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

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --bg: #e8ede1;
  --surface: #dce5d3;
  --surface2: #cddbc0;
  --border: #b8cab0;
  --text: #1e2d18;
  --muted: #5a7050;
  --forest: #2e5c22;
  --forest2: #4d8a38;
  --forest-light: rgba(46,92,34,0.10);
  --sans: 'DM Sans', system-ui, sans-serif;
  --serif: 'DM Serif Display', Georgia, serif;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(40,32,15,0.07), 0 1px 2px rgba(40,32,15,0.05);
  --shadow-md: 0 4px 16px rgba(40,32,15,0.10), 0 1px 4px rgba(40,32,15,0.06);
  --shadow-lg: 0 12px 40px rgba(40,32,15,0.13), 0 2px 8px rgba(40,32,15,0.07);
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.65; font-weight: 300; -webkit-font-smoothing: antialiased; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(232,237,225,0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem,5vw,4rem);
  transition: box-shadow 0.2s;
}
nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-name { font-family: var(--sans); font-size: 0.92rem; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 0.25rem; list-style: none; }
.nav-links a {
  font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  padding: 0.35rem 0.7rem; border-radius: 20px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--forest); background: var(--forest-light); }
.nav-links a.active { color: var(--forest); background: var(--forest-light); font-weight: 500; }

/* ── LAYOUT ── */
.wrap { max-width: 880px; margin: 0 auto; padding: 0 clamp(1.5rem,5vw,3rem); }
section { padding: 5.5rem 0; border-bottom: 1px solid var(--border); }
.eyebrow {
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--forest);
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 2.2rem;
}
.eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--border); }
a { color: var(--forest); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--forest); }

/* ── SCROLL FADE ── */
.fade-up { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-up.visible { opacity: 1; transform: none; }

/* ── HERO BANNER ── */
.hero-banner {
  width: 100%;
  overflow: hidden; position: relative;
}
.hero-banner img {
  width: 100%; height: auto;
  display: block;
}
.hero-banner::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(40,32,15,0.12) 0%, rgba(40,32,15,0.40) 100%);
}

/* ── ABOUT HERO ── */
#about { background: var(--bg); padding-top: 0; padding-bottom: 5.5rem; }

.hero-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 3rem;
  margin-top: -4rem;
  position: relative; z-index: 2;
}

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

.hero-photo-wrap { position: relative; }
.hero-photo {
  width: 160px; height: 160px;
  object-fit: cover; object-position: center top;
  border-radius: 50%;
  border: 4px solid var(--bg);
  box-shadow: var(--shadow-md);
  display: block;
}

.hero-title-block { display: flex; flex-direction: column; justify-content: center; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem,4vw,3rem);
  font-weight: 400; line-height: 1.08;
  letter-spacing: -0.01em; margin-bottom: 0.75rem;
}
.hero-sub { font-family: var(--sans); font-size: 0.9rem; font-weight: 400; letter-spacing: 0.01em; color: var(--muted); margin-bottom: 0.3rem; }
.hero-sub:last-of-type { margin-bottom: 0; }

.hero-bio {
  font-size: 0.96rem; line-height: 1.78; margin-top: 2rem;
  padding-top: 2rem; border-top: 1px solid var(--border);
}
.hero-bio p + p { margin-top: 0.9rem; }
.bio-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.bio-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.8rem; align-items: start; }
.bio-emoji { font-size: 1.2rem; line-height: 1.7; }

/* ── RESEARCH ── */
#research  { background: var(--surface); }
#publications { background: var(--bg); }
#education { background: var(--surface); }
#cv { background: var(--bg); }
#news { background: var(--surface); }
#contact { background: var(--bg); }
.research-focus {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--forest);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2.5rem;
}
#publications .pub-group { background: none; }
#education .edu-timeline::before { background: var(--border); }
#education .edu-timeline { margin-bottom: 0; }
.eyebrow.fade-up[style] { display: flex; }
#cv .cv-box { background: var(--bg); }
#news .news-item { background: none; }
#contact .ccard { background: var(--surface); }
.research-focus p { font-size: 0.95rem; line-height: 1.78; }
.research-focus p + p { margin-top: 0.8rem; }

.rg { display: flex; flex-direction: column; gap: 1.1rem; }

.rc {
  padding: 1.6rem 1.8rem 1.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  border-top: 3px solid var(--forest);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rc:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rc-feature { display: grid; grid-template-columns: 280px 1fr; gap: 0; padding: 0; overflow: hidden; align-items: stretch; }
.rc-feature .rc-body { padding: 1.6rem 1.8rem 1.8rem; }
.rc-fig { background: var(--surface); display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--border); position: relative; padding: 12px; }
.rc-fig:has(.rc-fig-label)::before { content: ''; position: absolute; inset: 16px; border: 1.5px dashed var(--border); border-radius: 4px; pointer-events: none; }
.rc-fig:has(.rc-fig-label) { min-height: 220px; padding: 0; }
.rc-fig img { width: 100%; height: auto; max-height: 100%; object-fit: contain; display: block; cursor: zoom-in; transition: opacity 0.15s; }
.rc-fig img:hover { opacity: 0.88; }

