/* ── VARIABLES ── */
:root {
  --ink: #1a1a2e;
  --body: #3a3a4a;
  --muted: #7a7a8a;
  --rule: #d8d8e0;
  --bg: #fafaf8;
  --bg-alt: #f0f0ec;
  --accent: #2c5f7c;
  --accent-light: #e8f0f5;
  --serif: 'Crimson Pro', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 17px; }

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

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
nav .nav-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav .nav-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
nav .nav-links { display: flex; gap: 1.8rem; }
nav .nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}
nav .nav-links a:hover,
nav .nav-links a.active { color: var(--ink); }

/* ── LAYOUT ── */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 4rem 0; }
section + section { border-top: 1px solid var(--rule); }

/* ── PAGE HEADER ── */
.page-header {
  padding-top: 7.5rem;
  padding-bottom: 0.25rem;   /* was 2rem */
}
.page-header h1 {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.2;
}
.page-header .page-subtitle {
  font-size: 0.95rem;
  color: var(--body);        /* was var(--muted) */
  margin-top: 0.5rem;
}

/* ── HERO (index/about landing) ── */
.hero {
  padding-top: 8rem;
  padding-bottom: 0.25rem;    /* was 3rem */
  border-bottom: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-photo {
  width: 150px;
  background: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted);
  overflow: hidden;
}
.hero-photo img { width: 100%; display: block; }
.hero h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.hero .subtitle {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.hero .affiliation {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}
.hero .hero-links {
  margin-top: 1rem;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.hero .hero-links a {
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.35rem 0.9rem;
  border-radius: 3px;
  transition: all 0.2s;
}
.hero .hero-links a:hover {
  background: var(--accent);
  color: #fff;
}

/* ── SECTION HEADINGS ── */
.section-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 1.8rem;
  letter-spacing: 0.01em;
}

/* ── ABOUT (body text) ── */
.about p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.research-interests {
  margin-top: 1.5rem;
  padding: 1.3rem 1.5rem;
  background: var(--bg-alt);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}
.research-interests h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.research-interests p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ── RESEARCH PAGE ── */
.research-block { padding: 3rem 0; }
.research-block + .research-block { border-top: 1px solid var(--rule); }
.research-block h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 1.2rem;
  line-height: 1.3;
}
.research-block p { font-size: 0.95rem; margin-bottom: 1rem; }
.research-block p:last-of-type { margin-bottom: 0; }
.research-block a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.research-block a:hover { border-bottom-color: var(--accent); }

.figure-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.figure-group.single { grid-template-columns: 1fr; }
.figure-slot {
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  margin: 1.5rem auto;
}
.figure-slot img { width: 100%; display: block; }
.figure-slot .placeholder {
  padding: 3rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}
.figure-slot figcaption {
  padding: 0.6rem 0.9rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  line-height: 1.45;
}

.paper-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-light);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  border-bottom: none !important;
  transition: background 0.2s;
  margin: 0.15rem 0.1rem;
}
.paper-ref:hover { background: #d4e6ef; border-bottom: none !important; }

/* ── TEACHING PAGE ── */
.teaching-section { margin-bottom: 2.8rem; }
.teaching-section:last-child { margin-bottom: 0; }
.teaching-heading {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.teaching-list {
  list-style: none;
  padding: 0;
}
.teaching-list li {
  position: relative;
  padding: 0.8rem 0 0.8rem 1.2rem;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--rule);
}
.teaching-list li:last-child { border-bottom: none; }
.teaching-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.teaching-list a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.teaching-list a:hover { border-bottom-color: var(--accent); }

.mentee-entry {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.mentee-entry:last-child { border-bottom: none; }
.mentee-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}
.mentee-current {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.mentee-project {
  font-size: 0.88rem;
  margin-top: 0.3rem;
}
.mentee-project .type {
  font-weight: 500;
  color: var(--body);
}
.mentee-project .dates {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── FOOTER ── */
footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  html { font-size: 15px; }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .hero .hero-links { justify-content: center; }
  nav .nav-links { gap: 1rem; }
  nav .nav-links a { font-size: 0.75rem; }
  .figure-group { grid-template-columns: 1fr; }
}
