/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream:        #fdf6ec;
  --cream-alt:    #f5ece0;
  --cream-dark:   #ede0cf;
  --ink:          #2c2416;
  --ink-muted:    #6b5c47;
  --accent:       #5a7a5e;
  --accent-light: #e8f0e9;
  --gold:         #9b7b2e;
  --gold-light:   #fef3c7;
  --border:       #e0d4c3;
  --nav-h:        64px;
  --max-w:        860px;
  --font-serif:   'Lora', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;
  --radius:       8px;
  --shadow:       0 2px 12px rgba(44,36,22,0.08);
}

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.7;
}

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

/* =============================================
   NAV
   ============================================= */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 246, 236, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img {
  height: 44px;
  width: auto;
  display: block;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.2s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--ink);
  padding: 0.25rem;
}

.nav-mobile {
  display: none;
  list-style: none;
  flex-direction: column;
  background: var(--cream);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  gap: 0.75rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
}

/* =============================================
   SHARED
   ============================================= */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

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

.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* =============================================
   HERO
   ============================================= */
#hero {
  background: var(--cream);
  padding: calc(var(--nav-h) + 3rem) 1.5rem 5rem;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-photo-wrap {
  flex-shrink: 0;
  width: 220px;
}

.hero-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--cream-dark);
  box-shadow: 0 4px 24px rgba(44,36,22,0.12);
  display: block;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--ink-muted);
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-muted);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.65;
}

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

.badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--accent);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.badge:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1rem;
  font-size: 0.975rem;
}

.about-aside {
  font-size: 0.875rem !important;
  color: var(--ink-muted);
  font-style: italic;
  border-left: 3px solid var(--cream-dark);
  padding-left: 1rem;
  margin-top: 1.5rem !important;
}

.about-interests h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.about-interests ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-interests li {
  font-size: 0.875rem;
  color: var(--ink-muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.5;
}
.about-interests li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* =============================================
   NEWS
   ============================================= */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  align-items: start;
}

.news-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.2rem;
  white-space: nowrap;
}

.news-body {
  font-size: 0.94rem;
  color: var(--ink);
  line-height: 1.65;
}

.news-body a {
  color: var(--accent);
  font-weight: 500;
}

/* =============================================
   PUBLICATIONS
   ============================================= */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.pub-card {
  background: var(--cream-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  transition: box-shadow 0.2s;
}
.pub-card:hover { box-shadow: var(--shadow); }

.pub-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.pub-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.18rem 0.6rem;
  border-radius: 99px;
}
.pub-type.journal {
  background: var(--accent-light);
  color: var(--accent);
}
.pub-type.preprint {
  background: var(--gold-light);
  color: #92400e;
}
.pub-type.under-review {
  background: #e8e8f5;
  color: #4a4a8a;
}

.pub-year {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

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

.pub-venue {
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-bottom: 0.65rem;
}

.pub-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}
.pub-link:hover { text-decoration: underline; }

/* Talks block */
.talks-block {
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
}

.talks-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
}

.talks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.talks-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.talk-venue {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.talk-title {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-style: italic;
}

.talk-video-link {
  display: inline-block;
  margin-left: 0.6rem;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #c00;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
  transition: background 0.2s;
}
.talk-video-link:hover {
  background: #a00;
  text-decoration: none;
}

/* =============================================
   RESEARCH JOURNEY TIMELINE
   ============================================= */
.research-intro {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 1rem;
  margin-bottom: 3rem;
  margin-top: -1rem;
}

.timeline {
  position: relative;
  padding-left: 2.25rem;   /* spine offset + breathing room */
}

/* Vertical spine — centered at 9px from timeline left */
.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--border) 0%, var(--accent) 100%);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.25rem;
}
.timeline-item:last-child { padding-bottom: 0; }

/* Dot sits on the spine (center = 9px + 1px half-spine = 10px from timeline left;
   item left edge = 2.25rem ≈ 36px;
   dot left: 36px back = -2.25rem, then +3px to center 14px dot on 9px spine) */
.timeline-dot {
  position: absolute;
  left: calc(-2.25rem + 2px);   /* centers 14px dot on the 2px spine at left:9px */
  top: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--cream-alt);
  box-shadow: 0 0 0 2px var(--accent);
  z-index: 1;
}

.active-dot {
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px var(--accent-light);
}

/* Timeline card */
.timeline-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  transition: box-shadow 0.2s;
}
.timeline-card:hover { box-shadow: var(--shadow); }

.timeline-card-active {
  border-color: var(--accent);
  border-width: 1.5px;
}

.timeline-year {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.timeline-card-header {
  margin-bottom: 0.85rem;
}

.timeline-card-header h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.timeline-org {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 0.15rem;
  line-height: 1.4;
}

/* Award badges */
.timeline-award {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
}

.award-gold {
  background: var(--gold-light);
  color: #92400e;
}

.award-distinction {
  background: #e8e8f5;
  color: #4a4a8a;
}

.award-astar {
  background: var(--accent-light);
  color: var(--accent);
}

.active-badge {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  white-space: nowrap;
  vertical-align: middle;
}

/* The science question — styled prominently */
.timeline-question {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.65rem;
  line-height: 1.5;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.timeline-tags span {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

/* =============================================
   CONTACT
   ============================================= */
.contact-container {
  text-align: center;
}

.contact-intro {
  max-width: 520px;
  margin: 0 auto 2.5rem;
  font-size: 0.975rem;
  color: var(--ink-muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--cream-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
  text-decoration: none;
}

.contact-icon { font-size: 1rem; }

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--cream-dark);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* =============================================
   RESPONSIVE — MOBILE
   ============================================= */
@media (max-width: 700px) {
  /* Nav */
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  #navbar { height: auto; min-height: var(--nav-h); }

  /* Hero */
  .hero-inner {
    flex-direction: column-reverse;
    gap: 2rem;
    text-align: center;
  }

  .hero-photo-wrap {
    width: 160px;
  }

  .hero-photo {
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }

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

  .hero-tagline {
    max-width: 100%;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* News */
  .news-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  /* Timeline — same structure works, just tighten spacing */
  .timeline {
    padding-left: 1.75rem;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline-dot {
    left: calc(-1.75rem + 0px);
  }

  .timeline-card-header {
    flex-direction: column;
    gap: 0.4rem;
  }

  /* Talks */
  .talk-venue { font-size: 0.72rem; }

  /* Contact */
  .contact-links { flex-direction: column; align-items: center; }
  .contact-item { width: 100%; max-width: 320px; justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 3.5rem 1.25rem; }
  .hero-name { font-size: 2.2rem; }
  .section-title { font-size: 1.5rem; }
}
