:root {
  --bg: #f7f2e9;
  --bg-soft: #fbf8f2;
  --bg-tint: #efe5d8;
  --paper: #fffdf9;
  --ink: #2c2926;
  --muted: #6f665f;
  --accent: #886d59;
  --accent-dark: #5f4a3c;
  --accent-soft: #d8c6b4;
  --sage: #8a907f;
  --line: #d9cfc3;
  --line-dark: rgba(255,255,255,.16);
  --dark: #342c28;
  --dark-soft: #443831;
  --shadow: 0 18px 55px rgba(59, 45, 36, .08);
  --shadow-soft: 0 10px 30px rgba(59, 45, 36, .06);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1180px;
  --narrow: 960px;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-body: Aptos, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.74;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1.18em; }
h1,h2,h3,h4 { margin: 0; color: var(--ink); }
h1,h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.025em; }
h3,h4 { font-weight: 650; letter-spacing: -.012em; }

.container { width: min(calc(100% - 42px), var(--container)); margin-inline: auto; }
.container.narrow { width: min(calc(100% - 42px), var(--narrow)); }
.section { padding: 104px 0; position: relative; }
.section-soft { background: var(--bg-soft); }
.section-tint { background: var(--bg-tint); }

.skip-link { position:absolute; left:-9999px; top:auto; }
.skip-link:focus { left:16px; top:16px; z-index:1000; background:#fff; padding:10px 14px; border-radius:8px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,242,233,.91);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(95,74,60,.12);
}
.nav-wrap { min-height: 76px; display:flex; align-items:center; justify-content:space-between; gap:28px; }
.brand { display:flex; align-items:center; gap:12px; text-decoration:none; }
.brand-mark { width:42px; height:42px; display:grid; place-items:center; border:1px solid var(--accent-soft); border-radius:50%; color:var(--accent-dark); font-family:var(--font-display); font-size:15px; letter-spacing:.06em; background:rgba(255,255,255,.55); }
.brand-text { font-family:var(--font-display); font-size:18px; letter-spacing:-.01em; }
.site-nav { display:flex; gap:22px; align-items:center; }
.site-nav a { font-size:14px; text-decoration:none; color:#4e4741; padding:26px 0 24px; border-bottom:2px solid transparent; transition:.2s ease; }
.site-nav a:hover, .site-nav a:focus-visible { color:var(--accent-dark); border-bottom-color:var(--accent); }
.nav-toggle { display:none; background:transparent; border:0; padding:8px; }
.nav-toggle span { display:block; width:24px; height:2px; margin:5px; background:var(--ink); }

.hero { overflow:hidden; padding: 92px 0 98px; border-bottom:1px solid var(--line); }
.hero-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr); gap:72px; align-items:center; }
.hero-copy { position:relative; z-index:2; }
.eyebrow { margin:0 0 18px; text-transform:uppercase; letter-spacing:.17em; font-size:12px; font-weight:700; color:var(--accent); }
.hero h1 { font-size:clamp(54px,7vw,92px); line-height:.96; max-width:780px; }
.hero-role { margin:26px 0 18px; font-size:18px; font-weight:650; color:var(--accent-dark); }
.hero-lead { max-width:760px; font-size:20px; line-height:1.72; color:#514943; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:30px; }
.button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 18px; border-radius:999px; text-decoration:none; font-size:14px; font-weight:650; transition:transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform:translateY(-1px); }
.button-primary { background:var(--accent-dark); color:#fffaf4; box-shadow:0 7px 20px rgba(95,74,60,.18); }
.button-ghost { border:1px solid var(--line); background:rgba(255,255,255,.62); }
.hero-tags { margin-top:30px; display:flex; flex-wrap:wrap; gap:9px; }
.hero-tags span { border:1px solid var(--accent-soft); background:#f3ebe1; border-radius:999px; padding:7px 11px; font-size:12px; color:#5f5148; }
.hero-portrait-wrap { position:relative; }
.portrait-frame { padding:12px; border:1px solid var(--accent-soft); background:rgba(255,255,255,.65); border-radius:46% 46% 18px 18px; box-shadow:var(--shadow); transform:rotate(.7deg); }
.hero-portrait { width:100%; aspect-ratio:4/5; object-fit:cover; object-position:center top; border-radius:44% 44% 14px 14px; filter:saturate(.92) contrast(.98); }
.hero-orbit { position:absolute; border:1px solid rgba(136,109,89,.18); border-radius:50%; pointer-events:none; }
.orbit-one { width:460px; height:460px; right:-160px; top:-180px; }
.orbit-two { width:240px; height:240px; left:-110px; bottom:-100px; }

.section-heading {
  position:relative;
  margin:0 0 48px;
  padding:30px 34px 32px;
  background:rgba(255,253,249,.72);
  border:1px solid rgba(136,109,89,.22);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
}
.section-heading::after { content:""; display:block; width:84px; height:2px; background:linear-gradient(90deg,var(--accent),var(--accent-soft)); margin-top:24px; }
.section-heading h2 { font-size:clamp(34px,4vw,52px); line-height:1.13; max-width:900px; }
.section-intro { max-width:850px; margin:18px 0 0; color:var(--muted); font-size:18px; line-height:1.72; }

.about-grid { display:grid; grid-template-columns:1.3fr .7fr; gap:50px; align-items:start; }
.prose { font-size:18px; line-height:1.8; }
.prose p + p { margin-top:1.05em; }
.about-facts { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:8px 26px; box-shadow:var(--shadow-soft); }
.about-facts div { display:grid; grid-template-columns:110px 1fr; gap:18px; padding:20px 0; border-bottom:1px solid var(--line); }
.about-facts div:last-child { border-bottom:0; }
.about-facts strong { color:var(--accent-dark); }
.about-facts span { color:#514943; line-height:1.55; }
.highlight-strip { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:38px; }
.highlight-strip > div { background:#f2e8dc; border:1px solid #dfd1c2; padding:22px; border-radius:var(--radius-sm); }
.highlight-year { display:block; color:var(--accent); font-size:13px; font-weight:700; margin-bottom:6px; }
.highlight-strip strong { line-height:1.45; display:block; }
.leadership-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:18px; }
.leadership-grid article { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-sm); padding:24px; }
.leadership-grid article > span { text-transform:uppercase; letter-spacing:.12em; font-size:10px; font-weight:800; color:var(--accent); }
.leadership-grid h3 { margin:8px 0 10px; }
.leadership-grid p { color:var(--muted); line-height:1.62; margin:0; }

.research-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:24px; }
.research-card { position:relative; background:var(--paper); border:1px solid #d8cabc; border-radius:var(--radius); padding:34px 34px 32px; box-shadow:var(--shadow-soft); overflow:hidden; transition:transform .2s ease, box-shadow .2s ease; }
.research-card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.research-card::before { content:""; position:absolute; inset:0 auto 0 0; width:5px; background:linear-gradient(var(--accent),var(--sage)); }
.card-number { font-family:var(--font-display); color:#b79d86; font-size:21px; }
.research-card h3 { font-family:var(--font-display); font-weight:600; font-size:28px; line-height:1.22; margin:8px 0 18px; }
.research-card p { color:#4f4944; line-height:1.75; }
.research-card p:last-child { margin-bottom:0; }
.research-card .small { font-size:15.5px; color:var(--muted); }

.methods-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.method-item { min-height:180px; background:linear-gradient(180deg,#fffdf9,#f5eee5); border:1px solid var(--line); border-radius:16px; padding:24px; }
.method-item h3 { font-size:17px; margin-bottom:12px; color:var(--accent-dark); }
.method-item p { font-size:14.5px; line-height:1.66; color:var(--muted); margin:0; }

.section-dark { background:var(--dark); color:#f6efe6; }
.section-dark .section-heading { background:rgba(255,255,255,.055); border-color:var(--line-dark); box-shadow:none; }
.section-dark .section-heading h2 { color:#fff8ef; }
.section-dark .section-heading .eyebrow { color:#d9bfa8; }
.section-dark .section-intro { color:#d7ccc3; }
.section-dark .section-heading::after { background:linear-gradient(90deg,#d3b79e,rgba(211,183,158,.15)); }
.software-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:24px; }
.software-card { background:#f9f3ea; color:var(--ink); border:1px solid rgba(255,255,255,.12); border-radius:var(--radius); padding:32px; box-shadow:0 16px 44px rgba(0,0,0,.12); }
.software-status { font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--accent); font-weight:750; margin-bottom:10px; }
.software-card h3 { font-family:var(--font-display); font-size:31px; font-weight:600; margin-bottom:15px; }
.software-card p { line-height:1.75; color:#554c45; font-size:15.7px; }
.software-links { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
.software-links a { text-decoration:none; font-weight:700; font-size:13px; color:var(--accent-dark); border-bottom:1px solid #b99f89; padding-bottom:2px; }
.ongoing-card, .support-card { margin-top:26px; border:1px solid var(--line-dark); border-radius:var(--radius); padding:30px 32px; background:rgba(255,255,255,.055); }
.ongoing-card h3, .support-card h3 { color:#fff8ef; font-family:var(--font-display); font-size:29px; font-weight:600; margin-bottom:8px; }
.ongoing-card p, .support-card p { color:#d7ccc3; margin:0; }
.support-card { display:flex; justify-content:space-between; gap:24px; align-items:center; }
.support-links { display:flex; flex-wrap:wrap; gap:10px; }
.button-light { background:#f4eadf; color:#40352f; }
.button-outline-light { color:#f4eadf; border:1px solid rgba(255,255,255,.32); }

.team-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:20px; max-width:760px; }
.person-card { display:flex; align-items:center; gap:18px; padding:22px; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-sm); box-shadow:var(--shadow-soft); }
.person-initials { flex:0 0 56px; height:56px; display:grid; place-items:center; border-radius:50%; background:#eee2d5; border:1px solid #d9c4b0; color:var(--accent-dark); font-family:var(--font-display); }
.person-card h3 { font-family:var(--font-display); font-size:22px; font-weight:600; }
.person-card p { margin:4px 0 0; color:var(--muted); font-size:14.5px; }

.publications-heading { display:flex; justify-content:space-between; gap:28px; align-items:flex-end; }
.text-link { white-space:nowrap; text-decoration:none; color:var(--accent-dark); font-weight:700; font-size:13px; }
.publication-list { display:grid; gap:14px; }
.publication-item { background:rgba(255,253,249,.86); border:1px solid #d8cabc; border-radius:14px; padding:22px 24px; display:grid; grid-template-columns:72px 1fr auto; gap:20px; align-items:start; }
.publication-year { font-family:var(--font-display); font-size:21px; color:var(--accent); }
.publication-title { font-weight:720; line-height:1.5; margin-bottom:6px; }
.publication-meta { color:var(--muted); font-size:14px; line-height:1.55; }
.publication-link { font-size:13px; font-weight:700; text-decoration:none; border-bottom:1px solid #bca38d; }

.mentoring-groups { display:grid; gap:20px; }
.mentoring-group { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:26px 28px 18px; box-shadow:var(--shadow-soft); }
.mentoring-group > h3 { font-family:var(--font-display); font-size:26px; font-weight:600; padding-bottom:13px; border-bottom:1px solid var(--line); }
.mentee-row { padding:15px 0; border-bottom:1px dashed #ddd0c2; }
.mentee-row:last-child { border-bottom:0; }
.mentee-row strong { display:block; }
.mentee-row span { display:block; margin-top:3px; color:var(--muted); font-size:14.5px; line-height:1.58; }

.contact-section { background:#eee3d5; border-top:1px solid #dbccbc; }
.contact-grid { display:grid; grid-template-columns:1.1fr .9fr; gap:42px; align-items:start; }
.contact-grid .section-heading { margin-bottom:0; }
.contact-card { background:var(--paper); border:1px solid #d7c8b8; border-radius:var(--radius); padding:32px; box-shadow:var(--shadow-soft); }
.contact-card h3 { font-family:var(--font-display); font-size:28px; font-weight:600; margin-bottom:12px; }
.contact-card p { color:var(--muted); }
.contact-links { display:grid; gap:8px; margin-top:20px; }
.contact-links a { text-decoration:none; color:var(--accent-dark); font-weight:650; width:max-content; max-width:100%; }
.contact-id { color:var(--muted); font-size:14px; }

.site-footer { background:#292421; color:#cfc5bd; padding:26px 0; font-size:13px; }
.footer-inner { display:flex; justify-content:space-between; gap:20px; }
.site-footer p { margin:0; }

/* Optional research image carousel. It remains hidden until data/research-gallery.js contains images. */
.section-gallery { padding-top:0; }
.research-carousel { position:relative; border:1px solid var(--line); border-radius:24px; background:var(--paper); overflow:hidden; box-shadow:var(--shadow); }
.carousel-stage { position:relative; min-height:420px; background:#e9dfd3; }
.carousel-slide { position:absolute; inset:0; opacity:0; transition:opacity .7s ease; }
.carousel-slide.active { opacity:1; }
.carousel-slide img { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; }
.carousel-caption { position:absolute; left:26px; right:26px; bottom:24px; max-width:660px; padding:16px 18px; border-radius:12px; background:rgba(42,35,31,.72); color:white; backdrop-filter:blur(9px); }
.carousel-caption strong { display:block; margin-bottom:4px; }
.carousel-caption span { font-size:14px; line-height:1.55; color:#eee4db; }
.carousel-controls { position:absolute; inset:auto 18px 18px auto; display:flex; gap:8px; z-index:3; }
.carousel-control { width:42px; height:42px; border:1px solid rgba(255,255,255,.42); border-radius:50%; background:rgba(47,39,35,.68); color:#fff; cursor:pointer; font-size:20px; }
.carousel-dots { display:flex; gap:7px; padding:15px 20px 18px; justify-content:center; background:var(--paper); }
.carousel-dot { width:8px; height:8px; border-radius:50%; border:0; background:#cdbbaa; cursor:pointer; }
.carousel-dot.active { background:var(--accent-dark); }

.reveal { opacity:1; transform:none; }
.js .reveal { opacity:0; transform:translateY(14px); transition:opacity .55s ease, transform .55s ease; }
.js .reveal.visible { opacity:1; transform:none; }

@media (max-width: 980px) {
  .site-nav { position:absolute; left:20px; right:20px; top:68px; display:none; flex-direction:column; align-items:stretch; gap:0; padding:10px 18px; background:var(--paper); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); }
  .site-nav.open { display:flex; }
  .site-nav a { padding:11px 0; border-bottom:1px solid var(--line); }
  .site-nav a:last-child { border-bottom:0; }
  .nav-toggle { display:block; }
  .hero-grid, .about-grid, .contact-grid { grid-template-columns:1fr; }
  .hero-portrait-wrap { max-width:420px; }
  .research-grid, .software-grid { grid-template-columns:1fr; }
  .methods-grid { grid-template-columns:repeat(2,1fr); }
  .highlight-strip, .leadership-grid { grid-template-columns:1fr; }
  .publication-item { grid-template-columns:64px 1fr; }
  .publication-link { grid-column:2; justify-self:start; }
}

@media (max-width: 680px) {
  body { font-size:16px; line-height:1.72; }
  .container, .container.narrow { width:min(calc(100% - 28px), var(--container)); }
  .section { padding:76px 0; }
  .nav-wrap { min-height:68px; }
  .brand-text { display:none; }
  .hero { padding:68px 0 72px; }
  .hero-grid { gap:42px; }
  .hero h1 { font-size:clamp(48px,15vw,66px); }
  .hero-lead { font-size:18px; }
  .section-heading { padding:24px 22px 26px; margin-bottom:34px; }
  .section-heading h2 { font-size:36px; }
  .research-card, .software-card { padding:26px 24px; }
  .methods-grid, .team-grid { grid-template-columns:1fr; }
  .support-card { flex-direction:column; align-items:flex-start; }
  .publications-heading { display:block; }
  .publications-heading .text-link { display:inline-block; margin-top:18px; }
  .publication-item { grid-template-columns:1fr; gap:8px; }
  .publication-link { grid-column:1; }
  .footer-inner { display:block; }
  .footer-inner p + p { margin-top:5px; }
  .carousel-stage { min-height:300px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *, *::before, *::after { transition:none !important; animation:none !important; }
}


/* v4: multipage layout and refined scale */
.site-nav a.active { color:var(--accent-dark); border-bottom-color:var(--accent); font-weight:700; }
.hero h1 { font-size:clamp(48px,5.6vw,74px); line-height:1.01; }
.hero-grid { grid-template-columns:minmax(0,1.55fr) minmax(240px,.58fr); gap:68px; }
.hero-portrait-wrap { max-width:330px; justify-self:end; }
.section-heading h2 { font-size:clamp(30px,3.2vw,44px); }
.page-hero { padding:72px 0 24px; }
.page-hero.section-dark { padding-bottom:28px; }
.page-content { padding-top:44px; }
.page-title { font-family:var(--font-display); font-weight:500; letter-spacing:-.022em; font-size:clamp(36px,4.3vw,54px); line-height:1.12; color:var(--ink); max-width:930px; }
.page-title-light { color:#fff8ef; }
.subsection-title { margin:62px 0 22px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.subsection-title .eyebrow { margin-bottom:8px; }
.subsection-title h2 { font-family:var(--font-display); font-weight:500; font-size:31px; letter-spacing:-.018em; }
.home-links-section { padding-top:64px; }
.home-link-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.home-link-card { display:block; text-decoration:none; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:26px; box-shadow:var(--shadow-soft); transition:transform .2s ease, box-shadow .2s ease; }
.home-link-card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.home-link-card > span { color:var(--accent); font-size:12px; font-weight:800; letter-spacing:.13em; }
.home-link-card h2 { font-family:var(--font-display); font-size:27px; font-weight:600; margin:7px 0 12px; }
.home-link-card p { color:var(--muted); font-size:14.5px; line-height:1.65; margin:0; }
.software-page-body { padding-top:38px; }
.publication-page-body { padding-top:36px; }
.compact-contact-heading { padding:26px 30px 28px; }
.contact-page-title { font-size:clamp(30px,3.2vw,42px); max-width:760px; }
.mentoring-note { margin-top:24px; padding:16px 18px; border-left:3px solid var(--accent-soft); color:var(--muted); font-size:14px; }
.mentoring-note p { margin:0; }

@media (max-width:980px) {
  .hero-portrait-wrap { justify-self:start; max-width:320px; }
  .home-link-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:680px) {
  .hero h1 { font-size:clamp(43px,13vw,58px); }
  .hero-portrait-wrap { max-width:270px; }
  .page-hero { padding:52px 0 12px; }
  .page-title { font-size:36px; }
  .home-link-grid { grid-template-columns:1fr; }
}


/* v5: slightly smaller page and subsection titles */
.page-title { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.14; }
.section-heading h2 { font-size: clamp(28px, 2.9vw, 40px); }
.subsection-title h2 { font-size: 28px; }
.contact-page-title { font-size: clamp(28px, 3vw, 38px); }
@media (max-width:680px) {
  .page-title { font-size: 32px; }
  .section-heading h2 { font-size: 31px; }
  .subsection-title h2 { font-size: 26px; }
}


/* v6: compact page titles, deeper academic profile, recent publications and optional research images */
.page-title { font-size:clamp(28px,2.8vw,38px); line-height:1.16; }
.section-heading { padding:22px 26px 24px; }
.section-heading .section-intro { max-width:800px; }
.subsection-title h2 { font-size:26px; }
.contact-page-title { font-size:clamp(28px,2.8vw,36px); }

.simple-section-heading { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:26px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.simple-section-heading h2 { font-family:var(--font-display); font-size:30px; font-weight:600; line-height:1.15; margin:4px 0 0; }
.recent-publication-list { display:grid; grid-template-columns:1fr 1fr; gap:12px 18px; }
.recent-publication-item { display:grid; grid-template-columns:48px 1fr auto; gap:12px; align-items:start; padding:17px 18px; background:rgba(255,253,249,.78); border:1px solid #d8cabc; border-radius:12px; }
.recent-publication-year { color:var(--accent); font-family:var(--font-display); font-size:18px; }
.recent-publication-title { font-weight:680; line-height:1.45; font-size:14.5px; }
.recent-publication-meta { margin-top:5px; color:var(--muted); font-size:12.8px; line-height:1.45; }
.recent-publication-item .publication-link { border:0; font-size:15px; }

.detail-link-row { display:flex; justify-content:flex-end; margin:14px 2px 8px; }
.detail-link-row a { color:var(--accent-dark); text-decoration:none; font-weight:700; font-size:13.5px; border-bottom:1px solid #bda58f; padding-bottom:2px; }
.academic-link-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.academic-link-grid a { display:block; text-decoration:none; color:var(--ink); background:var(--paper); border:1px solid var(--line); border-radius:14px; padding:20px 22px; box-shadow:var(--shadow-soft); }
.academic-link-grid strong { display:block; font-family:var(--font-display); font-size:20px; font-weight:600; margin-bottom:5px; }
.academic-link-grid span { display:block; color:var(--muted); font-size:13.5px; line-height:1.55; }

.academic-page { padding-top:40px; }
.academic-section { scroll-margin-top:94px; padding:8px 0 44px; }
.academic-section + .academic-section { border-top:1px solid var(--line); padding-top:46px; }
.compact-subsection { margin:0 0 22px; }
.academic-list { display:grid; gap:0; border-top:1px solid var(--line); }
.academic-list > div { display:grid; grid-template-columns:118px 1fr; gap:22px; padding:16px 0; border-bottom:1px solid var(--line); }
.academic-list time { color:var(--accent-dark); font-weight:750; font-size:13px; letter-spacing:.02em; }
.academic-list p { margin:0; line-height:1.65; }
.academic-details { margin-top:14px; border:1px solid var(--line); border-radius:12px; background:rgba(255,253,249,.6); }
.academic-details summary { cursor:pointer; padding:15px 18px; font-weight:700; color:var(--accent-dark); }
.academic-details .academic-list { margin:0 18px 12px; }
.compact-list > div { grid-template-columns:118px 1fr; padding:13px 0; }
.timeline-list { border-top:1px solid var(--line); }
.timeline-list > div { display:grid; grid-template-columns:118px 1fr; gap:22px; padding:17px 0; border-bottom:1px solid var(--line); }
.timeline-list time { color:var(--accent-dark); font-weight:750; font-size:13px; }
.timeline-list strong, .timeline-list span { display:block; }
.timeline-list span { margin-top:3px; color:var(--muted); line-height:1.55; }

.person-card-detailed { align-items:flex-start; }
.person-card-detailed .person-initials { margin-top:2px; }
.person-role { margin:3px 0 8px !important; color:var(--accent-dark) !important; font-weight:700; }
.person-focus { margin:0 !important; color:var(--muted) !important; font-size:14px !important; line-height:1.62; }
.team-grid-detailed { max-width:940px; }

.research-card-media { height:220px; margin:-1px -1px 20px; overflow:hidden; border-radius:var(--radius-sm) var(--radius-sm) 0 0; background:#e8ddd1; border-bottom:1px solid var(--line); position:relative; }
.research-card-media img { width:100%; height:100%; object-fit:cover; display:block; }
.research-card-media span { position:absolute; left:14px; bottom:12px; background:rgba(45,37,32,.72); color:#fff; border-radius:8px; padding:6px 9px; font-size:12px; }
.image-note { margin:24px auto 0; max-width:820px; padding:14px 16px; border-left:3px solid var(--accent-soft); color:var(--muted); font-size:13px; line-height:1.6; }
.image-note code { font-size:12px; }

@media (max-width: 900px) {
  .recent-publication-list { grid-template-columns:1fr; }
}
@media (max-width: 680px) {
  .page-title { font-size:29px; }
  .section-heading { padding:20px 20px 22px; }
  .subsection-title h2 { font-size:24px; }
  .simple-section-heading { align-items:flex-start; flex-direction:column; gap:9px; }
  .simple-section-heading h2 { font-size:27px; }
  .academic-link-grid { grid-template-columns:1fr; }
  .academic-list > div, .timeline-list > div, .compact-list > div { grid-template-columns:1fr; gap:5px; }
}


/* v7: tighter page rhythm, cleaner titles, wider team cards, smaller portraits */
.hero-portrait-wrap { max-width:285px; }

.page-hero { padding:50px 0 8px; }
.page-hero .section-heading { margin-bottom:0; }
main > .page-hero + .section { padding-top:32px; }
.page-content, .publication-page-body, .software-page-body, .academic-page { padding-top:28px; }
.section-heading { margin-bottom:0; }
.section-heading .section-intro { margin-top:12px; }

/* keep main page titles restrained */
.page-title { font-size:clamp(27px,2.55vw,35px); }
.subsection-title { margin-top:54px; }
.subsection-title h2 { font-size:25px; }

/* About: portrait restored, deliberately smaller than the home portrait */
.about-side { display:flex; flex-direction:column; align-items:stretch; gap:18px; }
.about-portrait-frame { width:205px; align-self:center; padding:8px; border:1px solid var(--accent-soft); background:rgba(255,255,255,.62); border-radius:44% 44% 14px 14px; box-shadow:var(--shadow-soft); }
.about-portrait { width:100%; aspect-ratio:4/5; object-fit:cover; object-position:center top; border-radius:42% 42% 10px 10px; filter:saturate(.92) contrast(.98); }
.detail-link-row + .subsection-title { margin-top:74px; }

/* Team: two generous cards in one row on desktop */
.team-grid-detailed { max-width:none; width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.person-card-detailed { min-height:190px; padding:30px; }
.person-card-detailed h3 { font-size:24px; }
.person-focus { font-size:15px !important; line-height:1.7; }

/* Publications: full-list link clearly precedes the ten recent items on Home */
.publication-list-toplink { margin:0 0 18px; }
.publication-list-toplink a { display:inline-block; color:var(--accent-dark); text-decoration:none; font-weight:750; font-size:14px; border-bottom:1px solid #bda58f; padding-bottom:3px; }
.publications-heading { display:block; }

/* Mentoring */
.mentoring-group > h3 { font-size:24px; }

/* Academic details: stronger breathing room between distinct sections */
.academic-section { padding-bottom:56px; }
.academic-section + .academic-section { margin-top:16px; padding-top:58px; }

@media (max-width:980px) {
  .team-grid-detailed { grid-template-columns:1fr; }
  .hero-portrait-wrap { max-width:270px; }
}
@media (max-width:680px) {
  .page-hero { padding:40px 0 6px; }
  main > .page-hero + .section { padding-top:24px; }
  .page-title { font-size:28px; }
  .about-portrait-frame { width:180px; }
  .person-card-detailed { min-height:auto; padding:24px; }
}


/* v8: layout corrections based on desktop review */

/* Development cache-busting is applied in HTML with ?v=8. */
.page-title { font-size:clamp(25px,2.25vw,32px); }
.section-heading { padding:20px 26px 22px; }
.section-heading::after { margin-top:18px; width:72px; }
main > .page-hero + section.section { padding-top:18px !important; }
.page-content, .publication-page-body, .software-page-body, .academic-page, .team-page-content { padding-top:18px !important; }

/* About intro: compact portrait; career milestones no longer squeezed below it. */
.about-disciplines { display:flex; flex-wrap:wrap; gap:0; margin:12px 0 0; color:var(--muted); font-size:15px; line-height:1.5; }
.about-disciplines span { display:inline-flex; align-items:center; }
.about-disciplines span + span::before { content:"·"; margin:0 11px; color:var(--accent); font-weight:800; }
.about-intro { display:grid; grid-template-columns:minmax(0,1fr) 176px; gap:42px; align-items:start; }
.about-photo-card { margin:0; width:176px; justify-self:end; }
.about-photo-card img { width:176px; aspect-ratio:4/5; object-fit:cover; object-position:center top; border-radius:12px; border:1px solid var(--accent-soft); box-shadow:var(--shadow-soft); filter:saturate(.94) contrast(.99); }
.about-photo-card figcaption { margin-top:8px; color:var(--muted); font-size:11.5px; text-align:center; }
.career-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; margin-top:32px; border:1px solid var(--line); border-radius:14px; overflow:hidden; background:rgba(255,253,249,.72); }
.career-strip > div { padding:17px 18px; border-right:1px solid var(--line); }
.career-strip > div:last-child { border-right:0; }
.career-strip strong { display:block; color:var(--accent-dark); font-size:12.5px; margin-bottom:5px; }
.career-strip span { display:block; color:var(--muted); font-size:13px; line-height:1.5; }
.about-block { margin-top:62px; }
.about-block + .about-block { margin-top:72px; padding-top:6px; }
.about-block .subsection-title { margin:0 0 22px; }
.about-block .detail-link-row { justify-content:flex-start; margin:18px 4px 0; }
.about-block .academic-link-grid { margin-top:4px; }

/* Make academic activity links unmistakably separate cards. */
.academic-link-grid { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:16px !important; }
.academic-link-grid a { display:block !important; min-width:0; padding:21px 22px !important; }
.academic-link-grid strong, .academic-link-grid span { display:block !important; }

/* Team: exactly two wide cards across the row; no implied third slot. */
.team-page-content .container { width:min(calc(100% - 42px), var(--container)); }
.team-grid.team-grid-detailed { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; width:100% !important; max-width:100% !important; gap:26px !important; }
.team-grid-detailed .person-card-detailed { width:100%; min-width:0; min-height:210px; padding:32px 34px; }
.team-grid-detailed .person-card-detailed h3 { font-size:23px; }
.team-grid-detailed .person-focus { max-width:46ch; }

/* Publications: visible in-page jump placed above the page title. */
.publications-heading { align-items:flex-start; }
.publication-page-jump { display:inline-block; margin:0 0 10px; color:var(--accent-dark); text-decoration:none; font-size:12.5px; font-weight:750; letter-spacing:.02em; border-bottom:1px solid #bda58f; padding-bottom:2px; }
#all-publications { scroll-margin-top:88px; }

/* Mentoring: no editor-facing notes in the public page. */
.mentoring-note { display:none !important; }

@media (max-width:900px) {
  .career-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .career-strip > div:nth-child(2) { border-right:0; }
  .career-strip > div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
}
@media (max-width:760px) {
  .about-intro { grid-template-columns:1fr; gap:24px; }
  .about-photo-card { justify-self:start; width:150px; }
  .about-photo-card img { width:150px; }
  .academic-link-grid { grid-template-columns:1fr !important; }
  .team-grid.team-grid-detailed { grid-template-columns:1fr !important; }
}
@media (max-width:520px) {
  .career-strip { grid-template-columns:1fr; }
  .career-strip > div { border-right:0 !important; border-bottom:1px solid var(--line); }
  .career-strip > div:last-child { border-bottom:0; }
  .about-disciplines { display:block; }
  .about-disciplines span { display:block; }
  .about-disciplines span + span::before { content:none; }
}


/* v9: profile links and publication utilities */
.profile-links {
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  margin-top:14px;
}
.profile-links a {
  color:var(--accent-dark);
  text-decoration:none;
  font-size:13px;
  font-weight:720;
  border-bottom:1px solid #bda58f;
  padding-bottom:2px;
}
.profile-links a:hover,
.profile-links a:focus-visible,
.publication-utility-links a:hover,
.publication-utility-links a:focus-visible {
  color:var(--ink);
  border-bottom-color:var(--accent-dark);
}
.publication-utility-links {
  display:flex;
  flex-wrap:wrap;
  gap:10px 20px;
  margin-bottom:9px;
}
.publication-utility-links .publication-page-jump { margin:0; }

/* v10: expandable research areas, software logo slots, team photo and alumni link */
.research-card-link {
  display:block;
  color:inherit;
  text-decoration:none;
  min-width:0;
}
.research-card-link .research-card { height:100%; }
.research-card-link:focus-visible { outline:none; }
.research-card-link:focus-visible .research-card {
  outline:2px solid var(--accent);
  outline-offset:4px;
}
.card-link-hint {
  display:inline-block;
  margin-top:18px;
  color:var(--accent-dark);
  font-size:13px;
  font-weight:750;
  border-bottom:1px solid #bda58f;
  padding-bottom:2px;
}

.back-link {
  display:inline-block;
  margin-bottom:12px;
  color:var(--accent-dark);
  text-decoration:none;
  font-size:13px;
  font-weight:750;
  border-bottom:1px solid #bda58f;
  padding-bottom:2px;
}
.research-detail-page { padding-top:30px !important; }
.research-detail-title { max-width:760px; }
.research-detail-hero {
  margin:0 0 34px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--paper);
  box-shadow:var(--shadow-soft);
}
.research-detail-hero img {
  width:100%;
  max-height:560px;
  object-fit:contain;
  background:var(--paper);
}
.research-detail-grid {
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);
  gap:42px;
  align-items:start;
}
.research-detail-lead {
  margin:0;
  font-size:18px;
  line-height:1.82;
  color:#4f4944;
}
.research-theme-panel {
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:16px;
  padding:26px 28px;
  box-shadow:var(--shadow-soft);
}
.research-theme-panel ul {
  margin:0;
  padding-left:20px;
  color:#514943;
}
.research-theme-panel li { margin:0 0 10px; line-height:1.6; }
.research-theme-panel li:last-child { margin-bottom:0; }

.software-logo {
  display:flex;
  align-items:center;
  min-height:72px;
  margin:4px 0 18px;
}
.software-logo[hidden] { display:none !important; }
.software-logo img {
  display:block;
  max-width:210px;
  max-height:82px;
  width:auto;
  height:auto;
  object-fit:contain;
}

.team-photo {
  margin:34px 0 0;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--paper);
  box-shadow:var(--shadow-soft);
}
.team-photo[hidden] { display:none !important; }
.team-photo img {
  width:100%;
  max-height:620px;
  object-fit:cover;
  object-position:center;
}
.team-alumni-link {
  margin-top:26px;
  display:flex;
  justify-content:flex-start;
}
.team-alumni-link a {
  color:var(--accent-dark);
  text-decoration:none;
  font-weight:750;
  font-size:13.5px;
  border-bottom:1px solid #bda58f;
  padding-bottom:2px;
}
#alumni { scroll-margin-top:96px; }

@media (max-width:760px) {
  .research-detail-grid { grid-template-columns:1fr; gap:24px; }
  .research-theme-panel { padding:22px; }
  .software-logo img { max-width:175px; max-height:70px; }
}
