/* Gagana M D — site styles
   Plain CSS, no build step. Cream background, muted blue-green accent, serif display type. */

:root {
  --bg: #f8f7f3;
  --ink: #202c32;
  --text: #3f4c52;
  --muted: #5c686e;
  --line: #dcdedb;
  --accent: #305d64;
  --accent-2: #4f6c84;
  --soft: #eceff0;
  --dark: #23343b;
  --header-bg: rgba(248, 247, 243, 0.96);
  --on-ink: #fff;
  --surface: #fff;
  --btn-border: #9eabb1; --btn-text: #2c414c; --btn-hover: #e8eeef;
  --chip-done-b: #a9c2bd; --chip-done-bg: #eef4f2; --chip-ongoing-b: #c9cfd9; --chip-ongoing-bg: #f1f3f7; --chip-private-b: #ddd6c8; --chip-private-bg: #f6f2ea;
  --evidence-b: #c8d3d1; --evidence-bg: #eef3f2; --portrait-bg: #dfe4e1;
  --max: 1080px;
  --prose: 40rem;
  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
/* Smooth scrolling only after the page has loaded (script.js adds .smooth-scroll), so a link that
   opens a page at #section jumps straight there and the browser keeps it in place while images load. */
@media (prefers-reduced-motion: no-preference) { html.smooth-scroll { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; }
h1, h2, h3, p, ul, ol, dl { margin-top: 0; }
h1, h2 { letter-spacing: -0.02em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

.wrap { width: min(var(--max), calc(100% - 64px)); margin-inline: auto; }

.skip { position: absolute; left: 12px; top: -100px; background: var(--surface); padding: 10px 14px; z-index: 30; border: 1px solid var(--ink); }
.skip:focus { top: 12px; }

/* Inline text links get an underline so they are recognisable as links */
.prose a, .text-link, .entry a, .lede a, .note a, .facts a, .contact-inner p a, .qa a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover, .text-link:hover, .entry a:hover, .lede a:hover, .note a:hover, .facts a:hover, .qa a:hover { color: var(--ink); }

/* ---------- Header & navigation ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) { .header { backdrop-filter: blur(8px); } }
.nav { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.brand-dot, .period { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { font-size: 13.5px; font-weight: 600; color: var(--text); padding: 4px 0; border-bottom: 1px solid transparent; }
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-links .nav-sep { width: 1px; height: 18px; background: var(--line); }
.nav-links .nav-contact { border: 1px solid var(--ink); padding: 7px 12px; color: var(--ink); }
.nav-links .nav-contact:hover { background: var(--ink); color: var(--on-ink); }
.menu { display: none; background: transparent; border: 1px solid var(--line); padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }

/* ---------- Type helpers ---------- */
.eyebrow, .mini-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0;
}
.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.75; color: var(--text); max-width: var(--prose); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 13.5px; font-weight: 700; padding: 12px 16px;
  border: 1px solid var(--btn-border); color: var(--btn-text); border-radius: 2px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button:hover { border-color: var(--accent); background: var(--btn-hover); color: var(--ink); }
.button.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }

/* ---------- Hero (home) ---------- */
.hero { padding-block: clamp(3rem, 6vw, 4.5rem) clamp(3rem, 6vw, 4.5rem); }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.5rem, 5.2vw, 4.4rem); line-height: 1.04; letter-spacing: -0.035em;
  max-width: 17ch; margin: 1.2rem 0 1.6rem;
}
.hero h1 em { color: var(--accent-2); }
.hero .lede strong { color: var(--ink); font-weight: 600; }
.availability {
  margin: 1.4rem 0 0; padding-left: 14px; border-left: 2px solid var(--accent);
  font-size: 15px; color: var(--text); max-width: 38rem;
}

