/* ==========================================================================
   Subham Pandey — warm editorial research portfolio
   One stylesheet, no framework. Tokens first, then base, layout, components,
   then page-specific pieces.
   ========================================================================== */

/* ---------- Fonts (self-hosted): Besley for headings, Schibsted Grotesk for text; SIL Open Font License 1.1 ---------- */
@font-face { font-family: "Besley"; src: url("../assets/fonts/besley-italic-latin-ext.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Besley"; src: url("../assets/fonts/besley-italic-latin.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Besley"; src: url("../assets/fonts/besley-normal-latin-ext.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Besley"; src: url("../assets/fonts/besley-normal-latin.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../assets/fonts/schibsted-grotesk-italic-latin-ext.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../assets/fonts/schibsted-grotesk-italic-latin.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../assets/fonts/schibsted-grotesk-normal-latin-ext.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../assets/fonts/schibsted-grotesk-normal-latin.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  /* paper + ink */
  --paper: #FFF9EE;
  --paper-2: #F7EEDC;
  --card: #FFFDF8;
  --ink: #1E2127;
  --ink-2: #4A4F58;
  --ink-3: #6A6E76;   /* was #767A82 (4.1:1); darkened to pass WCAG AA on paper and cards */
  --rule: #E8DDC8;
  --rule-strong: #D6C8AC;

  /* vibrant accents */
  --tomato: #F2593A;
  --marigold: #FFC24A;
  --teal: #5BC6BF;
  --cornflower: #6E8EF5;
  --plum: #6B3F7A;
  --sage: #7FAE7A;
  --sage-soft: #E2EFDD;
  --sage-ink: #3B6B37;

  /* soft tints (backgrounds) */
  --tomato-soft: #FDE1D8;
  --marigold-soft: #FFEFC7;
  --teal-soft: #D6F2EF;
  --cornflower-soft: #DFE6FD;
  --plum-soft: #EEE2F2;

  /* text-safe darks (≥ 4.5:1 on paper) */
  --tomato-ink: #B3381C;
  --marigold-ink: #7E5200;
  --teal-ink: #1A6863;
  --cornflower-ink: #2C47AE;
  --plum-ink: #5A3168;

  --font-display: "Besley", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(30, 33, 39, .04), 0 12px 30px -18px rgba(60, 40, 10, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.015em; margin: 0; font-optical-sizing: auto; }
::selection { background: var(--marigold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--cornflower); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: 66ch; }
.prose p { color: var(--ink-2); }
.prose p strong { color: var(--ink); }
.prose a { color: var(--cornflower-ink); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 10px;
}
/* a tiny "node — node" glyph: the site's graph motif */
.eyebrow::before {
  content: ""; width: 30px; height: 10px; flex: none;
  background:
    radial-gradient(circle at 5px 5px, var(--tomato) 4px, transparent 4.5px),
    radial-gradient(circle at 25px 5px, var(--ink) 3px, transparent 3.5px),
    linear-gradient(var(--ink), var(--ink)) 5px 4.25px / 20px 1.5px no-repeat;
}

.em { font-style: italic; font-weight: 500; }
.hl { background: linear-gradient(transparent 58%, var(--marigold) 58%, var(--marigold) 92%, transparent 92%); padding: 0 .08em; }

/* ---------- Header ---------- */
#site-header { min-height: 72px; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: none; overflow: visible; }
.brand-mark .mk-e { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-in 1.1s .2s var(--ease) forwards; }
.brand-mark circle { transform-box: fill-box; transform-origin: center; transition: transform .35s var(--ease); }
.brand:hover .brand-mark circle:nth-of-type(1) { transform: translate(-1px, -1px) scale(1.15); }
.brand:hover .brand-mark circle:nth-of-type(2) { transform: translate(1px, -1px) scale(1.15); }
.brand:hover .brand-mark circle:nth-of-type(3) { transform: translate(-1px, 1px) scale(1.15); }
.brand:hover .brand-mark circle:nth-of-type(4) { transform: translate(1px, 1px) scale(1.15); }
@keyframes draw-in { to { stroke-dashoffset: 0; } }
.brand-name { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative;
  text-decoration: none;
  font-size: 15px; font-weight: 500;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 6px;
  background: var(--marigold); border-radius: 6px; z-index: -1;
}

.menu-btn {
  display: none;
  align-items: center; gap: 8px;
  font: 600 14px/1 var(--font-body);
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}
.menu-btn svg { width: 16px; height: 16px; }

@media (max-width: 980px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 18px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { font-size: 18px; padding: 12px 6px; border-radius: 8px; }
  .nav a[aria-current="page"]::after { left: 6px; right: auto; width: 40px; bottom: 8px; }
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 -2px var(--ink); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { box-shadow: 0 6px 0 -2px var(--tomato); }
.btn svg { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 15px;
  text-decoration: none; color: var(--ink);
  border-bottom: 2px solid var(--marigold);
  padding-bottom: 1px;
  transition: border-color .2s, gap .2s var(--ease);
}
.link-arrow:hover { border-color: var(--tomato); gap: 10px; }
.link-arrow svg { width: 16px; height: 16px; flex: none; }

.pill-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600;
  text-decoration: none;
  color: var(--ink-2);
  padding: 6px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--card);
  transition: border-color .2s, color .2s, background-color .2s;
  cursor: pointer;
  font-family: var(--font-body);
}
.pill-link:hover { border-color: var(--ink); color: var(--ink); }
.pill-link svg { width: 14px; height: 14px; }
.pill-link[aria-expanded="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Tags & status badges ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }

.theme-signal   { --t: var(--cornflower); --t-soft: var(--cornflower-soft); --t-ink: var(--cornflower-ink); }
.theme-forecast { --t: var(--marigold);   --t-soft: var(--marigold-soft);   --t-ink: var(--marigold-ink); }
.theme-secure   { --t: var(--teal);       --t-soft: var(--teal-soft);       --t-ink: var(--teal-ink); }
.theme-energy   { --t: var(--tomato);     --t-soft: var(--tomato-soft);     --t-ink: var(--tomato-ink); }
.theme-vision   { --t: var(--plum);       --t-soft: var(--plum-soft);       --t-ink: var(--plum-ink); }
.tag.theme { background: var(--t-soft); color: var(--t-ink); }

/* application domains (research map, cards, filters) */
.theme-defence   { --t: var(--cornflower); --t-soft: var(--cornflower-soft); --t-ink: var(--cornflower-ink); }
.theme-energy    { --t: var(--marigold);   --t-soft: var(--marigold-soft);   --t-ink: var(--marigold-ink); }
.theme-cyber     { --t: var(--teal);       --t-soft: var(--teal-soft);       --t-ink: var(--teal-ink); }
.theme-transport { --t: var(--tomato);     --t-soft: var(--tomato-soft);     --t-ink: var(--tomato-ink); }
.theme-climate   { --t: var(--sage);       --t-soft: var(--sage-soft);       --t-ink: var(--sage-ink); }
.theme-assistive { --t: var(--plum);       --t-soft: var(--plum-soft);       --t-ink: var(--plum-ink); }

.status { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; white-space: nowrap; }
.status-published { background: var(--teal-soft); color: var(--teal-ink); }
.status-accepted  { background: var(--cornflower-soft); color: var(--cornflower-ink); }
.status-presented { background: var(--plum-soft); color: var(--plum-ink); }
.status-review    { background: var(--marigold-soft); color: var(--marigold-ink); }
.status-ongoing   { background: var(--tomato-soft); color: var(--tomato-ink); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; color: var(--ink-3); }
.meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rule-strong); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.band { background: var(--paper-2); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.section-title { font-size: clamp(32px, 4.6vw, 52px); }
.section-lede { color: var(--ink-2); max-width: 56ch; margin: 14px 0 0; font-size: 18px; }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); position: relative; }
.page-title { font-size: clamp(44px, 7vw, 84px); letter-spacing: -0.03em; }
.page-title .em { color: var(--tomato-ink); }
.page-lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-2); max-width: 60ch; margin: 20px 0 0; }
.page-head .shapes { position: absolute; right: var(--gutter); top: 40px; width: 160px; height: 120px; pointer-events: none; }
@media (max-width: 720px) { .page-head .shapes { display: none; } }

/* ---------- Home hero ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero-title { font-size: clamp(54px, 9vw, 112px); letter-spacing: -0.035em; line-height: .98; margin-bottom: 26px; }
.hero-title .em { color: var(--tomato-ink); font-weight: 500; }
.hero-intro { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.6; color: var(--ink-2); max-width: 36em; }
.hero-intro strong { color: var(--ink); font-weight: 600; }
.now {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 26px 0 32px; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-sm);
  max-width: 36em; font-size: 15.5px; color: var(--ink-2);
}
.now b { color: var(--ink); }
.now .pulse { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }

.portrait { position: relative; aspect-ratio: 4 / 5; max-width: 420px; justify-self: center; width: 100%; }
.portrait .blob-a { position: absolute; width: 74%; aspect-ratio: 1; border-radius: 50%; background: var(--marigold); right: -8%; top: -6%; }
.portrait .blob-b { position: absolute; width: 34%; aspect-ratio: 1; border-radius: 0 0 0 100%; background: var(--tomato); left: -6%; bottom: 8%; }
.portrait .stripes { position: absolute; width: 40%; height: 26%; left: -10%; top: 10%; background: repeating-linear-gradient(-45deg, var(--teal) 0 6px, transparent 6px 14px); border-radius: 8px; opacity: .9; }
.portrait .frame {
  position: absolute; inset: 6% 8% 0 8%;
  border-radius: 999px 999px 22px 22px;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: var(--paper-2);
  box-shadow: 10px 12px 0 var(--cornflower);
}
.portrait .frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.portrait figcaption {
  position: absolute; right: 0; bottom: -18px;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 6px 14px; font: italic 500 15px/1.2 var(--font-display);
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 300px; order: -1; justify-self: start; margin-left: 8px; }
}

/* ---------- Theme tiles (home + research) ---------- */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.theme-tile {
  position: relative; overflow: hidden;
  background: var(--t-soft);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  text-decoration: none;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 230px;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.theme-tile { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); transition: transform .25s var(--ease), box-shadow .3s, opacity .8s var(--ease), translate .8s var(--ease); }
.theme-tile:hover { --ty: -6px; box-shadow: 0 22px 40px -26px rgba(60, 40, 10, .5); }
.theme-tile::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--t); opacity: .18; transition: transform .6s var(--ease); }
.theme-tile:hover::after { transform: scale(1.5); }
.theme-tile .glyph { transition: transform .4s cubic-bezier(.3, 1.5, .5, 1); }
.theme-tile:hover .glyph { transform: rotate(-6deg) scale(1.08); }
/* animated icons */
.g-drone svg { animation: hover-bob 3s ease-in-out infinite; }
.g-drone .rot { transform-box: fill-box; transform-origin: center; animation: spin 1.6s linear infinite; }
.theme-tile:hover .g-drone .rot { animation-duration: .35s; }
.g-sun .rays { transform-origin: 12px 12px; animation: spin 14s linear infinite; }
.theme-tile:hover .g-sun .rays { animation-duration: 3s; }
.g-shield .tick { stroke-dasharray: 1; stroke-dashoffset: 0; }
.theme-tile:hover .g-shield .tick { animation: redraw .7s var(--ease); }
.theme-tile:hover .g-bolt svg { animation: flash .6s ease 2; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes hover-bob { 50% { transform: translateY(-2px); } }
@keyframes redraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes flash { 50% { opacity: .35; transform: scale(.9); } }
.theme-tile .glyph { width: 46px; height: 46px; border-radius: 12px; background: var(--t); display: grid; place-items: center; color: var(--ink); }
.theme-tile .glyph svg { width: 24px; height: 24px; }
.theme-tile h3 { font-size: 22px; }
.theme-tile p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.theme-tile .count { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--t-ink); }
@media (max-width: 980px) { .themes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .themes { grid-template-columns: 1fr; } .theme-tile { min-height: 0; } }

/* ---------- Project grid ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(24px, 3vw, 40px); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; gap: 14px; position: relative; }
.card-fig {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--t-soft);
  border: 1px solid color-mix(in srgb, var(--t) 30%, transparent);
  position: relative;
}
.card-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-fig img { transform: scale(1.03); }
.card-fig .fig-tag { position: absolute; left: 14px; top: 14px; }
.card-fig .fig-tag .tag { background: var(--card); color: var(--t-ink); box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--ink-3); }
.card-title { font-size: clamp(23px, 2.2vw, 28px); line-height: 1.15; }
.card-title a { text-decoration: none; background-image: linear-gradient(var(--t), var(--t)); background-size: 0 3px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s var(--ease); }
.card:hover .card-title a, .card-title a:focus-visible { background-size: 100% 3px; }
.card-desc { color: var(--ink-2); margin: 0; }
.notice { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.notice li { display: flex; gap: 10px; }
.notice li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 2px; background: var(--t); transform: rotate(45deg); }
.card-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(28px, 4vw, 44px); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-row .label { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-right: 4px; min-width: 64px; }
.chip {
  font: 600 14px/1 var(--font-body);
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--rule-strong);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--t, var(--ink)); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .n { font-weight: 500; opacity: .6; }
.empty { padding: 40px; text-align: center; color: var(--ink-3); border: 1.5px dashed var(--rule-strong); border-radius: var(--radius); }

/* ---------- News ---------- */
.news { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.news li { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.news time { font: italic 500 16px/1.5 var(--font-display); color: var(--ink-3); }
.news p { margin: 0; color: var(--ink-2); }
.news p b { color: var(--ink); font-weight: 600; }
.news a { color: var(--cornflower-ink); }
@media (max-width: 560px) { .news li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Closing band ---------- */
.closing { background: var(--plum); color: var(--paper); border-radius: 28px; padding: clamp(36px, 6vw, 72px); position: relative; overflow: hidden; }
.closing h2 { font-size: clamp(34px, 5vw, 60px); max-width: 14ch; }
.closing h2 .em { color: var(--marigold); }
.closing p { color: #EADFEF; max-width: 46ch; font-size: 18px; margin: 18px 0 28px; }
.closing .btn { border-color: var(--paper); color: var(--paper); }
.closing .btn:hover { box-shadow: 0 6px 0 -2px var(--marigold); }
.closing .btn-solid { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.closing .ring { position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid var(--tomato); opacity: .95; }
.closing .ring2 { position: absolute; right: 150px; top: -40px; width: 90px; height: 90px; border-radius: 50%; background: var(--teal); }
@media (max-width: 720px) { .closing .ring { width: 160px; height: 160px; border-width: 24px; right: -50px; bottom: -50px; } .closing .ring2 { display: none; } }

/* ---------- Research themes (research page) ---------- */
.theme-block { display: grid; grid-template-columns: 300px 1fr; gap: clamp(24px, 5vw, 64px); padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--rule); }
.theme-block:first-of-type { border-top: 0; }
.theme-side .num { font: italic 500 18px/1 var(--font-display); color: var(--t-ink); margin-bottom: 14px; display: block; }
.theme-side h2 { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 18px; }
.theme-side .swatch { height: 10px; width: 72px; border-radius: 10px; background: var(--t); }
.theme-q { font: italic 500 clamp(22px, 2.4vw, 28px)/1.3 var(--font-display); margin: 0 0 22px; padding-left: 20px; border-left: 4px solid var(--t); color: var(--ink); max-width: 34em; }
.theme-body .prose { margin-bottom: 22px; }
.related { display: flex; flex-wrap: wrap; gap: 10px; }
.related a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; background: var(--t-soft); color: var(--ink); padding: 8px 14px 8px 8px; border-radius: 999px; font-size: 14.5px; font-weight: 500; transition: transform .2s var(--ease); }
.related a:hover { transform: translateY(-2px); }
.related img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--card); }
@media (max-width: 860px) { .theme-block { grid-template-columns: 1fr; } }

/* ---------- Project detail ---------- */
.detail-head { padding-top: clamp(36px, 5vw, 64px); }
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 22px; }
.crumbs a { color: var(--ink-2); }
.detail-title { font-size: clamp(36px, 5.6vw, 68px); letter-spacing: -0.03em; max-width: 18ch; margin: 14px 0 20px; }
.detail-lede { font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-2); max-width: 54ch; }
.detail-fig { margin: clamp(28px, 4vw, 48px) 0 0; aspect-ratio: 16 / 10; max-width: 920px; border-radius: 24px; overflow: hidden; background: var(--t-soft); border: 1px solid color-mix(in srgb, var(--t) 30%, transparent); }
.detail-fig img { width: 100%; height: 100%; object-fit: cover; }
.fig-caption { font-size: 13.5px; color: var(--ink-3); margin-top: 10px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 28px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.facts div { padding: 16px 18px 16px 0; }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 15.5px; font-weight: 500; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts { grid-template-columns: repeat(3, 1fr); }
.facts .facts-wide { grid-column: 1 / -1; border-top: 1px solid var(--rule); }
.sv-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.sv-list li { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: baseline; gap: 12px; font-size: 15.5px; }
.sv-list .status { justify-self: start; }
.sv-list em { color: var(--ink-3); font-style: normal; font-size: 14px; }
@media (max-width: 640px) { .facts { grid-template-columns: repeat(2, 1fr); } .sv-list li { grid-template-columns: 1fr; gap: 4px; } }

.detail-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }
.toc { position: sticky; top: 96px; align-self: start; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; font-size: 14.5px; color: var(--ink-3); transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--t); font-weight: 600; }
@media (max-width: 900px) { .detail-body { grid-template-columns: 1fr; } .toc { display: none; } }

.dsec { margin-bottom: clamp(44px, 5vw, 64px); max-width: 70ch; }
.dsec h2 { font-size: clamp(26px, 2.6vw, 32px); margin-bottom: 16px; display: flex; align-items: baseline; gap: 14px; }
.dsec h2 .n { font: italic 500 16px/1 var(--font-display); color: var(--t-ink); min-width: 24px; }
.dsec p, .dsec li { color: var(--ink-2); }
.dsec ul { padding-left: 20px; }
.dsec li { margin-bottom: 8px; }
.dsec .question { font: italic 500 clamp(22px, 2.4vw, 28px)/1.35 var(--font-display); color: var(--ink); background: var(--t-soft); border-radius: var(--radius); padding: 24px 28px; margin: 0; }


.cite-box { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 18px 20px; }
.cite-box .cite { margin: 0 0 12px; color: var(--ink-2); font-size: 15.5px; }
.bib { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease), margin .35s var(--ease); }
.bib > .bib-in { overflow: hidden; }
.bib.is-open { grid-template-rows: 1fr; margin-top: 12px; }
.bib pre { margin: 0; background: var(--ink); color: #F3EBDD; padding: 16px 18px; border-radius: 10px; font: 13px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; overflow-x: auto; white-space: pre; }
.bib .copy { margin-top: 8px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1.5px solid var(--ink); padding-top: 24px; }
.pager a { text-decoration: none; display: block; padding: 6px 0; }
.pager small { display: block; font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.pager span { font: 600 clamp(18px, 2vw, 22px)/1.2 var(--font-display); }
.pager a:hover span { text-decoration: underline; text-decoration-color: var(--marigold); text-decoration-thickness: 3px; }
.pager .next { text-align: right; }

/* ---------- Publications ---------- */
.pub-group { margin-bottom: clamp(40px, 5vw, 60px); }
.pub-group > h2 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 6px; display: flex; align-items: baseline; gap: 12px; }
.pub-group > h2 .count { font: 500 15px/1 var(--font-body); color: var(--ink-3); }
.pubs { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.pub { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.pub .idx { font: italic 500 18px/1.3 var(--font-display); color: var(--ink-3); }
.pub-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.pub h3 { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.3; margin-bottom: 8px; letter-spacing: -0.005em; }
.pub .authors { font-size: 15px; color: var(--ink-2); margin: 0 0 4px; }
.pub .authors b { color: var(--ink); font-weight: 700; }
.pub .venue { font-size: 15px; color: var(--ink-2); margin: 0 0 10px; }
.pub .venue i { color: var(--ink); }
.pub .summary { font-size: 15px; color: var(--ink-2); margin: 0 0 12px; padding-left: 12px; border-left: 3px solid var(--t, var(--rule-strong)); }
.pub .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pub .doi { font: 13px/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--ink-3); }
@media (max-width: 560px) { .pub { grid-template-columns: 1fr; gap: 4px; } }
.footnote { font-size: 14px; color: var(--ink-3); }

/* ---------- Experience / timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline > li { display: grid; grid-template-columns: 190px 1fr; gap: clamp(20px, 4vw, 48px); padding: 28px 0; border-top: 1px solid var(--rule); }
.timeline > li:first-child { border-top: 1.5px solid var(--ink); }
.tl-when { font: italic 500 17px/1.4 var(--font-display); color: var(--ink-2); }
.tl-when small { display: inline-block; margin-top: 10px; padding: 5px 9px; border-radius: 6px; background: var(--t-soft); color: var(--t-ink); font: 700 12px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.tl-body h3 { font-size: clamp(22px, 2.2vw, 26px); margin-bottom: 4px; }
.tl-body .where { color: var(--ink-2); margin: 0 0 4px; font-weight: 500; }
.tl-body .sub { font-size: 14.5px; color: var(--ink-3); margin: 0 0 14px; font-style: italic; }
.tl-body ul { margin: 0; padding-left: 20px; color: var(--ink-2); }
.tl-body li { margin-bottom: 6px; }
@media (max-width: 680px) { .timeline > li { grid-template-columns: 1fr; gap: 8px; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.box { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); }
.box h3 { font-size: 24px; margin-bottom: 18px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 12px 0; border-top: 1px solid var(--rule); }
.list-plain li:first-child { border-top: 0; padding-top: 0; }
.list-plain b { display: block; font-weight: 600; }
.list-plain span { color: var(--ink-2); font-size: 15px; }
.list-plain em { color: var(--ink-3); font-size: 14px; font-style: normal; }

.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.skills div { padding: 14px 0; border-top: 1px solid var(--rule); }
.skills dt { font-weight: 600; margin-bottom: 4px; }
.skills dd { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 760px) { .skills { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-photo { position: sticky; top: 100px; }
.about-photo .frame { border-radius: 24px; overflow: hidden; border: 3px solid var(--ink); box-shadow: -10px 10px 0 var(--teal); aspect-ratio: 4 / 5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.about-photo .facts-mini { margin-top: 24px; font-size: 15px; color: var(--ink-2); }
.about-photo .facts-mini div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); }
.about-photo .facts-mini b { color: var(--ink); font-weight: 600; }
.lead-big { font: 400 clamp(22px, 2.4vw, 28px)/1.45 var(--font-display); color: var(--ink); margin-bottom: 28px; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .about-photo { position: static; max-width: 320px; } }

/* ---------- Contact ---------- */
.contact-email { font: 600 clamp(28px, 5vw, 56px)/1.1 var(--font-display); letter-spacing: -0.02em; text-decoration: none; word-break: break-word; background-image: linear-gradient(var(--marigold), var(--marigold)); background-size: 100% 10px; background-position: 0 88%; background-repeat: no-repeat; transition: background-size .3s var(--ease); }
.contact-email:hover { background-size: 100% 40%; }
.profiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.profiles a { display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 18px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--rule); transition: border-color .2s, transform .2s var(--ease); }
.profiles a:hover { border-color: var(--ink); transform: translateY(-2px); }
.profiles .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--t-soft); color: var(--t-ink); flex: none; }
.profiles .ic svg { width: 20px; height: 20px; }
.profiles b { display: block; font-weight: 600; }
.profiles span { font-size: 14px; color: var(--ink-3); }
@media (max-width: 860px) { .profiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .profiles { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); margin-top: clamp(40px, 6vw, 80px); padding: 36px 0 44px; font-size: 14.5px; color: var(--ink-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ==========================================================================
   Identity & motion layer
   ========================================================================== */

/* ---------- Page transitions (browsers that support cross-document view transitions) ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out .22s ease both; }
::view-transition-new(root) { animation: vt-in .42s cubic-bezier(.2, .7, .2, 1) both; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Lab-notebook dot grid behind page openings ---------- */
.hero, .page-head { position: relative; isolation: isolate; }
.hero::before, .page-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.5) 50%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.5) 50%, transparent 92%);
}

/* ---------- Signal trace under page titles ---------- */
.trace { height: 46px; margin-top: 22px; max-width: 720px; }
.trace svg { width: 100%; height: 100%; overflow: visible; }
.trace path { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.trace.is-in path { transition: stroke-dashoffset 2.2s cubic-bezier(.45, .05, .25, 1) .25s; stroke-dashoffset: 0; }

/* ---------- Hero entrance ---------- */
.intro > * { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
.portrait .frame { animation: frame-in 1.1s var(--ease) .25s both; }
.portrait .blob-a { animation: pop-in .9s cubic-bezier(.3, 1.4, .5, 1) .55s both; }
.portrait .blob-b { animation: pop-in .9s cubic-bezier(.3, 1.4, .5, 1) .75s both; }
.portrait .stripes { animation: slide-in 1s var(--ease) .9s both; }
.portrait figcaption { animation: rise .7s var(--ease) 1.2s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.4); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-30px); } }
@keyframes frame-in { from { clip-path: inset(100% 0 0 0 round 999px 999px 22px 22px); } to { clip-path: inset(0 0 0 0 round 999px 999px 22px 22px); } }

