/* ===== Base ===== */

:root {
  --bg-body: #f3f4f6;
  --bg-card: #ffffff;
  --bg-nav: #111827;
  --accent: #6694f7;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-subtle: #e5e7eb;
  --radius-lg: 0.5rem;
  --shadow-soft: 0 4px 5px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top left, #dbeafe 0, #f3f4f6 40%, #f9fafb 100%);
}

p,
li {
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--text-main);
}

/* ===== Top Navigation ===== */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  color: #f9fafb;
  box-shadow: var(--shadow-soft);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.brand-role {
  font-size: 0.75rem;
  color: #9ca3af;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.nav-links a:hover {
  background: rgba(249, 250, 251, 0.08);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-links a.active {
  background: var(--accent-soft);
  color: #ffffff;
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 1.35rem;
  cursor: pointer;
}

/* ===== Layout ===== */

.page-wrapper {
  max-width: 1400px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

/* Left sidebar */
.sidebar {
  flex: 0 0 280px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.3);
  position: sticky;
  top: 5rem;
}

/* Profile block */
.profile {
  text-align: center;
  margin-bottom: 1.5rem;
}

.profile-photo {
  width: 180px;
  height: 250px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(37, 99, 235, 0.2);
  background: #e5e7eb;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.profile-title {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

.profile-summary {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Contact info */
.contact h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.4rem;
}

.contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.contact li + li {
  margin-top: 0.4rem;
}

.contact a {
  color: var(--accent);
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

/* Contact icons layout */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* A horizontal row for icons */
.contact-icons-row {
  display: flex;
  justify-content: space-between;   /* ← distribute evenly */
  align-items: center;
  width: 100%;
  margin-bottom: 0rem;
	margin-top: 0.875rem;
}

.contact-icon {
  flex: 1;                           /* each icon takes equal width */
  display: flex;
  justify-content: center;           /* center the icon inside its column */
}

.contact-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.18s ease;
}

.contact-icon img:hover {
  transform: scale(1.18);
}


/* Keep phone/location normal text */
.contact-list li {
  margin-top: 0.4rem;
}

.contact-list li strong {
  color: var(--text-main);
}

.contact-text {
  display: flex;
  align-items: center;
  justify-content: center;       /* center horizontally */
  gap: 0.5rem;                   /* spacing between icon and text */
  margin: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--text-main);
  list-style: none;
}

.contact-text-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.85;
}


/* Right content */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.content p a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
  font-size: 0.85rem;
}

/* Sections */
.section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
  scroll-margin-top: 5.5rem; /* for anchor offset */
}

.section h2 {
  margin-top: 0;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Generic item styling */
.item + .item {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
}

.item h3 {
  margin: 0;
  font-size: 1rem;
}

.item-meta {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Timeline (News) */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  position: relative;
  padding-left: 1.75rem;  /* space for line and dots */
}

/* Inner scrollable content */
.timeline-inner {
  position: relative;
  padding-left: 0.125rem;  /* spacing between line and text */
}

/* The vertical line (drawn in the inner container, so it scrolls) */
.timeline-inner::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;       /* NOW it scrolls with content */
  left: -1rem;     /* adjusts position of the vertical line */
  width: 2px;
  background: rgba(148, 163, 184, 0.6);
}

/* List item */
.timeline li {
  position: relative;
  margin-bottom: 0.7rem;
}

/* Dot (attached relative to li, so it scrolls too) */
.timeline li::before {
  content: "";
  position: absolute;
  top: 0.25rem;
  left: -22px;   /* positions circle on the line */
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
}

/* Date + inline text */
.timeline li p {
  display: inline;
  margin-left: 0.875rem;
}

.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.2rem;
}


/* Education */
/* Two-column layout for education items */
.edu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

/* The text takes most of the width */
.edu-text {
  flex: 1;
}

/* Education images */
.edu-img {
  width: auto;       /* adjust size */
  height: 90px;
  object-fit: cover; /* crop nicely */
  /* border: 1px solid var(--border-subtle); */
}

/* Publications */
/* Publications layout */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub-item {
  display: flex;
	align-items: center;
  gap: 3rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.pub-img img {
  width: 400px;
  height: 225px;
  object-fit: cover;      /* crop nicely */
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.pub-content {
  flex: 1;
}

.pub-title {
  font-size: 1rem;
  margin: 0 0 1rem;
  font-weight: 600;
}

.pub-authors {
  font-size: 0.9rem;
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.pub-conf {
  font-size: 0.9rem;
  margin: 0 0 1rem;
  color: var(--accent);
  font-weight: 500;
}

.pub-links a {
  margin-right: 0.8rem;
  font-size: 1.2rem;
  color: var(--accent);
  text-decoration: underline;
}

/* Responsive: stack image on top on mobile */
@media (max-width: 600px) {
  .pub-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .pub-img img {
    width: 100%;
    height: auto;
  }
}

/* Internship */
.intern-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* The text takes most of the width */
.intern-text {
  flex: 1;
}

.intern-img {
  width: auto;       /* adjust size */
  height: 90px;
  object-fit: cover; /* crop nicely */
  /* border: 1px solid var(--border-subtle); */
}

.intern-content ul li {
  line-height: 1.6;   /* increase spacing */
}


/* Projects */
/* Project grid container */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Project card */
.project-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);   /* slight lift */
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
  border-color: rgba(37, 99, 235, 0.4); /* optional accent border */
}

/* Project image */
.project-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-subtle);
}

/* Project title */
.project-title {
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
}

/* Project description */
.project-desc {
  font-size: 0.6rem;
  line-height: 1.5;
  margin: 0 0 0.5rem;
  flex-grow: 1; /* pushes link to bottom when card is tall */
}

/* Project link */
.project-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.3rem 0;
}

.project-link:hover {
  text-decoration: underline;
}


/* Section links */
.section a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.section a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.25rem 1.5rem 2.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */

/* Medium screens: stack sidebar and main content */
@media (max-width: 960px) {
  .page-wrapper {
    flex-direction: column;
    padding-inline: 1rem;
  }

  .sidebar {
    position: static;
    width: 100%;
  }
}

/* Small screens: mobile nav, tighter spacing */
@media (max-width: 720px) {
  .nav-inner {
    padding-inline: 1rem;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg-nav);
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    gap: 0.35rem;
    display: none;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
  }

  .top-nav.open .nav-links {
    display: flex;
  }

  .nav-links a {
    width: 100%;
  }

  .page-wrapper {
    margin-top: 1rem;
  }

  .section {
    padding: 1.1rem 1.1rem 1.3rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .profile-photo {
    width: 100px;
    height: 100px;
  }

  .profile-name {
    font-size: 1.15rem;
  }

  .profile-summary {
    font-size: 0.85rem;
  }

  .section h2 {
    font-size: 1.05rem;
  }
}