/* ---------- Sections ---------- */
.section { padding-top: clamp(4rem, 8vw, 6rem); }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 28px; }
.section-top h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.15; margin: 10px 0 0; font-weight: 600; }
.section-desc { max-width: 380px; font-size: 14.5px; color: var(--muted); margin: 0; }
.section-more { margin-top: 22px; font-size: 14px; font-weight: 700; }
.section-more a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* ---------- Research entries (home + research page) ---------- */
.entries { border-top: 1px solid var(--ink); }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 36px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.entry h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); letter-spacing: -0.015em; line-height: 1.25; margin: 8px 0 10px; }
.entry h3 a { text-decoration: none; color: var(--ink); }
.entry h3 a:hover { color: var(--accent); }
.entry p { color: var(--text); font-size: 15.5px; max-width: 44rem; margin-bottom: 10px; }
.entry .tag { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.entry-side { font-size: 13px; color: var(--muted); display: grid; gap: 10px; align-content: start; }
.entry-side .links { display: grid; gap: 6px; }
.entry-side .links a { font-weight: 700; }
.status {
  display: inline-block; justify-self: start; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.status.done { border-color: var(--chip-done-b); background: var(--chip-done-bg); }
.status.ongoing { border-color: var(--chip-ongoing-b); background: var(--chip-ongoing-bg); }
.status.private { border-color: var(--chip-private-b); background: var(--chip-private-bg); }

/* Fact list used inside research-page entries */
.facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 22px; margin: 18px 0 4px; font-size: 14.5px; max-width: 48rem; }
.facts dt { font-weight: 700; color: var(--ink); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; padding-top: 2px; }
.facts dd { margin: 0; color: var(--text); }

/* ---------- Questions ---------- */
.questions { list-style: none; padding: 0; margin: 0; counter-reset: q; border-top: 1px solid var(--line); }
.questions li { counter-increment: q; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.questions li::before { content: counter(q, decimal-leading-zero); font-size: 12px; font-weight: 700; color: var(--accent); padding-top: 6px; }
.questions h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2.1vw, 1.55rem); line-height: 1.3; margin-bottom: 6px; }
.questions p { margin: 0; color: var(--muted); font-size: 15px; max-width: 44rem; }

/* ---------- Compact experience list ---------- */
.roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.roles li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.roles time { font-size: 13px; color: var(--muted); padding-top: 2px; }
.roles strong { display: block; font-size: 16px; }
.roles span { font-size: 14px; color: var(--muted); }

/* ---------- Timeline (about) ---------- */
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; border-bottom: 1px solid var(--line); padding: 22px 0; }
.timeline-item time { font-size: 13px; color: var(--muted); }
.timeline-item h3 { font-size: 18px; margin: 0; }
.timeline-item .position { font-size: 13.5px; color: var(--accent); font-weight: 700; margin: 2px 0 8px; }
.timeline-item p:last-child { font-size: 14.5px; color: var(--text); max-width: 44rem; margin-bottom: 0; }