/* ---------- Micro-interactions ---------- */
.pill-go svg, .btn svg, .link-arrow svg { transition: transform .25s var(--ease); }
.pill-go:hover svg, .btn:hover svg, .link-arrow:hover svg { transform: translateX(3px); }
.chip, .pill-link, .btn { -webkit-tap-highlight-color: transparent; }
.chip:active, .pill-link:active, .btn:active { transform: scale(.97); }
.pill-link.is-done { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-ink); }
.card-fig { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card:hover .card-fig { transform: translateY(-4px); box-shadow: 0 16px 30px -22px rgba(60, 40, 10, .45); }

/* ---------- Research map ---------- */
.research-map { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(250px, 1fr); gap: clamp(18px, 3vw, 32px); align-items: start; }
.map-canvas {
  position: relative; border-radius: 24px; border: 1px solid var(--rule); background-color: var(--card);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.4px); background-size: 20px 20px;
  padding: clamp(4px, 1vw, 12px);
}
.map-canvas svg { width: 100%; height: auto; display: block; overflow: visible; }
.m-cluster circle { fill: var(--t-soft); stroke: color-mix(in srgb, var(--t) 45%, transparent); stroke-width: 1.5; stroke-dasharray: 4 6; opacity: 0; transform-box: fill-box; transform-origin: center; transition: fill .3s, stroke .3s; }
.m-cluster text { font: 700 11.5px var(--font-body); letter-spacing: .14em; text-transform: uppercase; fill: var(--t-ink); opacity: 0; }
.is-in .m-cluster circle { animation: map-pop .9s var(--ease) var(--d) both; opacity: 1; }
.is-in .m-cluster text { animation: fade-in .6s ease calc(var(--d) + 300ms) both; opacity: 1; }
.m-cluster.is-on circle { stroke: var(--t); stroke-dasharray: none; }
.m-edge { fill: none; stroke: var(--ink); stroke-opacity: .32; stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-opacity .25s, stroke-width .25s, stroke .25s; }
.is-in .m-edge { animation: draw-in 1.1s var(--ease) var(--d) forwards; }
.m-edge { cursor: help; }
.m-edge.is-on { stroke-opacity: 1; stroke-width: 2.8; stroke: var(--tomato); }
.has-focus .m-edge:not(.is-on) { stroke-opacity: .1; }
.m-pulse { fill: var(--tomato); stroke: var(--card); stroke-width: 1.5; pointer-events: none; }
.has-focus .m-pulse { opacity: 0 !important; }
.m-node { cursor: pointer; outline: none; }
.m-node .hit { fill: transparent; }
.m-node .dot { fill: var(--t); stroke: var(--ink); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), fill .2s; opacity: 0; }
.m-node .core { fill: var(--ink); pointer-events: none; opacity: 0; transform-box: fill-box; transform-origin: center; }
.m-node.is-review .dot { fill: var(--card); stroke: var(--t-ink); stroke-width: 4; }
.m-node.is-review .core { fill: var(--t-ink); }
.m-node text { font: 600 13px var(--font-body); fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 5px; stroke-linejoin: round; opacity: 0; transition: opacity .25s; pointer-events: none; }
.is-in .m-node .dot, .is-in .m-node .core { animation: map-pop .55s cubic-bezier(.3, 1.5, .5, 1) var(--d) both; opacity: 1; }
.is-in .m-node text { animation: fade-in .5s ease calc(var(--d) + 200ms) both; opacity: 1; }
.m-node:hover .dot, .m-node:focus-visible .dot, .m-node.is-on .dot { scale: 1.3; }
.m-node:focus-visible .dot { stroke: var(--cornflower-ink); stroke-width: 4; }
.has-focus .m-node:not(.is-on):not(.is-near) { opacity: .28; }
.m-node { transition: opacity .25s; }
@keyframes map-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.map-panel { display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.map-panel .mp-intro { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.map-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.map-legend button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; font: 500 15px var(--font-body); color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 14px; cursor: default; transition: border-color .2s, transform .2s var(--ease); }
.map-legend button:hover, .map-legend button:focus-visible { border-color: var(--t); transform: translateX(3px); }
.map-legend .sw { width: 14px; height: 14px; border-radius: 50%; background: var(--t); border: 2px solid var(--ink); flex: none; }
.map-legend .count { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.map-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-3); margin: 0; }
.map-key span { display: inline-flex; align-items: center; gap: 8px; }
.map-key i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); display: inline-block; }
.map-key i.solid { background: var(--ink-3); border-color: var(--ink); }
.map-key i.ring { background: var(--card); border: 3px solid var(--ink-3); }
.map-key i.line { width: 22px; height: 0; border-radius: 0; border: 0; border-top: 2px solid var(--ink-3); }
.mp-card { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--t); border-radius: 16px; padding: 18px 20px; animation: rise .35s var(--ease) both; }
.mp-card h3 { font-size: 22px; margin: 12px 0 8px; }
.mp-card p { color: var(--ink-2); font-size: 15px; margin: 10px 0; }
.mp-card .mp-sub { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 14px 0 6px; }
.mp-links { list-style: none; margin: 0 0 14px; padding: 0; font-size: 14.5px; }
.mp-links li { padding: 4px 0; }
.mp-links a { color: var(--ink); font-weight: 600; }
.mp-links span { color: var(--ink-3); }
@media (max-width: 900px) { .research-map { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .m-node text { opacity: 0 !important; } .m-node.is-on text { opacity: 1 !important; } .m-cluster text { font-size: 15px; } }

/* ---------- Pipeline diagram (project pages) ---------- */
#pipeline { max-width: none; }
.arch { container-type: inline-size; }
.arch-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 24px; }
.arch-flow li { position: relative; margin: 0 !important; }
.arch-flow li:not(:last-child)::after {
  content: ""; position: absolute; right: -22px; top: 50%; width: 20px; height: 12px; transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M1 6h16M12 1.5l5 4.5-5 4.5' fill='none' stroke='%231E2127' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.stage {
  width: 100%; height: 100%; min-height: 118px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  text-align: left; cursor: pointer;
  font-family: var(--font-body); color: var(--ink);
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; padding: 12px 12px 10px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s, border-color .3s;
}
.stage .s-n { font: italic 500 14px/1 var(--font-display); color: var(--t-ink); }
.stage .s-l { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.stage .s-k { margin-top: auto; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.stage.k-input { background: var(--paper); border-style: dashed; }
.stage.k-model { background: var(--ink); color: var(--paper); }
.stage.k-model .s-k { color: #C9C2B4; }
.stage.k-model .s-n { color: var(--t); }
.stage.k-output { background: var(--t-soft); }
.stage:hover { transform: translateY(-3px); }
.stage[aria-pressed="true"] { transform: translateY(-5px); box-shadow: 0 7px 0 var(--t); }
.stage.is-done { border-color: var(--t-ink); }
.is-playing .stage[aria-pressed="true"] { animation: stage-ping 1.7s ease-out; }
@keyframes stage-ping { 0% { box-shadow: 0 7px 0 var(--t), 0 0 0 0 color-mix(in srgb, var(--t) 60%, transparent); } 70% { box-shadow: 0 7px 0 var(--t), 0 0 0 12px transparent; } }
.arch-note { margin-top: 22px; padding: 18px 22px; min-height: 108px; background: var(--t-soft); border-left: 4px solid var(--t); border-radius: 0 14px 14px 0; }
.arch-note > * { animation: rise .35s var(--ease) both; }
.arch-note .an-k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--t-ink); margin-bottom: 4px; }
.arch-note strong { font: 600 20px/1.3 var(--font-display); }
.arch-note p { margin: 6px 0 0; }
.arch-hint { font-size: 13.5px; color: var(--ink-3); margin: 10px 0 0; }

/* controls, progress, data-flow and the all-steps list */
.arch-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.arch-ctrl { display: flex; gap: 6px; }
.ctrl { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background-color .2s, color .2s, transform .2s var(--ease); }
.ctrl svg { width: 18px; height: 18px; }
.ctrl:hover { background: var(--t-soft); }
.ctrl:active { transform: scale(.92); }
.ctrl-play { background: var(--ink); color: var(--paper); }
.ctrl-play:hover { background: var(--ink); color: var(--t); }
.arch-progress { flex: 1; height: 6px; border-radius: 6px; background: var(--rule); overflow: hidden; }
.arch-progress span { display: block; height: 100%; background: var(--t); transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease); }
.arch-count { font-size: 13px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.arch-flow li.is-active:not(:last-child)::before {
  content: ""; position: absolute; top: 50%; right: -22px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--t); box-shadow: 0 0 0 3px var(--card); z-index: 2; animation: packet 1.1s ease-in-out infinite;
}
.arch.is-stacked .arch-flow li.is-active:not(:last-child)::before { top: auto; right: auto; left: 18px; bottom: -14px; animation-name: packet-down; }
@keyframes packet { 0% { transform: translateX(-4px); opacity: 0; } 30%, 70% { opacity: 1; } 100% { transform: translateX(16px); opacity: 0; } }
@keyframes packet-down { 0% { transform: translateY(-6px); opacity: 0; } 30%, 70% { opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }
.an-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin-top: 14px; }
.an-io { flex: 1 1 120px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; font-size: 14px; font-weight: 600; }
.an-io small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.an-io.is-now { border-color: var(--t); box-shadow: inset 4px 0 0 var(--t); }
.an-arrow { display: grid; place-items: center; color: var(--ink-3); }
.an-arrow svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .an-arrow { display: none; } }
.arch-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.arch-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: 13px; color: var(--ink-3); }
.arch-legend span { display: inline-flex; align-items: center; gap: 7px; }
.arch-legend i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--ink); background: var(--card); }
.arch-legend i.k-input { border-style: dashed; background: var(--paper); }
.arch-legend i.k-model { background: var(--ink); }
.arch-legend i.k-output { background: var(--t-soft); }
.arch-list { list-style: none; padding: 0 !important; margin: 16px 0 0; border-top: 1.5px solid var(--ink); }
.arch-list li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); margin: 0 !important; animation: rise .35s var(--ease) both; }
.arch-list .al-n { font: italic 500 18px/1.4 var(--font-display); color: var(--t-ink); }
.arch-list em { font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-left: 6px; }
.arch-list p { margin: 4px 0 0; font-size: 15px; }
@media print { .arch-list[hidden] { display: block !important; } .arch-bar, .arch-foot .arch-all, .arch-hint { display: none !important; } }
/* stacked layout: set by site.js when each step would be narrower than ~125px */
.arch.is-stacked .arch-flow { grid-template-columns: 1fr; gap: 18px; }
.arch.is-stacked .arch-flow li:not(:last-child)::after { right: auto; left: 22px; top: auto; bottom: -17px; transform: rotate(90deg); }
.arch.is-stacked .stage { min-height: 0; flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; }
.arch.is-stacked .stage .s-k { margin: 0 0 0 auto; }
.arch.is-stacked .stage[aria-pressed="true"] { transform: translateX(6px); box-shadow: -6px 0 0 var(--t); }

/* ---------- Contributions, lists ---------- */
.contribs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.contrib { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 20px; transition: transform .3s var(--ease), border-color .3s; }
.contrib:hover { transform: translateY(-3px); border-color: var(--t); }
.contrib .c-n { font: italic 500 26px/1 var(--font-display); color: var(--t-ink); }
.contrib h3 { font-size: 19px; margin: 10px 0 6px; }
.contrib p { margin: 0; font-size: 15px; }
.ticks { list-style: none; padding: 0 !important; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 14px; height: 8px; border-left: 2.5px solid var(--t-ink); border-bottom: 2.5px solid var(--t-ink); transform: rotate(-45deg); }
.pending { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-figure { margin: 0; }
.facts .badges { display: flex; flex-wrap: wrap; gap: 6px; }
.cite-box { margin-bottom: 12px; }
.cite-box .actions { display: flex; flex-wrap: wrap; gap: 8px; }

.toc { position: sticky; }
.toc-progress { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; pointer-events: none; }
.toc-progress span { display: block; height: 100%; background: var(--t); transform-origin: top; transform: scaleY(0); }

/* ---------- Publications overview ---------- */
.pub-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 20px 32px; align-items: end; margin-bottom: clamp(32px, 4vw, 48px); }
.po-bar { display: flex; gap: 5px; height: 52px; margin-bottom: 12px; }
.po-seg { border: 1.5px solid var(--ink); border-radius: 10px; cursor: pointer; font: 700 16px var(--font-body); display: flex; align-items: center; padding: 0 12px; min-width: 42px; transform-origin: left; animation: grow-x .9s var(--ease) both; transition: opacity .25s, transform .25s var(--ease); }
.po-seg:nth-child(2) { animation-delay: .1s; } .po-seg:nth-child(3) { animation-delay: .2s; } .po-seg:nth-child(4) { animation-delay: .3s; }
.po-seg:hover { transform: translateY(-3px); }
.po-seg.status-published { background: var(--teal); color: var(--ink); }
.po-seg.status-accepted { background: var(--cornflower); color: var(--ink); }
.po-seg.status-presented { background: var(--plum); color: var(--paper); }
.po-seg.status-review { background: var(--marigold); color: var(--ink); }
.has-filter .po-seg[aria-pressed="false"] { opacity: .3; }
@keyframes grow-x { from { transform: scaleX(0); opacity: 0; } }
.po-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.chip .sw.status-published { background: var(--teal); } .chip .sw.status-accepted { background: var(--cornflower); }
.chip .sw.status-presented { background: var(--plum); } .chip .sw.status-review { background: var(--marigold); }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; font: 500 15.5px var(--font-body); color: var(--ink); background: var(--card); border: 1.5px solid var(--rule-strong); border-radius: 999px; padding: 12px 16px 12px 42px; transition: border-color .2s, box-shadow .2s; }
.search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--marigold-soft); }
.search label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.pub { transition: background-color .25s; border-radius: 0; }
.pub:hover { background: linear-gradient(90deg, var(--t-soft, var(--paper-2)), transparent 70%); }
@media (max-width: 760px) { .pub-tools { grid-template-columns: 1fr; } }

/* ---------- Timeline ---------- */
.k-research   { --k: var(--cornflower); --k-soft: var(--cornflower-soft); --k-ink: var(--cornflower-ink); }
.k-paper      { --k: var(--marigold);   --k-soft: var(--marigold-soft);   --k-ink: var(--marigold-ink); }
.k-education  { --k: var(--teal);       --k-soft: var(--teal-soft);       --k-ink: var(--teal-ink); }
.k-leadership { --k: var(--tomato);     --k-soft: var(--tomato-soft);     --k-ink: var(--tomato-ink); }
.k-service    { --k: var(--plum);       --k-soft: var(--plum-soft);       --k-ink: var(--plum-ink); }
.chip.k-research .sw, .chip.k-paper .sw, .chip.k-education .sw, .chip.k-leadership .sw, .chip.k-service .sw { background: var(--k); }
#timeline { position: relative; }
.tl-spine { position: absolute; left: 149px; top: 10px; bottom: 0; width: 3px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.tl-fill { position: absolute; inset: 0; background: linear-gradient(var(--tomato), var(--marigold) 35%, var(--teal) 70%, var(--cornflower)); transform-origin: top; transform: scaleY(0); }
.tl-year { display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.tl-y { position: sticky; top: 92px; align-self: start; font: italic 500 clamp(30px, 3.6vw, 42px)/1 var(--font-display); color: var(--ink); padding-top: 22px; }
.tl-year ol { list-style: none; margin: 0; padding: 0 0 24px; }
.tl-item { position: relative; padding: 12px 0 12px 40px; }
.tl-item.reveal { transition-delay: calc(var(--i, 0) * 70ms); }
.tl-dot { position: absolute; left: -7px; top: 34px; width: 17px; height: 17px; border-radius: 50%; background: var(--k); border: 2.5px solid var(--ink); box-shadow: 0 0 0 5px var(--paper); transform: scale(0); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1) .2s; }
.tl-item.is-in .tl-dot { transform: none; }
.tl-card { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 22px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.tl-card:hover { transform: translateX(4px); border-color: var(--k); box-shadow: -4px 0 0 var(--k); }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13.5px; color: var(--ink-3); margin-bottom: 6px; }
.tl-kind { background: var(--k-soft); color: var(--k-ink); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; }
.tl-card h3 { font-size: clamp(19px, 2vw, 22px); line-height: 1.25; margin-bottom: 2px; }
.tl-where { font-style: italic; color: var(--ink-2); font-size: 15px; margin: 0 0 8px; }
.tl-card p, .tl-card li { color: var(--ink-2); font-size: 15.5px; }
.tl-card p:last-child { margin-bottom: 0; }
.tl-card ul { padding-left: 20px; margin: 0 0 10px; }
.tl-card .link-arrow { margin-top: 4px; font-size: 14px; }
@media (max-width: 680px) {
  .tl-spine { left: 6px; }
  .tl-year { grid-template-columns: 1fr; }
  .tl-y { position: static; padding: 18px 0 4px 32px; font-size: 30px; }
  .tl-item { padding-left: 32px; }
  .tl-dot { left: -1px; }
}

/* ---------- Research & Publications ---------- */
.page-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.domain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.domain-card { background: var(--card); border: 1px solid var(--rule); border-top: 5px solid var(--t); border-radius: var(--radius); padding: 22px 22px 18px; scroll-margin-top: 96px; transition: transform .3s var(--ease), box-shadow .3s; }
.domain-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.domain-card .swatch { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--t-soft); border: 2px solid var(--t); margin-bottom: 14px; }
.domain-card h3 { font-size: 21px; line-height: 1.2; margin-bottom: 10px; }
.domain-card p { color: var(--ink-2); font-size: 15px; margin: 0 0 14px; }
.domain-card ul { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--rule); display: grid; gap: 7px; }
.domain-card li { font-size: 14.5px; line-height: 1.4; }
.domain-card li a { color: var(--ink); font-weight: 600; text-decoration-color: var(--t); }
.domain-card .also { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 980px) { .domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .domain-grid { grid-template-columns: 1fr; } }
.used-in { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ink-3); }
.used-in a { color: var(--ink-2); }
.unpub { font-style: italic; color: var(--ink-3); }
.res-h { font-size: 18px; margin: 18px 0 8px; }
.pending svg { width: 18px; height: 18px; flex: none; color: var(--t-ink, var(--ink-2)); }
.mp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; background: var(--t-soft); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; }
.headline .hl-value { font: 600 clamp(28px, 3.4vw, 40px)/1.1 var(--font-display); color: var(--ink); white-space: nowrap; }
.headline p { margin: 0; flex: 1 1 260px; color: var(--ink-2); }
.m-link2 { fill: none; stroke: var(--t-ink); stroke-width: 1.6; stroke-dasharray: .02 .025; opacity: .55; transition: opacity .25s, stroke-width .25s; }
.m-link2-end { fill: var(--card); stroke: var(--t-ink); stroke-width: 2; opacity: .7; }
.m-link2.is-on, .m-link2-end.is-on { opacity: 1; stroke-width: 2.6; }
.has-focus .m-link2:not(.is-on), .has-focus .m-link2-end:not(.is-on) { opacity: .15; }
.map-key i.line.dash { border-top-style: dashed; }
.mp-links li { display: grid; gap: 2px; padding: 6px 0; }
.mp-links li span { font-size: 13.5px; }

/* ---------- Blog ---------- */
.blog-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 16px 32px; align-items: end; margin-bottom: clamp(28px, 4vw, 44px); }
.blog-tools .filters { margin: 0; }
@media (max-width: 760px) { .blog-tools { grid-template-columns: 1fr; } }
.post-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 980px) { .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .post-list { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--marigold); }
.post-card h3 { font-size: 22px; line-height: 1.2; }
.post-card h3 a { text-decoration: none; background-image: linear-gradient(var(--marigold), var(--marigold)); background-size: 0 3px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s var(--ease); }
.post-card:hover h3 a { background-size: 100% 3px; }
.post-card p { margin: 0; color: var(--ink-2); font-size: 15.5px; flex: 1; }
.post-card .link-arrow { align-self: flex-start; font-size: 14px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; color: var(--ink-3); }
.post-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rule-strong); }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ptag { font-size: 12.5px; font-weight: 600; color: var(--plum-ink); background: var(--plum-soft); padding: 3px 9px; border-radius: 999px; }
.post { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(40px, 6vw, 72px); }
.post .detail-title { max-width: 22ch; }
.post-body { margin: 28px 0 48px; max-width: 68ch; font-size: 18px; }
.post-body h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 36px 0 12px; }
.post-body h3 { font-size: 21px; margin: 28px 0 10px; }
.post-body p, .post-body li { color: var(--ink-2); }
.post-body blockquote { margin: 24px 0; padding: 14px 20px; border-left: 4px solid var(--marigold); background: var(--marigold-soft); border-radius: 0 12px 12px 0; }
.post-body blockquote p { margin: 0; color: var(--ink); font: italic 500 20px/1.45 var(--font-display); }
.post-body code { font: 15px ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--paper-2); padding: 2px 6px; border-radius: 5px; }
.post-body pre { background: var(--ink); color: #F3EBDD; padding: 16px 18px; border-radius: 12px; overflow-x: auto; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body img { border-radius: 14px; border: 1px solid var(--rule); }
.post-gallery { margin: 22px 0 26px; }
.post-gallery.is-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.post-gallery figure { margin: 0; }
.post-gallery img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; transition: transform .4s var(--ease); }
.post-gallery.is-grid img { aspect-ratio: 4 / 3; }
.post-gallery a { display: block; overflow: hidden; border-radius: 14px; }
.post-gallery a:hover img { transform: scale(1.03); }
.post-gallery figcaption { font-size: 14px; color: var(--ink-3); margin-top: 6px; }
@media (max-width: 600px) { .post-gallery.is-grid { grid-template-columns: 1fr; } }
.post-cover { display: block; margin: -22px -22px 6px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-cover img { transform: scale(1.04); }

/* ---------- Conference gallery ---------- */
#gallery { max-width: none; }
.gallery-note { color: var(--ink-3); font-size: 15px; }
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 120px; gap: 12px; }
.g-item { margin: 0; grid-column: span 3; grid-row: span 2; display: flex; flex-direction: column; min-height: 0; }
.g-item.is-tall { grid-column: span 2; grid-row: span 3; }
.g-item:nth-child(n+4):not(.is-tall) { grid-column: span 2; }
.g-open { flex: 1; min-height: 0; padding: 0; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--paper-2); }
.g-open img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.g-open:hover img { transform: scale(1.04); }
.g-item figcaption { font-size: 13.5px; color: var(--ink-3); padding-top: 6px; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .g-item, .g-item.is-tall, .g-item:nth-child(n+4):not(.is-tall) { grid-column: span 1; grid-row: auto; }
  .g-open { aspect-ratio: 4 / 3; }
  .g-item.is-tall .g-open { aspect-ratio: 3 / 4; }
}
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(20, 18, 16, .82); }
.lightbox figure { margin: 0; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 82vh; width: auto; height: auto; margin: 0 auto; border-radius: 12px; }
.lightbox figcaption { color: #F3EBDD; text-align: center; margin-top: 10px; font-size: 15px; }
.lb-btn { position: fixed; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.lb-btn svg { width: 20px; height: 20px; }
.lb-prev { left: 16px; top: 50%; } .lb-next { right: 16px; top: 50%; } .lb-close { right: 16px; top: 16px; }
.tl-photos { display: flex; gap: 8px; margin: 4px 0 10px; }
.tl-photos img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); transition: transform .25s var(--ease); }
.tl-photos a:hover img { transform: translateY(-2px); }

/* ---------- Funded research ---------- */
.fund-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; background: var(--marigold-soft); color: var(--marigold-ink); border: 1px solid var(--marigold); white-space: nowrap; }
.fund-badge svg { width: 14px; height: 14px; }
.fund-ribbon { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--marigold-soft); border: 1px solid var(--marigold); color: var(--ink); max-width: 920px; }
.fund-ribbon svg { width: 30px; height: 30px; flex: none; color: var(--marigold-ink); }
.fund-ribbon p { margin: 0; font-size: 15.5px; }
.fund-ribbon b { color: var(--marigold-ink); }
.fund-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; background: var(--card); border: 1.5px solid var(--ink); border-radius: 28px; padding: clamp(24px, 4vw, 48px); box-shadow: 10px 10px 0 var(--marigold); }
.fund-card::after { content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--marigold-soft) 0 60%, transparent 61%); pointer-events: none; }
.fund-seal { position: relative; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 4px; background: var(--marigold); color: var(--ink); box-shadow: 0 0 0 6px var(--card), 0 0 0 8px var(--marigold); }
.fund-seal svg { width: 56px; height: 56px; }
.fund-seal span { font: 600 20px/1 var(--font-display); color: var(--ink); }
.fund-seal::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--ink) 35%, transparent); animation: spin 40s linear infinite; }
.fund-body { position: relative; z-index: 1; }
.fund-body .section-title { font-size: clamp(26px, 3.4vw, 40px); max-width: 22ch; }
.fund-lede { font-size: 17.5px; color: var(--ink-2); margin: 14px 0 12px; max-width: 60ch; }
.fund-body .ticks { --t-ink: var(--marigold-ink); margin: 0 0 6px; color: var(--ink-2); }
.fund-body .ticks li { margin-bottom: 6px; }
@media (max-width: 720px) { .fund-card { grid-template-columns: 1fr; } .fund-seal { width: 110px; height: 110px; } .fund-seal svg { width: 40px; height: 40px; } }

