/* M² Lab — site styles
   One typeface (IBM Plex Sans). No greys: text is navy, lines and tints are light blue,
   cavity blue for the dark bands, magnon cyan for accents, signal blue for links. */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: "Plex"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
  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: "Plex"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Plex"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url("fonts/ibm-plex-sans-greek-wght-normal.woff2") format("woff2");
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* ---------- Tokens ---------- */
:root {
  --cavity: #0E2A4D;
  --cavity-2: #163A66;
  --cavity-line: rgba(0, 212, 255, .28);
  --magnon: #00D4FF;
  --magnon-deep: #00A9D6;
  --signal: #00739E;
  --antenna: #D9A441;
  --paper: #FFFFFF;
  --mist: #EAF6FC;
  --ink: #12243A;
  --ink-2: #12243A;
  --rule: #C6E6F4;
  --on-dark: #FFFFFF;
  --on-dark-2: #A8ECFF;

  --sans: "Plex", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --sec: clamp(64px, 9vw, 120px);
  --nav-h: 64px;
  --radius: 6px;
  --radius-lg: 12px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .hero :focus-visible, .site-header :focus-visible { outline-color: var(--magnon); }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 4px; font-weight: 600;
}
.skip:focus { top: 8px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--sec); }
.section--mist { background: var(--mist); }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2, .latest-head h2 { font-size: clamp(1.75rem, 1.2rem + 1.7vw, 2.4rem); letter-spacing: -0.015em; }
.section-head h2::after, .latest-head h2::after, .contact-section h2::after {
  content: ""; display: block; width: 44px; height: 4px; margin-top: 12px; border-radius: 2px; background: var(--magnon-deep);
}
.on-dark h2::after { background: var(--magnon); }
.section-head p { margin-top: 16px; font-size: 1.125rem; line-height: 1.6; max-width: 40rem; }
.sub-head { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.6rem); margin: clamp(48px, 7vw, 80px) 0 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 0 20px; border-radius: 4px; font: 600 1rem/1 var(--sans);
  text-decoration: none; cursor: pointer; border: 0;
}
.btn--primary { background: var(--magnon); color: var(--cavity); }
.btn--primary:hover { background: #fff; color: var(--cavity); }
.btn--ghost { background: transparent; color: var(--on-dark); box-shadow: inset 0 0 0 1.5px var(--on-dark-2); }
.btn--ghost:hover { color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
.btn--outline { background: transparent; color: var(--signal); box-shadow: inset 0 0 0 1.5px var(--signal); }
.btn--outline:hover { background: var(--signal); color: #fff; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cavity); color: var(--on-dark);
  border-bottom: 1px solid var(--cavity-line);
}
.nav { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); height: var(--nav-h); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--on-dark); text-decoration: none; font: 700 1.25rem/1 var(--sans); }
.brand:hover { color: #fff; }
.brand img { width: 34px; height: 36px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  display: block; padding: 8px 10px; border-radius: 4px;
  color: var(--on-dark-2); text-decoration: none; font-size: .9375rem; font-weight: 500;
}
.nav-links a:hover { color: #fff; }
.nav-links a[aria-current] { color: #fff; box-shadow: inset 0 -2px 0 var(--magnon); border-radius: 0; }
.nav-toggle {
  display: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  background: transparent; color: var(--on-dark); border: 1px solid var(--cavity-line); border-radius: 4px;
  font: 500 .9375rem/1 var(--sans); cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }
@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px; background: var(--cavity); border-bottom: 1px solid var(--cavity-line);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 13px 2px; font-size: 1.0625rem; border-bottom: 1px solid var(--cavity-line); }
  .nav-links a[aria-current] { box-shadow: inset 3px 0 0 var(--magnon); padding-left: 12px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--cavity); color: var(--on-dark); overflow: hidden; }
.hero-text { padding-top: clamp(40px, 6vw, 80px); }
.hero-kicker { font-size: 1rem; font-weight: 500; color: var(--magnon); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.4rem, 1.3rem + 3.8vw, 4.1rem); font-weight: 600; line-height: 1.06; letter-spacing: -0.025em; max-width: 14em; }
.hero-lede { margin-top: 22px; max-width: 44rem; font-size: clamp(1.125rem, 1rem + .45vw, 1.3125rem); line-height: 1.55; }
.hero-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-sim { margin-top: clamp(8px, 2vw, 20px); }
.hero-sim canvas { display: block; width: 100%; height: clamp(170px, 17vw, 240px); cursor: crosshair; touch-action: pan-y; }
@media (min-width: 900px) and (max-height: 820px) {
  .hero-text { padding-top: 36px; }
  .hero h1 { font-size: 3.4rem; }
  .hero-actions { margin-top: 22px; }
  .hero-sim canvas { height: 180px; }
}
.hero-sim canvas:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--magnon); }
.hero-caption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding-block: 14px 26px; border-top: 1px solid var(--cavity-line);
  font-size: .9375rem; color: var(--on-dark-2);
}
.hero-caption p { max-width: 52rem; }
.hero-caption strong { color: var(--on-dark); font-weight: 600; }
.sim-toggle {
  background: transparent; border: 1px solid var(--cavity-line); color: var(--on-dark-2);
  font: 500 .8125rem/1 var(--sans); padding: 8px 12px; border-radius: 4px; cursor: pointer;
}
.sim-toggle:hover { color: #fff; border-color: var(--on-dark-2); }
.sim-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sim-play {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 15px 8px 13px;
  background: rgba(0, 212, 255, .1); border: 1px solid rgba(0, 212, 255, .6); border-radius: 999px;
  color: #fff; font: 600 .875rem/1 var(--sans); cursor: pointer; transition: background .15s, color .15s;
}
.sim-play svg { width: 11px; height: 11px; fill: var(--magnon); transition: fill .15s; }
.sim-play:hover { background: var(--magnon); color: var(--cavity); }
.sim-play:hover svg { fill: var(--cavity); }
.hero-caption.is-playing #sim-hint { min-height: 3.2em; }

/* ---------- What's new ---------- */
.latest { padding-block: clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--rule); }
.latest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.latest-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2rem); }
.latest-head a { font-weight: 600; }
.latest-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 36px); }
.latest-card a { display: block; color: inherit; text-decoration: none; }
.latest-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--mist); border-radius: var(--radius); }
.latest-card time { display: block; margin-top: 14px; font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.latest-card h3 { margin-top: 4px; font-size: 1.35rem; line-height: 1.2; }
.latest-card p { margin-top: 6px; font-size: 1rem; color: var(--ink-2); }
.latest-card a:hover h3 { color: var(--signal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 820px) {
  .latest-grid { grid-template-columns: 1fr; }
  .latest-card a { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 2px 16px; align-items: start; }
  .latest-card img { grid-row: span 3; }
  .latest-card time { margin-top: 0; }
  .latest-card h3 { font-size: 1.15rem; }
}

/* ---------- Research ---------- */
.research-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.prose { font-size: 1.125rem; line-height: 1.65; max-width: 36rem; }
.prose p + p { margin-top: 16px; }
.figure figcaption { margin-top: 12px; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.themes { list-style: none; margin-top: clamp(56px, 8vw, 96px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 6vw, 72px) clamp(32px, 4vw, 56px); }
.theme-fig {
  background: #fff; aspect-ratio: 16 / 10; padding: clamp(14px, 2vw, 24px); border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--rule);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.theme-fig video { transform: scale(1.65); }
.theme-fig img, .theme-fig video { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.theme h3 { margin-top: 24px; font-size: 1.6rem; }
.theme > p { margin-top: 12px; }
.cites { list-style: none; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: .9375rem; }
.cites li + li { margin-top: 4px; }
.cites a { text-decoration: none; }
.cites a:hover { text-decoration: underline; }
.cite-j { font-weight: 600; }
@media (max-width: 860px) {
  .research-intro, .themes { grid-template-columns: 1fr; }
}

/* ---------- Projects ----------
   Plain rows: the main project large, the earlier one below a line, then the ITRC note. */
.projects-band h2 { color: #fff; }
.proj-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 10px clamp(32px, 5vw, 72px); align-items: start; }
.proj-row h3 { color: #fff; }
.proj-row .meta { margin-top: 8px; font-size: .9375rem; font-weight: 600; color: var(--magnon); }
.proj-row > p { color: var(--on-dark); max-width: 38rem; }
.proj-row--main h3 { font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.3rem); line-height: 1.12; }
.proj-row--main > p { font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem); line-height: 1.6; }
.proj-row--past { margin-top: clamp(36px, 5vw, 56px); padding-top: 28px; border-top: 1px solid var(--cavity-line); }
.proj-row--past h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.45rem); }
.projects-note { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--cavity-line); color: var(--on-dark-2); }

@media (max-width: 760px) {
  .proj-row { grid-template-columns: 1fr; }
  .proj-row--main > p { margin-top: 8px; }
  .proj-row--past > p { margin-top: 6px; }
}

/* ---------- Lab ---------- */
.photo-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; color: inherit; border-radius: var(--radius); overflow: hidden; }
.photo-btn img { width: 100%; height: 100%; object-fit: cover; }
.lab-lead .photo-btn { aspect-ratio: 16 / 9; background: var(--mist); }
.lab-lead img { object-position: 50% 58%; }
.setups { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 48px) clamp(20px, 3vw, 32px); }
.setup .photo-btn { aspect-ratio: 4 / 3; background: var(--mist); }
.setup h4 { margin-top: 16px; font-size: 1.25rem; }
.setup > p { margin-top: 8px; font-size: 1rem; line-height: 1.6; }
.kit { margin-top: 14px; padding: 12px 0 0 1.15em; border-top: 1px solid var(--rule); font-size: .9375rem; line-height: 1.45; }
.kit li + li { margin-top: 4px; }
.kit li::marker { color: var(--magnon-deep); }
/* a phrase that opens a photo in the viewer */
.photo-link { padding: 0; border: 0; background: none; font: inherit; color: var(--signal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: zoom-in; }
.photo-link:hover { color: var(--ink); }
.vlab-teaser { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); margin-top: clamp(28px, 4vw, 44px); border-radius: var(--radius-lg); overflow: hidden; background: var(--cavity); color: var(--on-dark); }
.vlab-teaser-img { display: block; min-height: 100%; background: var(--cavity-2); }
.vlab-teaser-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; image-rendering: pixelated; }
.vlab-teaser-text { padding: clamp(24px, 3.5vw, 44px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; }
.vlab-teaser-text h3 { color: #fff; font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); }
.vlab-teaser-text h3::after { content: ""; display: block; width: 44px; height: 4px; margin-top: 12px; border-radius: 2px; background: var(--magnon); }
.vlab-teaser-text p { color: var(--on-dark); line-height: 1.6; max-width: 32rem; }
.vlab-teaser :focus-visible { outline-color: var(--magnon); }
@media (max-width: 760px) { .vlab-teaser { grid-template-columns: 1fr; } }
.history { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); align-items: start; }
.history .photo-btn { aspect-ratio: 4 / 3; background: var(--mist); }
.buildout { list-style: none; margin-top: clamp(24px, 3vw, 32px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.5vw, 32px); }
.buildout .photo-btn { aspect-ratio: 4 / 3; background: var(--mist); }
.buildout figcaption { margin-top: 10px; font-size: .9375rem; line-height: 1.45; }
.buildout time { display: block; font-weight: 600; font-size: .875rem; }
@media (max-width: 900px) {
  .setups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .history { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .setups, .buildout { grid-template-columns: 1fr; }
  .lab-lead .photo-btn { aspect-ratio: 4 / 3; }
}

/* before/after photo comparison */
.compare {
  --pos: 50%;
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); border-radius: var(--radius);
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; transform: translateX(-1px);
  background: #fff; box-shadow: 0 0 0 1px rgba(14, 42, 77, .18); pointer-events: none;
}
.compare-handle {
  position: absolute; z-index: 1; top: 50%; left: var(--pos); width: 46px; height: 46px;
  transform: translate(-50%, -50%); border-radius: 50%; background: #fff; color: var(--cavity);
  display: grid; place-items: center; box-shadow: 0 2px 12px rgba(14, 42, 77, .35); pointer-events: none;
  transition: transform .15s ease;
}
.compare.is-dragging .compare-handle { transform: translate(-50%, -50%) scale(1.1); }
.compare:focus-within .compare-handle { outline: 2px solid var(--signal); outline-offset: 3px; }
.compare-tag {
  position: absolute; z-index: 1; top: 12px; padding: 5px 11px; border-radius: 999px;
  background: rgba(14, 42, 77, .82); color: #fff; font-size: .8125rem; font-weight: 600; line-height: 1.25;
  pointer-events: none; transition: opacity .2s ease;
}
.compare-tag--before { left: 12px; }
.compare-tag--after { right: 12px; }
.compare.hide-before .compare-tag--before, .compare.hide-after .compare-tag--after { opacity: 0; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }

/* ---------- Publications ---------- */
.favourites-title { font-size: 1.5rem; margin-bottom: 14px; }
.pub-sel { list-style: none; border-top: 1px solid var(--rule); }
.pub-sel > li { display: grid; grid-template-columns: minmax(180px, 3fr) minmax(0, 9fr); gap: 8px 32px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.pub-src { font: 600 1.125rem/1.3 var(--sans); }
.pub-src .vol { display: block; font: normal 400 .875rem/1.4 var(--sans); color: var(--ink-2); margin-top: 4px; }
.pub-body h4 { font: 600 1.125rem/1.4 var(--sans); letter-spacing: 0; }
.pub-body h4 a { color: var(--ink); text-decoration: none; }
.pub-body h4 a:hover { color: var(--signal); text-decoration: underline; }
.authors { margin-top: 6px; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); }
.authors b { color: var(--ink); font-weight: 600; }
.why { margin-top: 8px; font-size: 1rem; }
.note { display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 3px; background: #D6F1FB; color: var(--ink); font-size: .8125rem; font-weight: 500; }
.pub-all { margin-top: 40px; }
.pub-all > summary {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border-radius: 4px;
  cursor: pointer; list-style: none; font-weight: 600; color: var(--signal); box-shadow: inset 0 0 0 1.5px var(--signal);
}
.pub-all > summary::-webkit-details-marker { display: none; }
.pub-all > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.pub-all[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.pub-all > summary:hover { background: var(--signal); color: #fff; }
.pub-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 28px 0 8px; font-size: .9375rem; color: var(--ink-2); }
.seg { display: inline-flex; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--rule); background: var(--paper); }
.seg button { font: 500 .9375rem/1 var(--sans); padding: 10px 14px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; border-radius: 4px; }
.seg button[aria-pressed="true"] { background: var(--cavity); color: #fff; }
.pub-year h3 { font: 700 1.35rem/1 var(--sans); margin: 32px 0 6px; }
.pub-list { list-style: none; }
.pub-list li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.pub-list .t { font-weight: 600; line-height: 1.4; }
.pub-list .t a { color: var(--ink); text-decoration: none; }
.pub-list .t a:hover { color: var(--signal); text-decoration: underline; }
.pub-list .j { margin-top: 2px; font-size: .9375rem; }
.pub-list .j i { font-style: normal; font-weight: 600; }
.pub-list .authors { margin-top: 2px; }
.pub-all[data-filter="lead"] .pub-list li:not([data-lead]) { display: none; }
.pub-all[data-filter="lead"] .pub-year:not(:has(li[data-lead])) { display: none; }
.scholar-link { display: inline-block; margin-top: 28px; font-weight: 600; }
@media (max-width: 700px) {
  .pub-sel > li { grid-template-columns: 1fr; }
}

/* ---------- People ---------- */
.pi { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.pi-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--mist); border-radius: var(--radius); }
.pi h3 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.5rem); }
.pi .role { margin-top: 8px; color: var(--ink-2); }
.pi .bio { margin-top: 18px; font-size: 1.125rem; line-height: 1.65; max-width: 40rem; }
.pi-links { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 600; }
.career { list-style: none; margin-top: 28px; border-top: 1px solid var(--rule); max-width: 40rem; }
.career li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
.career .when { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.team { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.member-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--mist); border-radius: var(--radius); }
/* the group card spans two columns; this ratio keeps its photo as tall as the portraits beside it */
.member--group { grid-column: span 2; }
.member--group .member-photo { aspect-ratio: 1.717; border-radius: 0; }
.member-initials { display: flex; align-items: center; justify-content: center; font: 600 2.4rem/1 var(--sans); color: var(--signal); }
.member h4 { margin-top: 14px; font-size: 1.3rem; }
.member .role { margin-top: 2px; font-size: .9375rem; font-weight: 600; color: var(--signal); }
.member p { font-size: .9375rem; margin-top: 4px; }
.member .muted { color: var(--ink-2); }
.member a { font-size: .9375rem; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .pi { grid-template-columns: 1fr; }
  .pi-photo { max-width: 320px; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member--group .member-photo { aspect-ratio: 4 / 3; }
}

/* ---------- News ---------- */
.news { list-style: none; border-top: 1px solid var(--rule); }
.news > li { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 8px 32px; padding: 24px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.news time { font-size: .9375rem; font-weight: 600; color: var(--ink-2); padding-top: 3px; }
.news h3 { font-size: 1.4rem; }
.news p { margin-top: 8px; max-width: 42rem; }
.news .photo-btn { width: 200px; aspect-ratio: 4 / 3; overflow: hidden; }
@media (max-width: 760px) {
  .news > li { grid-template-columns: 1fr; }
  .news .photo-btn { width: 100%; max-width: 420px; }
}
.gallery { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 300px); gap: 18px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.gallery li { scroll-snap-align: start; }
.gallery .photo-btn { aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); }
.gallery .photo-btn.is-poster img { object-fit: contain; background: #fff; }
.gallery p { margin-top: 8px; font-size: .9375rem; line-height: 1.45; }
.gallery time { display: block; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: #8FD6F0; border-radius: 4px; }
.scroll-hint { font-size: .875rem; color: var(--ink-2); margin: -12px 0 18px; }

/* ---------- Teaching ---------- */
.teach-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.semesters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 36px; }
.semester h3 { font-size: 1.2rem; }
.semester h3 span { font-weight: 400; }
.semester ul { margin-top: 10px; padding-left: 1.15em; }
.semester li { padding: 3px 0; line-height: 1.45; }
.semester li::marker { color: var(--magnon-deep); }
.outreach { background: var(--mist); padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg); }
.outreach h3 { font-size: 1.5rem; }
.outreach p { margin-top: 10px; }
.outreach ul { list-style: none; margin: 14px 0 22px; }
.outreach li { padding: 6px 0; border-top: 1px solid var(--rule); font-size: 1rem; }
@media (max-width: 900px) {
  .teach-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .semesters { grid-template-columns: 1fr; }
}

/* ---------- Contact + footer ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.contact-section h2 { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.2rem); color: #fff; }
.contact-lede { margin-top: 18px; max-width: 36rem; font-size: clamp(1.1875rem, 1.05rem + .5vw, 1.375rem); line-height: 1.55; }
.contact-lede a { font-weight: 600; }
.contact-sign { margin-top: 20px; font: 600 1.125rem/1.3 var(--sans); color: #fff; }
.contact-meta { margin-top: 6px; color: var(--on-dark-2); font-size: .9375rem; }
.contact-photo .photo-btn { aspect-ratio: 4 / 3; }
.contact-photo figcaption { margin-top: 10px; font-size: .875rem; color: var(--on-dark-2); }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-photo { max-width: 520px; }
}
.on-dark { background: var(--cavity); color: var(--on-dark); }
.on-dark a:not(.btn) { color: var(--magnon); }
.on-dark a:not(.btn):hover { color: #fff; }
.site-footer { border-top: 1px solid var(--cavity-line); padding-block: 28px 36px; font-size: .9375rem; color: var(--on-dark-2); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.footer-row ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- Lightbox ---------- */
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 94vh; color: #fff; }
.lightbox::backdrop { background: rgba(6, 18, 34, .88); }
.lightbox figure { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: 100%; max-height: calc(94vh - 90px); width: auto; height: auto; }
.lightbox figcaption { font-size: 1rem; text-align: center; max-width: 48rem; color: var(--on-dark); }
.lb-close { position: fixed; top: 16px; right: 16px; background: var(--paper); color: var(--ink); border: 0; border-radius: 4px; padding: 10px 14px; font: 600 .9375rem/1 var(--sans); cursor: pointer; }

/* ---------- Resources page ---------- */
.page-hero { background: var(--cavity); color: var(--on-dark); padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 64px); }
.page-hero h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); font-weight: 600; letter-spacing: -0.02em; }
.page-hero p { margin-top: 18px; max-width: 40rem; font-size: 1.1875rem; line-height: 1.55; color: var(--on-dark); }
.res-list { list-style: none; border-top: 1px solid var(--rule); }
.res-list > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 32px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.res-list h3 { font: 600 1.1875rem/1.35 var(--sans); letter-spacing: 0; }
.res-list p { margin-top: 6px; color: var(--ink-2); max-width: 44rem; }
.res-list .meta { font-size: .875rem; color: var(--ink-2); margin-top: 6px; }
@media (max-width: 640px) {
  .res-list > li { grid-template-columns: 1fr; }
  .res-list .btn { justify-self: start; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .hero-sim, .hero-caption, .hero-actions, .gallery, .lightbox, .nav-toggle { display: none !important; }
  .hero, .on-dark { background: #fff !important; color: #000 !important; }
  .pub-all > *:not(summary) { display: block !important; }
}