/* Multi-figure carousel inside an rc-fig */
.rc-fig-multi { position: relative; padding-bottom: 24px; }
.rc-fig-track { width: 100%; display: flex; align-items: center; justify-content: center; }
.rc-fig-track img { display: none; }
.rc-fig-track img[data-active="true"] { display: block; }
.rc-fig-dots { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; }
.rc-fig-dot { width: 7px; height: 7px; border-radius: 50%; border: none; padding: 0; background: var(--border); cursor: pointer; transition: background 0.15s, transform 0.15s; }
.rc-fig-dot:hover { background: var(--muted); }
.rc-fig-dot.is-active { background: var(--forest); transform: scale(1.2); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(20,28,18,0.92); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 4rem 2rem; backdrop-filter: blur(6px); }
.lightbox.open { display: flex; animation: lb-fade 0.18s ease; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,0.5); border-radius: 4px; background: #fff; }
.lightbox-controls { position: absolute; top: 1.2rem; right: 1.2rem; display: flex; gap: 0.5rem; }
.lb-btn { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; padding: 0.55rem 1rem; border-radius: 30px; background: rgba(255,255,255,0.95); color: var(--text); border: none; cursor: pointer; text-decoration: none; transition: background 0.15s, transform 0.15s; }
.lb-btn:hover { background: #fff; transform: translateY(-1px); }
.lb-btn.lb-close { background: rgba(255,255,255,0.18); color: #fff; }
.lb-btn.lb-close:hover { background: rgba(255,255,255,0.28); color: #fff; }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: rgba(255,255,255,0.14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; transition: background 0.15s, transform 0.15s; padding: 0 0 4px 0; }
.lb-arrow:hover { background: rgba(255,255,255,0.28); }
.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }
.lb-arrow:hover { transform: translateY(-50%) scale(1.05); }
.rc-fig-label { font-size: 0.7rem; color: var(--muted); text-align: center; letter-spacing: 0.04em; line-height: 1.6; padding: 1rem; position: relative; z-index: 1; }
.rc-fig-label em { font-style: italic; opacity: 0.8; }
@media (max-width: 700px) {
  .rc-feature { grid-template-columns: 1fr; }
  .rc-fig { border-right: none; border-bottom: 1px solid var(--border); }
  .rc-fig:has(.rc-fig-label) { min-height: 160px; }
}
.rc:nth-child(2) { border-top-color: var(--forest2); }
.rc:nth-child(3) { border-top-color: var(--forest2); }
.rc:nth-child(4) { border-top-color: var(--forest); }
.rc-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.rc-links a {
  font-size: 0.73rem; font-weight: 500; color: var(--forest); text-decoration: none;
  border: 1px solid var(--border); padding: 0.2rem 0.6rem; border-radius: 20px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.rc-links a:hover { border-color: var(--forest); background: var(--forest-light); text-decoration: none; }
.rc-num { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.14em; color: var(--forest); margin-bottom: 0.6rem; opacity: 0.7; }
.rc h3 { font-family: var(--sans); font-size: 0.97rem; font-weight: 600; margin-bottom: 0.5rem; }
.rc p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ── PUBLICATIONS ── */
.pub-group { margin-bottom: 2.5rem; }
.pub-yr {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase;
  border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; margin-bottom: 1rem;
}
.pub-item {
  display: flex; gap: 1rem; padding: 1rem 0;
  border-bottom: 1px solid var(--border); align-items: flex-start;
  transition: background 0.15s;
  border-radius: 4px;
}
.pub-item:last-child { border-bottom: none; }
.pub-bar {
  width: 3px; flex-shrink: 0; margin-top: 6px; min-height: 36px;
  align-self: stretch; background: var(--border); border-radius: 2px;
  transition: background 0.2s;
}
.pub-item:hover .pub-bar { background: var(--forest); }
.pub-title { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; line-height: 1.45; margin-bottom: 0.25rem; }
.pub-authors { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.2rem; }
.pub-authors strong { color: var(--text); font-weight: 500; }
.pub-venue { font-size: 0.78rem; color: var(--muted); font-style: italic; }
.pub-link { font-style: normal; font-size: 0.78rem; color: var(--forest); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; word-break: break-all; }
.pub-link:hover { text-decoration-color: var(--forest); }
.pub-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; align-items: center; }
.bdg {
  font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.05em;
  padding: 0.18rem 0.5rem; border-radius: 20px; text-decoration: none;
  border: 1px solid var(--border); color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}
.bdg:hover { border-color: var(--forest); color: var(--forest); }
.bdg.doi { background: var(--surface); color: var(--forest); border-color: var(--border); }

/* ── CV ── */
.cv-box {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2.2rem 2.5rem;
  box-shadow: var(--shadow-sm);
}
.cv-box p { font-size: 0.9rem; color: var(--muted); max-width: 480px; line-height: 1.7; }

.cv-viewer {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.cv-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.75rem 1rem 0.75rem 1.2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cv-filename {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  color: var(--text); letter-spacing: 0.01em;
  min-width: 0;
}
.cv-filename span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-doc-ico { width: 16px; height: 16px; color: var(--forest); flex-shrink: 0; }
.cv-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.cv-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  background: var(--bg); color: var(--muted);
  border: 1px solid var(--border); border-radius: 20px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}
.cv-btn svg { width: 13px; height: 13px; }
.cv-btn:hover { border-color: var(--forest); color: var(--forest); background: var(--forest-light); text-decoration: none; transform: translateY(-1px); }
.cv-btn-primary { background: var(--forest); color: #fff; border-color: var(--forest); }
.cv-btn-primary:hover { background: var(--forest2); border-color: var(--forest2); color: #fff; }
.cv-embed {
  position: relative;
  height: clamp(520px, 78vh, 900px);
  background: var(--surface2);
}
.cv-embed object { width: 100%; height: 100%; display: block; border: 0; }
.cv-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 2rem; text-align: center;
}
.cv-fallback p { font-size: 0.9rem; color: var(--muted); }
@media (max-width: 700px) {
  .cv-toolbar { flex-wrap: wrap; }
  .cv-btn span { display: none; }
  .cv-btn { padding: 0.45rem 0.6rem; }
  .cv-embed { height: 70vh; }
}
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.76rem; letter-spacing: 0.07em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  padding: 0.7rem 1.6rem;
  background: var(--forest); color: #fff;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(61,96,48,0.25);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.btn:hover { background: var(--forest2); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(61,96,48,0.30); }

/* ── NEWS ── */
.news-item {
  display: grid; grid-template-columns: 88px 1fr; gap: 1.2rem;
  padding: 1.3rem 0; border-bottom: 1px solid var(--border); align-items: start;
  transition: color 0.15s;
}
.news-item:last-child { border-bottom: none; }
.news-date { font-family: var(--sans); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); padding-top: 3px; text-transform: uppercase; }
.news-title { font-family: var(--sans); font-size: 0.93rem; font-weight: 500; margin-bottom: 0.25rem; line-height: 1.42; }
.news-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-links-row { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.6rem; }
.ccard-full { grid-column: 1 / -1; }
.ccard {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  background: var(--bg);
}
.ccard:hover { border-color: var(--forest2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ccard .cval + .cval { margin-top: 0.2rem; }
.clabel { font-family: var(--sans); font-size: 0.63rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--forest); display: block; margin-bottom: 0.5rem; font-weight: 600; }
.cval { font-size: 0.9rem; }

.chip-ico { width: 14px; height: 14px; flex-shrink: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.73rem; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; padding: 0.4rem 0.9rem;
  border: 1px solid var(--border); border-radius: 20px;
  color: var(--muted); background: var(--bg);
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}
.chip:hover { border-color: var(--forest); color: var(--forest); background: var(--forest-light); transform: translateY(-1px); }

footer {
  text-align: center; padding: 2.5rem;
  font-family: var(--sans); font-size: 0.67rem;
  letter-spacing: 0.08em; color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── EDUCATION TIMELINE ── */
.edu-timeline { position: relative; padding-left: 2rem; }
.edu-timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--border); }
.edu-item { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 0.4rem 1.5rem; padding-bottom: 2.5rem; align-items: start; }
.edu-item:last-child { padding-bottom: 0; }
.edu-dot { position: absolute; left: -2rem; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--forest); box-shadow: 0 0 0 3px var(--forest-light); }
.edu-degree { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.edu-school { font-size: 0.85rem; color: var(--forest); margin-top: 0.2rem; }
.edu-detail { font-size: 0.83rem; color: var(--muted); margin-top: 0.4rem; line-height: 1.6; }
.edu-advisor { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); margin-top: 0.25rem; letter-spacing: 0.03em; }
.edu-year { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.05em; white-space: nowrap; padding-top: 3px; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-photo { width: 110px; height: 110px; }
  .hero-card { padding: 1.8rem 1.4rem; margin-top: -2.5rem; }
  .rg { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .cv-box { flex-direction: column; align-items: flex-start; }
  .nav-links { display: none; }

}