/* ---------- My contribution (CRediT) ---------- */
/* ---------- Experience: timeline entries ---------- */
.k-internship  { --k: var(--teal);     --k-soft: var(--teal-soft);     --k-ink: var(--teal-ink); }
.k-recognition { --k: var(--marigold); --k-soft: var(--marigold-soft); --k-ink: var(--marigold-ink); }
.k-education   { --k: var(--sage);     --k-soft: var(--sage-soft);     --k-ink: var(--sage-ink); }
.chip.k-internship .sw, .chip.k-recognition .sw { background: var(--k); }
.tl-item { scroll-margin-top: 100px; }
.tl-item.is-fund .tl-card { border: 2px solid var(--marigold); background: linear-gradient(160deg, var(--marigold-soft), var(--card) 55%); }
.tl-item.is-fund .tl-dot { width: 21px; height: 21px; left: -9px; top: 32px; background: var(--marigold); }
.tl-card .hl-sub { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--marigold-ink); margin: 10px 0 4px; }
.xp-work a { color: var(--ink); text-decoration-color: var(--marigold); }
.tl-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 4px; }
.tl-links:empty { display: none; }
.xp-media { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.xp-media .g-open { position: relative; flex: none; width: 120px; height: 88px; border-radius: 10px; }
.xp-media .g-open.is-doc { width: 70px; height: 92px; background: #fff; }
.xp-media .g-open.is-doc img { object-fit: cover; object-position: top; }
.doc-tag { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: rgba(30, 33, 39, .82); color: #fff; border-radius: 5px; padding: 2px 0; }
.doc-tag svg { width: 10px; height: 10px; }
.xp-mag { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); background: var(--paper-2); border-radius: 12px; padding: 8px; margin: 8px 0; max-width: 420px; transition: background-color .2s; }
.xp-mag:hover { background: var(--marigold-soft); }
.xp-mag img { width: 120px; height: 85px; object-fit: cover; border-radius: 8px; }
.xp-mag small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.xp-mag b { display: block; font: 600 19px/1.2 var(--font-display); margin-bottom: 2px; }
.xp-mag span { font-size: 14px; font-weight: 600; display: block; }
.xp-mag svg { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- Magazine viewer ---------- */
.mag { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(40px, 6vw, 72px); }
.mag-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.mag-head .detail-title { margin: 6px 0 8px; }
.mag-stage { position: relative; display: flex; align-items: center; justify-content: center; background: #15171c; border-radius: 18px; padding: 14px; }
.mag-page { display: block; width: 100%; max-width: 1200px; aspect-ratio: 1600 / 1133; background: #23262d; border-radius: 8px; overflow: hidden; cursor: zoom-in; }
.mag-page img { width: 100%; height: 100%; object-fit: contain; }
.mag-stage .lb-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.mag-prev { left: 10px; } .mag-next { right: 10px; }
.mag-count { text-align: center; font-size: 14px; color: var(--ink-3); margin: 10px 0; }
.mag-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.mag-strip button { flex: none; width: 120px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--paper-2); cursor: pointer; scroll-snap-align: center; }
.mag-strip button[aria-current="true"] { border-color: var(--marigold-ink); }
.mag-strip img { width: 100%; height: auto; display: block; }
.lightbox.is-single .lb-prev, .lightbox.is-single .lb-next { display: none; }

/* ---------- My contribution (CRediT) ---------- */
.credit { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.credit li { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--t-soft); color: var(--t-ink); border: 1px solid color-mix(in srgb, var(--t) 40%, transparent); }

/* ---------- Scroll progress ---------- */
.scroll-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 70; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--tomato), var(--marigold), var(--teal), var(--cornflower)); pointer-events: none; }

/* ---------- Methods strip ---------- */
.marquee { overflow: hidden; border-block: 1.5px solid var(--ink); background: var(--card); padding: 14px 0; }
.marquee-track { display: flex; width: max-content; }
.mq-row { display: flex; flex: none; animation: marquee 48s linear infinite; }
.marquee-track.is-paused .mq-row, .marquee:hover .mq-row { animation-play-state: paused; }
.mq-item { display: inline-flex; align-items: center; gap: 12px; padding: 0 22px; font: italic 500 clamp(17px, 1.6vw, 21px)/1.2 var(--font-display); white-space: nowrap; }
.mq-item i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Title marker sweep ---------- */
.section-title .em { background: linear-gradient(transparent 62%, var(--marigold) 62%, var(--marigold) 90%, transparent 90%) no-repeat 0 0 / 0% 100%; transition: background-size .9s var(--ease) .35s; padding: 0 .06em; }
.section-title.is-in .em, .no-js .section-title .em { background-size: 100% 100%; }
.page-title .em { display: inline-block; animation: rise .9s var(--ease) .15s both; }

/* ---------- Cards: figure wipes in ---------- */
.js .card.reveal .card-fig { clip-path: inset(0 0 100% 0 round var(--radius)); transition: clip-path 1s var(--ease) .1s, transform .35s var(--ease), box-shadow .35s var(--ease); }
.js .card.reveal.is-in .card-fig { clip-path: inset(0 0 0 0 round var(--radius)); }
.grid-2 > .card:nth-child(2n) { transition-delay: 120ms; }

/* ---------- Gentle ambient motion ---------- */
.portrait .blob-a { animation: pop-in .9s cubic-bezier(.3, 1.4, .5, 1) .55s both, float 9s ease-in-out 1.6s infinite; }
.portrait .blob-b { animation: pop-in .9s cubic-bezier(.3, 1.4, .5, 1) .75s both, float 7s ease-in-out 1.8s infinite reverse; }
.closing .ring { animation: spin 40s linear infinite; border-style: solid; border-right-color: var(--marigold); }
.closing .ring2 { animation: float 6s ease-in-out infinite; }
.now .pulse { animation: ping 2.4s ease-out infinite; }
.news li.reveal { translate: -18px 0; }
.news li.reveal.is-in { translate: none; }
.news li:nth-child(2) { transition-delay: 80ms; } .news li:nth-child(3) { transition-delay: 160ms; } .news li:nth-child(4) { transition-delay: 240ms; } .news li:nth-child(5) { transition-delay: 320ms; } .news li:nth-child(6) { transition-delay: 400ms; }
@keyframes float { 50% { transform: translate(6px, -10px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 70%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }

/* ---------- Draft notes (offline review only) ---------- */
.draft-note { display: none; }
html.is-draft .draft-note {
  display: block;
  background: repeating-linear-gradient(-45deg, #FFF4C2 0 10px, #FFEFB0 10px 20px);
  border: 1.5px dashed var(--marigold-ink);
  color: #4A3500;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 12px 0;
  max-width: 70ch;
}
html.is-draft .draft-note::before { content: "Needs your input · "; font-weight: 700; }
html.is-draft.hide-notes .draft-note { display: none; }
.draft-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: none; font: 600 13px/1 var(--font-body); padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--marigold-ink); background: #FFF4C2; color: #4A3500; cursor: pointer; box-shadow: var(--shadow); }
html.is-draft .draft-toggle { display: inline-flex; }

/* ---------- Motion ---------- */
/* reveals use `translate` so they never fight with hover `transform`s */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .8s var(--ease), translate .8s var(--ease), transform .3s var(--ease), border-color .3s, box-shadow .3s; transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.is-in { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .brand-mark .mk-e, .m-edge, .trace path { stroke-dashoffset: 0 !important; }
  .m-cluster circle, .m-cluster text, .m-node .dot, .m-node .core, .m-node text { opacity: 1; }
  .js .card.reveal .card-fig { clip-path: none; }
  .section-title .em { background-size: 100% 100%; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .js .reveal { opacity: 1; translate: none; }
  .marquee-track .mq-row { animation: none !important; }
  .theme-tile .glyph * { animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .draft-toggle, .toc, .filters, .closing { display: none !important; }
  body { background: #fff; }
}
.fund-project { font: italic 500 16px/1.45 var(--font-display); color: var(--ink); margin: 0 0 12px; max-width: 62ch; }

/* ==========================================================================
   Refinements (Nov 2026): page accents, type scale, merged About, timeline list
   ========================================================================== */

/* ---- one accent colour per page, used for highlights, eyebrows and bands ---- */
body { --accent: var(--tomato); --accent-soft: var(--tomato-soft); --accent-ink: var(--tomato-ink); }
body[data-page="research"], body[data-page="publications"] { --accent: var(--cornflower); --accent-soft: var(--cornflower-soft); --accent-ink: var(--cornflower-ink); }
body[data-page="projects"], body[data-page="project"] { --accent: var(--teal); --accent-soft: var(--teal-soft); --accent-ink: var(--teal-ink); }
body[data-page="experience"] { --accent: var(--marigold); --accent-soft: var(--marigold-soft); --accent-ink: var(--marigold-ink); }
body[data-page="blog"], body[data-page="post"], body[data-page="magazine"] { --accent: var(--plum); --accent-soft: var(--plum-soft); --accent-ink: var(--plum-ink); }
body[data-page="contact"] { --accent: var(--sage); --accent-soft: var(--sage-soft); --accent-ink: var(--sage-ink); }
.eyebrow { color: var(--accent-ink); }
.eyebrow::before { background:
    radial-gradient(circle at 5px 5px, var(--accent) 4px, transparent 4.5px),
    radial-gradient(circle at 25px 5px, var(--ink) 3px, transparent 3.5px),
    linear-gradient(var(--ink), var(--ink)) 5px 4.25px / 20px 1.5px no-repeat; }
.page-title .em, .hero-title .em { color: var(--accent-ink); }
.page-head { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 70%, var(--paper)), var(--paper)); }
.band { background: color-mix(in srgb, var(--accent-soft) 45%, var(--paper)); }
.section-title .em { background-image: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 55%, transparent) 62%, color-mix(in srgb, var(--accent) 55%, transparent) 90%, transparent 90%); }
.nav a[aria-current="page"]::after { background: var(--accent); opacity: .55; }
.btn-solid:hover { box-shadow: 0 6px 0 -2px var(--accent); }
.scroll-progress { background: linear-gradient(90deg, var(--accent), var(--marigold)); }

/* ---- type scale: calmer headings, nothing smaller than 13px ---- */
.hero-title { font-size: clamp(46px, 7.4vw, 92px); }
.page-title { font-size: clamp(38px, 5.6vw, 66px); }
.section-title { font-size: clamp(28px, 3.6vw, 44px); }
.detail-title { font-size: clamp(32px, 4.6vw, 56px); }
.card-title { font-size: clamp(21px, 2vw, 25px); }
.page-lede, .section-lede { font-size: clamp(17px, 1.4vw, 19px); }
.hero-intro { font-size: clamp(17px, 1.5vw, 20px); }
.lead-big { font-size: clamp(20px, 2vw, 24px); }
.tag, .status, .tl-kind, .fund-badge, .ptag, .credit li { font-size: 13px; }
.xp-mag small, .an-io small, .hl-sub, .tl-card .hl-sub, .mp-card .mp-sub, .facts dt, .arch-list em { font-size: 12.5px; }
.doc-tag { font-size: 10.5px; }
.prose p, .dsec p, .dsec li { line-height: 1.7; }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tight { padding: clamp(36px, 5vw, 64px) 0; }

/* ---- About section on the home page ---- */
.about-home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-home .prose { max-width: 60ch; }
.about-home .section-title { margin-bottom: 18px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(96px, 11vw, 150px); gap: 10px; }
.pg-item { margin: 0; position: relative; overflow: hidden; border-radius: 14px; }
.pg-item.is-big { grid-column: span 2; grid-row: span 2; }
.pg-item .g-open { width: 100%; height: 100%; border: 0; border-radius: 0; }
.pg-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 13px; line-height: 1.3; color: #fff; background: linear-gradient(transparent, rgba(20, 18, 16, .78)); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease); pointer-events: none; }
.pg-item figcaption a { color: #fff; pointer-events: auto; }
.pg-item:hover figcaption, .pg-item:focus-within figcaption, .pg-item.is-big figcaption { opacity: 1; transform: none; }
@media (max-width: 900px) { .about-home { grid-template-columns: 1fr; } .photo-grid { grid-auto-rows: 26vw; } }
@media (hover: none) { .pg-item figcaption { opacity: 1; transform: none; } }

/* ---- Experience: one list, newest activity first ---- */
#timeline .tl-spine { left: 23px; }
.tl-list { list-style: none; margin: 0; padding: 0 0 24px 24px; }
.tl-item { padding-left: 34px; }
.tl-card { border-left: 4px solid var(--k); }
.tl-item.k-professional { --k: var(--marigold); --k-soft: var(--marigold-soft); --k-ink: var(--marigold-ink); }
.chip.k-professional .sw { background: var(--marigold); }
.tl-meta span:not(.tl-kind):not(.fund-badge) { font-weight: 600; color: var(--ink-2); }
@media (max-width: 680px) { #timeline .tl-spine { left: 11px; } .tl-list { padding-left: 12px; } .tl-item { padding-left: 26px; } .tl-dot { left: -7px; } .tl-item.is-fund .tl-dot { left: -9px; } }

/* ---- Research outputs: plain-language note ---- */
.pub .summary { font-size: 15.5px; color: var(--ink-2); background: var(--t-soft, var(--paper-2)); border-left: 3px solid var(--t, var(--rule-strong)); border-radius: 0 10px 10px 0; padding: 10px 14px; }
.pub .summary b { color: var(--t-ink, var(--ink)); }

/* ---- photo viewer states ---- */
.lightbox.is-loading img { opacity: .35; transition: opacity .2s; }
.lightbox.is-broken figcaption::after { content: " · this photo could not be loaded"; color: #F6B5A3; }
.lightbox img { touch-action: pan-y; user-select: none; }

/* ---- boxed portrait in the home About section ---- */
.about-side { display: grid; gap: 18px; }
.about-card { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 20px; align-items: center; }
.about-card .frame { border-radius: 20px; overflow: hidden; border: 3px solid var(--ink); box-shadow: -10px 10px 0 var(--teal); aspect-ratio: 4 / 5; margin-left: 10px; }
.about-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.about-card .facts-mini { font-size: 15px; color: var(--ink-2); }
.about-card .facts-mini div { display: flex; flex-direction: column; gap: 1px; padding: 7px 0; border-top: 1px solid var(--rule); }
.about-card .facts-mini div:first-child { border-top: 0; }
.about-card .facts-mini span { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.about-card .facts-mini b { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) { .about-card { grid-template-columns: 1fr; } .about-card .frame { max-width: 260px; } }

/* ---- Status & venue rows: the badge column fits the widest label, so long labels never overlap the title ---- */
.sv-list { grid-template-columns: max-content minmax(0, 1fr); column-gap: 14px; row-gap: 10px; align-items: baseline; }
.sv-list li { display: contents; }
.sv-list .status { justify-self: start; align-self: start; margin-top: 2px; }
.sv-list li > span:not(.status) { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .sv-list { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .sv-list li > span:not(.status) { margin-bottom: 8px; }
}

/* ---- hero portrait in the box frame (replaces the arch) ---- */
.portrait.is-box { aspect-ratio: 4 / 5; max-width: 380px; }
.portrait.is-box .frame { inset: 0 0 0 12px; border-radius: 22px; border: 3px solid var(--ink); box-shadow: -12px 12px 0 var(--teal); }
.portrait.is-box .frame img { object-position: 50% 18%; }
.portrait.is-box figcaption { right: -10px; bottom: -16px; }
@keyframes frame-in-box { from { clip-path: inset(100% 0 0 0 round 22px); } to { clip-path: inset(0 0 0 0 round 22px); } }
.portrait.is-box .frame { animation-name: frame-in-box; }

/* ---- About: quick facts only (the photo lives in the hero) ---- */
.about-card { display: block; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 18px; }
.about-card .facts-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.about-card .facts-mini div:nth-child(2) { border-top: 0; }
@media (max-width: 520px) { .about-card .facts-mini { grid-template-columns: 1fr; } .about-card .facts-mini div:nth-child(2) { border-top: 1px solid var(--rule); } }

/* ---- profile icons (official marks) ---- */
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--card); border: 1px solid var(--rule); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.social a:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 6px 14px -10px rgba(0, 0, 0, .5); }
.social svg { width: 20px; height: 20px; }
.social-hero { margin-top: 18px; animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
.site-footer .social a { width: 34px; height: 34px; border-radius: 10px; }
.site-footer .social svg { width: 17px; height: 17px; }
.profiles .ic { background: var(--card); border: 1px solid var(--rule); }
.profiles .ic svg { width: 24px; height: 24px; }
@media (max-width: 860px) { .portrait.is-box { max-width: 280px; } }

/* project stories: the opening paragraph under the question reads a little larger */
.dsec .question + .hook { margin-top: 22px; font-size: 1.08em; }
.dsec .hook { max-width: 68ch; }

/* ==========================================================================
   Themes, stories, publications and the closing coast
   ========================================================================== */

/* ---------- Theme tokens shared by both modes ---------- */
:root {
  --on-accent: #1E2127;   /* text on bright accent fills, in both themes */
  --on-dark: #FFF9EE;     /* text on plum and other deep fills, in both themes */
  --code-bg: #1E2127;
  --code-ink: #F3EBDD;
  --shadow-c: rgba(60, 40, 10, .28);
  /* closing coast: dawn over the Bay of Bengal */
  --coast-sky-1: #F6CF9C; --coast-sky-2: #FFF0D6;
  --coast-sea-1: #6FB3C2; --coast-sea-2: #2F7487;
  --coast-sun: #F2593A; --coast-sand: #EBCF98; --coast-silhouette: #233434;
  --coast-wave: rgba(255, 255, 255, .55); --coast-arc: rgba(126, 82, 0, .55); --coast-star: transparent;
}
/* ---------- Dark theme: the same palette, re-balanced for a dark page ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #14161B; --paper-2: #1B1E25; --card: #1D2129;
  --ink: #F2ECE1; --ink-2: #C9C3B8; --ink-3: #9C978E;
  --rule: #2E333D; --rule-strong: #434A57;
  --plum: #8C5C9E;
  --tomato-soft: #3B2420; --marigold-soft: #3A3020; --teal-soft: #163330; --cornflower-soft: #1E2747; --plum-soft: #2F2338; --sage-soft: #1E3020;
  --tomato-ink: #FF9C82; --marigold-ink: #FFCD6B; --teal-ink: #7FDCD4; --cornflower-ink: #AFC1FF; --plum-ink: #DDB8EA; --sage-ink: #A9D8A3;
  --code-bg: #0E1014; --code-ink: #F3EBDD;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 32px -18px rgba(0, 0, 0, .7);
  --shadow-c: rgba(0, 0, 0, .6);
  /* the coast at night */
  --coast-sky-1: #0B1222; --coast-sky-2: #1D2B47;
  --coast-sea-1: #14304A; --coast-sea-2: #08121E;
  --coast-sun: #EDE6D3; --coast-sand: #2B2721; --coast-silhouette: #06080B;
  --coast-wave: rgba(175, 210, 235, .28); --coast-arc: rgba(255, 205, 107, .35); --coast-star: #F2ECE1;
}
:root[data-theme="light"] { color-scheme: light; }
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after { transition: background-color .35s ease, color .35s ease, border-color .35s ease, fill .35s ease, stroke .35s ease !important; }

/* elements that put text on accent or deep fills keep a readable colour in both themes */
::selection { color: var(--on-accent); }
.theme-tile .glyph { color: var(--on-accent); }
.closing { color: var(--on-dark); }
.closing .btn { border-color: var(--on-dark); color: var(--on-dark); }
.closing .btn-solid { color: var(--on-accent); }
.po-seg.status-published, .po-seg.status-accepted, .po-seg.status-review { color: var(--on-accent); }
.po-seg.status-presented { color: var(--on-dark); }
.fund-seal { color: var(--on-accent); }
.bib pre, .post-body pre { background: var(--code-bg); color: var(--code-ink); }
.stage.k-model .s-k { color: color-mix(in srgb, var(--paper) 72%, var(--ink)); }
.theme-tile:hover, .card:hover .card-fig { box-shadow: 0 18px 34px -24px var(--shadow-c); }
[data-theme="dark"] .hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--marigold) 45%, transparent) 62%, color-mix(in srgb, var(--marigold) 45%, transparent) 92%, transparent 92%); }
[data-theme="dark"] .nav a[aria-current="page"]::after { opacity: .45; }
/* project figures are drawn on light plates; in the dark theme they are dimmed a little rather than glare */
[data-theme="dark"] .card-fig img, [data-theme="dark"] .detail-fig img, [data-theme="dark"] .related img { filter: brightness(.88) saturate(.95); }
[data-theme="dark"] .photo-grid img, [data-theme="dark"] .gallery img, [data-theme="dark"] .coast-photo img { filter: brightness(.92); }

/* ---------- Theme toggle in the header ---------- */
.site-header .wrap .brand { margin-right: auto; }
.theme-btn {
  order: 2; flex: none; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  color: var(--ink); background: var(--card); border: 1px solid var(--rule-strong);
  transition: transform .3s var(--ease), border-color .2s;
}
.theme-btn:hover { border-color: var(--ink); transform: rotate(-12deg); }
.theme-btn svg { width: 18px; height: 18px; grid-area: 1 / 1; transition: opacity .3s, transform .4s var(--ease); }
.theme-btn .i-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="dark"] .theme-btn .i-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
[data-theme="dark"] .theme-btn .i-moon { opacity: 1; transform: none; }
.nav { order: 1; }
.menu-btn { order: 3; }

/* ---------- Research areas on the home page: five tiles, the first one wide ---------- */
.theme-methods { --t: var(--sage); --t-soft: var(--sage-soft); --t-ink: var(--sage-ink); }
.theme-tile.is-wide { grid-column: span 2; }
.theme-tile .g-net .hub { transform-box: fill-box; transform-origin: center; }
.theme-tile:hover .g-net .hub { animation: pulse-hub .8s ease 2; }
@keyframes pulse-hub { 50% { transform: scale(1.4); } }
@media (max-width: 560px) { .theme-tile.is-wide { grid-column: auto; } }

