:root {
  --bg: #f9fafb;
  --bg-alt: #ffffff;
  --ink: #111827;
  --ink-soft: #6b7280;
  --line: #e5e7eb;
  --accent: #1d4ed8;
  --accent-dark: #1e3a8a;
  --accent-light: #eff6ff;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 14px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-dark); }

.container {
  width: min(1040px, 92vw);
  margin: 0 auto;
}

.section { padding: 5rem 0; }

.alt-bg {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ── Typography ─────────────────────────────────── */
h1, h2, h3 { margin: 0 0 1rem; line-height: 1.2; }

h1 {
  font-family: "Lora", Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-family: "Lora", Georgia, serif;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 600;
}

h3 {
  font-size: 1.02rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-top: 2rem;
  margin-bottom: 0.85rem;
}

p { margin: 0 0 0.85rem; }

/* ── Nav ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 250, 251, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  font-family: "Lora", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.top-nav { display: flex; gap: 0.15rem; }

.top-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: background 120ms, color 120ms;
}
.top-nav a:hover {
  background: var(--line);
  color: var(--ink);
}

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

/* ── Hero ───────────────────────────────────────── */
.hero { padding-top: 6rem; padding-bottom: 6rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: start;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0.5rem 0 1.75rem;
}

.divider {
  width: 2.5rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.profile-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 120ms, color 120ms, transform 120ms, box-shadow 120ms;
  color: inherit;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

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

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--ink) !important;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent) !important; }

/* ── CV ─────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
}

.timeline-item {
  display: flex;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
  align-items: flex-start;
}
.timeline-item > div { flex: 1; }
.timeline-item p { margin: 0.2rem 0; color: var(--ink-soft); font-size: 0.95rem; }
.timeline-item strong { color: var(--ink); font-size: 0.95rem; display: block; margin-bottom: 0.2rem; }

.date-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-variant-numeric: tabular-nums;
}

.skills-grid { display: flex; flex-direction: column; gap: 1.1rem; }
.skill-group p:not(.skill-label) { margin: 0.15rem 0; font-size: 0.95rem; }
.skill-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 0.08rem !important;
}

/* ── Research ───────────────────────────────────── */
.section-sub {
  font-size: 1.02rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.pub-list {
  padding-left: 1.4rem;
  margin: 0 0 0.5rem;
}
.pub-list li {
  margin-bottom: 1.2rem;
  font-size: 0.975rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.pub-list li em { color: var(--ink); }

.tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent) !important;
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 120ms, color 120ms;
}
.tag:hover { background: var(--accent); color: #fff !important; }

.disclaimer {
  display: inline-block;
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  margin-bottom: 0.75rem;
}

.chapter-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 1rem; }

.chapter {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-alt);
}

.chapter summary {
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  font-size: 0.95rem;
  list-style: none;
  user-select: none;
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  color: var(--ink);
  transition: background 120ms;
}
.chapter summary::-webkit-details-marker { display: none; }
.chapter summary::before {
  content: '+';
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
.chapter[open] > summary::before { content: '\2212'; }
.chapter[open] > summary { border-bottom: 1px solid var(--line); background: var(--bg); }
.chapter summary:hover { background: var(--bg); }

.ch-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  flex-shrink: 0;
}

.chapter-body {
  padding: 1rem 1.2rem;
}
.chapter-body p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* ── Teaching ───────────────────────────────────── */
.teaching-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.teaching-role h3 { margin-top: 0; }
.teaching-list { padding-left: 1.2rem; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.teaching-list li { font-size: 0.975rem; color: var(--ink-soft); line-height: 1.5; }

@media (max-width: 640px) {
  .teaching-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ── Shared ─────────────────────────────────────── */
.muted { color: var(--ink-soft); font-size: 0.95rem; }

/* ── Contact ────────────────────────────────────── */
.contact { padding-bottom: 6rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: end;
}

.email-link {
  display: inline-block;
  font-family: "Lora", Georgia, serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: color 120ms;
}
.email-link:hover { color: var(--accent); }

.dept { margin-top: 1.25rem !important; line-height: 1.7; }

.contact-image {
  width: min(260px, 100%);
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: block;
}

/* ── Footer ─────────────────────────────────────── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
}
.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.footer-wrap p { margin: 0; }
.footer-wrap a { color: var(--ink-soft); }
.footer-wrap a:hover { color: var(--accent); }

/* ── Scroll reveal ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 860px) {
  .hero-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-photo { order: -1; }
  .profile-image { width: 130px; height: 130px; }
  .two-col { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-image { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .hero { padding-top: 4rem; padding-bottom: 4rem; }
  .menu-btn { display: inline-flex; align-items: center; }
  .top-nav {
    position: absolute;
    right: 4vw;
    top: 66px;
    flex-direction: column;
    gap: 0.1rem;
    background: var(--bg-alt);
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 150ms, transform 150ms;
  }
  .top-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .top-nav a { padding: 0.5rem 1rem; border-radius: 6px; }
}
