/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent:      #3b52a0;        /* deep indigo-blue */
  --accent-soft: #eef0f9;        /* very light accent tint */
  --text:        #1a1a2e;        /* near-black */
  --text-muted:  #5c5f73;
  --border:      #e0e2ef;
  --bg:          #ffffff;
  --bg-alt:      #f7f8fc;
  --nav-h:       60px;
  --max-w:       820px;
  --font:        'Inter', system-ui, sans-serif;
  --badge-bg:    #fff3cd;
  --badge-color: #7a5200;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Utility ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Navigation ── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.nav-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}

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

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Header / Hero ── */
header {
  padding: calc(var(--nav-h) * 0.5 + 2.5rem) 0 3rem;
  border-bottom: 1px solid var(--border);
}

.hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 3px solid var(--border);
}

.hero-text h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.hero-title {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

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

.hero-title a:hover {
  text-decoration: underline;
}

.hero-bio {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  max-width: 600px;
}

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

.hero-bio a:hover {
  text-decoration: underline;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1.5px solid var(--accent);
  border-radius: 5px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Sections ── */
section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.subsection-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 1rem;
  letter-spacing: -0.01em;
}

/* ── Research section ── */
#research p {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.research-list {
  margin: 0.75rem 0 1rem 1.25rem;
  font-size: 0.95rem;
}

.research-list li {
  margin-bottom: 0.6rem;
}

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

.pub-item {
  padding: 1.1rem 0 1.1rem 0;
  border-bottom: 1px solid var(--border);
  counter-increment: pub-counter;
}

.pub-item:first-child {
  padding-top: 0;
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-title {
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.pub-authors {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.pub-venue {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.pub-note {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  font-style: italic;
}

.pub-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: var(--badge-bg);
  color: var(--badge-color);
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-left: 0.5rem;
  vertical-align: middle;
  white-space: nowrap;
}

.pub-links {
  font-size: 0.82rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pub-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.pub-links a:hover {
  text-decoration: underline;
}

/* ── Teaching ── */
.teaching-block {
  margin-bottom: 1.75rem;
}

.teaching-block h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.role-tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

.course-list {
  list-style: none;
  padding: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.course-list li {
  padding: 0.2rem 0;
  padding-left: 1rem;
  position: relative;
}

.course-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
}

/* ── Contact ── */
#contact p {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

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

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

/* ── Footer ── */
footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

footer p {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

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

/* ── Responsive ── */
@media (max-width: 680px) {
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .hero-bio {
    text-align: left;
  }

  .hero-links {
    justify-content: center;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.2rem;
  }

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

  .nav-links a {
    font-size: 0.95rem;
    padding: 0.5rem 0.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .pub-badge {
    display: block;
    margin-left: 0;
    margin-top: 0.3rem;
    width: fit-content;
  }

  .section-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 400px) {
  .hero-photo {
    width: 130px;
    height: 130px;
  }
}