/* ---------- "Elsewhere" strip ---------- */
.elsewhere { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.elsewhere a { display: block; padding: 20px 20px 22px 0; border-bottom: 1px solid var(--line); }
.elsewhere a + a { padding-left: 20px; border-left: 1px solid var(--line); }
.elsewhere strong { display: block; font-size: 16px; margin-bottom: 4px; }
.elsewhere span { display: block; font-size: 14px; color: var(--muted); }
.elsewhere a:hover strong { color: var(--accent); }

/* ---------- Sub-page hero ---------- */
.page-hero { padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(1rem, 3vw, 2rem); max-width: 860px; }
.page-hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.3rem, 4.8vw, 3.8rem); line-height: 1.06; letter-spacing: -0.03em;
  margin: 1rem 0 1.3rem;
}
.page-hero h1 em { color: var(--accent-2); }
.page-hero .actions { margin-top: 20px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 0; }
.crumb a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* ---------- Prose (case study, about) ---------- */
.prose { max-width: var(--prose); }
.prose p, .prose li { color: var(--text); font-size: 16.5px; line-height: 1.75; }
.prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); margin: 3rem 0 .9rem; font-weight: 600; }
.prose h3 { font-size: 1.1rem; margin: 2rem 0 .6rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose code, .note code { font-size: .88em; background: var(--soft); padding: 1px 5px; border-radius: 2px; }
.prose pre { background: var(--dark); color: #e9efed; padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; border-radius: 2px; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose .lead { font-family: var(--serif); color: var(--ink); font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.45; }

.case-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.case-meta { position: sticky; top: 96px; font-size: 13.5px; color: var(--muted); display: grid; gap: 16px; border-top: 1px solid var(--ink); padding-top: 16px; }
.case-meta strong { display: block; color: var(--ink); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.case-meta a { color: var(--accent); font-weight: 700; }
.toc { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.toc a { color: var(--text); font-weight: 500; }
.toc a:hover { color: var(--accent); }

.table-wrap { overflow-x: auto; margin: 1.2rem 0 1.6rem; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); border-bottom-color: var(--ink); }
td { color: var(--text); }

figure { margin: 2rem 0; }
figure img { border: 1px solid var(--line); background: #fff; }
figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

.callout { border-left: 2px solid var(--accent); padding: 4px 0 4px 16px; margin: 1.6rem 0; }
.callout p { margin: 0; }

/* ---------- Projects archive ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filter { border: 1px solid var(--line); padding: 8px 13px; background: transparent; color: var(--ink); cursor: pointer; font-size: 13px; }
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.project-count { font-size: 13px; color: var(--muted); margin: 14px 0; }
.archive { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; border-top: 1px solid var(--line); }
.archive-item { border-bottom: 1px solid var(--line); padding: 22px 0 24px; }
.archive-item[hidden] { display: none !important; }
.archive-item .category { font-size: 11px; letter-spacing: .1em; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.archive-item h3 { font-size: 17.5px; margin: 6px 0 6px; }
.archive-item p { font-size: 14.5px; color: var(--text); margin: 0 0 8px; }
.archive-item .meta { font-size: 13px; color: var(--muted); }
.archive-item .meta a { color: var(--accent); font-weight: 700; border-bottom: 1px solid currentColor; }

/* ---------- Writing list ---------- */
.writing-list { border-top: 1px solid var(--line); }
.writing-item { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.writing-item .date { font-size: 13px; color: var(--muted); }
.writing-item h3 { font-size: 18px; margin: 0 0 6px; }
.writing-item h3 a:hover { color: var(--accent); }
.writing-item p { font-size: 14.5px; color: var(--text); margin: 0 0 6px; max-width: 42rem; }
.writing-item .kind { font-size: 12.5px; color: var(--muted); }

/* ---------- Two-column about / community ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px; }
.list-plain { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.list-plain li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--text); }
.list-plain strong { display: block; color: var(--ink); font-size: 15px; }

/* ---------- Speaking & consulting ---------- */
.engagement-list { border-top: 1px solid var(--line); }
.engagement-list article { border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
.engagement-list h3 { font-size: clamp(1.1rem, 1.9vw, 1.35rem); letter-spacing: -0.01em; margin: 0 0 .45rem; }
.engagement-list p { color: var(--text); margin: 0; max-width: 44rem; }
.item-meta { color: var(--accent) !important; font-size: .72rem; font-weight: 700; letter-spacing: .1em; margin-bottom: .5rem !important; text-transform: uppercase; }
.community-metrics { display: grid; gap: 1px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1.3rem 0 0; max-width: 30rem; }
.community-metrics div { background: var(--soft); padding: .9rem 1.1rem; }
.community-metrics dt { color: var(--accent); font-family: var(--serif); font-size: 1.55rem; line-height: 1.1; }
.community-metrics dd { color: var(--muted); font-size: .8rem; line-height: 1.45; margin: .4rem 0 0; }
.impact-metrics { display: grid; gap: 1px; grid-template-columns: repeat(5, 1fr); margin: 2.5rem 0 0; }
.impact-metrics div { background: var(--soft); padding: 1.2rem; }
.impact-metrics dt { color: var(--accent); font-family: var(--serif); font-size: 1.85rem; line-height: 1.1; }
.impact-metrics dd { color: var(--muted); font-size: .77rem; margin: .6rem 0 0; }
.topic-list { border-top: 1px solid var(--line); list-style: none; margin: 0; padding: 0; }
.topic-list li { border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.5rem); padding: .85rem 0; }
.offer-grid { display: grid; gap: 0 40px; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.offer-grid article { border-bottom: 1px solid var(--line); padding: 22px 0; }
.offer-grid h3 { font-size: 1.1rem; margin-bottom: .45rem; }
.offer-grid p { color: var(--text); font-size: 15px; margin: 0 0 8px; }
.offer-grid .basis { font-size: 13.5px; color: var(--muted); margin: 0; }
.offer-grid .basis a { color: var(--accent); font-weight: 700; }
.speaking-gallery[hidden] { display: none; }
.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.gallery-grid figure { background: var(--soft); margin: 0; }
.gallery-grid figcaption { padding: .7rem; }

/* ---------- Contact band ---------- */
.contact { margin-top: clamp(4.5rem, 9vw, 6.5rem); background: var(--dark); color: #f4f6f4; }
.contact-inner { padding-block: clamp(3.5rem, 7vw, 5rem); }
.contact .eyebrow { color: #a9c6c0; }
.contact h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; margin: 14px 0 16px; letter-spacing: -0.02em; }
.contact h2 em { color: #a9c6c0; }
.contact p:not(.eyebrow) { color: #d2dbd9; max-width: 36rem; }
.contact-inner p a { color: #fff; text-decoration-color: #9bbab5; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 24px; }
.contact-actions a { border-bottom: 1px solid #9bbab5; font-size: 15px; padding-bottom: 4px; }
.contact-actions a:hover { color: #a9c6c0; }
.contact :focus-visible { outline-color: #a9c6c0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 22px 0; font-size: 13px; color: var(--muted); }
.footer .wrap { display: flex; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { height: 62px; }
  .menu { display: block; }
  .nav-links {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 18px 32px 24px; flex-direction: column; align-items: flex-start; gap: 12px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 16px; }
  .nav-links .nav-sep { width: 100%; height: 1px; }
  .entry { grid-template-columns: 1fr; gap: 14px; }
  .entry-side { grid-template-columns: auto 1fr; align-items: start; gap: 8px 18px; }
  .entry-side .links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .case-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .case-layout > * { min-width: 0; }
  .case-meta div { overflow-wrap: anywhere; }
  .case-meta { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .elsewhere { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .elsewhere a:nth-child(3) { padding-left: 0; border-left: 0; }
  .impact-metrics { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .section-top { flex-direction: column; align-items: start; gap: 10px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .roles li, .timeline-item, .writing-item { grid-template-columns: 1fr; gap: 4px; }
  .archive, .offer-grid { grid-template-columns: 1fr; }
  .elsewhere { grid-template-columns: 1fr; }
  .elsewhere a, .elsewhere a + a { padding-left: 0; border-left: 0; }
  .case-meta { grid-template-columns: 1fr; }
  .questions li { grid-template-columns: 34px minmax(0, 1fr); }
  .impact-metrics, .gallery-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .header, .contact, .footer, .filters, .skip { display: none; }
  body { background: #fff; }
}

/* =========================================================
   Portrait styles — kept for when a final portrait is ready.
   The portrait markup is commented out in index.html; these
   rules have no effect until it is restored.
   ========================================================= */
.hero-portrait { align-self: center; margin: 0; min-width: 0; position: relative; width: 100%; }
.portrait-frame { aspect-ratio: 4/5; background: var(--portrait-bg); border-radius: 4px; box-shadow: 0 20px 45px rgba(35,52,59,.14); overflow: hidden; position: relative; z-index: 1; }
.portrait-image { height: 100%; object-fit: cover; object-position: center 25%; width: 100%; }
.hero-portrait:not(.has-photo) .portrait-image { display: none; }

/* ---------- Utilities ---------- */
.section.tight { padding-top: 1.5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.list-plain.spaced { margin: 10px 0 32px; }
@media (max-width: 640px) {
  .entry-side { grid-template-columns: 1fr; }
}

/* ---------- Iteration 2: roles, publications, direction, evidence ---------- */
.entry .role { font-size: 14.5px; color: var(--text); border-left: 2px solid var(--line); padding-left: 12px; }
.entry .role strong, .role strong { color: var(--ink); }
.pubs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.pubs li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.pubs p { margin: 0 0 4px; max-width: 48rem; }
.pub-title { font-size: 17px; font-weight: 600; line-height: 1.4; }
.pub-title a:hover { color: var(--accent); }
.pub-authors { font-size: 14.5px; color: var(--text); }
.pub-authors strong { color: var(--ink); font-weight: 600; }
.pub-venue { font-size: 14px; color: var(--muted); }
.pub-venue a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.pub-note { font-size: 13px; color: var(--muted); font-style: italic; }
.direction { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--ink); }
.direction article { padding: 22px 0; }
.direction h3 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.3; margin-bottom: 12px; }
.direction p { font-size: 14.5px; color: var(--text); margin-bottom: 10px; }
.direction p strong { color: var(--ink); }
.direction a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.jump { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 600; }
.jump a { color: var(--accent); border-bottom: 1px solid currentColor; }
.evidence { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px !important; }
.evidence span { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border: 1px solid var(--evidence-b); background: var(--evidence-bg); color: var(--ink); }
.group-title { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 32px 0 10px; }
.timeline-item h4 { font-size: 18px; margin: 0; }
.archive-item .meta a { white-space: nowrap; }
@media (max-width: 960px) { .direction { grid-template-columns: 1fr; } .direction article + article { border-top: 1px solid var(--line); } }

/* ---------- Photos ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.hero-grid .hero-photo { margin-top: 3.4rem; }
.hero-grid .hero-copy { min-width: 0; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); background: var(--soft); }
.speaking-photo figure { margin: 0 0 8px; max-width: 960px; }
.speaking-photo img { width: 100%; border-radius: 3px; border: 1px solid var(--line); background: var(--soft); }
.speaking-photo figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 200px; gap: 32px; } }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-grid .hero-photo { order: 1; width: 160px; margin-top: 4px; }
}
.pub-photo { margin: 28px 0 0; max-width: 960px; }
.pub-photo img { width: 100%; border-radius: 3px; border: 1px solid var(--line); background: var(--soft); }
.pub-photo figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.math { font-family: var(--serif); font-style: italic; white-space: nowrap; }
.formula { font-family: var(--serif); font-size: 1.25rem; color: var(--ink) !important; text-align: center; margin: 14px 0 16px !important; max-width: 44rem; }
.pub-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.engagement-list article p + p { margin-top: 10px; }

/* Collapsible project details (Oct 2026 restructure) */
details.more { margin: 14px 0 4px; max-width: 48rem; }
details.more > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; font-weight: 700; width: 1em; }
details.more[open] > summary::before { content: "\2212"; }
details.more > summary:hover { color: var(--ink); }
details.more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ongoing-list li { line-height: 1.6; }
.ongoing-list strong { margin-bottom: 2px; }
.pubs + .group-title { margin-top: 40px; }
.roles.overview strong a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.roles.overview strong a:hover { text-decoration-color: var(--accent); }
.roles.overview span { line-height: 1.6; }
.roles.overview span a { color: var(--accent); }
.roles.overview + .group-title { margin-top: 36px; }

/* ---------- Themes: light (default) and dark ----------
   Light is the default for every visitor. Dark applies only when the visitor chooses it with the
   header toggle (data-theme="dark", remembered in localStorage). Only colour tokens change. */
:root[data-theme="dark"] {
  --bg: #131c21; --ink: #f0ebe1; --text: #d8d9d2; --muted: #a9b2b0; --line: #33434b;
  --accent: #9fd0d5; --accent-2: #a9c3dc; --soft: #1a252b; --dark: #0c1418;
  --header-bg: rgba(19, 28, 33, 0.94); --on-ink: #141d22; --surface: #1b262c;
  --btn-border: #4d5f66; --btn-text: #ece6da; --btn-hover: #1f2c32;
  --chip-done-b: #3f6461; --chip-done-bg: #17282a; --chip-ongoing-b: #3e4a5e; --chip-ongoing-bg: #1a2230; --chip-private-b: #5a4f3c; --chip-private-bg: #252119;
  --evidence-b: #34494a; --evidence-bg: #182528; --portrait-bg: #1b262c;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* Theme toggle in the header */
.nav-links { order: 2; margin-left: auto; }
.theme-toggle { order: 3; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; padding: 0; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.menu { order: 4; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (max-width: 960px) { .theme-toggle { margin-left: auto; } }

/* ---------- Homepage: academic layout (Nov 2026) ----------
   Scoped to .ac* classes, used only by index.html. */
.ac { width: min(800px, calc(100% - 48px)); margin-inline: auto; }
.ac-intro { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 44px; padding-top: clamp(2.6rem, 5vw, 3.6rem); align-items: start; }
.ac-intro > div { min-width: 0; }
.ac-intro .ac-name { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 .7rem; }
.ac-intro h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.4vw, 2.7rem); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 1.2rem; max-width: 18ch; }
.ac-intro h1 em { color: var(--accent-2); }
.ac-intro p { color: var(--text); font-size: 16.5px; line-height: 1.75; margin: 0 0 .95rem; }
.ac-intro p strong { color: var(--ink); font-weight: 600; }
.ac-intro .ac-ask { color: var(--ink); font-weight: 600; font-size: 15.5px; }
.ac a.u, .ac-intro p a, .ac-news a, .ac-list a, .ac-note a, .ac-current a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ac a.u:hover, .ac-intro p a:hover, .ac-news a:hover, .ac-list a:hover, .ac-note a:hover, .ac-current a:hover { color: var(--ink); }
.ac-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: .9rem; font-size: 15px; font-weight: 600; }
.ac-links a { color: var(--accent); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.ac-links a:hover { color: var(--ink); }
.ac-photo { margin: 4px 0 0; }
.ac-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--soft); }
.ac-sec { padding-top: clamp(2.6rem, 5vw, 3.4rem); }
.ac-sec h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 1.8rem); letter-spacing: -0.015em; margin: 0 0 1rem; padding-bottom: .45rem; border-bottom: 1px solid var(--line); }
.ac-news { list-style: none; padding: 0; margin: 0; }
.ac-news li { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 14px; padding: 5px 0; font-size: 15.5px; line-height: 1.6; color: var(--text); }
.ac-news time { font-size: 14px; color: var(--muted); white-space: nowrap; }
.ac-older { margin-top: .4rem; }
.ac-older > summary { cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--accent); list-style: none; display: inline-flex; gap: 6px; padding: 4px 0; }
.ac-older > summary::-webkit-details-marker { display: none; }
.ac-older > summary::before { content: "+"; width: 1em; font-weight: 700; }
.ac-older[open] > summary::before { content: "\2212"; }
.ac-older[open] > summary { margin-bottom: .3rem; }
.ac-papers { list-style: none; padding: 0; margin: 0; }
.ac-papers li { margin: 0 0 1.25rem; font-size: 15px; line-height: 1.6; color: var(--text); }
.ac-papers .t { display: block; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.ac-papers .t a:hover { color: var(--accent); }
.ac-papers .a { display: block; }
.ac-papers .a strong { color: var(--ink); font-weight: 600; }
.ac-papers .v { display: block; font-style: italic; color: var(--muted); }
.ac-papers .v span { font-style: normal; }
.ac-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ac-btns a, .ac-tag { display: inline-block; font-size: 12.5px; font-weight: 600; line-height: 1.5; border-radius: 3px; padding: 1px 8px; }
.ac-btns a { color: var(--accent); border: 1px solid var(--chip-done-b); }
.ac-btns a:hover { background: var(--chip-done-bg); color: var(--ink); }
.ac-tag { color: var(--muted); border: 1px solid var(--line); background: var(--soft); }
.ac-tag.peer { color: var(--ink); border-color: var(--chip-done-b); background: var(--chip-done-bg); }
.ac-note { font-size: 14px; color: var(--muted); margin: -.3rem 0 1.1rem; }
.ac-current { list-style: none; padding: 0; margin: 0; }
.ac-current li { margin: 0 0 1rem; font-size: 15.5px; line-height: 1.65; color: var(--text); }
.ac-current strong { color: var(--ink); font-weight: 600; }
.ac-current .when { color: var(--muted); font-size: 14px; }
.ac-list { list-style: none; padding: 0; margin: 0; }
.ac-list li { margin: 0 0 1.05rem; font-size: 15px; line-height: 1.6; color: var(--text); }
.ac-row { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 18px; flex-wrap: wrap; }
.ac-row b { color: var(--ink); font-weight: 600; font-size: 15.5px; }
.ac-row .org { color: var(--text); }
.ac-row time, .ac-row .when { color: var(--muted); font-size: 14px; white-space: nowrap; margin-left: auto; }
.ac-list p { margin: .2rem 0 0; }
.ac-list.compact li { margin-bottom: .45rem; }
.ac-skills { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 20px; margin: 0; font-size: 15px; line-height: 1.6; }
.ac-skills dt { color: var(--ink); font-weight: 600; }
.ac-skills dd { margin: 0; color: var(--text); }
@media (max-width: 700px) {
  .ac { width: calc(100% - 40px); }
  .ac-intro { grid-template-columns: minmax(0, 1fr) 112px; gap: 18px; }
  .ac-intro > div { display: contents; }
  .ac-intro .ac-head { grid-column: 1; grid-row: 1; align-self: end; }
  .ac-photo { grid-column: 2; grid-row: 1; margin: 0; }
  .ac-intro .ac-body { grid-column: 1 / -1; }
  .ac-intro h1 { font-size: 1.75rem; margin-bottom: .2rem; }
  .ac-news li { grid-template-columns: 70px minmax(0, 1fr); gap: 10px; font-size: 15px; }
  .ac-skills { grid-template-columns: 1fr; gap: 2px; }
  .ac-skills dd { margin-bottom: .7rem; }
}

/* Homepage refinements (Nov 2026 review) */
.ac-intro .ac-place { color: var(--muted); font-weight: 500; letter-spacing: .06em; }
.ac-sec { padding-top: clamp(2.9rem, 5.5vw, 3.8rem); }
.ac-news li { padding: 6px 0; }
.ac-current li, .ac-list li { margin-bottom: 1.15rem; }
.ac-list.compact li { margin-bottom: .5rem; }
.ac-older .ac-list { margin-top: .4rem; }
.ac a.u, .ac-intro p a, .ac-news a, .ac-list a, .ac-note a, .ac-current a { text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); }
:root[data-theme="dark"] .ac-intro p, :root[data-theme="dark"] .ac-news li, :root[data-theme="dark"] .ac-current li, :root[data-theme="dark"] .ac-list li { line-height: 1.72; }

/* Readability: running text on the homepage is at least 16px (Nov 2026 review). */
.ac-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.ac-cols .ac-row { display: block; }
.ac-list.ac-cols li { margin-bottom: 1rem; }
.ac-cols .ac-row .when { display: block; margin-left: 0; }
@media (max-width: 700px) { .ac-cols { grid-template-columns: 1fr; } }
.ac-intro .ac-ask { font-size: 16px; }
html:not(.js) .theme-toggle { display: none; } /* the toggle needs JavaScript; hide it otherwise */
.ac-news li, .ac-papers li, .ac-current li, .ac-list li, .ac-note, .ac-skills, .ac-news time, .ac-row time, .ac-row .when, .ac-current .when, .ac-older > summary { font-size: 16px; }
.ac-papers .t { font-size: 17px; }
.ac-row b { font-size: 16px; }
.ac-news li { grid-template-columns: 96px minmax(0, 1fr); }
@media (max-width: 700px) {
  .ac-news li { grid-template-columns: 84px minmax(0, 1fr); font-size: 16px; }
}

/* ---------- Legacy: Version C homepage rules (Nov 2026) ----------
   Kept for one release so a browser that still has the previous homepage cached keeps its layout.
   Safe to delete in the next release.
   Scoped to .home* classes, used only by index.html. Existing rules above are unchanged. */
.home { width: min(var(--max), calc(100% - 64px)); margin-inline: auto; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 56px; padding-top: clamp(3rem, 6vw, 4.25rem); align-items: center; }
.home-hero > div { min-width: 0; }
.home-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 4.4vw, 3.6rem); line-height: 1.06; letter-spacing: -0.03em; max-width: 17ch; margin: .9rem 0 1.4rem; }
.home-hero h1 em { color: var(--accent-2); }
.home-hero p { color: var(--text); font-size: clamp(1.02rem, 1.3vw, 1.1rem); line-height: 1.75; max-width: 38rem; margin-bottom: 1rem; }
.home-hero p strong { color: var(--ink); font-weight: 600; }
.home-hero .home-eyebrow { font-size: 12.5px; margin-bottom: 0; }
.home-hero .home-ask { font-weight: 600; color: var(--ink); font-size: 15.5px; }
.home-hero p a, .home-recent a, .home-research a, .home-note a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.home-hero p a:hover, .home-recent a:hover, .home-research a:hover, .home-note a:hover { color: var(--ink); }
.home-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 1.1rem; font-size: 15px; font-weight: 600; }
.home-links a { border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.home-links a:first-child { color: var(--accent); border-color: currentColor; }
.home-links a:hover { color: var(--accent); border-color: currentColor; }
.home-photo { margin: 0; }
.home-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); background: var(--soft); }
.home-photo figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.home-sec { padding-top: clamp(3rem, 6vw, 4.25rem); }
.home-sec > * { max-width: 46rem; }
.home-sec h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2rem); letter-spacing: -0.02em; margin: 0 0 1.1rem; }
.home-recent { list-style: none; padding: 0; margin: 0; }
.home-recent li { margin: 0 0 .75rem; font-size: 15.5px; line-height: 1.65; color: var(--text); }
.home-recent time { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-right: .45rem; white-space: nowrap; }
.home-research { display: grid; gap: 1.9rem; }
.home-research .home-tag { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.home-research h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 2vw, 1.5rem); line-height: 1.22; letter-spacing: -0.01em; color: var(--ink); margin: .25rem 0 .4rem; }
.home-research p:not(.home-tag) { margin: 0; font-size: 15.5px; line-height: 1.7; color: var(--text); }
.home-more { font-size: 14.5px; font-weight: 600; margin-top: 1.5rem; }
.home-more a { color: var(--accent); border-bottom: 1px solid currentColor; }
.home-note { font-size: 14px; color: var(--muted); margin: -0.5rem 0 1.2rem; }
.home-pubgroup { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 1.3rem 0 .55rem; }
.home-pubs { list-style: none; padding: 0; margin: 0; }
.home-pubs li { font-size: 15px; line-height: 1.6; color: var(--text); margin-bottom: .9rem; }
.home-pubs .cite-authors strong, .home-pubs .cite-title { color: var(--ink); font-weight: 600; }
.home-pubs .cite-venue { font-style: italic; }
.home-pubs .cite-links a { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--accent); border: 1px solid #a9c2bd; border-radius: 3px; padding: 1px 8px; margin: 3px 4px 0 0; }
.home-pubs .cite-links a:hover { background: #eef4f2; color: var(--ink); }
.home-beyond p { font-family: var(--serif); font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--ink); margin: 0; }
.home-beyond .home-links { margin-top: 1rem; }
@media (max-width: 760px) {
  .home { width: calc(100% - 40px); }
  .home-hero { grid-template-columns: 1fr; gap: 0; }
  .home-photo { order: -1; width: 46%; max-width: 170px; margin-bottom: .6rem; }
  .home-photo figcaption { display: none; }
  .home-hero h1 { font-size: 2.15rem; margin-top: .6rem; }
  .home-research { gap: 1.6rem; }
  .home-research h3 { font-size: 1.25rem; }
  .home-pubs li, .home-recent li { font-size: 15px; }
}

/* Desktop: keep the date on the first line of long homepage rows (e.g. Service and leadership);
   the role text wraps within its own column instead. Phones keep the stacked layout. */
@media (min-width: 701px) {
  .ac-list:not(.compact) .ac-row:has(> .when) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; }
}