/* ---------- Step illustrations in the project pipelines ---------- */
.arch-note.has-art { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 8px 24px; align-items: center; }
.arch-note.has-art .an-flow { grid-column: 1 / -1; }
.an-art { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 6px; }
.step-art { width: 100%; height: auto; overflow: visible; font-family: var(--font-body); }
@media (max-width: 640px) { .arch-note.has-art { grid-template-columns: 1fr; } .an-art { max-width: 420px; } }
.arch-list li:has(.al-art) { grid-template-columns: 40px minmax(0, 1fr) 180px; align-items: center; }
.al-art { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 4px; }
@media (max-width: 640px) { .arch-list li:has(.al-art) { grid-template-columns: 40px minmax(0, 1fr); } .al-art { grid-column: 2; max-width: 300px; } }
.sa-ln { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sa-acc { fill: none; stroke: var(--t-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sa-faint { fill: none; stroke: var(--rule-strong); stroke-width: 1.1; stroke-linecap: round; }
.sa-dash { fill: none; stroke: var(--ink-3); stroke-width: 1.3; stroke-dasharray: 4 4; }
.sa-dash-box { fill: none; stroke: var(--ink-3); stroke-width: 1.3; stroke-dasharray: 4 4; }
.sa-warn-l { fill: none; stroke: var(--tomato-ink); stroke-width: 2; stroke-linecap: round; }
.sa-ok-l { fill: none; stroke: var(--teal-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sa-ok-thick { fill: none; stroke: var(--sage); stroke-width: 4.5; stroke-linecap: round; }
.sa-ring { fill: none; stroke: var(--t-ink); stroke-width: 2; }
.sa-card { fill: var(--card); stroke: var(--rule-strong); stroke-width: 1.2; }
.sa-soft, .sa-soft-f { fill: var(--t-soft); stroke: none; }
.sa-soft-s { fill: var(--t-soft); stroke: var(--t-ink); stroke-width: 1.2; }
.sa-t, .sa-t-f, .sa-acc-f { fill: var(--t); stroke: none; }
.sa-ink { fill: var(--ink); stroke: none; }
.sa-mute { fill: var(--rule); stroke: none; }
.sa-warn { fill: var(--tomato); stroke: none; }
.sa-warn-soft, .sa-warn-soft-f { fill: var(--tomato-soft); stroke: none; }
.sa-tx { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.sa-sm { fill: var(--ink-3); font-size: 9.5px; font-weight: 500; }
.sa-tk { fill: var(--t-ink); font-size: 11px; font-weight: 700; }
.sa-warn-t { fill: var(--tomato-ink); font-size: 11px; font-weight: 700; }
.sa-on { fill: var(--on-accent); font-size: 11px; font-weight: 700; }
.sa-on-ink { fill: var(--paper); font-size: 11px; font-weight: 700; }
/* a short entrance each time the step changes */
.an-art .step-art > * { animation: sa-pop .45s var(--ease) both; }
.an-art .step-art > *:nth-child(3n+2) { animation-delay: .05s; }
.an-art .step-art > *:nth-child(3n) { animation-delay: .1s; }
.an-art [pathLength="1"] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sa-draw 1s .15s var(--ease) forwards; }
.an-art .sa-spin { transform-box: fill-box; transform-origin: center; animation: sa-spin .5s linear infinite; }
@keyframes sa-pop { from { opacity: 0; transform: translateY(4px); } }
@keyframes sa-draw { to { stroke-dashoffset: 0; } }
@keyframes sa-spin { to { transform: rotate(360deg); } }

/* ---------- Publications: featured row, area filter, sort, expandable detail ---------- */
.pub-featured { margin-bottom: clamp(24px, 3vw, 36px); }
.feat-pubs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feat-pub { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--t); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.feat-pub h3 { font-size: 18px; line-height: 1.3; }
.feat-pub h3 a { text-decoration: none; }
.feat-pub h3 a:hover { text-decoration: underline; }
.feat-pub .venue { font-size: 14px; color: var(--ink-2); margin: 0; }
.feat-pub .actions { margin-top: auto; }
.tag.type { background: var(--paper-2); color: var(--ink-2); }
@media (max-width: 900px) { .feat-pubs { grid-template-columns: 1fr; } }
.pub-ctrls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px 20px; }
.pub-ctrls label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.pub-ctrls select { font: 500 15px var(--font-body); color: var(--ink); background: var(--card); border: 1.5px solid var(--rule-strong); border-radius: 999px; padding: 9px 14px; min-width: 220px; max-width: 100%; }
.pub-ctrls select:focus-visible { border-color: var(--ink); }
.pub-more { margin: 10px 0 4px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.pub-more summary { cursor: pointer; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--t-ink); list-style-position: inside; }
.pub-more[open] summary { border-bottom: 1px solid var(--rule); }
.pub-more dl { margin: 0; padding: 12px 14px 4px; display: grid; gap: 10px; }
.pub-more dt { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pub-more dd { margin: 2px 0 0; font-size: 15px; color: var(--ink-2); }
.pub-more ul { margin: 0; padding-left: 18px; }
.pub-more .link-arrow { margin: 4px 14px 14px; display: inline-flex; }

/* ---------- Closing coast (home) ---------- */
.coast-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-areas: "art text" "art p1" "p2 p1"; gap: 16px; align-items: stretch; }
.coast-fig { grid-area: art; margin: 0; border-radius: 24px; overflow: hidden; border: 1px solid var(--rule); background: var(--coast-sky-2); }
.coast-art { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.coast-text { grid-area: text; align-self: end; padding: 8px 4px; }
.coast-text p:not(.eyebrow) { color: var(--ink-2); }
.coast-photo { margin: 0; position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--rule); }
.coast-photo:nth-of-type(2) { grid-area: p1; }
.coast-photo:nth-of-type(3) { grid-area: p2; }
.coast-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.coast-photo:nth-of-type(2) img { aspect-ratio: auto; max-height: 420px; }
.coast-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.coast-art .c-star { fill: var(--coast-star); }
.coast-art .c-sun { fill: var(--coast-sun); }
.coast-art .c-arc { fill: none; stroke: var(--coast-arc); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; }
.coast-art .c-label { fill: var(--coast-arc); font: italic 500 15px var(--font-display); }
.coast-art .c-glint rect { fill: var(--coast-sun); opacity: .55; }
.coast-art .c-waves path { fill: none; stroke: var(--coast-wave); stroke-width: 2; stroke-linecap: round; animation: c-drift calc(9s + var(--k) * 3s) ease-in-out infinite alternate; }
.coast-art .c-boat { animation: c-bob 4s ease-in-out infinite alternate; }
.coast-art .c-hull { fill: var(--coast-silhouette); }
.coast-art .c-mast { stroke: var(--coast-silhouette); stroke-width: 2.5; }
.coast-art .c-sail { fill: var(--coast-silhouette); opacity: .85; }
.coast-art .c-sand { fill: var(--coast-sand); }
.coast-art .c-trunk { fill: none; stroke: var(--coast-silhouette); stroke-width: 6; stroke-linecap: round; }
.coast-art .c-frond { fill: none; stroke: var(--coast-silhouette); stroke-width: 4.5; stroke-linecap: round; }
@keyframes c-drift { to { transform: translateX(-26px); } }
@keyframes c-bob { to { transform: translate(690px, 322px) rotate(-1.5deg); } }
@media (max-width: 860px) {
  .coast-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "art art" "text text" "p1 p2"; }
  .coast-photo:nth-of-type(2) img { aspect-ratio: 3 / 4; max-height: none; }
  .coast-photo img { aspect-ratio: 3 / 4; }
}
@media (max-width: 520px) { .coast-grid { grid-template-columns: 1fr; grid-template-areas: "art" "text" "p1" "p2"; } }

/* ---------- Motion: everything above stays still when reduced motion is requested ---------- */
@media (prefers-reduced-motion: reduce) {
  .an-art .step-art > *, .an-art [pathLength="1"], .an-art .sa-spin, .coast-art .c-waves path, .coast-art .c-boat, .theme-tile:hover .g-net .hub { animation: none !important; }
  .an-art [pathLength="1"] { stroke-dashoffset: 0; }
  .theme-btn, .theme-btn svg { transition: none; }
}
/* narrow phones: keep the brand, theme toggle and menu on one line */
@media (max-width: 420px) {
  .site-header .wrap { gap: 10px; }
  .brand-name { font-size: 18px; }
  .menu-btn { padding: 10px 12px; }
  .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* ==========================================================================
   Time of day (Nov 2026): Morning · Day · Evening · Night, plus Auto.
   html[data-time] sets the mood; html[data-theme="dark"] is set together with Night.
   Day keeps the original palette. Morning and Evening tint the paper; Night is the dark theme above.
   ========================================================================== */
:root[data-time="dawn"] { --paper: #FFF5EE; --paper-2: #FBE8DD; --card: #FFFCF9; --rule: #F0DACB; --rule-strong: #DFC1AC; }
:root[data-time="dusk"] { --paper: #FAEDE2; --paper-2: #F2DDCB; --card: #FFF8F1; --rule: #E9D0BA; --rule-strong: #D5B596; }

/* the closing panorama, one set of values per time of day (Day is the default) */
:root {
  --coast-sky-1: #8CCBE6; --coast-sky-2: #EAF5F2; --coast-sea-1: #4FA7BE; --coast-sea-2: #1E6A82;
  --coast-sun: #FFC24A; --coast-moon: #EDE6D3; --coast-glint: #FFF6D0; --coast-sand: #F0D6A0; --coast-silhouette: #2E4747;
  --coast-bldg: #D7B087; --coast-win: #8A6446; --coast-land: #B9B58A; --coast-tree: #7C8F5A; --coast-river: #7FB8C8;
  --coast-place: #5A4A3A; --coast-clock: #FFF9EE; --coast-hand: #1E2127; --coast-arc: rgba(126, 82, 0, .5); --coast-wave: rgba(255, 255, 255, .55);
  --sun-x: 600px; --sun-y: 112px; --sun-o: 1; --moon-x: 220px; --moon-y: 520px; --moon-o: 0;
  --glint-x: 760px; --glint-o: .35; --star-o: 0; --bird-o: 0;
}
:root[data-time="dawn"] {
  --coast-sky-1: #F2A981; --coast-sky-2: #FFE6CC; --coast-sea-1: #86B4C2; --coast-sea-2: #3E7C8E;
  --coast-sun: #FF7A45; --coast-glint: #FFB98F; --coast-sand: #EBCF98; --coast-silhouette: #3A3340;
  --coast-bldg: #C99A7C; --coast-win: #7E5A4A; --coast-land: #A8A07E; --coast-tree: #6E7A55; --coast-river: #9CC2CC;
  --coast-place: #5B3E33; --coast-arc: rgba(160, 70, 30, .5);
  --sun-x: 1040px; --sun-y: 262px; --glint-x: 1040px; --glint-o: .75; --bird-o: 1;
}
:root[data-time="dusk"] {
  --coast-sky-1: #D9603F; --coast-sky-2: #F6BE7E; --coast-sea-1: #B27668; --coast-sea-2: #4C4769;
  --coast-sun: #FF6A3D; --coast-glint: #FFB38A; --coast-sand: #DDB386; --coast-silhouette: #3B2430;
  --coast-bldg: #5B3343; --coast-win: #FFB35C; --coast-land: #6E5148; --coast-tree: #3B2A30; --coast-river: #C78E7A;
  --coast-place: #F6D9B8; --coast-clock: #FFE2A8; --coast-arc: rgba(90, 30, 30, .45);
  --sun-x: 170px; --sun-y: 252px; --glint-o: 0; --bird-o: 1;
}
:root[data-time="night"] {
  --coast-sky-1: #070C18; --coast-sky-2: #1B2944; --coast-sea-1: #13304A; --coast-sea-2: #08121E;
  --coast-glint: #EDE6D3; --coast-sand: #2B2721; --coast-silhouette: #06080B;
  --coast-bldg: #11141C; --coast-win: #FFCD6B; --coast-land: #121418; --coast-tree: #0A0C10; --coast-river: #23405A;
  --coast-place: #C9C3B8; --coast-clock: #FFCD6B; --coast-hand: #11141C; --coast-arc: rgba(255, 205, 107, .3); --coast-wave: rgba(175, 210, 235, .28);
  --sun-x: 120px; --sun-y: 520px; --sun-o: 0; --moon-x: 880px; --moon-y: 96px; --moon-o: 1;
  --glint-x: 880px; --glint-o: .45; --star-o: 1;
}

/* ---------- time-of-day control in the header ---------- */
.theme-btn { display: none; }
.time-ctl { order: 2; position: relative; flex: none; }
.time-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); background: var(--card); border: 1px solid var(--rule-strong); transition: border-color .2s, transform .35s var(--ease); }
.time-btn:hover { border-color: var(--ink); transform: rotate(-14deg); }
.time-btn .time-ic { display: grid; place-items: center; }
.time-btn svg { width: 19px; height: 19px; }
.time-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; min-width: 220px; display: grid; gap: 2px; padding: 8px; background: var(--card); border: 1px solid var(--rule-strong); border-radius: 16px; box-shadow: var(--shadow); animation: rise .25s var(--ease) both; }
.time-menu[hidden] { display: none; }
.time-h { margin: 2px 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.time-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 500 15px var(--font-body); text-align: left; cursor: pointer; }
.time-opt svg { width: 19px; height: 19px; flex: none; }
.time-opt[data-time="auto"] svg { color: var(--teal-ink); }
.time-opt[data-time="dawn"] svg { color: var(--tomato-ink); }
.time-opt[data-time="day"] svg { color: var(--marigold-ink); }
.time-opt[data-time="dusk"] svg { color: var(--tomato-ink); }
.time-opt[data-time="night"] svg { color: var(--cornflower-ink); }
.time-opt:hover, .time-opt:focus-visible { background: var(--paper-2); }
.time-opt[aria-pressed="true"] { background: var(--marigold-soft); font-weight: 700; }
.time-opt[aria-pressed="true"]::after { content: "✓"; margin-left: auto; color: var(--ink-2); }

/* ---------- the sky change ---------- */
.sky-veil { position: fixed; inset: 0; z-index: 95; display: none; opacity: 0; pointer-events: none; }
.sky-veil svg { width: 100%; height: 100%; display: block; }
.sky-veil .v-stars circle { fill: #F2ECE1; animation: twinkle 1.4s ease-in-out infinite alternate; animation-delay: var(--tw); }
.sky-veil .v-disc { fill: #FFC24A; }
.sky-veil[data-to="dawn"] .v-disc, .sky-veil[data-to="dusk"] .v-disc { fill: #FF7A45; }
.sky-veil .v-rays path { stroke: #FFC24A; stroke-width: 6; stroke-linecap: round; }
.sky-veil .v-moon circle:first-child { fill: #EDE6D3; }
.sky-veil .v-crater { fill: #CFC6AE; }
.sky-veil .v-hills { fill: rgba(60, 40, 10, .2); }
.sky-veil[data-to="night"] .v-hills { fill: #05070C; }
.sky-veil[data-to="dusk"] .v-hills { fill: rgba(59, 36, 48, .55); }
.sky-veil .v-word { font: italic 600 34px var(--font-display); fill: #1E2127; letter-spacing: .02em; }
.sky-veil[data-to="night"] .v-word, .sky-veil[data-to="dusk"] .v-word { fill: #FFF9EE; }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }

/* ---------- the panorama follows the time of day ---------- */
.coast-fig { background: var(--coast-sky-2); }
.coast-art .c-sun-g { transform: translate(var(--sun-x), var(--sun-y)); opacity: var(--sun-o); transition: transform 1.8s cubic-bezier(.45, 0, .2, 1), opacity 1.2s; }
.coast-art .c-moon-g { transform: translate(var(--moon-x), var(--moon-y)); opacity: var(--moon-o); transition: transform 1.8s cubic-bezier(.45, 0, .2, 1), opacity 1.2s; }
.coast-art .c-moon { fill: var(--coast-moon); }
.coast-art .c-glint { transform: translateX(var(--glint-x)); opacity: var(--glint-o); transition: transform 1.8s cubic-bezier(.45, 0, .2, 1), opacity 1.2s; }
.coast-art .c-glint rect { fill: var(--coast-glint); opacity: 1; }
.coast-art .c-stars { opacity: var(--star-o); transition: opacity 1.5s; }
.coast-art .c-star { fill: #F2ECE1; animation: twinkle 2.2s ease-in-out infinite alternate; animation-delay: var(--tw); }
.coast-art .c-bldg { fill: var(--coast-bldg); transition: fill 1.2s; }
.coast-art .c-fin { fill: none; stroke: var(--coast-bldg); stroke-width: 2; stroke-linecap: round; transition: stroke 1.2s; }
.coast-art .c-win { fill: var(--coast-win); transition: fill 1.2s, filter 1.2s; }
:root[data-time="night"] .coast-art .c-win, :root[data-time="dusk"] .coast-art .c-win { filter: drop-shadow(0 0 3px var(--coast-win)); }
.coast-art .c-land { fill: var(--coast-land); transition: fill 1.2s; }
.coast-art .c-river { fill: none; stroke: var(--coast-river); stroke-width: 7; stroke-linecap: round; opacity: .85; }
.coast-art .c-tree path { stroke: var(--coast-silhouette); stroke-width: 3; stroke-linecap: round; }
.coast-art .c-tree circle { fill: var(--coast-tree); transition: fill 1.2s; }
.coast-art .c-place { fill: var(--coast-place); font: italic 600 17px var(--font-display); letter-spacing: .03em; }
.coast-art .c-clock circle { fill: var(--coast-clock); stroke: var(--coast-bldg); stroke-width: 1.5; }
:root[data-time="night"] .coast-art .c-clock circle { filter: drop-shadow(0 0 4px var(--coast-clock)); }
.coast-art .c-hand { stroke: var(--coast-hand); stroke-width: 1.6; stroke-linecap: round; }
.coast-art .c-birds { opacity: var(--bird-o); transition: opacity 1s; animation: c-fly 28s linear infinite; }
.coast-art .c-birds path { fill: none; stroke: var(--coast-silhouette); stroke-width: 2; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: c-flap .45s ease-in-out infinite alternate; animation-delay: var(--fl); }
.coast-art .c-shoot { fill: none; stroke: #FFF9EE; stroke-width: 2; stroke-linecap: round; opacity: 0; stroke-dasharray: 102; stroke-dashoffset: 102; }
:root[data-time="night"] .coast-art .c-shoot { animation: c-shoot 12s 2s ease-in infinite; }
.coast-art .c-boat { animation: c-bob2 4s ease-in-out infinite alternate; }
.coast-hint { font-size: 14px; color: var(--ink-3); }
@keyframes c-fly { from { transform: translate(1260px, 128px); } to { transform: translate(-120px, 70px); } }
@keyframes c-flap { to { transform: scaleY(.35); } }
@keyframes c-shoot { 0%, 86% { opacity: 0; stroke-dashoffset: 102; } 89% { opacity: 1; } 95% { opacity: 0; stroke-dashoffset: -102; } 100% { opacity: 0; stroke-dashoffset: -102; } }
@keyframes c-bob2 { from { transform: translate(830px, 318px); } to { transform: translate(830px, 322px) rotate(-1.5deg); } }

@media (prefers-reduced-motion: reduce) {
  .coast-art .c-sun-g, .coast-art .c-moon-g, .coast-art .c-glint, .coast-art .c-stars, .coast-art .c-bldg, .coast-art .c-win { transition: none; }
  .coast-art .c-star, .coast-art .c-birds, .coast-art .c-birds path, .coast-art .c-shoot, .coast-art .c-boat, .sky-veil .v-stars circle, .time-menu { animation: none !important; }
  .coast-art .c-birds { transform: translate(760px, 96px); }
  .time-btn { transition: none; }
}
/* ==========================================================================
   Illustrated stories, sky slider, beach veil, compact CST-UP strip,
   portrait shapes, editorial Experience page.
   ========================================================================== */

/* ---------- illustrated project stories (pinned picture, scrolling steps) ---------- */
.story { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.story-sticky { position: sticky; top: 92px; }
.st { width: 100%; height: auto; display: block; background: var(--card); border: 1px solid var(--rule); border-radius: 20px; font-family: var(--font-body); overflow: hidden; }
.st .cam { transform-box: view-box; transform-origin: 0 0; transition: transform 1.2s cubic-bezier(.5, 0, .2, 1); }
.st [data-s] { opacity: 0; transition: opacity .7s var(--ease) var(--d, 0s); }
.st [data-s].on { opacity: 1; }
.st [data-pos] { transform-box: fill-box; transform-origin: center; transition: transform 1.2s cubic-bezier(.5, 0, .2, 1), opacity .7s var(--ease) var(--d, 0s); }
.st .bus { transform-box: view-box; transform-origin: 0 0; }
.st .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease) .15s; }
.st .on .draw, .st > .cam > .draw, .st .cam > .draw { stroke-dashoffset: 0; }
.st [data-s]:not(.on) .draw { stroke-dashoffset: 1; }
.st .is-hl { animation: st-glow 1.3s ease-in-out infinite alternate; }
.st .now .conv { animation: st-conv 1.4s var(--ease) both; }
.st .now.slide, .st .now .slide { animation: st-slide 1.6s var(--ease) both; }
.st .now .grow { animation: st-grow 1.8s .2s var(--ease) both; }
.st .grow { transform-box: fill-box; transform-origin: left center; }
.st .now .fly { animation: st-fly 1.8s .3s var(--ease) both; }
@keyframes st-glow { from { filter: none; } to { filter: drop-shadow(0 0 6px var(--t)); } }
@keyframes st-conv { from { transform: translate(var(--fx), var(--fy)); opacity: .3; } }
@keyframes st-slide { from { transform: translateX(-150px); } }
@keyframes st-grow { from { transform: scaleX(.25); } }
@keyframes st-fly { from { transform: translate(0, 0); } to { transform: translate(250px, -128px) scale(.7); opacity: 0; } }
.sa-acc-thick { fill: none; stroke: var(--t-ink); stroke-width: 4; stroke-linecap: round; }
.sa-ok-ring { fill: none; stroke: var(--teal-ink); stroke-width: 2.2; }
.sa-warn-ring { fill: none; stroke: var(--tomato-ink); stroke-width: 3; }
.story-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 12px; }
.story-count { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.story-dots { display: flex; gap: 6px; }
.story-dot { width: 22px; height: 8px; border-radius: 4px; border: 0; padding: 0; cursor: pointer; background: var(--rule-strong); transition: background .3s, width .3s; }
.story-dot.is-on { background: var(--t); }
.story-dot[aria-current="step"] { width: 34px; }
.story-steps { list-style: none; margin: 0; padding: 18vh 0 34vh; }
.story-card { min-height: 56vh; display: flex; align-items: center; margin: 0 !important; }
.story-card .sc-in { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--rule-strong); border-radius: 16px; padding: 18px 22px; box-shadow: var(--shadow); opacity: .5; transform: translateY(8px); transition: opacity .45s, transform .45s var(--ease), border-color .45s; }
.story-card.is-active .sc-in { opacity: 1; transform: none; border-left-color: var(--t); }
.story-card h3 { font-size: 21px; margin: 4px 0 6px; }
.story-card p { margin: 0; color: var(--ink-2); }
.sc-n { font: italic 600 15px var(--font-display); color: var(--t-ink); }
.sc-n em { font: 700 11px var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-left: 6px; }
@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; gap: 0; }
  .story-sticky { top: 72px; z-index: 3; background: var(--paper); padding: 8px 0; }
  .st { max-height: 46vh; }
  .story-steps { padding: 4vh 0 30vh; }
  .story-card { min-height: 62vh; align-items: flex-start; padding-top: 6vh; }
}

/* ---------- time of day: the sky slider (Day · Evening · Night) ---------- */
.time-ctl { --v: 0; order: 2; position: relative; width: 108px; height: 38px; flex: none; }
.time-track { position: absolute; left: 0; right: 0; top: 7px; height: 24px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, #8CCBE6 0%, #BFE3F0 22%, #F6BE7E 46%, #D9603F 58%, #1B2944 80%, #070C18 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.time-track i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; top: 7px; right: 14px; opacity: .9; }
.time-track i:nth-child(2) { top: 14px; right: 24px; } .time-track i:nth-child(3) { top: 6px; right: 34px; width: 1.5px; height: 1.5px; }
.time-knob { position: absolute; top: 2px; left: calc(var(--v) * (100% - 34px) / 2); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--marigold-ink); border: 1px solid var(--rule-strong); box-shadow: 0 3px 10px -4px rgba(0, 0, 0, .45); transition: left .35s var(--ease), color .35s; pointer-events: none; }
.time-knob svg { width: 18px; height: 18px; }
:root[data-time="dusk"] .time-knob { color: var(--tomato-ink); }
:root[data-time="night"] .time-knob { color: var(--cornflower-ink); }
.time-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: grab; }
.time-range:active { cursor: grabbing; }
.time-ctl:focus-within .time-knob { outline: 3px solid var(--cornflower); outline-offset: 2px; }
@media (max-width: 420px) { .time-ctl { width: 92px; } }

/* ---------- the sky veil: layers, beach, stars ---------- */
.sky-veil .v-l1, .sky-veil .v-l2 { opacity: 0; }
.sky-veil .v-disc2 { fill: #FF7A45; opacity: 0; }
.sky-veil .v-sea { fill: rgba(16, 64, 92, .55); }
.sky-veil .v-waves path { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 2.5; stroke-linecap: round; }
.sky-veil .v-sand { fill: #E9CF9C; }
.sky-veil .v-shade { fill: #05070C; opacity: 0; }
.sky-veil .v-trunk { fill: none; stroke: #15201F; stroke-width: 6; stroke-linecap: round; }
.sky-veil .v-frond { fill: none; stroke: #15201F; stroke-width: 4.5; stroke-linecap: round; }
.sky-veil .v-shoot { fill: none; stroke: #FFF9EE; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 170; stroke-dashoffset: 170; opacity: 0; }
.sky-veil .v-word { font: italic 600 46px var(--font-display); fill: #1E2127; letter-spacing: .02em; }
.sky-veil[data-state="dusk"] .v-word, .sky-veil[data-state="night"] .v-word, .sky-veil[data-state="rise"] .v-word { fill: #FFF9EE; }
.sky-veil .v-hills { display: none; }

/* ---------- compact CST-UP strip on the home page ---------- */
.fund-card.is-compact { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 24px; padding: 18px 22px; }
.fund-card.is-compact .fund-seal { width: 76px; height: 76px; gap: 0; box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--marigold); font-size: 12px; }
.fund-card.is-compact .fund-seal svg { width: 26px; height: 26px; }
.fund-card.is-compact .eyebrow { margin-bottom: 4px; }
.fund-title { font: 600 clamp(19px, 2vw, 23px)/1.25 var(--font-display); margin: 0 0 4px; }
.fund-card.is-compact .fund-lede { font-size: 15px; color: var(--ink-2); margin: 0 0 10px; }
.fund-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fund-chips a { font-size: 13px; font-weight: 600; text-decoration: none; padding: 4px 11px; border-radius: 999px; background: var(--t-soft); color: var(--t-ink); border: 1px solid transparent; }
.fund-chips a:hover { border-color: var(--t); }
.fund-more { align-self: start; white-space: nowrap; }
@media (max-width: 720px) { .fund-card.is-compact { grid-template-columns: auto minmax(0, 1fr); } .fund-more { grid-column: 2; } .fund-card.is-compact .fund-seal { width: 60px; height: 60px; } }

/* ---------- portrait: shapes behind the box frame ---------- */
.portrait.is-box .blob-a { width: 58%; right: -9%; top: -7%; opacity: .9; }
.portrait.is-box .blob-b { width: 30%; left: -7%; bottom: 6%; }
.portrait.is-box .stripes { width: 36%; height: 22%; left: -12%; top: 14%; }
.portrait .pd-dots { position: absolute; right: -12%; bottom: -8%; width: 42%; height: 30%; border-radius: 12px;
  background: radial-gradient(circle, var(--cornflower) 1.6px, transparent 2.2px) 0 0 / 12px 12px; opacity: .55; animation: slide-in 1s var(--ease) 1s both; }
.portrait .pd-nodes { position: absolute; left: -6%; top: -9%; width: 34%; overflow: visible; animation: rise .8s var(--ease) 1.1s both; }
.portrait .pd-nodes path { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.portrait .pd-nodes circle { fill: var(--teal); stroke: var(--ink); stroke-width: 2; }
.portrait .pd-nodes circle:nth-of-type(2) { fill: var(--tomato); } .portrait .pd-nodes circle:nth-of-type(4) { fill: var(--marigold); }
.portrait.is-box .frame { z-index: 1; }
.portrait.is-box figcaption { z-index: 2; }

/* ---------- Experience: grouped, dated, one sentence each ---------- */
.xp-nav { margin: 0 0 clamp(24px, 3vw, 36px); }
.xp-glance { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: baseline; font-size: 16px; color: var(--ink-3); }
.xp-glance a { text-decoration: none; color: var(--ink-2); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); }
.xp-glance a:hover { border-color: var(--ink); color: var(--ink); }
.xp-glance b { font: italic 600 18px var(--font-display); color: var(--accent, var(--ink)); margin-right: 2px; }
.xp-group { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px clamp(20px, 4vw, 56px); padding: clamp(26px, 4vw, 44px) 0; border-top: 1.5px solid var(--ink); scroll-margin-top: 90px; }
.xp-head { position: sticky; top: 96px; align-self: start; }
.xp-head h2 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 6px; }
.xp-head p { margin: 0; font-size: 14.5px; color: var(--ink-3); }
.xp-list { display: grid; }
.xp { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 22px; padding: 16px 0 18px; border-bottom: 1px solid var(--rule); scroll-margin-top: 96px; }
.xp:first-child { padding-top: 0; }
.xp:last-child { border-bottom: 0; }
.xp-when { margin: 3px 0 0; font-size: 13.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.xp-body h3 { font-size: 20px; line-height: 1.3; margin: 0; }
.xp-org { margin: 2px 0 6px; font-size: 15px; color: var(--ink-2); font-style: italic; }
.xp-org .fund-badge { font-style: normal; margin-left: 6px; vertical-align: 1px; }
.xp-lede { margin: 0 0 6px; max-width: 70ch; }
.xp.is-featured .xp-body { border-left: 3px solid var(--accent, var(--marigold)); padding-left: 16px; }
.xp.is-target .xp-body { background: color-mix(in srgb, var(--accent, var(--marigold)) 10%, transparent); border-radius: 10px; }
.xp-more { margin: 4px 0 6px; }
.xp-more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent-ink, var(--ink-2)); list-style-position: outside; width: fit-content; }
.xp-more summary:hover { text-decoration: underline; }
.xp-more[open] summary { margin-bottom: 8px; }
.xp-more ul { margin: 0 0 10px; padding-left: 18px; color: var(--ink-2); font-size: 15.5px; }
.xp-more li { margin-bottom: 4px; }
.xp-more > p { color: var(--ink-2); font-size: 15.5px; max-width: 70ch; }
.xp-more .xp-media { margin-top: 8px; }
.xp-links { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 860px) { .xp-group { grid-template-columns: 1fr; } .xp-head { position: static; } }
@media (max-width: 560px) { .xp { grid-template-columns: 1fr; gap: 2px; } .xp-when { margin: 0; } .xp.is-featured .xp-body { padding-left: 12px; } }

@media (prefers-reduced-motion: reduce) {
  .st .cam, .st [data-s], .st [data-pos], .st .draw, .story-card .sc-in, .time-knob { transition: none !important; }
  .st .is-hl, .st .now .conv, .st .now.slide, .st .now .slide, .st .now .grow, .st .now .fly, .portrait .pd-dots, .portrait .pd-nodes { animation: none !important; }
  .st .draw { stroke-dashoffset: 0 !important; }
}
/* ---------- calmer sky change, orbiting sun and moon ---------- */
.sky-veil { opacity: 1; }
.sky-veil .v-orbit { transform-box: view-box; transform-origin: 500px 520px; }
.sky-veil .v-rays { animation: v-spin 24s linear infinite; }
@keyframes v-spin { to { transform: rotate(360deg); } }
.sky-veil .v-moon-c { fill: #EDE6D3; }
.sky-veil .v-word { font-size: 30px; }
.sky-veil .v-shade { fill: #05070C; opacity: 0; }
/* the coast: the sun and moon share one orbit around a point below the horizon */
:root { --orbit: 0deg; }
:root[data-time="dusk"] { --orbit: -50deg; --glint-o: 0; }
:root[data-time="night"] { --orbit: -150deg; --glint-x: 810px; }
.coast-art .c-orbit { transform-box: view-box; transform-origin: 600px 520px; transform: rotate(var(--orbit)); transition: transform 2.4s cubic-bezier(.45, 0, .55, 1); }
.coast-art .c-sun-g, .coast-art .c-moon-g { display: none; }
/* while the sky covers the page, everything underneath switches at once */
.sky-swap *, .sky-swap *::before, .sky-swap *::after { transition: none !important; }
/* a smaller knob */
.time-knob { width: 30px; height: 30px; top: 4px; left: calc(var(--v) * (100% - 30px) / 2); }
.time-knob svg { width: 16px; height: 16px; }
/* story labels are drawn on a 640-wide canvas; keep them readable when it shrinks on phones */
.st .sa-tx, .st .sa-tk, .st .sa-on, .st .sa-on-ink, .st .sa-warn-t { font-size: 13px; }
.st .sa-sm { font-size: 11.5px; }
@media (max-width: 560px) { .st .sa-tx, .st .sa-tk, .st .sa-on, .st .sa-on-ink, .st .sa-warn-t { font-size: 16px; } .st .sa-sm { font-size: 14px; } }
@media (max-width: 380px) { .brand-name { display: none; } }
/* ---------- two moods (Day, Night), both easy on the eyes ---------- */
/* Day: a softer, warmer paper than pure cream; Night: a calm slate-blue rather than near-black */
:root[data-time="day"], :root:not([data-time]) { --paper: #FAF4E8; --paper-2: #F2E9D8; --card: #FFFCF5; --rule: #E7DBC4; }
:root[data-theme="dark"] {
  --paper: #1C2230; --paper-2: #232A39; --card: #272E3E;
  --ink: #ECE7DD; --ink-2: #C9C4BA; --ink-3: #A39F98;
  --rule: #343C4E; --rule-strong: #4A5368;
  --code-bg: #141925;
  --tomato-soft: #3A2A2C; --marigold-soft: #3A3328; --teal-soft: #1C3638; --cornflower-soft: #232C4A; --plum-soft: #32283E; --sage-soft: #233428;
}
.time-track { background: linear-gradient(90deg, #8CCBE6 0%, #CFE8EE 30%, #F6BE7E 50%, #C8553D 62%, #24304A 80%, #111827 100%); }
.time-knob { left: calc(var(--v) * (100% - 30px)); }
.time-ctl { width: 86px; }
/* ---------- stories that actually pin, and at a readable size ---------- */
/* the story section uses the full page width; the page menu steps aside while it is on screen */
.dsec#pipeline { max-width: none; }
@media (min-width: 901px) {
  .dsec#pipeline { margin-left: calc(-220px - clamp(28px, 6vw, 80px)); }
  .detail-body.story-on .toc { opacity: 0; pointer-events: none; }
  .detail-body .toc { transition: opacity .3s; }
}
.story { grid-template-columns: minmax(0, 1.75fr) minmax(250px, 1fr); }
.story-fig { align-self: stretch; }                 /* the column runs the full height, so the picture can stay pinned */
.story-sticky { top: 84px; }
.st { max-height: calc(100vh - 150px); }
.story-steps { padding: 22vh 0 40vh; }
.story-card { min-height: 70vh; }
@media (max-width: 860px) {
  .story-fig { align-self: auto; position: sticky; top: 64px; z-index: 3; background: var(--paper); }
  .story-sticky { position: static; padding: 6px 0; }
  .st { max-height: 44vh; }
  .story-card { min-height: 72vh; }
}

/* ---------- the story playing by itself in project cards and at the top of project pages ---------- */
.auto-story { position: relative; width: 100%; height: 100%; background: var(--card); }
.auto-story .st { border: 0; border-radius: 0; max-height: none; width: 100%; height: 100%; }
.as-cap { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  font-size: 13px; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--rule); border-radius: 10px; backdrop-filter: blur(4px); }
.as-cap b { font: italic 600 13px var(--font-display); color: var(--t-ink); }
.as-cap i { flex: 1; height: 3px; border-radius: 2px; background: var(--rule); overflow: hidden; position: relative; }
.as-cap i::after { content: ""; position: absolute; inset: 0; background: var(--t); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .5s var(--ease); }
.detail-fig .auto-story { aspect-ratio: 16 / 10; }
.card-fig .auto-story { aspect-ratio: 16 / 10; }
/* story parts used by the drone story */
.sa-sky { fill: color-mix(in srgb, var(--cornflower-soft) 70%, var(--card)); stroke: var(--rule); }
.sa-wifi { fill: var(--cornflower); }
.sa-bt { fill: var(--ink-3); }
.sa-ring-box { fill: none; stroke: var(--t-ink); stroke-width: 2.5; stroke-dasharray: 6 5; }
.sa-hoppath { fill: none; stroke: var(--t-ink); stroke-width: 2; stroke-dasharray: 1; }
.sa-link { fill: none; stroke: var(--t-ink); stroke-width: 2.4; stroke-dasharray: 5 5; animation: st-link 0.9s linear infinite; }
@keyframes st-link { to { stroke-dashoffset: -20; } }
.st .flyer { animation: st-fly-around 6s ease-in-out infinite alternate; transform-box: view-box; }
@keyframes st-fly-around { 0% { transform: translate(0, 0); } 50% { transform: translate(26px, -6px); } 100% { transform: translate(52px, 4px); } }
.st .hop { animation: st-hop 4s steps(1) infinite; animation-delay: calc(var(--k) * .45s); }
@keyframes st-hop { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .sa-link, .st .flyer, .st .hop { animation: none !important; } }.story { grid-template-columns: minmax(0, 2.1fr) minmax(240px, 1fr); }
/* ---------- one-click Day / Night switch ---------- */
.time-ctl { --v: 0; order: 2; position: relative; width: 74px; height: 36px; flex: none; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 999px; }
.time-ctl .time-track { position: absolute; inset: 4px 0; border-radius: 999px; display: flex; align-items: center; justify-content: space-between; padding: 0 7px;
  background: linear-gradient(90deg, #9BD3EA, #F6C48A 48%, #2A3654 70%, #121A2B); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); overflow: hidden; }
.time-ctl .time-track svg { width: 14px; height: 14px; }
.time-ctl .tt-sun { color: #7E5200; } .time-ctl .tt-moon { color: #E6EBFF; }
.time-ctl .time-track i { display: none; }
.time-ctl .time-knob { position: absolute; top: 3px; left: calc(3px + var(--v) * (100% - 36px)); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--marigold-ink); border: 1px solid var(--rule-strong); box-shadow: 0 3px 10px -4px rgba(0, 0, 0, .5); transition: left .45s cubic-bezier(.5, 1.6, .5, 1), color .3s; }
.time-ctl[aria-pressed="true"] .time-knob { color: var(--cornflower-ink); }
.time-ctl .time-knob svg { width: 16px; height: 16px; }
.time-ctl:hover .time-knob { box-shadow: 0 0 0 4px color-mix(in srgb, var(--marigold) 35%, transparent); }
.time-ctl:focus-visible { outline: 3px solid var(--cornflower); outline-offset: 3px; }
.sky-veil { will-change: clip-path; contain: strict; }
.sky-veil .v-stars circle { animation: none; }
.sky-veil .v-stars circle.tw { animation: twinkle 1.4s ease-in-out infinite alternate; animation-delay: var(--tw); }
.sky-veil .v-orbit { will-change: transform; }
/* ---------- publications toolbar ---------- */
.pub-tools { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; align-items: end; }
.pub-tools #pub-overview { grid-column: 1 / -1; }
.pub-tools .search { grid-column: 1; }
.pub-tools .pub-ctrls { grid-column: 2 / 4; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pub-ctrls label { gap: 6px; font-size: 13px; letter-spacing: .04em; }
.pub-ctrls select { width: 100%; min-width: 0; font-size: 16px; padding: 12px 16px; }
.pub-tools .search label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 6px; }
.pub-tools .search input { font-size: 16px; padding: 13px 16px 13px 44px; }
.pt-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pt-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; text-align: left; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--rule); border-radius: 16px; color: var(--ink); font: inherit; transition: border-color .2s, transform .2s, background .2s; }
.pt-tab b { font: 600 clamp(28px, 3vw, 36px)/1 var(--font-display); }
.pt-tab span { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.pt-tab .sw { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pt-tab .sw.status-published { background: var(--teal); } .pt-tab .sw.status-accepted { background: var(--cornflower); }
.pt-tab .sw.status-presented { background: var(--plum); } .pt-tab .sw.status-review { background: var(--marigold); }
.pt-tab:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.pt-tab[aria-pressed="true"] { border-color: var(--ink); background: var(--paper-2); box-shadow: inset 0 -3px 0 var(--ink); }
@media (max-width: 860px) {
  .pt-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pub-tools { grid-template-columns: 1fr; }
  .pub-tools .search, .pub-tools .pub-ctrls { grid-column: 1; }
}
@media (max-width: 520px) { .pt-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pt-tab:first-child { grid-column: 1 / -1; } .pub-tools .pub-ctrls { grid-template-columns: 1fr; } }
/* ---------- experience glimpses ---------- */
.xp-glimpse { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.xp-glimpse .g-open { width: 112px; height: 80px; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--rule); background: var(--card); cursor: zoom-in; position: relative; transition: transform .25s var(--ease), box-shadow .25s; }
.xp-glimpse .g-open img { width: 100%; height: 100%; object-fit: cover; }
.xp-glimpse .g-open.is-doc { width: 66px; height: 80px; background: #fff; }
.xp-glimpse .g-open.is-doc img { object-fit: cover; object-position: top; }
.xp-glimpse .g-open:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 10px 20px -12px var(--shadow-c); }
.xp-glimpse .doc-tag { font-size: 10px; }
@media (max-width: 560px) { .xp-glimpse .g-open { width: 96px; height: 70px; } .xp-glimpse .g-open.is-doc { width: 56px; height: 70px; } }
/* ---------- the home photo grid always ends on a full row ---------- */
.photo-grid { grid-auto-flow: dense; grid-auto-rows: clamp(110px, 12vw, 160px); }
.pg-item.is-wide { grid-column: span 2; }
.pg-item img { width: 100%; height: 100%; object-fit: cover; }
/* ---------- the research map as a solar system ---------- */
.research-map { grid-template-columns: minmax(0, 2.4fr) minmax(260px, 1fr); }
.map-canvas { border-radius: 24px; overflow: hidden; background: radial-gradient(120% 90% at 50% 50%, #1D2740 0%, #10162A 70%, #0B1020 100%); border: 1px solid var(--rule); padding: 0; }
.map-canvas svg { overflow: hidden; }
.m-stars circle { fill: #F2ECE1; opacity: .55; }
.m-orbit { fill: none; stroke: var(--t); stroke-width: 2; opacity: .45; transition: opacity .3s, stroke-width .3s; }
.m-orbit.is-front { opacity: .7; }
.m-orbit.is-on { opacity: 1; stroke-width: 3.5; }
.m-ring-label { font: 700 13.5px var(--font-body); fill: var(--t); letter-spacing: .02em; paint-order: stroke; stroke: #10162A; stroke-width: 5px; stroke-linejoin: round; transition: opacity .3s; }
.has-focus .m-ring-label:not(.is-on) { opacity: .35; }
.m-sun text { font: italic 600 15px var(--font-display); fill: #3A2200; }
.m-sun .m-sun-sub { font: 600 10.5px var(--font-body); fill: #5A3600; }
.m-sun-disc { filter: drop-shadow(0 0 18px rgba(255, 194, 74, .6)); }
.map-canvas .m-edge { stroke: #E6EBFF; stroke-opacity: .28; stroke-width: 1.5; stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
.map-canvas .m-edge.is-on { stroke: #FFC24A; stroke-opacity: 1; stroke-width: 3; }
.map-canvas .has-focus .m-edge:not(.is-on), .research-map.has-focus .m-edge:not(.is-on) { stroke-opacity: .06; }
.map-canvas .m-node .dot { opacity: 1; animation: none; fill: var(--t); stroke: #0B1020; stroke-width: 3; }
.map-canvas .m-node.is-review .dot { fill: #10162A; stroke: var(--t); stroke-width: 4; }
.map-canvas .m-node .core { opacity: 1; animation: none; fill: #0B1020; }
.map-canvas .m-node.is-review .core { fill: var(--t); }
.map-canvas .m-node .moon2 { fill: var(--t); stroke: #0B1020; stroke-width: 2; }
.map-canvas .m-node text { opacity: calc(.55 + var(--depth, 1) * .45); animation: none; font: 600 14px var(--font-body); fill: #F2ECE1; stroke: #10162A; stroke-width: 5px; }
.map-canvas .m-node:hover .dot, .map-canvas .m-node.is-on .dot { scale: 1.35; }
.map-canvas .m-node.is-on text { opacity: 1; fill: #FFE7A3; }
.research-map.has-focus .m-node:not(.is-on):not(.is-near) { opacity: .25; }
@media (max-width: 1000px) { .research-map { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .map-canvas { margin: 0 calc(var(--gutter) * -1); border-radius: 0; border-left: 0; border-right: 0; }
  .map-canvas .m-node text { font-size: 22px; opacity: 0 !important; }
  .map-canvas .m-node.is-on text { opacity: 1 !important; }
  .m-ring-label { font-size: 20px; }
  .map-canvas .m-node .dot { r: 20; }
}
/* map: full width, the project card floats over it, the legend sits below */
.research-map { grid-template-columns: 1fr; }
.map-canvas { position: relative; }
.map-pop { position: absolute; top: 16px; right: 16px; width: min(360px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; z-index: 2; }
.map-pop .mp-card { box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .6); }
.map-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 14px 28px; align-items: start; }
.map-panel .map-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.map-panel .map-key { grid-column: 1 / -1; font-size: 14px; }
.map-panel .mp-intro { font-size: 16px; }
@media (max-width: 860px) { .map-panel { grid-template-columns: 1fr; } .map-panel .map-legend { grid-template-columns: 1fr; } .map-pop { top: auto; bottom: 10px; right: 10px; left: 10px; width: auto; max-height: 60%; } }
/* experience glimpses, a little larger */
.xp-glimpse .g-open { width: 150px; height: 104px; }
.xp-glimpse .g-open.is-doc { width: 82px; height: 104px; }
/* ---------- story legibility and colour ---------- */
.st .sa-tx { font-size: 14px; font-weight: 600; }
.st .sa-sm { font-size: 12.5px; font-weight: 500; }
.st .sa-tk, .st .sa-warn-t { font-size: 14px; font-weight: 700; }
.st .sa-on, .st .sa-on-ink { font-size: 13.5px; font-weight: 700; }
@media (max-width: 560px) { .st .sa-tx, .st .sa-tk, .st .sa-on, .st .sa-on-ink, .st .sa-warn-t { font-size: 14px; } .st .sa-sm { font-size: 12.5px; } }
.st text { paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }
.st .sa-on, .st .sa-on-ink { stroke: none; }
.sa-warn-box { fill: none; stroke: var(--tomato-ink); stroke-width: 2.5; stroke-dasharray: 5 4; }
/* a palette for stories, beyond the project colour */
.sa-c-teal { fill: var(--teal); } .sa-c-tomato { fill: var(--tomato); } .sa-c-corn { fill: var(--cornflower); } .sa-c-mari { fill: var(--marigold); } .sa-c-plum { fill: var(--plum); } .sa-c-sage { fill: var(--sage); }
.sa-s-teal { fill: var(--teal-soft); } .sa-s-tomato { fill: var(--tomato-soft); } .sa-s-corn { fill: var(--cornflower-soft); } .sa-s-mari { fill: var(--marigold-soft); } .sa-s-plum { fill: var(--plum-soft); } .sa-s-sage { fill: var(--sage-soft); }
.sa-l-teal, .sa-l-tomato, .sa-l-corn, .sa-l-mari, .sa-l-plum, .sa-l-sage { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sa-l-teal { stroke: var(--teal-ink); } .sa-l-tomato { stroke: var(--tomato-ink); } .sa-l-corn { stroke: var(--cornflower-ink); } .sa-l-mari { stroke: var(--marigold-ink); } .sa-l-plum { stroke: var(--plum-ink); } .sa-l-sage { stroke: var(--sage-ink); }
.sa-k-teal { fill: var(--teal-ink); font-size: 14px; font-weight: 700; } .sa-k-tomato { fill: var(--tomato-ink); font-size: 14px; font-weight: 700; } .sa-k-corn { fill: var(--cornflower-ink); font-size: 14px; font-weight: 700; }
.sa-k-mari { fill: var(--marigold-ink); font-size: 14px; font-weight: 700; } .sa-k-plum { fill: var(--plum-ink); font-size: 14px; font-weight: 700; } .sa-k-sage { fill: var(--sage-ink); font-size: 14px; font-weight: 700; }
/* phones: picture on top, steps below, the picture as large as the width allows */
@media (max-width: 860px) {
  .story-fig { margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter) 8px; box-shadow: 0 10px 18px -16px var(--shadow-c); }
  .st { max-height: 52vh; border-radius: 14px; }
  .story-bar { margin-top: 6px; }
  .story-count { font-size: 13px; }
  .story-card { min-height: 46vh; padding-top: 2vh; }
  .story-card .sc-in { padding: 14px 16px; }
  .story-card h3 { font-size: 19px; }
}/* drone story colours: Wi-Fi in sage, Bluetooth in plum, the drone's hopping link in tomato */
.sa-wifi { fill: var(--sage); } .sa-bt { fill: var(--plum); }
.st .hop { fill: var(--tomato); } .sa-hoppath { stroke: var(--tomato-ink); }
.st .cap-band { fill: var(--paper-2); }
/* ---------- phones and tablets: the picture on top, the steps scrolling under it (must stay last) ---------- */
@media (max-width: 860px) {
  .story { grid-template-columns: 1fr !important; gap: 0; }
  .dsec#pipeline { margin-left: 0; }
  .story-fig { position: sticky; top: 64px; z-index: 3; background: var(--paper); align-self: auto; }
  .story-sticky { position: static; }
  .st { width: 100%; max-height: none; aspect-ratio: 16 / 10; }
  .story-steps { padding: 3vh 0 40vh; }
}@media (max-width: 860px) {
  .story-fig { margin: 0 calc(var(--gutter) * -1); padding: 0 0 8px; }
  .st { border-radius: 0; border-left: 0; border-right: 0; }
  .story-bar { padding: 0 var(--gutter); }
  .story-count { font-size: 14.5px; color: var(--ink); }
  .story .st .cap { display: none; }
  .story .st .sa-tx, .story .st .sa-tk, .story .st .sa-warn-t, .story .st [class^="sa-k-"] { font-size: 15px; }
  .story .st .sa-sm { font-size: 13.5px; }
}
/* ---------- a floor for small text ---------- */
.eyebrow { font-size: 13.5px; }
.also, .card-meta, .card-meta span, .mp-card .mp-sub, .facts dt, .xp-mag small, .an-io small, .arch-list em { font-size: 13.5px; }
.skills dt, dl dt { font-size: 14px; }
.doc-tag, .xp-glimpse .doc-tag { font-size: 11px; }
.sc-n em { font-size: 12.5px; }
.tag, .status { font-size: 13px; }
.pub .authors, .pub .venue, .pub .summary { font-size: 15.5px; }
@media (max-width: 560px) {
  body { font-size: 17px; }
  .section-lede, .page-lede { font-size: 17px; }
  .card-desc, .notice li { font-size: 16px; }
  .nav a { font-size: 19px; }
}
/* ---------- project cards with a playing story, and the upright map on phones ---------- */
.card-area { margin: 14px 0 0; }
.card-area .tag { font-size: 13px; }
.card-fig:has(.auto-story) { background: var(--card); }
.auto-story .cap { display: none; }
.as-cap { font-size: 12.5px; padding: 5px 9px; left: 8px; right: 8px; bottom: 8px; }
.research-map.is-vert .map-canvas .m-node text { opacity: 1 !important; font-size: 23px; stroke-width: 6px; }
.research-map.is-vert .map-canvas .m-node .dot { r: 18; }
.research-map.is-vert .m-sun text { font-size: 24px; }
.research-map.is-vert .m-sun .m-sun-sub { font-size: 16px; }
/* ---------- the coast section, balanced ---------- */
.coast-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "art art art" "text p1 p2"; gap: 18px; align-items: stretch; }
.coast-fig { aspect-ratio: 1200 / 420; background: none; }
.coast-art { height: 100%; min-height: 0; display: block; }
.coast-text { align-self: center; }
.coast-photo img, .coast-photo:nth-of-type(2) img { aspect-ratio: 4 / 3; max-height: none; height: 100%; }
@media (max-width: 860px) { .coast-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "art art" "text text" "p1 p2"; } }
@media (max-width: 520px) { .coast-grid { grid-template-columns: 1fr; grid-template-areas: "art" "text" "p1" "p2"; } .coast-fig { margin: 0 calc(var(--gutter) * -1); border-radius: 0; border-left: 0; border-right: 0; } }
/* long area names wrap instead of running off a phone screen */
.tag { white-space: normal; max-width: 100%; line-height: 1.3; }
/* ---------- the sky change on compositor-only layers ---------- */
.sky2 { position: fixed; inset: 0; z-index: 95; pointer-events: none; opacity: 0; overflow: hidden; contain: strict; will-change: transform, opacity; }
.sky2:not(.is-on) { transform: scale(.001); }
.s2-zoom, .s2-layer, .s2-stars, .s2-shade, .s2-arm, .s2-shoot, .s2-word { will-change: transform, opacity; }
.s2-zoom { position: absolute; inset: 0; }
.s2-layer { position: absolute; inset: 0; }
.s2-day { background: linear-gradient(#7EC3E3, #FFF4DA 78%); }
.s2-dusk { background: linear-gradient(#C8553D, #F8C27E 78%); opacity: 0; }
.s2-night { background: linear-gradient(#0B1324, #22304D 78%); opacity: 0; }
.s2-stars { position: absolute; inset: 0 0 25% 0; opacity: 0;
  background-image: radial-gradient(1.6px 1.6px at 20px 30px, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 140px 90px, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 80px 160px, #F2ECE1 50%, transparent 51%), radial-gradient(1px 1px at 190px 40px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 260px 130px, #FFF4DA 50%, transparent 51%), radial-gradient(1.1px 1.1px at 330px 70px, #fff 50%, transparent 51%);
  background-size: 360px 210px, 290px 170px, 410px 230px, 230px 190px, 470px 260px, 310px 150px; }
.s2-arm { position: absolute; left: var(--px); top: var(--py); width: 0; height: 0; }
.s2-sun, .s2-moon { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; }
.s2-sun { top: calc(var(--R) * -1); background: #FFC24A; box-shadow: 0 0 0 10px rgba(255, 194, 74, .25), 0 0 60px 30px rgba(255, 220, 140, .55); }
.s2-sun i { position: absolute; inset: 0; border-radius: 50%; background: #FF7A45; opacity: 0; }
.s2-moon { top: var(--R); width: 58px; height: 58px; margin: -29px 0 0 -29px; background: transparent; box-shadow: 14px -10px 0 0 #EDE6D3, 0 0 50px 18px rgba(237, 230, 211, .18); transform: rotate(180deg); }
.s2-ground { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26vh; }
.v-sea2 { fill: #2C6E86; } .v-wave2 { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 2.5; stroke-linecap: round; }
.v-sand2 { fill: #E9CF9C; }
.s2-ground .v-trunk, .s2-ground .v-frond { fill: none; stroke: #15201F; stroke-linecap: round; } .s2-ground .v-trunk { stroke-width: 6; } .s2-ground .v-frond { stroke-width: 4.5; }
.s2-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 26vh; background: #05070C; opacity: 0; }
.s2-shoot { position: absolute; left: 70%; top: 14%; width: 140px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #fff, transparent); opacity: 0; }
.s2-word { position: absolute; left: 50%; top: 44%; transform: translateX(-50%); font: italic 600 clamp(26px, 3.4vw, 34px) var(--font-display); color: #1E2127; opacity: 0; white-space: nowrap; }
.sky2[data-state="dusk"] .s2-word, .sky2[data-state="night"] .s2-word, .sky2[data-state="rise"] .s2-word { color: #FFF9EE; }
/* ---------- cheaper re-colouring (no filters to repaint when the time of day changes) ---------- */
[data-theme="dark"] .card-fig img, [data-theme="dark"] .detail-fig img, [data-theme="dark"] .related img,
[data-theme="dark"] .photo-grid img, [data-theme="dark"] .gallery img, [data-theme="dark"] .coast-photo img { filter: none; }
:root[data-time="night"] .coast-art .c-win, :root[data-time="dusk"] .coast-art .c-win, :root[data-time="night"] .coast-art .c-clock circle { filter: none; }
:root[data-time="night"] .coast-art .c-win { fill: #FFD27A; }/* sections far off screen are not styled or painted until they come near, which keeps re-colouring and scrolling light */
.section, .section-tight, .band { content-visibility: auto; contain-intrinsic-size: auto 900px; }/* park the sky invisible at full size (not shrunk), so the warm-up paint is kept for the first click */
.sky2:not(.is-on) { transform: none; opacity: 0; visibility: visible; }
/* ---------- the research galaxy ---------- */
.map-canvas { background: #070B17; }
.gx-bg { fill: #070B17; }
.gx-far circle { fill: #E6EBFF; opacity: .5; }
.gx { cursor: pointer; outline: none; transition: opacity .5s; }
.gx-halo { fill: var(--t); opacity: .06; transition: opacity .3s; }
.gx:hover .gx-halo, .gx:focus-visible .gx-halo { opacity: .16; }
.gx:focus-visible .gx-halo { stroke: var(--t); stroke-width: 2; }
.gx-arms circle { fill: var(--t); }
.gx-arms { animation: gx-turn 120s linear infinite; }
@keyframes gx-turn { to { transform: rotate(360deg); } }
.gx .gx-stop-a { stop-color: var(--t); stop-opacity: .9; } .gx .gx-stop-b { stop-color: var(--t); stop-opacity: 0; }
.gx-name { font: 600 19px var(--font-display); fill: #F2ECE1; paint-order: stroke; stroke: #070B17; stroke-width: 6px; stroke-linejoin: round; letter-spacing: .01em; transition: opacity .4s; }
.gx-star { cursor: pointer; outline: none; }
.gx-dot { fill: #FFF6DD; stroke: var(--t); stroke-width: 3; }
.gx-star.is-review .gx-dot { fill: #070B17; stroke-width: 3.5; }
.gx-glow { fill: var(--t); opacity: .35; animation: gx-pulse 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes gx-pulse { 50% { opacity: .12; transform: scale(1.4); } }
.gx-star text { font: 600 15px var(--font-body); fill: #F2ECE1; paint-order: stroke; stroke: #070B17; stroke-width: 5px; stroke-linejoin: round; opacity: 0; transition: opacity .4s; pointer-events: none; }
.gx-star:hover text, .gx-star:focus-visible text, .gx-star.is-in text { opacity: 1; }
.gx-star.is-sel .gx-dot { fill: var(--t); stroke: #FFF6DD; }
.gx-star:focus-visible .gx-glow { opacity: .8; }
.gx-link { stroke: #FFC24A; stroke-width: 1.4; stroke-opacity: 0; transition: stroke-opacity .4s; }
.research-map.is-inside .gx-link { stroke-opacity: .35; }
.research-map.is-inside .gx-link.is-on { stroke-opacity: 1; stroke-width: 2.5; }
.research-map.is-inside .gx:not(.is-on) { opacity: .28; }
.research-map.is-inside .gx.is-on .gx-name { opacity: 0; }
.research-map.is-inside .gx-star:not(.is-in) { opacity: .3; }
.gx-back { position: absolute; top: 14px; left: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; font: 600 14px var(--font-body); color: #F2ECE1;
  background: rgba(16, 22, 42, .85); border: 1px solid rgba(201, 212, 255, .35); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.gx-back svg { width: 16px; height: 16px; }
.gx-back:hover { border-color: #F2ECE1; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 0; }
.map-legend button { cursor: pointer; }
.map-legend button[aria-pressed="true"] { border-color: var(--t); box-shadow: inset 4px 0 0 var(--t); }
.research-map.is-vert .gx-name { font-size: 22px; }
.research-map.is-vert .gx-star text { font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .gx-arms, .gx-glow { animation: none; } }
/* galaxy fixes */
.gx-back[hidden] { display: none; }
.mp-actions .btn svg { width: 16px; height: 16px; flex: none; }
.mp-actions .btn { padding: 10px 18px; font-size: 15px; }
.gx-halo { opacity: .035; }
.gx:hover .gx-halo, .gx:focus-visible .gx-halo { opacity: .1; }
.gx-arms circle { fill: var(--t); filter: none; }
.research-map.is-vert .gx-name { font-size: 19px; }
.map-pop { width: min(380px, 34%); }
@media (max-width: 860px) { .map-pop { width: auto; } }
/* ---------- about me ---------- */
.about-h { margin: 22px 0 8px; font-size: 13.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink, var(--ink-3)); }
.about-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.about-list li { position: relative; padding: 12px 16px 12px 18px; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--marigold); border-radius: 12px; color: var(--ink-2); line-height: 1.55; }
.about-list li:nth-child(2) { border-left-color: var(--teal); } .about-list li:nth-child(3) { border-left-color: var(--cornflower); } .about-list li:nth-child(4) { border-left-color: var(--tomato); }
.about-list b { color: var(--ink); display: block; margin-bottom: 2px; }
.about-next { padding: 14px 18px; border-radius: 12px; background: var(--marigold-soft); color: var(--ink); }
.mp-actions svg, .mp-actions .pill-link svg { width: 16px; height: 16px; flex: none; }
/* galaxy extras */
.gx-count { font: 600 13.5px var(--font-body); fill: #C9D4FF; letter-spacing: .04em; }
.gx-far circle.tw { animation: twinkle 2.6s ease-in-out infinite alternate; }
.gx-comet { fill: none; stroke: #FFF6DD; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 28 300; stroke-dashoffset: 28; opacity: 0; }   /* flights are started from site.js */
@keyframes gx-comet { 0% { stroke-dashoffset: 28; opacity: 0; } 2% { opacity: .95; } 14% { opacity: .9; } 17%, 100% { stroke-dashoffset: -100; opacity: 0; } }
.research-map.is-inside .map-canvas { cursor: zoom-out; }
.research-map.is-inside .gx-star { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .gx-comet, .gx-far circle.tw { animation: none; opacity: 0; } }/* the moon: a real crescent (masked disc) with its glow drawn separately behind it */
.s2-moon { background: none; box-shadow: none; transform: rotate(180deg); }
.s2-moon::before { content: ""; position: absolute; inset: -40px; border-radius: 50%; background: radial-gradient(circle, rgba(237, 230, 211, .32), rgba(237, 230, 211, 0) 65%); }
.s2-moon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #EDE6D3;
  -webkit-mask: radial-gradient(circle at 72% 30%, transparent 0 46%, #000 48%); mask: radial-gradient(circle at 72% 30%, transparent 0 46%, #000 48%); }
/* ---------- blog posts ---------- */
.post-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 60; pointer-events: none; }
.post-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--tomato), var(--marigold)); transform-origin: left; transform: scaleX(0); }
.post-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); background:
  radial-gradient(60% 120% at 100% 0%, color-mix(in srgb, var(--t, var(--plum)) 22%, transparent), transparent 70%),
  radial-gradient(40% 90% at 0% 100%, color-mix(in srgb, var(--marigold) 14%, transparent), transparent 70%), var(--paper-2);
  border-bottom: 1px solid var(--rule); }
.post-hero .detail-title { max-width: 22ch; margin: 6px 0 14px; }
.post-lede { font: 400 clamp(19px, 2vw, 23px)/1.5 var(--font-display); color: var(--ink-2); max-width: 60ch; margin: 0 0 18px; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 5vw, 64px); padding-top: clamp(32px, 4vw, 52px); padding-bottom: 24px; align-items: start; }
.post-layout .post { max-width: 68ch; }
.post-body > p:first-child { font-size: 1.12em; color: var(--ink); }
.post-body h2 { position: relative; padding-left: 16px; margin-top: 2em; }
.post-body h2::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 5px; border-radius: 3px; background: var(--t, var(--plum)); }
.post-body ul li::marker { color: var(--t-ink, var(--plum-ink)); }
.post-body blockquote { border-left: 4px solid var(--t, var(--plum)); background: var(--card); border-radius: 0 12px 12px 0; padding: 12px 18px; margin: 1.4em 0; }
.post-side { position: sticky; top: 92px; display: grid; gap: 18px; }
.post-card-side, .post-doc { margin: 0; background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--t, var(--plum)); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.ps-h { margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--t-ink, var(--ink-3)); }
.post-card-side dl { margin: 0 0 10px; display: grid; gap: 10px; }
.post-card-side dt { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.post-card-side dd { margin: 2px 0 0; font-size: 15.5px; color: var(--ink); line-height: 1.4; }
.post-card-side .link-arrow { display: flex; margin-top: 8px; font-size: 14.5px; }
.doc-open { display: block; position: relative; width: 100%; padding: 0; border: 1px solid var(--rule); border-radius: 8px; background: #fff; cursor: zoom-in; overflow: hidden; }
.doc-open img { width: 100%; height: auto; display: block; }
.doc-zoom { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px; font: 600 13px var(--font-body); color: #fff; background: rgba(20, 24, 34, .78); border-radius: 8px; opacity: 0; transition: opacity .2s; }
.doc-zoom svg { width: 14px; height: 14px; }
.doc-open:hover .doc-zoom, .doc-open:focus-visible .doc-zoom { opacity: 1; }
.post-doc figcaption { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
@media (hover: none) { .doc-zoom { opacity: 1; } }
@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-side { position: static; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}.post-layout .post { padding-top: 0; padding-bottom: 0; }
.post-layout .post-body { margin-top: 0; }/* letters and certificates used as post covers: shown whole, as a page on a tinted mat */
.post-cover:has(img[src*="assets/docs/"]) { background: linear-gradient(135deg, var(--plum-soft), var(--marigold-soft)); }
.post-cover img[src*="assets/docs/"] { object-fit: contain; object-position: center; padding: 12px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .18)); }
/* ---------- personal touches ---------- */
/* search button and palette */
.site-header .wrap { gap: 12px; }
/* signature line */
.site-footer .wrap { flex-wrap: wrap; }
.foot-motto { flex-basis: 100%; margin: 14px 0 0; font-size: 14.5px; color: var(--ink-3); }
.foot-motto .em { font-family: var(--font-display); font-size: 17px; color: var(--ink-2); }
.foot-motto a { color: inherit; }
/* card illustrations: complete at rest, a quick replay on hover */
.auto-story.is-replaying .as-cap b { color: var(--t-ink); }
.auto-story .as-cap b:empty { display: none; }
.card:hover .auto-story .st { transform: scale(1.02); }
.auto-story .st { transition: transform .5s var(--ease); }
/* ---------- the logo: sun, horizon and signal ---------- */
.brand-mark { width: 30px; height: 30px; }
.brand-mark .bm-tile { fill: #1C2433; }
:root[data-theme="dark"] .brand-mark .bm-tile { fill: #2A3550; }
.brand-mark .bm-sun { fill: #FFC24A; transform-box: view-box; transform-origin: 14px 16.5px; animation: bm-rise 1.1s .15s cubic-bezier(.2, .8, .2, 1) both; }
.brand-mark .bm-rays path { fill: none; stroke: #FFC24A; stroke-width: 1.6; stroke-linecap: round; }
.brand-mark .bm-rays { transform-box: view-box; transform-origin: 14px 16.5px; animation: fade-in .6s 1s both; transition: transform .6s var(--ease); }
.brand-mark .bm-line { stroke: #FFF9EE; stroke-opacity: .55; stroke-width: 1.2; stroke-linecap: round; }
.brand-mark .bm-wave { fill: none; stroke: #5BC6BF; stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-in 1.2s .5s var(--ease) forwards; }
.brand:hover .brand-mark .bm-rays { transform: rotate(18deg) scale(1.08); }
.brand:hover .brand-mark .bm-sun { animation: bm-bob .9s ease-in-out; }
.brand:hover .brand-mark .bm-wave { animation: bm-wave 1.2s linear infinite; stroke-dasharray: .25 .08; }
@keyframes bm-rise { from { transform: translateY(7px) scale(.7); opacity: 0; } }
@keyframes bm-bob { 50% { transform: translateY(-1.6px); } }
@keyframes bm-wave { to { stroke-dashoffset: -.66; } }

/* ---------- motion across the site ---------- */
/* titles rise word by word */
.has-rise .w-rise { display: inline-block; animation: w-rise .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--wi) * 70ms + 80ms); }
@keyframes w-rise { from { opacity: 0; transform: translateY(.45em) rotate(1.5deg); filter: blur(3px); } }
/* lists cascade in */
.cascade > * { opacity: 0; transform: translateY(10px); }
.cascade.is-cascaded > * { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .6s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--ci) * 60ms); }
/* cards tilt and catch a light under the pointer */
.card, .post-card, .feat-pub, .domain-card { transform: perspective(1100px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform .35s var(--ease), box-shadow .35s; }
.card, .post-card, .feat-pub, .domain-card, .profile, .about-list li, .mp-card, .post-card-side, .fund-card, .pt-tab { position: relative; }
.post-card:hover, .feat-pub:hover, .domain-card:hover { box-shadow: 0 22px 40px -26px var(--shadow-c); }
/* a ripple where a button is pressed */
.btn, .pill-link, .chip, .pt-tab, .time-ctl, .menu-btn { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .18; transform: scale(0); animation: ripple .6s ease-out forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
/* buttons: a light sweeps across on hover; arrows nudge forward */
.btn::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); pointer-events: none; }
.btn:hover::before { transform: translateX(120%); transition: transform .7s ease; }
.btn svg, .link-arrow svg, .pill-go svg { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.btn:hover svg, .link-arrow:hover svg, .pill-go:hover svg { transform: translateX(4px); }
/* navigation: the underline slides in */
.nav a::before { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--accent, var(--ink)); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover::before { transform: scaleX(1); }
.nav a[aria-current="page"]::before { display: none; }
/* profile icons hop; tags and chips lift */
.social a { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), border-color .2s, box-shadow .2s; }
.social a:hover { transform: translateY(-4px) rotate(-6deg); }
.tag, .ptag, .fund-chips a, .credit li { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.tag:hover, .ptag:hover, .fund-chips a:hover, .credit li:hover { transform: translateY(-2px) scale(1.04); }
/* photos fade in as they arrive */
img.img-wait { opacity: 0; transform: scale(1.02); }
img.img-wait.img-in { opacity: 1; transform: none; transition: opacity .6s ease, transform .9s ease; }
/* eyebrow motif draws itself; the motto shimmers */
.eyebrow::before { animation: eyebrow-in .8s var(--ease) both; }
@keyframes eyebrow-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.foot-motto .em { background: linear-gradient(90deg, var(--ink-2), var(--marigold-ink), var(--tomato-ink), var(--ink-2)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 9s linear infinite; }
@keyframes shimmer { to { background-position: 300% 0; } }
/* the "Now" pulse ripples outward */
.now .pulse { animation: now-pulse 2.4s ease-out infinite; }
@keyframes now-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 12px transparent; } }
/* the portrait floats gently; the hero shapes drift */
.portrait.is-box .frame { animation: frame-in-box 1.1s var(--ease) .25s both, float-soft 8s ease-in-out 1.5s infinite; }
@keyframes float-soft { 50% { translate: 0 -6px; } }
.portrait .pd-nodes circle { animation: node-blink 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.portrait .pd-nodes circle:nth-of-type(2) { animation-delay: .8s; } .portrait .pd-nodes circle:nth-of-type(3) { animation-delay: 1.6s; } .portrait .pd-nodes circle:nth-of-type(4) { animation-delay: 2.4s; }
@keyframes node-blink { 50% { transform: scale(1.35); } }
/* section titles: the highlighted word gets its marker swept in */
.section-title .em { background-size: 0% 100%; transition: background-size 1s .3s var(--ease); }
.section-title.is-in .em, .section-title:not(.reveal) .em { background-size: 100% 100%; }
/* back to the top */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 55; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--paper); background: var(--ink); border: 0; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none; transition: opacity .3s, transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.to-top svg { width: 18px; height: 18px; }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover svg { animation: up-hop .6s ease; }
@keyframes up-hop { 50% { transform: translateY(-3px); } }
/* status badges breathe once when they appear; the scroll bar glows */
.status { animation: badge-in .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes badge-in { from { transform: scale(.7); opacity: 0; } }
/* certificate link */
.cert-link svg { color: var(--marigold-ink); }

@media (prefers-reduced-motion: reduce) {
  .brand-mark .bm-sun, .brand-mark .bm-rays, .brand-mark .bm-wave, .has-rise .w-rise, .eyebrow::before, .foot-motto .em, .now .pulse,
  .portrait.is-box .frame, .portrait .pd-nodes circle, .status, .to-top:hover svg { animation: none !important; }
  .brand-mark .bm-wave { stroke-dashoffset: 0; }
  .cascade > * { opacity: 1; transform: none; }
  .btn::before { display: none; }
  .section-title .em { background-size: 100% 100%; transition: none; }
}
/* ---------- logo: "sp" monogram with a rising sun ---------- */
.brand-mark { width: 34px; height: 34px; }
.brand-mark .bm-disc { fill: var(--ink); transition: fill .3s; }
.brand-mark .bm-text { font: italic 600 15.5px var(--font-display); fill: var(--paper); letter-spacing: -.02em; }
.brand-mark .bm-sun { fill: var(--marigold); stroke: var(--paper); stroke-width: 1.6; transform-box: fill-box; transform-origin: center; animation: bm-pop .8s .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.brand:hover .brand-mark .bm-sun { animation: bm-orbit 1.4s cubic-bezier(.45, 0, .2, 1); transform-origin: -6.6px 13.2px; transform-box: fill-box; }
.brand:hover .brand-mark .bm-disc { fill: color-mix(in srgb, var(--ink) 88%, var(--tomato)); }
@keyframes bm-pop { from { transform: scale(0); } }
@keyframes bm-orbit { to { transform: rotate(360deg); } }
.brand-name { font-size: 22px; letter-spacing: -.015em; }

/* ---------- hero: one line about where next ---------- */
.hero-intro { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.6; max-width: 34ch; color: var(--ink-2); }
.hero-next { display: inline-flex; align-items: center; gap: 12px; margin: 4px 0 26px; padding: 10px 18px 10px 14px; border-radius: 999px; font-size: 16px;
  background: var(--card); border: 1px solid var(--rule); animation: rise .7s var(--ease) calc(var(--i) * 90ms + .2s) both; }
.hero-next b { color: var(--ink); }
.hn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); flex: none; animation: now-pulse 2.4s ease-out infinite; }

/* ---------- home: compact project cards ---------- */
.grid-2.is-compact { gap: 28px 28px; }
.is-compact .card-fig { aspect-ratio: 16 / 9; }
.is-compact .card-title { font-size: clamp(20px, 1.8vw, 23px); }
.is-compact .card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15.5px; }
.is-compact .card-area { margin-top: 12px; }
.is-compact .card-links { margin-top: 8px; }

/* ---------- home: photos across the full width ---------- */
.photo-grid.is-wide-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(120px, 13vw, 190px); }
@media (max-width: 760px) { .photo-grid.is-wide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 38vw; } .photo-grid.is-wide-grid .pg-item.is-wide { grid-column: span 2; } }

/* ---------- closing: say hello ---------- */
.reach { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 24px;
  padding: clamp(32px, 5vw, 64px); border-radius: 28px; color: #F2ECE1;
  background: radial-gradient(90% 120% at 100% 0%, #2B3A63 0%, transparent 60%), radial-gradient(70% 90% at 0% 100%, #4A2A45 0%, transparent 60%), #141B2D; }
.reach-body { position: relative; z-index: 1; grid-column: 1; grid-row: 1; }
.reach .eyebrow { color: #FFC24A; }
.reach .eyebrow::before { background: radial-gradient(circle at 5px 5px, #FFC24A 4px, transparent 4.5px), radial-gradient(circle at 25px 5px, #F2ECE1 3px, transparent 3.5px), linear-gradient(#F2ECE1, #F2ECE1) 5px 4.25px / 20px 1.5px no-repeat; }
.reach-title { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.05; margin: 0 0 14px; color: #FFF9EE; }
.reach-title .em { color: #FFC24A; }
.reach-lede { font-size: 18px; color: #C9D4FF; max-width: 42ch; margin: 0 0 24px; }
.reach-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.reach-addr { font: 600 clamp(19px, 2.2vw, 26px) var(--font-display); color: #FFF9EE; text-decoration: none; background: linear-gradient(#FFC24A, #FFC24A) 0 100% / 0 2px no-repeat; transition: background-size .4s var(--ease); padding-bottom: 2px; }
.reach-addr:hover { background-size: 100% 2px; }
.reach .reach-copy { color: #F2ECE1; border-color: rgba(242, 236, 225, .4); background: transparent; }
.reach .social a { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
.reach-orbit { grid-column: 2; grid-row: 1; width: 100%; max-width: 340px; justify-self: center; overflow: visible; }
.ro-ring { fill: none; stroke: rgba(201, 212, 255, .25); stroke-width: 1.5; stroke-dasharray: 3 7; }
.ro-core { fill: #FFC24A; filter: drop-shadow(0 0 22px rgba(255, 194, 74, .65)); }
.ro-sun { fill: #F2593A; } .ro-moon { fill: #EDE6D3; }
.ro-spin { transform-box: view-box; transform-origin: 200px 200px; animation: ro-spin 18s linear infinite; }
.ro-spin.s2 { animation-duration: 9s; animation-direction: reverse; }
@keyframes ro-spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .reach { grid-template-columns: 1fr; } .reach-orbit { grid-column: 1; grid-row: 2; max-width: 200px; } }

/* ---------- footer: name and tagline ---------- */
.site-footer .foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 24px; }
.foot-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.foot-brand > span { display: grid; gap: 2px; }
.foot-brand b { font: 600 19px var(--font-display); }
.foot-tag { font: italic 500 16px var(--font-display); color: var(--ink-2); }
.foot-copy { grid-column: 1 / -1; margin: 6px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--ink-3); }
.foot-motto { display: none; }
@media (max-width: 640px) { .site-footer .foot-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { .ro-spin, .brand-mark .bm-sun, .hn-dot, .hero-next { animation: none !important; } }.reach .social a[aria-label="GitHub"] svg path { fill: #F2ECE1 !important; }
.reach .social a[aria-label="Email"] svg { stroke: #FFC24A !important; }.brand-name { white-space: nowrap; }
@media (max-width: 420px) { .brand-name { font-size: 17px; } .brand-mark { width: 30px; height: 30px; } .site-header .wrap { gap: 8px; } }
/* ---------- logo: Om ---------- */
.brand-mark { width: 36px; height: 36px; overflow: visible; }
.brand-mark .bm-disc { fill: #1E2127; }
:root[data-theme="dark"] .brand-mark .bm-disc { fill: #2A3550; }
.brand-mark .bm-halo { fill: #FF9933; opacity: .28; transform-box: fill-box; transform-origin: center; animation: om-breathe 4s ease-in-out infinite; }
.brand-mark .bm-om { font-family: "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari", Mangal, sans-serif; font-size: 19px; font-weight: 600; fill: #FF9933;
  animation: om-in 1.2s .2s cubic-bezier(.2, .8, .2, 1) both; transform-box: fill-box; transform-origin: center; }
.brand:hover .brand-mark .bm-om { filter: drop-shadow(0 0 4px rgba(255, 153, 51, .9)); }
.brand:hover .brand-mark .bm-halo { opacity: .5; }
@keyframes om-in { from { opacity: 0; transform: scale(.6); } }
@keyframes om-breathe { 50% { transform: scale(1.08); opacity: .12; } }
.foot-brand .brand-mark { width: 40px; height: 40px; }

/* ---------- research: domain boxes fill a complete grid ---------- */
.domain-grid { grid-auto-flow: dense; align-items: stretch; }
.domain-card.is-tall { grid-row: span 2; }
.domain-card.is-wide { grid-column: span 2; }
.domain-card { display: flex; flex-direction: column; }
.domain-card ul { margin-top: auto; }
.domain-card.is-tall h3 { font-size: clamp(24px, 2.4vw, 30px); }
.domain-card.is-tall ul { display: grid; gap: 4px; }
@media (max-width: 600px) { .domain-card.is-tall, .domain-card.is-wide { grid-row: auto; grid-column: auto; } }

/* ---------- blog: just a search box ---------- */
.blog-tools { grid-template-columns: minmax(0, 420px); }

/* ---------- contact ---------- */
.contact-hero { padding: clamp(40px, 7vw, 96px) 0 clamp(28px, 4vw, 48px); background: radial-gradient(60% 90% at 100% 10%, var(--tomato-soft), transparent 70%), radial-gradient(50% 80% at 0% 100%, var(--marigold-soft), transparent 70%); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.ch-addr { display: inline-block; margin: 8px 0 22px; font: 600 clamp(26px, 3.6vw, 44px)/1.15 var(--font-display); color: var(--ink); text-decoration: none; word-break: break-word;
  background: linear-gradient(var(--tomato), var(--tomato)) 0 100% / 0 3px no-repeat; transition: background-size .5s var(--ease); padding-bottom: 4px; }
.ch-addr:hover { background-size: 100% 3px; }
.ch-actions { margin-bottom: 26px; }
.ch-topics { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.ch-topics li { display: flex; align-items: center; gap: 12px; font-size: 17px; color: var(--ink-2); }
.ct-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tomato); flex: none; }
.ch-topics li:nth-child(2) .ct-dot { background: var(--teal); } .ch-topics li:nth-child(3) .ct-dot { background: var(--cornflower); }
.ch-where { margin: 0; font-size: 14.5px; color: var(--ink-3); }
.ch-art { position: relative; aspect-ratio: 6 / 5; max-width: 420px; width: 100%; justify-self: center; }
.ch-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch-trail path { fill: none; stroke: var(--rule-strong); stroke-width: 2.5; stroke-dasharray: 2 10; stroke-linecap: round; }
.ch-plane { position: absolute; left: 0; top: 0; width: 46px; height: 46px; offset-path: path("M30 250C80 120 150 260 200 160S330 40 330 40"); offset-rotate: auto 45deg; animation: plane 6s cubic-bezier(.45, 0, .3, 1) infinite; }
.ch-plane svg { width: 100%; height: 100%; }
.ch-plane .pl-a { fill: var(--tomato); stroke: var(--tomato-ink); stroke-width: 1.2; stroke-linejoin: round; }
.ch-plane .pl-b { fill: none; stroke: var(--paper); stroke-width: 1.4; stroke-linecap: round; }
@keyframes plane { 0% { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.ch-dot { position: absolute; border-radius: 50%; animation: float-soft 6s ease-in-out infinite; }
.ch-dot.d1 { width: 70px; height: 70px; right: 4%; top: 6%; background: var(--marigold); }
.ch-dot.d2 { width: 26px; height: 26px; left: 6%; top: 20%; background: var(--teal); animation-delay: 1s; }
.ch-dot.d3 { width: 40px; height: 40px; right: 30%; bottom: 4%; background: var(--cornflower); opacity: .8; animation-delay: 2s; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .ch-art { max-width: 300px; } }
/* profile cards carry each brand's colour */
.profiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.profile { border-left: 4px solid var(--bc, var(--rule-strong)); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), box-shadow .3s, border-color .3s; }
.profile:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -22px var(--shadow-c); }
.profile .ic { transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.profile:hover .ic { transform: rotate(-8deg) scale(1.1); }
@media (max-width: 860px) { .profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .profiles { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { .brand-mark .bm-halo, .brand-mark .bm-om, .ch-plane, .ch-dot { animation: none !important; } .ch-plane { offset-distance: 60%; } }.ch-addr { font-size: clamp(22px, 2.9vw, 36px); white-space: nowrap; word-break: normal; }
.ch-art { width: 360px; height: 300px; max-width: none; aspect-ratio: auto; }
@media (max-width: 860px) { .ch-art { transform: scale(.8); transform-origin: center top; margin-bottom: -60px; } }
@media (max-width: 480px) { .ch-addr { white-space: normal; overflow-wrap: anywhere; font-size: 22px; } .ch-art { transform: scale(.7); margin-bottom: -90px; } }.profiles a.profile { border-left: 4px solid var(--bc, var(--rule-strong)); }
.profiles a.profile:hover { border-color: var(--bc); border-left-width: 4px; }.domain-card.is-tall ul { margin-top: 18px; gap: 2px; }
.domain-card.is-tall ul li { padding: 8px 0; }
.fund-card.is-compact .fund-seal svg { width: 30px; height: 30px; }

/* ==========================================================================
   Delight: the opening, the hero constellation, the cursor ring and small surprises
   ========================================================================== */
/* the opening: Om, a breath, then the page opens out of it */
.om-intro { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 14px; background: #141B2D; cursor: pointer;
  clip-path: circle(150% at 50% 50%); transition: clip-path .75s cubic-bezier(.7, 0, .2, 1), opacity .75s; }
.om-intro.is-out { clip-path: circle(0% at 50% 50%); opacity: .6; pointer-events: none; }
.om-intro-om { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(255, 153, 51, .35), transparent 70%); animation: intro-breathe 1.1s ease-out both; }
.om-intro-om span { font: 600 64px "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari", Mangal, sans-serif; color: #FF9933; text-shadow: 0 0 30px rgba(255, 153, 51, .7); }
.om-intro-tag { margin: 0; font: italic 500 17px var(--font-display); color: #F2ECE1; letter-spacing: .04em; animation: rise .8s .3s var(--ease) both; }
@keyframes intro-breathe { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }

/* the hero constellation */
.hero { position: relative; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .75; }

/* "Subham." waves when the pointer passes */
.hero-title .em .ch { display: inline-block; transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.hero-title:hover .em .ch { animation: ch-wave .7s ease-in-out both; animation-delay: calc(var(--ci) * 45ms); }
@keyframes ch-wave { 40% { transform: translateY(-14px) rotate(-6deg); } 70% { transform: translateY(3px); } }

/* section headings draw a line under themselves */
.section-head { position: relative; }
.section-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent, var(--tomato)), var(--marigold), transparent); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.section-head.is-drawn::after { transform: scaleX(1); }

/* the footer tagline types itself */
.foot-tag.is-typing::after { content: "▍"; margin-left: 2px; color: var(--marigold-ink); animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* back-to-top: a ring shows how far down you are */
.to-top { overflow: visible; }
.tt-ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
.tt-ring circle { fill: none; stroke: var(--marigold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .15s linear; }

/* a burst when an address is copied */
.spark { position: fixed; z-index: 120; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; pointer-events: none; animation: spark .8s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

/* type "om": a lotus of light */
.bloom { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle, rgba(20, 27, 45, .55), rgba(20, 27, 45, .2) 60%, transparent); animation: fade-in .4s both; transition: opacity .7s; }
.bloom.is-out { opacity: 0; }
.bloom-petals { position: absolute; width: 0; height: 0; }
.bloom-petals i { position: absolute; left: -22px; top: -120px; width: 44px; height: 120px; border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%; transform-origin: 22px 120px;
  background: linear-gradient(to top, rgba(255, 153, 51, .9), rgba(255, 194, 74, .25)); transform: rotate(calc(var(--pi) * 30deg)) scaleY(0); animation: petal 1.2s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--pi) * 40ms); }
@keyframes petal { to { transform: rotate(calc(var(--pi) * 30deg)) scaleY(1); } }
.bloom-om { position: relative; font: 600 72px "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari", Mangal, sans-serif; color: #FFF6DD; text-shadow: 0 0 24px #FF9933, 0 0 60px #FF9933; animation: intro-breathe 1.2s ease-out both; }
.brand.is-bloom .brand-mark .bm-halo { animation: brand-bloom 1.4s ease-out; }
@keyframes brand-bloom { 0% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.9); opacity: .55; } 100% { transform: scale(1); opacity: .28; } }

  border: 1.5px solid color-mix(in srgb, var(--accent, var(--tomato)) 70%, transparent); transition: width .25s, height .25s, left .25s, top .25s, background-color .25s, opacity .3s; }

/* magnetic icons and a leaning portrait */
.social a { transition: translate .25s cubic-bezier(.3, 1.6, .5, 1), transform .35s cubic-bezier(.3, 1.6, .5, 1), border-color .2s, box-shadow .2s; }
.portrait.is-box { transform: translate(var(--px, 0), var(--py, 0)) rotate(var(--pr, 0)); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }

/* photos drift slowly when hovered; research boxes get a turning border light */
.pg-item img, .gallery img, .coast-photo img { transition: transform 3s cubic-bezier(.2, .8, .2, 1); }
.pg-item:hover img, .gallery figure:hover img, .coast-photo:hover img { transform: scale(1.08) translate(-1%, -1%); }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.theme-tile::before, .domain-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 2px; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: conic-gradient(from var(--spin), transparent 0 70%, var(--t, var(--marigold)) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.theme-tile:hover::before, .domain-card:hover::before { opacity: 1; animation: spin-border 2.4s linear infinite; }
@keyframes spin-border { to { --spin: 360deg; } }
.domain-card { position: relative; }

/* prose links: the underline sweeps in */
.prose a, .post-body a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .35s var(--ease); }
.prose a:hover, .post-body a:hover { background-size: 0 1px; background-position: 100% 100%; }

@media (prefers-reduced-motion: reduce) {
  .om-intro, .hero-sky, .bloom, .spark { display: none !important; }
  .hero-title:hover .em .ch, .theme-tile:hover::before, .domain-card:hover::before, .foot-tag.is-typing::after { animation: none !important; }
  .section-head::after { transition: none; transform: scaleX(1); }
  .portrait.is-box { transform: none; }
}/* the coast section with a single photo: text and photo share the row */
.coast-grid:not(:has(.coast-photo ~ .coast-photo)) { grid-template-areas: "art art art" "text text p1"; }
@media (max-width: 860px) { .coast-grid:not(:has(.coast-photo ~ .coast-photo)) { grid-template-areas: "art art" "text p1"; } }
@media (max-width: 520px) { .coast-grid:not(:has(.coast-photo ~ .coast-photo)) { grid-template-areas: "art" "text" "p1"; } }
/* ---------- the tagline: तमसो मा ज्योतिर्गमय ---------- */
.foot-tag { font: 600 19px/1.3 "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Serif Devanagari", "Noto Sans Devanagari", Mangal, serif; color: var(--marigold-ink); letter-spacing: .01em; font-style: normal; }
.foot-tag-en { font: italic 500 14.5px var(--font-display); color: var(--ink-3); }
.foot-brand > span { gap: 1px; }
.om-intro-tag { display: grid; justify-items: center; gap: 6px; text-align: center; }
.om-intro-tag span { font: 600 24px "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Serif Devanagari", "Noto Sans Devanagari", Mangal, serif; color: #FFE7A3; }
.om-intro-tag small { font: italic 500 15px var(--font-display); color: #C9D4FF; }

/* ---------- more motion, everywhere (only for visitors who have not asked for less motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* the tagline appears word by word, then its meaning */
  .tag-wait .foot-tag .tw { display: inline-block; opacity: 0; transform: translateY(8px); }
  .tag-wait .foot-tag-en { opacity: 0; }
  .tag-in .foot-tag .tw { opacity: 1; transform: none; transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--wi) * 260ms); }
  .tag-in .foot-tag-en { opacity: 1; transition: opacity .8s ease 1s; }
  /* the menu drops in when a page opens */
  .nav a { animation: nav-in .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--n, 0) * 60ms + 150ms); }
  @keyframes nav-in { from { opacity: 0; transform: translateY(-10px); } }
  .time-ctl { animation: nav-in .6s .55s cubic-bezier(.2, .8, .2, 1) both; }
  /* the switch's icon spins in each time the time of day changes */
  .time-ctl .time-knob svg { animation: knob-spin .6s cubic-bezier(.3, 1.6, .5, 1); }
  @keyframes knob-spin { from { transform: rotate(-180deg) scale(.4); opacity: 0; } }
  /* shapes behind the portrait drift with the scroll */
  .portrait .blob-a, .portrait .blob-b, .portrait .stripes, .portrait .pd-dots, .portrait .pd-nodes { translate: 0 var(--sy, 0); }
  /* project cards arrive from alternate sides */
  .js .grid-2 > .card.reveal:nth-child(odd) { translate: -36px 18px; }
  .js .grid-2 > .card.reveal:nth-child(even) { translate: 36px 18px; }
  .js .grid-2 > .card.reveal.is-in { translate: none; }
  /* blog covers are wiped into view */
  .post-card.reveal .post-cover img { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s cubic-bezier(.7, 0, .2, 1) .15s, transform .6s var(--ease); }
  .post-card.reveal.is-in .post-cover img { clip-path: inset(0 0 0 0); }
  .post-card:hover .post-cover img { transform: scale(1.05); }
  /* experience entries slide in from the date column */
  .js .xp.reveal { translate: -24px 0; }
  .js .xp.reveal.is-in { translate: none; }
  .xp-head h2 { background: linear-gradient(var(--accent, var(--marigold)), var(--accent, var(--marigold))) 0 100% / 0 3px no-repeat; transition: background-size 1s .2s var(--ease); padding-bottom: 4px; }
  .xp-group:hover .xp-head h2, .xp-group:focus-within .xp-head h2 { background-size: 60% 3px; }
  /* publications cascade in */
  .pubs > li { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--ci, 0) * 55ms); }
  /* search results cascade in */
  /* photos open in the viewer with a gentle zoom */
  .lightbox[open] img { animation: lb-zoom .45s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes lb-zoom { from { opacity: 0; transform: scale(.92); } }
  /* research-area icons float; published badges catch a passing light */
  .theme-tile .glyph { animation: glyph-float 5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .6s); }
  @keyframes glyph-float { 50% { translate: 0 -5px; } }
  .status-published { position: relative; overflow: hidden; }
  .status-published::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%); transform: translateX(-120%); animation: badge-shine 5s ease-in-out 1.5s infinite; }
  @keyframes badge-shine { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
  /* the primary hero button glints now and then */
  .hero .btn-solid::before { animation: hero-glint 6s ease-in-out 2.5s infinite; }
  @keyframes hero-glint { 0%, 80% { transform: translateX(-120%); } 92%, 100% { transform: translateX(120%); } }
  /* the CST-UP seal turns slowly; its project chips lift one by one on hover */
  .fund-seal::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed rgba(30, 33, 39, .35); animation: seal-turn 18s linear infinite; }
  @keyframes seal-turn { to { transform: rotate(360deg); } }
  /* profile icons wave in turn */
  .is-wave a { animation: icon-wave .7s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--ci, 0) * 80ms); }
  @keyframes icon-wave { 0% { transform: translateY(14px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
  /* the active story step breathes */
  .story-card.is-active .sc-in { animation: step-breathe 2.8s ease-in-out infinite; }
  @keyframes step-breathe { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--t) 22%, transparent), var(--shadow); } }
  /* the domain boxes and the closing card rise a little under the pointer */
  .domain-card { transition: translate .35s cubic-bezier(.3, 1.4, .5, 1), box-shadow .35s; }
  .domain-card:hover { translate: 0 -6px; box-shadow: 0 22px 40px -26px var(--shadow-c); }
  .reach:hover .ro-core { animation: core-pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes core-pulse { 50% { transform: scale(1.15); } }
  /* the "Looking for a PhD" line has a slow light running across it */
  .hero-next { position: relative; overflow: hidden; }
  .hero-next::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 40%, color-mix(in srgb, var(--marigold) 30%, transparent) 50%, transparent 60%); transform: translateX(-100%); animation: badge-shine 7s ease-in-out 3s infinite; pointer-events: none; }
  /* experience photo glimpses fan out a little on hover */
  .xp-glimpse:hover .g-open:nth-child(odd) { transform: rotate(-3deg) translateY(-3px); }
  .xp-glimpse:hover .g-open:nth-child(even) { transform: rotate(3deg) translateY(-3px); }
}/* the opening closes cleanly: its words fade first, then the solid screen closes (nothing shows through) */
.om-intro.is-out { opacity: 1; clip-path: circle(0% at 50% 50%); transition: clip-path .75s cubic-bezier(.7, 0, .2, 1) .3s; }
.om-intro > * { transition: opacity .3s ease, transform .3s ease; }
.om-intro.is-out > * { opacity: 0; transform: scale(.94); }
.om-intro-om { margin-bottom: 6px; }
/* research map: the starfield drifts in two depths; galaxy cores pulse */
.gx-drift { transform-box: view-box; animation: gx-drift 240s linear infinite; }
.gx-drift.d2 { animation-duration: 120s; }
.gx-drift.d2 circle { fill: #E6EBFF; opacity: .75; }
@keyframes gx-drift { to { transform: translateX(-100%); } }
.gx > circle[fill^="url(#gx-core"] { transform-box: fill-box; transform-origin: center; animation: core-glow 5s ease-in-out infinite; }
@keyframes core-glow { 50% { transform: scale(1.12); opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .gx-drift, .gx > circle[fill^="url(#gx-core"] { animation: none; } }
/* headings that only exist for structure (screen readers and search engines) */
.sr-heading { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the first instant of a visit: a plain cover (from the <head> snippet) until the Om screen takes over;
   it lifts by itself after a moment if scripts never run */
html.om-first::after { content: ""; position: fixed; inset: 0; z-index: 199; background: #141B2D; animation: om-cover-off 0s 2.5s forwards; }
@keyframes om-cover-off { to { visibility: hidden; } }
/* the opening, a little quicker */
.om-intro-om { animation-duration: .9s; }
.om-intro-tag { animation: rise .6s .15s var(--ease) both; }
.om-intro.is-out { transition: clip-path .6s cubic-bezier(.7, 0, .2, 1) .2s; }
.om-intro > * { transition: opacity .22s ease, transform .22s ease; }

/* ---------- the opening closes into the logo: the dark screen shrinks to the logo's disc as the Om flies home ---------- */
.om-intro-sky { display: none; }
.om-intro.has-sky { background: transparent; clip-path: none; transition: none; }
.om-intro.has-sky .om-intro-sky { display: block; position: absolute; z-index: -1; border-radius: 50%; background: #141B2D; will-change: transform;
  transition: transform .6s cubic-bezier(.5, 0, .2, 1); }
.om-intro.is-going .om-intro-om { animation: none; }
.om-intro.is-out { opacity: 0; pointer-events: none; clip-path: none; transition: opacity .14s ease .52s; }
.om-intro.is-out .om-intro-sky { transform: scale(var(--k, 0)); }
.om-intro.is-out > .om-intro-tag { opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease; }
.om-intro.is-out > .om-intro-om { opacity: 1; animation: none; transform: translate(var(--dx, 0), var(--dy, 0)) scale(var(--s, .3));
  transition: transform .6s cubic-bezier(.5, 0, .2, 1); will-change: transform; }

/* ---------- experience: the counts as tiles ---------- */
.k-professional { --k: var(--cornflower); --k-soft: var(--cornflower-soft); --k-ink: var(--cornflower-ink); }
.xp-tally { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.xp-tally a { display: grid; align-content: start; gap: 4px; padding: 14px 14px 13px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--k, var(--accent)); transition: transform .25s var(--ease), box-shadow .25s; }
.xp-tally b { font: 600 34px/1 var(--font-display); color: var(--k-ink, var(--ink)); }
.xp-tally span { font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--ink-2); }
.xp-tally a:hover, .xp-tally a:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 22px -16px var(--shadow-c); }
@media (max-width: 560px) { .xp-tally { grid-template-columns: repeat(2, minmax(0, 1fr)); } .xp-tally b { font-size: 28px; } }

/* ---------- blog: drawn covers for posts without a photo; a letter or certificate rests on them like a sheet ---------- */
.post-cover.is-art { position: relative; isolation: isolate; color: #fff;
  background: radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--k) 70%, #fff 0%) 0%, transparent 60%),
              linear-gradient(150deg, color-mix(in srgb, var(--k) 80%, #141B2D), color-mix(in srgb, var(--k) 38%, #141B2D)); }
.post-cover.is-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.6px) 0 0 / 16px 16px;
  -webkit-mask-image: linear-gradient(110deg, transparent 15%, #000 85%); mask-image: linear-gradient(110deg, transparent 15%, #000 85%); }
.post-cover.is-art::after { content: ""; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; right: -18%; top: -38%; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .22); box-shadow: 0 0 0 26px rgba(255, 255, 255, .05), 0 0 0 52px rgba(255, 255, 255, .04); }
.post-cover .pa-motif { position: absolute; right: 7%; top: 50%; width: 42%; height: auto; max-height: 82%; transform: translateY(-50%) rotate(-8deg);
  stroke: rgba(255, 255, 255, .8); stroke-width: 1.1; transition: transform .6s var(--ease); }
.post-cover .pa-kick { position: absolute; left: 18px; top: 16px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; background: rgba(255, 255, 255, .92); color: color-mix(in srgb, var(--k) 60%, #141B2D); }
.post-card:hover .post-cover .pa-motif { transform: translateY(-50%) rotate(0deg) scale(1.06); }
/* ---------- text never strands a lone word on its own line ---------- */
/* headings fill the width they have; "pretty" only avoids a lone word on the last line ("balance" used to shorten
   every line of a two-line title to half the box, leaving an empty band beside card and listing titles) */
h1, h2, h3, h4, .page-title, .detail-title, .lede, .detail-lede, .xp-head h2 { text-wrap: pretty; }
p, li, figcaption, dd, blockquote, .xp-lede { text-wrap: pretty; }

/* drawn covers win over the older pale backdrop for letters; the sheet sits lower so the label stays clear */
.post-card .post-cover.is-art { background: radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--k) 70%, #fff 0%) 0%, transparent 60%),
  linear-gradient(150deg, color-mix(in srgb, var(--k) 80%, #141B2D), color-mix(in srgb, var(--k) 38%, #141B2D)); }
.post-cover .pa-kick { z-index: 2; }
.xp-when .nw { white-space: nowrap; }

/* ---------- every photo, certificate and letter is shown whole, never cropped ---------- */
/* experience: the pictures sit beside the entry in an even grid of equal square tiles; each picture is shown whole
   inside its tile, with no tilt, frame or movement */
.xp-body.has-media { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 34px; align-content: start; }
.xp-body.has-media > * { grid-column: 1; }
.xp-body.has-media > .xp-sheet { grid-column: 2; grid-row: 1 / span 8; align-self: start; }
.xp-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 0; }
.xp-sheet.is-one { grid-template-columns: minmax(0, 1fr); }
.xp-sheet .g-open, .xp-sheet .g-open.is-doc { display: block; position: relative; width: 100%; height: auto; aspect-ratio: 1; margin: 0; padding: 6px; border: 1px solid var(--rule);
  border-radius: 10px; overflow: hidden; background: var(--paper-2); cursor: zoom-in; transform: none; box-shadow: none; transition: border-color .2s; }
.xp-sheet .g-open img, .xp-sheet .g-open.is-doc img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 4px; transform: none !important; }
.xp-sheet .g-open:hover, .xp-sheet .g-open:focus-visible { transform: none; border-color: var(--rule-strong); box-shadow: none; }
@media (max-width: 860px) {
  .xp-body.has-media { display: block; }
  .xp-sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 520px; margin: 14px 0 8px; }
  .xp-sheet.is-one { grid-template-columns: minmax(0, 220px); }
}

/* blog cards: the whole picture over a blurred copy of itself; every cover the same size */
.post-cover { aspect-ratio: 4 / 3; }
.post-cover.is-full { position: relative; isolation: isolate; background: #1E2127; }
.post-card .post-cover.is-full img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border-radius: 0; }
.post-card .post-cover .pc-bg { object-fit: cover; filter: blur(18px) saturate(1.15) brightness(.72); transform: scale(1.2); }
.post-card .post-cover .pc-img { object-fit: contain; filter: none; }
.post-card .post-cover.is-doc .pc-img { inset: 14px 0; height: calc(100% - 28px); filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .45)); }
.post-card:hover .post-cover .pc-bg { transform: scale(1.26); }
.post-card:hover .post-cover .pc-img { transform: scale(1.03); }

/* blog posts: photos at their own shape, two columns like a contact sheet */
.post-gallery img, .post-gallery.is-grid img { height: auto; max-height: none; aspect-ratio: auto; object-fit: contain; }
.post-gallery.is-grid { display: block; columns: 2; column-gap: 14px; }
.post-gallery.is-grid figure { break-inside: avoid; margin: 0 0 14px; }
@media (max-width: 600px) { .post-gallery.is-grid { columns: 1; } }

/* project galleries: the same, three columns */
.gallery { display: block; columns: 3 220px; column-gap: 12px; }
.gallery .g-item, .gallery .g-item.is-tall, .gallery .g-item:nth-child(n+4):not(.is-tall) { display: block; break-inside: avoid; margin: 0 0 12px; }
.gallery .g-open { display: block; width: 100%; height: auto; }
.gallery .g-open img { height: auto; object-fit: contain; display: block; }
.post-gallery:not(.is-grid) img { width: auto; max-width: 100%; max-height: 640px; margin: 0 auto; display: block; }
.xp-sheet .doc-tag { display: none; }
@media (max-width: 560px) { .xp-tally a:last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* ==========================================================================
   Performance pass (measured with DevTools metrics)
   ========================================================================== */
/* looping decorations pause while their section is off screen or under the Day/Night sky (js: motionGate) */
.is-idle, .is-idle *, .is-idle::before, .is-idle::after, .is-idle *::before, .is-idle *::after { animation-play-state: paused !important; }

/* reveals: quick, with a short capped stagger, so text and pictures arrive together as they enter */
.js .reveal { transition: opacity .45s var(--ease), translate .45s var(--ease), transform .3s var(--ease), border-color .3s, box-shadow .3s;
  transition-delay: calc(min(var(--i, 0), 3) * 60ms); }
.tl-item.reveal { transition-delay: calc(min(var(--i, 0), 3) * 50ms); }
.cascade.is-cascaded > * { transition: opacity .35s var(--ease), transform .4s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(min(var(--ci, 0), 5) * 40ms); }
.js .card.reveal .card-fig { transition: clip-path .65s var(--ease) .05s, transform .35s var(--ease), box-shadow .35s var(--ease); }
@media (prefers-reduced-motion: no-preference) {
  .post-card.reveal .post-cover img { transition: clip-path .65s cubic-bezier(.7, 0, .2, 1) .05s, transform .6s var(--ease); }
  /* titles rise word by word: no blur (a filter repaints every word on every frame), and the stagger is capped */
  .has-rise .w-rise { animation: w-rise2 .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(min(var(--wi), 6) * 45ms + 40ms); }
  @keyframes w-rise2 { from { opacity: 0; transform: translateY(.4em) rotate(1.2deg); } }
}

/* pulses drawn with transform and opacity on a ring, instead of an animated box-shadow that repaints each frame */
.hn-dot, .now .pulse { position: relative; animation: none !important; }
.hn-dot::after, .now .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--teal); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .hn-dot::after, .now .pulse::after { animation: dot-ring 2.4s ease-out infinite; }
  @keyframes dot-ring { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(2.4); opacity: 0; } }
}
/* the active story step glows with an opacity ring, not an animated shadow */
.story-card.is-active .sc-in { animation: none !important; }
.story-card .sc-in { position: relative; }
.story-card .sc-in::after { content: ""; position: absolute; inset: -1px; border-radius: 16px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--t, var(--marigold)) 22%, transparent);
  opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .story-card.is-active .sc-in::after { animation: ring-breathe 2.8s ease-in-out infinite; }
  @keyframes ring-breathe { 50% { opacity: 1; } }
  /* the highlighted part of a story picture pulses in opacity instead of an animated drop-shadow filter */
  .st .is-hl { animation: st-pulse 1.3s ease-in-out infinite alternate; }
  @keyframes st-pulse { from { opacity: 1; } to { opacity: .55; } }
}

/* the galaxy's background stars twinkle as two groups, not 80 separately animated stars */
.gx-far g.tw { animation: twinkle 2.6s ease-in-out infinite alternate; }
.gx-far g.tw-b { animation-delay: -1.3s; }
@media (prefers-reduced-motion: reduce) { .gx-far g.tw { animation: none; } }

/* phones: the sticky header's backdrop blur is redrawn on every scroll frame; a near-opaque fill looks the same */
@media (max-width: 860px) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: color-mix(in srgb, var(--paper) 97%, transparent); }
}

/* the dots behind the portrait float as one piece (a GPU transform) instead of each dot pulsing inside the SVG */
.portrait .pd-nodes circle { animation: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .portrait .pd-nodes { animation: rise .8s var(--ease) 1.1s both, nodes-float 6s ease-in-out 2s infinite; }
  @keyframes nodes-float { 50% { transform: translateY(-6px) rotate(-2deg); } }
}
/* phones: the spiral arms (hundreds of dust dots) hold still; the stars still orbit and the sky still drifts */
@media (max-width: 860px), (pointer: coarse) {
  .gx-arms, .gx > circle[fill^="url(#gx-core"] { animation: none !important; }
}

/* ---------- home: selected projects as a showcase (a numbered list beside one large picture) ---------- */
.showcase { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr); gap: clamp(18px, 3vw, 36px); align-items: start; }
.sc-list { display: grid; gap: 6px; }
.sc-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; width: 100%; padding: 14px 16px; text-align: left;
  font: inherit; color: var(--ink); background: none; border: 1px solid transparent; border-radius: 14px; cursor: pointer; transition: background .25s, border-color .25s, box-shadow .25s; }
.sc-item:hover { background: color-mix(in srgb, var(--card) 70%, transparent); }
.sc-item[aria-selected="true"] { background: var(--card); border-color: var(--rule); box-shadow: inset 4px 0 0 var(--t, var(--ink)); }
.sc-n { font: 600 22px/1 var(--font-display); color: var(--ink-3); padding-top: 3px; font-variant-numeric: tabular-nums; }
.sc-item[aria-selected="true"] .sc-n { color: var(--t-ink, var(--ink)); }
.sc-txt { display: grid; gap: 4px; min-width: 0; }
.sc-area { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.sc-txt b { font: 600 18px/1.3 var(--font-display); text-wrap: pretty; }
.sc-q { display: none; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.sc-item[aria-selected="true"] .sc-q { display: block; }
.sc-stage { position: sticky; top: 92px; }
.sc-panel { border: 1px solid var(--rule); border-radius: 20px; background: var(--card); overflow: hidden; box-shadow: var(--shadow); }
.sc-pic { display: block; }
.sc-pic .auto-story { aspect-ratio: 16 / 10; }
.sc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 18px; border-top: 1px solid var(--rule); }
.sc-foot .card-meta { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .sc-panel:not([hidden]) { animation: sc-in .4s var(--ease) both; }
  @keyframes sc-in { from { opacity: 0; transform: translateY(6px); } }
}
@media (max-width: 860px) {
  .showcase { grid-template-columns: 1fr; }
  .sc-stage { position: static; order: -1; }
  .sc-item { padding: 12px 12px; }
  .sc-txt b { font-size: 17px; }
}

/* The portrait's shapes: entrance and loop on separate properties. Two animations stacked on the same `transform`
   (a finished pop-in held on its last frame, plus the float) cannot run on the compositor, so Chrome restyled and
   re-laid out the page 60 times a second while the hero was in view. The entrance now uses `scale`/`opacity`,
   the loop keeps `transform` (measured: 44% -> 2% main thread on a phone-speed CPU). */
@keyframes pop-in-s { from { opacity: 0; scale: .4; } }
@keyframes rise-s { from { opacity: 0; scale: .9; } }
@media (prefers-reduced-motion: no-preference) {
  .portrait .blob-a { animation: pop-in-s .9s cubic-bezier(.3, 1.4, .5, 1) .55s both, float 9s ease-in-out 1.6s infinite; }
  .portrait .blob-b { animation: pop-in-s .9s cubic-bezier(.3, 1.4, .5, 1) .75s both, float 7s ease-in-out 1.8s infinite reverse; }
  .portrait .pd-nodes { animation: rise-s .8s var(--ease) 1.1s both, nodes-float 6s ease-in-out 2s infinite; }
}
/* phones: the galaxy's slow background drift holds still too (the stars keep orbiting) */
@media (max-width: 860px), (pointer: coarse) { .gx-drift { animation: none !important; } }

/* a card picture rests a few seconds after playing its steps (its small loops pause until it plays again) */
.auto-story.is-still .st *, .auto-story.is-still .st *::before, .auto-story.is-still .st *::after { animation-play-state: paused !important; }
/* phones: the stars' glow holds still in the galaxy */
@media (max-width: 860px), (pointer: coarse) { .gx-glow { animation: none !important; } }

/* phones: the background twinkle rests (the orbits and shooting stars carry the motion) */
@media (max-width: 860px), (pointer: coarse) { .gx-far g.tw { animation: none !important; } }

/* ---------- mobile fixes from the width audit (320-1024 px) ---------- */
/* decorations behind the portrait and the contact drawing never push the page sideways */
.hero, .contact-hero { overflow-x: clip; }
/* the contact drawing keeps its layout size; the text column may still shrink below it on small phones */
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
/* tap targets of at least 24 px (WCAG 2.2): story step dots, photo-grid captions, project links in research areas */
.story-dot { position: relative; }
.story-dot::before { content: ""; position: absolute; inset: -9px -3px; }
/* (touch screens only, so the research-area boxes keep their size with a mouse) */
@media (pointer: coarse) { .pg-item figcaption a, .domain-card li > a { display: inline-block; padding-block: 4px; } }

/* ---------- pictures fill their frames: one frame size per place, no empty bars ---------- */
/* experience: equal 4:3 tiles; photos centred, certificates and letters from the top (the whole page opens on a tap) */
.xp-sheet .g-open, .xp-sheet .g-open.is-doc { aspect-ratio: 4 / 3; padding: 0; background: var(--paper-2); }
.xp-sheet .g-open img, .xp-sheet .g-open.is-doc img { object-fit: cover; object-position: center; border-radius: 0; }
.xp-sheet .g-open.is-doc img { object-position: top; }
/* blog cards: the photo or certificate fills the card's frame edge to edge */
.post-cover.is-full { background: var(--paper-2); }
.post-card .post-cover .pc-img, .post-card .post-cover.is-doc .pc-img { inset: 0; height: 100%; object-fit: cover; object-position: center; filter: none; }
.post-card .post-cover.is-doc .pc-img { object-position: top; }

/* ---------- research-assistant card: the work under the project as two numbers ---------- */
.fund-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.fund-stat { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 8px; padding: 8px 16px; border-radius: 14px; text-decoration: none;
  color: var(--ink); background: var(--marigold-soft); border: 1px solid transparent; transition: border-color .2s, transform .25s var(--ease); }
.fund-stat b { font: 600 30px/1 var(--font-display); color: var(--marigold-ink); }
.fund-stat span { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.fund-stat:hover, .fund-stat:focus-visible { border-color: var(--marigold); transform: translateY(-2px); }

/* ---------- back-to-top: the progress ring is the button's own border ---------- */
.tt-ring { inset: 0; width: 100%; height: 100%; }
.tt-ring .tt-track { fill: none; stroke: color-mix(in srgb, var(--paper) 28%, transparent); stroke-width: 3; }
.tt-ring .tt-bar { fill: none; stroke: var(--marigold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .15s linear; }

/* ---------- the showcase, told by scrolling ---------- */
.sc-item { min-height: 30vh; align-content: start; }
.sc-item:last-child { min-height: 0; margin-bottom: 18vh; }
@media (max-width: 860px) {
  .showcase { display: flex; flex-direction: column; gap: 14px; }
  .sc-stage { order: -1; position: sticky; top: 72px; z-index: 3; padding: 6px 0 10px; background: var(--paper); }
  .sc-item { min-height: 36vh; }
  .sc-item:last-child { min-height: 0; margin-bottom: 26vh; }
  .sc-panel { box-shadow: 0 14px 30px -22px rgba(20, 24, 33, .45); }
  .sc-foot { padding: 10px 14px; }
}
@media (max-width: 560px) {
  /* phones: the seal sits above the text, so the two numbers have room side by side */
  .fund-card.is-compact { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .fund-more { grid-column: 1; }
  .fund-stats { flex-wrap: nowrap; }
  .fund-stat { padding: 8px 12px; }
  .fund-stat b { font-size: 26px; }
}

/* ---------- the showcase never moves the page when the project changes ---------- */
/* all four panels share one grid cell, so the pinned card always has the height of the tallest one */
.sc-stage { display: grid; }
.sc-stage > .sc-panel { grid-area: 1 / 1; }
.sc-stage > .sc-panel[hidden] { display: block; visibility: hidden; }
/* every project shows its one-line question; the chosen one is full strength, so no row changes height */
.sc-q { display: block; opacity: .55; transition: opacity .3s; }
.sc-item[aria-selected="true"] .sc-q { opacity: 1; }
/* ---------- wide screens keep the showcase as it was; the scroll-told version is for phones ---------- */
@media (min-width: 861px) {
  .sc-item, .sc-item:last-child { min-height: 0; margin-bottom: 0; }
  .sc-q { display: none; }
  .sc-item[aria-selected="true"] .sc-q { display: block; opacity: 1; }
}
@media (max-width: 860px) {
  .sc-foot .card-meta { display: none; }      /* phones: the picture and its steps get the room */
  /* project scroll stories: the steps stay sharp as they arrive; the current one is marked by its edge */
  .story-card .sc-in { opacity: 1; transform: none; }
}

/* ---------- the Om, auspicious: gold glyph with a soft glow, a gold ring, and a warm breathing aura ---------- */
.om-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand-mark .bm-halo { fill: url(#om-aura); opacity: .55; }
.brand-mark .bm-disc { stroke: #E9B44C; stroke-width: .9; stroke-opacity: .7; }
.brand-mark .bm-om { fill: url(#om-gold); filter: drop-shadow(0 0 1.4px rgba(255, 190, 90, .9)); }
.brand:hover .brand-mark .bm-om { filter: drop-shadow(0 0 3px rgba(255, 200, 110, 1)); }
.brand:hover .brand-mark .bm-halo { opacity: .85; }
@media (prefers-reduced-motion: no-preference) {
  .brand-mark .bm-halo { animation: om-aura 4.5s ease-in-out infinite; }
  @keyframes om-aura { 50% { transform: scale(1.06); opacity: .8; } }
}

/* ---------- phones: pinned pictures without empty spacers ---------- */
/* the four home pictures share one cell that always fills the width */
.sc-stage { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) {
  /* home: the project names sit close together under the pinned picture, several visible at once */
  .sc-item, .sc-item:last-child { min-height: 0; margin-bottom: 0; }
  .sc-list { gap: 8px; padding-bottom: 6vh; }
  /* project pages: the steps sit close together under the pinned picture; no tall blank cards */
  .story-steps { display: grid; gap: 12px; padding: 14px 0 5vh !important; }
  .story-card { display: block !important; min-height: 0 !important; padding: 0 !important; }
}
/* ---------- the Om: auspicious, not lit up (gold glyph, fine gold ring, a quiet warm aura) ---------- */
.brand-mark .bm-om, .brand:hover .brand-mark .bm-om { filter: none; }
.brand-mark .bm-disc { stroke: #C9973F; stroke-width: .8; stroke-opacity: .85; }
.brand-mark .bm-halo { opacity: .22; }
.brand:hover .brand-mark .bm-halo { opacity: .38; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes om-aura { 50% { transform: scale(1.04); opacity: .32; } }
}

/* phones: the pinned home picture always spans the full width (the desktop grid aligned items to the start) */
@media (max-width: 860px) { .showcase { align-items: stretch; } .sc-stage, .sc-panel { width: 100%; } }

/* ==========================================================================
   Fluid text: every size follows the screen width (no jumps between fixed sizes), and headings and paragraphs
   use the room they have. Titles are smaller on phones (a long project title takes 2-3 lines, not 4) and do not
   squeeze into a narrow column on wide screens (1-2 lines). Paragraph lines stay under ~75 characters to read well.
   ========================================================================== */
body { font-size: clamp(16px, .2vw + 15.2px, 17px); }
.hero-title { font-size: clamp(44px, 6vw + 20px, 92px); }
.page-title { font-size: clamp(32px, 4vw + 16px, 66px); }
.section-title { font-size: clamp(26px, 2.2vw + 17px, 44px); }
.detail-title { font-size: clamp(24px, 2.6vw + 15px, 54px); max-width: none; }
.post .detail-title, .post-hero .detail-title { max-width: none; }
.card-title { font-size: clamp(20px, .8vw + 15.5px, 25px); }
.fund-title { font-size: clamp(19px, .6vw + 16px, 23px); }
.story-card h3, .xp-body h3 { font-size: clamp(18px, .5vw + 15.5px, 21px); }
.sc-txt b { font-size: clamp(17px, .3vw + 15.5px, 19px); }
.closing h2 { max-width: 22ch; }
.fund-body .section-title { max-width: 32ch; }
/* paragraphs: comfortable line lengths, not narrow columns */
.hero-intro { font-size: clamp(17px, .5vw + 15px, 21px); max-width: 44ch; }
.page-lede, .section-lede, .detail-lede, .fund-lede, .reach-lede { font-size: clamp(16.5px, .35vw + 15px, 20px); max-width: 72ch; }
.post-lede { font-size: clamp(18px, .5vw + 16px, 22px); max-width: 68ch; }
.prose, .dsec, .dsec .hook, .post-body, .post-layout .post, .xp-lede, .xp-more > p, .fund-project, .about-home .prose { max-width: 76ch; }
.closing p { max-width: 56ch; }

/* the hero name: each word's letters stay together on one line */
.ch-word { display: inline-block; white-space: nowrap; }

/* ---------- project pages: the kind of each contribution ---------- */
.contrib .c-kind { display: inline-block; margin: 0 0 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--t-ink, var(--ink-2)); background: var(--t-soft, var(--paper-2)); }
/* ---------- back-to-top: the progress ring is drawn at the button's own size, concentric with the arrow ----------
   (the button's rule `.to-top svg { width: 18px }` for the arrow icon also matched the ring and shrank it into a
   small circle at the top-left corner) */
.to-top .tt-ring { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; transform: rotate(-90deg); pointer-events: none; }
.to-top > svg:not(.tt-ring) { position: relative; z-index: 1; }

/* ---------- long-form reading: justified research and article paragraphs on wider screens ----------
   Hyphenation keeps word spacing even; phones keep left alignment, where a justified narrow column opens large gaps.
   Cards, captions, lists, metadata and headings are never justified. */
@media (min-width: 720px) {
  .dsec > p, .dsec .hook, .post-body > p, .xp-more > p, .prose > p {
    text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3;
  }
}
.dsec > p, .post-body > p { max-width: 72ch; }

/* ---------- pictures fill their frames ----------
   Experience tiles and blog cards are glimpses: photographs and documents both fill the frame (owner's choice).
   Letters and certificates are cropped from the top, where the letterhead and title are; the whole document opens
   on a tap and is shown complete inside the post. Portrait photos keep the upper part, where faces are. */
.xp-sheet .g-open:not(.is-doc) img, .post-card .post-cover.is-full:not(.is-doc) .pc-img { object-position: center 30%; }
.xp-sheet .g-open.is-doc { padding: 0; background: var(--paper-2); }
.xp-sheet .g-open.is-doc img { object-fit: cover; object-position: top center; filter: none; }
.post-card .post-cover.is-doc .pc-img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: none; }

/* ---------- balanced card grids: the number of cards decides the columns, so no card is left alone on a row ----------
   "What is new": 2 or 4 cards in two columns, 3 in three, 5 as three over two; one column on phones. */
.contribs { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .contribs.n-2, .contribs.n-4, .contribs.n-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .contribs.n-3, .contribs.n-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contribs.n-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .contribs.n-5 > * { grid-column: span 2; }
  .contribs.n-5 > :nth-child(n+4) { grid-column: span 3; }
}
/* Experience tally on phones: seven tiles as 2 + 2 + 3 instead of three pairs and one stretched tile */
@media (max-width: 560px) {
  .xp-tally.n-7 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .xp-tally.n-7 a, .xp-tally.n-7 a:last-child:nth-child(odd) { grid-column: span 3; }
  .xp-tally.n-7 a:nth-child(n+5), .xp-tally.n-7 a:last-child:nth-child(n+5) { grid-column: span 2; }
}

/* ---------- phones: the header slides away while reading down (js: autoHide toggles html.hdr-off) ----------
   A transform only, so nothing below moves; pinned pictures (project story, home showcase) slide up with it so no gap
   opens above them. Reduced motion: it still hides, without the slide. */
@media (max-width: 860px) {
  .site-header { transition: border-color .25s var(--ease), transform .3s var(--ease); }
  .story-fig, .sc-stage { transition: transform .3s var(--ease); }
  html.hdr-off .site-header { transform: translateY(-100%); }
  html.hdr-off .story-fig { transform: translateY(-64px); }
  html.hdr-off .sc-stage { transform: translateY(-72px); }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .site-header, .story-fig, .sc-stage { transition: none; }
}
.scroll-progress[hidden] { display: none; }

/* ---------- long-form paragraphs justified on every screen (owner's request) ----------
   Hyphenation (the pages declare lang="en") keeps word spacing even in a phone-width column; long words and links
   may break rather than overflow; "pretty" wrapping avoids a lone word on the last line. Cards, captions, lists,
   labels and headings stay left-aligned. */
.dsec > p, .dsec .hook, .post-body > p, .xp-more > p, .prose > p {
  text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3;
  overflow-wrap: break-word; text-wrap: pretty;
}

/* ---------- headings use the width they have (desktop) ----------
   Experience: the entry title runs across the text and the picture column instead of the narrow text column; between
   861 and 1180 px the pictures go under the text, where the picture column used to squeeze it to a few words a line.
   Card titles ease slightly on mid-size screens; featured papers (long titles) are one full-width column. */
.xp-group { grid-template-columns: 240px minmax(0, 1fr); }
@media (max-width: 860px) { .xp-group { grid-template-columns: 1fr; } }
.xp-body.has-media > h3 { grid-column: 1 / -1; grid-row: 1; }
.xp-body.has-media > .xp-sheet { grid-row: 2 / span 8; }
/* Experience: pictures sit under the text on every screen (beside it, they squeezed the text into a third of the entry) */
.xp-body.has-media { display: block; }
.xp-body.has-media > .xp-sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 520px; margin: 14px 0 8px; }
.xp-body.has-media > .xp-sheet.is-one { grid-template-columns: minmax(0, 260px); }
.post-card h3, .theme-tile h3, .domain-card h3 { font-size: clamp(19px, 1.65vw, 21px); }
.feat-pubs { grid-template-columns: minmax(0, 1fr); }

/* justification only where the column is wide enough to take it: not the large-type lead paragraph of a post on a
   phone */
@media (max-width: 560px) { .post-body > p:first-child { text-align: left; } }

/* ---------- photo frames without empty bands ----------
   Project galleries: on phones the frames were forced to 4:3 while the photo is shown whole, which left bands above
   and below wide photos and certificates; frames now follow each photo's own shape, as on desktop. A single photo in
   a post: the figure hugs the photo (portrait photos used to sit in a full-width frame with empty sides, the caption
   hanging out at the left). Nothing is cropped or stretched. */
.gallery .g-open { aspect-ratio: auto; }
.post-gallery:not(.is-grid) figure { display: table; width: auto; max-width: 100%; margin-inline: auto; }
.post-gallery:not(.is-grid) figcaption { display: table-caption; caption-side: bottom; }   /* the caption wraps to the photo's width */

/* a magazine inside a post: its own framed panel, apart from the photographs (cover and title beside each other,
   every page in a strip below; each opens the magazine viewer), or a single page as a framed excerpt */
.mag-panel { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px 24px; align-items: center; margin: 28px 0 36px;
  padding: 20px; border: 1px solid var(--rule-strong); border-left: 4px solid var(--marigold); border-radius: 16px; background: var(--card); }
.mag-panel .mp-cover { display: block; border-radius: 8px; overflow: hidden; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .55); }
.mag-panel .mp-cover img { display: block; width: 100%; height: auto; }
.mag-panel .mp-kick { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--marigold-ink, var(--ink-3)); }
.mag-panel .mp-title { margin: 0 0 6px; font: 600 clamp(24px, 2.4vw, 30px)/1.15 var(--font-display); color: var(--ink); }
.mag-panel .mp-meta { margin: 0 0 4px; font-size: 15px; color: var(--ink-2); text-align: left; }
.mag-panel .btn { margin-top: 12px; }
.mag-panel .mp-strip { grid-column: 1 / -1; display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px; overflow-x: auto;
  padding: 4px 2px 10px; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.mag-panel .mp-strip a { position: relative; display: block; border-radius: 6px; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--rule); }
.mag-panel .mp-strip img { display: block; width: 100%; height: auto; }
.mag-panel .mp-strip span { position: absolute; right: 6px; bottom: 6px; min-width: 22px; padding: 1px 6px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  text-align: center; color: #fff; background: rgba(0, 0, 0, .62); }
.mag-panel.is-page { display: block; padding: 12px; text-decoration: none; color: inherit; }
.mag-panel.is-page img { display: block; width: 100%; height: auto; border-radius: 8px; }
.mag-panel.is-page .mp-cap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 4px; font-size: 14.5px; color: var(--ink-2); text-align: center; }
.mag-panel.is-page .mp-go { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border: 1px solid var(--rule-strong); border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: var(--ink); }
.mag-panel svg { width: 13px; height: 13px; flex: none; }
@media (max-width: 640px) { .mag-panel { grid-template-columns: minmax(0, 1fr); padding: 14px; } .mag-panel .mp-strip { grid-auto-columns: 112px; } }
