/* Luján Lab site. Palette and type from lujanlab.org: black and charcoal grounds, light-gray text,
   one orange-red. Orange marks behavior (lever presses), links in motion and the anatomy we record from;
   gray carries everything else. Single dark look on purpose. */
:root {
  --black: #000000;      /* page */
  --char: #282828;       /* lab charcoal: alternate bands */
  --rule: #3a3a3a;
  --ink: #0d0d0d;        /* panels that hold data */
  --white: #ffffff;
  --grey: #dad9d9;       /* lab light gray: body text */
  --dim: #9b9a9a;
  --orange: #ee5525;     /* lab accent */
  --violet: #9f7aea;     /* the pregnancy card's oxytocin data, beside the orange */
  --display: "Syne", "Arial Black", system-ui, sans-serif;
  --body: "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* layout rules (grid, flex) must not override the hidden attribute */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--black); color: var(--grey); font: 400 1.0625rem/1.55 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--dim); text-underline-offset: 3px; }
a:hover { color: var(--white); text-decoration-color: var(--orange); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
p { margin: 0; }
.wrap { max-width: 80rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -999px; top: 0; z-index: 20; background: var(--orange); color: var(--black); padding: .5rem 1rem; font-weight: 700; }
.skip:focus { left: var(--gutter); top: calc(env(safe-area-inset-top, 0px) + .5rem); }

/* nav */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--black); }
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: rgb(0 0 0 / .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--char); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; padding-block: .85rem; flex-wrap: wrap; }
.brand { text-decoration: none; display: flex; align-items: center; gap: .9rem; line-height: 1.15; }
.brand img { height: 2.4rem; width: auto; }
.brand span { font-size: .8rem; color: var(--dim); max-width: 7.5rem; padding-left: .9rem; border-left: 1px solid var(--rule); }
.nav ul { display: flex; gap: .4rem 1.5rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; font-weight: 500; font-size: .95rem; }
.nav ul a { text-decoration: none; color: var(--grey); padding-block: .2rem; border-bottom: 2px solid transparent; }
.nav ul a:hover, .nav ul a[aria-current="page"]:hover { color: var(--orange); }
.nav ul a[aria-current="page"] { color: var(--white); border-bottom-color: var(--orange); }
.menu { display: none; font: 700 .9rem var(--body); color: var(--grey); background: none; border: 1px solid var(--rule); border-radius: 3px; padding: .35rem .7rem; cursor: pointer; }

/* type */
h1, h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; color: var(--white); text-wrap: balance; margin: 0; letter-spacing: -.01em; }
/* main is a size container so long single words in headings ("PUBLICATIONS") shrink to fit narrow phones */
main { container-type: inline-size; }
h1 { font-size: clamp(1.4rem, 7.4cqi, 4.1rem); line-height: .98; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.02; }
h3 { font: 700 1.15rem/1.25 var(--display); color: var(--white); margin: 0; text-wrap: balance; }
.lede { font-size: 1.25rem; line-height: 1.4; color: var(--grey); max-width: 38rem; }
.prose { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 40rem; min-width: 0; }
.muted { color: var(--dim); }
.more { font-weight: 700; color: var(--white); text-decoration-color: var(--orange); text-decoration-thickness: 2px; }

/* bands */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.band-char { background: var(--char); }
.band-rule { border-top: 1px solid var(--char); }
.page-head { padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--char); }
.page-head .wrap { display: grid; gap: 1.2rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; flex-wrap: wrap; margin-bottom: 2rem; }

/* small shared parts */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.chips li { font-size: .82rem; border: 1px solid var(--rule); border-radius: 3px; padding: .15rem .55rem; color: var(--grey); }
.role { font-size: .92rem; color: var(--orange); font-weight: 500; }
.media { position: relative; border-radius: 4px; overflow: hidden; background: var(--ink); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.email { font: 500 clamp(1.35rem, 2.4vw, 1.9rem)/1.2 var(--body); letter-spacing: .01em; color: var(--white); user-select: all; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: .25em; overflow-wrap: anywhere; }
.email:hover { color: var(--orange); }

/* ---------- home: full-width raster with the headline over it ---------- */
.stage { position: relative; height: min(46rem, 80svh); min-height: 28rem; background: #050505; }
.raster-box { position: absolute; inset: 0 7.5rem 0 0; }
#raster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bands { position: absolute; top: 0; bottom: 0; right: 0; width: 7.5rem; border-left: 1px solid var(--char); font-size: .78rem; font-weight: 700; }
.band { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: .5rem; padding-left: .7rem; }
.band i { width: 3px; align-self: stretch; margin-block: 2px; border-radius: 2px; }
.stage-meta { position: absolute; top: .9rem; right: 8.5rem; font-size: .82rem; color: var(--grey); font-variant-numeric: tabular-nums; background: rgb(0 0 0 / .6); padding: .15rem .5rem; border-radius: 3px; }
.hero-copy { position: absolute; inset: 0 7.5rem 0 0; display: flex; align-items: flex-end; pointer-events: none;
  background: linear-gradient(90deg, rgb(0 0 0 / .9) 0%, rgb(0 0 0 / .72) 32%, rgb(0 0 0 / 0) 62%); }
.hero-copy .wrap { margin: 0; width: 100%; max-width: 44rem; padding-block: 0 2.4rem; }
.hero-copy h1 { margin-bottom: 1rem; }
.hero-copy .lede { font-size: .92rem; line-height: 1.45; max-width: 30rem; opacity: .6; }
.accent { color: var(--orange); }

/* below the raster: what is playing, and where it is in the session */
.console { border-bottom: 1px solid var(--char); }
.console .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 3rem; padding-block: 1.4rem 1.6rem; align-items: start; }
.readout { display: grid; grid-template-columns: repeat(2, auto); gap: .7rem 2rem; margin: 0; font-variant-numeric: tabular-nums; }
.readout div { display: grid; }
.readout dt { font-size: .8rem; color: var(--dim); }
.readout dd { margin: 0; font: 700 1.3rem var(--body); color: var(--white); }
.ov-head { display: flex; gap: .4rem 1.4rem; flex-wrap: wrap; font-size: .82rem; color: var(--dim); margin-bottom: .4rem; }
.ov-head span::before { content: ""; display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin-right: .35rem; background: var(--c); }
.ov-head b { color: var(--grey); font-weight: 500; }
.ov-box { position: relative; height: 4rem; }
#overview { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#overview { touch-action: pan-y; cursor: pointer; }   /* horizontal drags move the window; vertical swipes still scroll */
#overview:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.ov-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--dim); margin-top: .2rem; font-variant-numeric: tabular-nums; }
.controls { grid-column: 1 / -1; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.controls .label { font-size: .82rem; color: var(--dim); margin: 0 .3rem 0 0; }
.controls .label:not(:first-child) { margin-left: 1.2rem; }
.btn { font: 700 .88rem var(--body); color: var(--grey); background: transparent; border: 1px solid var(--rule); border-radius: 3px; padding: .4rem .75rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.btn:hover { border-color: var(--grey); color: var(--white); }
.btn[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--black); }

/* what we study: text, 3D brain, three project cards */
.research-head { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2.5rem; align-items: center; }
.research-head > div { display: grid; gap: 1rem; }
.research-head > div > p { max-width: 30rem; }
/* university and department, on the line between the hero and "What we study" */
.affil .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; padding-block: 1.8rem 0; }
.uic-logo { height: clamp(2.4rem, 4vw, 3.2rem); width: auto; }
.affil a { color: var(--orange); font-weight: 500; font-size: 1rem; text-decoration: none; padding-left: 1.4rem; border-left: 1px solid var(--rule); }
.affil a:hover { text-decoration: underline; }
#research { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 2.5rem; }
/* home project cards: a dark panel with a method label on the picture; the outline turns orange on hover */
.card { position: relative; display: grid; grid-template-rows: auto 1fr; background: #111; border: 1px solid #262626; }
.card:hover, .card:focus-within { border-color: var(--orange); }
.card .media, .card .rec-card { aspect-ratio: 16 / 10; border: 0; border-radius: 0; }
/* Q2 card: single eCB trials drawn one at a time (assets/js/ecb.js) */
.ecb-card { position: relative; aspect-ratio: 16 / 10; background: var(--ink); overflow: hidden; }
.ecb { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ecb .trace { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .4; }
.ecb .trace.now { stroke-width: 2; opacity: 1; }
.ecb .press { stroke: var(--dim); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.ecb .zero { stroke: var(--rule); vector-effect: non-scaling-stroke; }
.ecb .bar { fill: none; stroke: var(--dim); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ecb-label { position: absolute; left: .8rem; top: .6rem; font: 700 1rem var(--body); opacity: 0; transition: opacity .25s; }
.ecb-press, .ecb-scale { position: absolute; bottom: .35rem; font-size: .72rem; color: var(--dim); }
.ecb-press { transform: translateX(-50%); }
.ecb-scale { right: .6rem; bottom: 1.2rem; }
.card .tx { display: grid; gap: .6rem; align-content: start; padding: 1.1rem 1.2rem 1.4rem; }
.card h3 a { text-decoration: none; }
.card .qn { display: block; font: 700 .85rem var(--body); color: var(--orange); margin-bottom: .25rem; }
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.card p { color: var(--dim); }

/* 3D brain with a chart-style legend */
.brain-fig { margin: 0; display: grid; gap: .6rem; min-width: 0; }
.brain-view { position: relative; aspect-ratio: 4 / 3; max-width: 100%; min-width: 0; }
.brain-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.brain-fallback { color: var(--dim); }
.brain-key { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 1.5rem; align-items: start; font-size: .8rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.brain-key p { max-width: 26rem; }
.brain-key b { color: var(--grey); font-weight: 500; }
.legend { display: grid; grid-template-columns: repeat(2, auto); gap: 0 .9rem; margin: 0; padding: 0; list-style: none; }
.legend button { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 8px auto auto; gap: .4rem; align-items: center; padding: .12rem .25rem; border-radius: 2px; cursor: pointer; font: 400 .8rem var(--body); color: var(--grey); font-variant-numeric: tabular-nums; }
.legend button:hover { background: var(--char); }
.legend button:focus-visible { outline: 2px solid var(--orange); }
.legend button[aria-pressed="false"] { opacity: .35; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend span:last-child { color: var(--dim); }
.legend .probe i { width: 10px; height: 2px; border-radius: 0; background: var(--orange); }
.legend .firing i { box-sizing: border-box; border: 1.5px solid var(--grey); }

/* cumulative press records with per-mouse scores on hover */
.rec-card { position: relative; aspect-ratio: 16 / 10; max-width: 100%; background: var(--ink); border: 1px solid var(--char); border-radius: 4px; }
.records { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.records .sess { fill: none; stroke: #5e5d5d; stroke-width: 1; vector-effect: non-scaling-stroke; }
.records .sess.on { stroke: var(--orange); stroke-width: 2.4; }
.records .sess.dim { stroke: #3a3a3a; }
.records .axis { fill: none; stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.records text { fill: var(--dim); font: 400 10px var(--body); }
.tip { position: absolute; left: 2.6rem; top: .45rem; font-size: .78rem; line-height: 1.35; color: var(--dim); pointer-events: none; font-variant-numeric: tabular-nums; max-width: 66%; background: rgb(13 13 13 / .86); padding: .2rem .35rem; border-radius: 3px; }
.tip b { color: var(--white); font-weight: 700; }
.tip .row { display: grid; grid-template-columns: 6.6rem 3.6rem 2.6rem; align-items: center; gap: .4rem; color: var(--grey); }
.tip .bar { position: relative; height: 6px; background: var(--char); }
.tip .bar::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--dim); }
.tip .bar i { position: absolute; top: 0; bottom: 0; background: var(--orange); }

/* home: papers and news teasers */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; }
.teaser-pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.teaser-pubs li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.teaser-pubs .media { aspect-ratio: 4 / 3; background: var(--white); }
.teaser-pubs .media img { object-position: top; }

/* work with us: a full-width split, lab photo on one half and the invitation, contacts and two actions on the other */
.cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; background: var(--char); border-top: 1px solid var(--char); }
.cta__photo { position: relative; min-height: 30rem; overflow: hidden; }
.cta__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.cta__body { display: grid; gap: 1.5rem; align-content: center; max-width: 40rem; padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4.5rem); }
.cta__body > p { color: var(--grey); }
.cta__contact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem 1.6rem; margin: .4rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.cta__contact > div { display: contents; }
.cta__contact dt { font-size: .8rem; color: var(--dim); padding-top: .35rem; }
.cta__contact dd { margin: 0; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .4rem; }
.cta__btn { display: inline-block; padding: .75rem 1.3rem; font: 700 .95rem var(--body); text-decoration: none; color: var(--black); background: var(--orange); border: 1px solid var(--orange); }
.cta__btn--line { color: var(--white); background: transparent; border-color: var(--grey); }
.cta__btn:hover { color: var(--black); background: var(--white); border-color: var(--white); }
@media (prefers-reduced-motion: no-preference) {
  .cta__btn { transition: background-color .2s, color .2s, border-color .2s; }
  .cta__photo img { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
  .cta:hover .cta__photo img { transform: scale(1.03); }
}
@media (max-width: 860px) {
  .cta { grid-template-columns: minmax(0, 1fr); }
  .cta__photo { min-height: 0; aspect-ratio: 16 / 10; }
}

/* Research, People and News borrow three patterns from astroawards.live: headings that sit on a thin
   rule, portraits in orange-outlined cards, and rows that open with +/-. */
h2.ruled { font: 700 clamp(1.2rem, 6cqi, 1.75rem)/1.15 var(--display); text-transform: none; letter-spacing: 0;
  padding-bottom: .6rem; border-bottom: 1px solid var(--dim); }
.frame { border: 1px solid var(--orange); overflow: hidden; background: var(--ink); }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- research page, after steinmetzlab.net: a traced label, then one wide card per question ---------- */
/* label on a circuit trace that steps up to a pad */
.eyebrow { display: flex; align-items: flex-end; margin: 0; font: 700 .9rem var(--body); color: var(--orange); }
.eyebrow i { flex: 1; border-bottom: 1px solid var(--orange); margin: 0 0 .3rem .8rem; }
.eyebrow svg { flex: none; margin-bottom: calc(.3rem - .5px); overflow: visible; }
.pcb path, .pcb circle { fill: none; stroke: var(--orange); stroke-width: 1; }
.rcards { display: grid; gap: 1.6rem; }
.rcards-sec { padding-top: clamp(2rem, 4vw, 3rem); }
.rcard { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  background: #111; border: 1px solid #262626; scroll-margin-top: 5rem; }
.rcard:hover, .rcard:focus-within { border-color: var(--orange); }
/* the picture fills the whole height of the card beside the text; on phones it sits on top at 16:10 */
.rcard__fig { position: relative; min-height: 20rem; }
.rcard__fig > .media, .rcard__fig > .rec-card, .rcard__fig > .ecb-card { position: absolute; inset: 0; aspect-ratio: auto; border: 0; border-radius: 0; }
.rcard__fig .media img { object-fit: cover; }
.rcard__body { position: relative; display: grid; gap: .9rem; align-content: start; padding: 1.6rem 1.8rem 1.8rem; container-type: inline-size; }
.rcard__body .qn { font: 700 .9rem var(--body); color: var(--orange); }
/* sized to the text column so the longest word ("endocannabinoids") never breaks */
.rcard__body h2 { font: 700 clamp(1.15rem, 6cqi, 1.6rem)/1.2 var(--display); text-transform: none; letter-spacing: 0; margin-top: -.5rem; }
.rcard__body .short { color: var(--white); font-size: 1.1rem; }
.rcard__body p:not(.qn):not(.short) { color: var(--dim); }
.rcard .chips li { border-radius: 0; }
/* Q1 research card: latent state in its PC1-PC2 plane (assets/js/latent.js) */
.latent-card { position: absolute; inset: 0; background: var(--ink); overflow: hidden; }
.latent { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.latent .axis { stroke: var(--rule); stroke-dasharray: 3 3; }
.latent .ax-label { fill: var(--dim); font: 400 12px var(--body); }
.latent .cloud circle { fill: #4a4a4a; }
.latent .rest { fill: rgb(218 217 217 / .07); }
.latent .bout { fill: rgb(238 85 37 / .14); }
.latent .tail line { stroke-linecap: round; }
.latent .now { stroke: var(--black); stroke-width: 1; }
.latent .ring { fill: none; stroke-width: 1.5; }
.latent .ring.press { stroke: var(--orange); }
.latent .ring.cue { stroke: var(--white); }
.latent .probe rect { fill: #1c1c1c; stroke: #3a3a3a; }
.latent .probe circle { stroke: var(--black); stroke-width: .5; }
.latent-label { position: absolute; left: .8rem; top: .6rem; font: 700 1rem var(--body); }
/* pregnancy research card: PVN oxytocin-cell heatmap and mean (assets/js/oxt.js) */
.oxt-card { position: absolute; inset: 0; background: var(--ink); overflow: hidden; touch-action: none; cursor: crosshair; }
.oxt-heat { position: absolute; image-rendering: pixelated; }
.oxt { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.oxt-read { position: absolute; left: .8rem; top: .6rem; right: 8rem; margin: 0; font: 500 .8rem/1.3 var(--body); color: var(--grey); }
.oxt-read.is-title { font: 700 1rem/1.2 var(--body); color: var(--violet); }
.oxt .cue { fill: rgb(159 122 234 / .08); }
.oxt .cue-edge { stroke: var(--grey); stroke-dasharray: 3 3; stroke-width: .8; }
.oxt .press { stroke: var(--white); stroke-width: 1.5; }
.oxt .zero { stroke: var(--rule); }
.oxt .sem { fill: rgb(159 122 234 / .25); }
.oxt .mean { fill: none; stroke: var(--violet); stroke-width: 2; }
.oxt .bar { fill: none; stroke: var(--dim); stroke-width: 1.5; }
.oxt .lab { fill: var(--dim); font: 400 11px var(--body); }
.oxt .trial { fill: none; stroke: var(--white); stroke-width: 1.2; opacity: .85; }
.oxt .press-now { stroke: var(--white); stroke-dasharray: 2 3; }
.oxt .row-box { fill: none; stroke: var(--white); stroke-width: 1.2; }
.oxt .cross { stroke: var(--grey); stroke-width: .8; }
/* eCB research card: 12 min of eCB photometry during FR4 self-administration (assets/js/fr4.js) */
.fr4-card { position: absolute; inset: 0; background: var(--ink); overflow: hidden; }
.fr4 { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fr4-title { position: absolute; left: .8rem; top: .6rem; right: 8rem; margin: 0; font: 700 1rem/1.2 var(--body); color: var(--orange); }
.fr4 .trace { fill: none; stroke: var(--grey); stroke-width: 1.1; stroke-linejoin: round; }
.fr4 .zero { stroke: var(--rule); stroke-dasharray: 2 3; }
.fr4 .press { stroke: var(--orange); stroke-width: 1.2; }
.fr4 .drug { fill: var(--white); }
.fr4 .drug-line { stroke: var(--white); stroke-opacity: .18; }
.fr4 .bar { fill: none; stroke: var(--dim); stroke-width: 1.5; }
.fr4 .lab { fill: var(--dim); font: 400 11px var(--body); }
.card .tag, .rcard .tag { position: absolute; right: .7rem; top: .7rem; z-index: 2; background: var(--black); color: var(--white); border: 1px solid var(--rule); font: 700 .75rem var(--body); padding: .2rem .5rem; pointer-events: none; }
.research-quote { padding-top: 0; }
.quote { margin: 0; border-left: 3px solid var(--orange); padding-left: 1rem; font-size: 1.25rem; color: var(--white); max-width: 34rem; }
.quote footer { font-size: .9rem; color: var(--dim); margin-top: .3rem; }

/* ---------- people page ---------- */
.pi { max-width: 68rem; display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.pi .frame { aspect-ratio: 4 / 5; }
.pi .prose { container-type: inline-size; }
.pi .links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.row-head { font-size: clamp(1.1rem, 5.5cqi, 1.7rem); margin-bottom: 1.6rem; }
.alumni { display: flex; flex-wrap: wrap; gap: 1.2rem 2.5rem; list-style: none; margin: 0; padding: 0; }
.alumni li { display: flex; align-items: center; gap: .9rem; }
.alumni img { width: 3.6rem; height: 3.6rem; object-fit: cover; border-radius: 50%; border: 1px solid var(--orange); }
.alumni span { display: block; font-size: .9rem; color: var(--dim); }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .6rem; }
.strip .media { aspect-ratio: 4 / 3; padding: 0; border: 1px solid transparent; cursor: zoom-in; transition: opacity .25s, filter .25s, border-color .25s; }
.strip:has(.media:hover, .media:focus-visible) .media:not(:hover, :focus-visible) { opacity: .3; filter: grayscale(.6); }
.strip .media:hover, .strip .media:focus-visible { border-color: var(--orange); outline: 0; }
.zoom { max-width: none; max-height: none; width: 100vw; height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; place-items: center; cursor: zoom-out; }
.zoom[open] { display: grid; }
.zoom::backdrop { background: rgb(0 0 0 / .88); }
.zoom img { max-width: calc(100vw - 2rem); max-height: calc(100vh - 2rem); width: auto; height: auto; border: 1px solid #262626; }
.zoom-close { position: fixed; top: .6rem; right: .8rem; background: none; border: 0; color: var(--white); font: 400 2rem/1 var(--body); cursor: pointer; padding: .2rem .5rem; }
.zoom-close:hover { color: var(--orange); }
@media (prefers-reduced-motion: reduce) { .strip .media { transition: none; } }

/* full-screen opening photo: a slow settle-in zoom, then drifts more slowly than the page as you scroll (site.js sets --drift) */
.hero-photo { position: relative; height: calc(100svh - 4.3rem); min-height: 26rem; max-height: 62rem; overflow: hidden; display: grid; align-items: end; border-bottom: 1px solid var(--char); }
.hero-photo__media { position: absolute; inset: 0; }
.hero-photo__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 60%); transform: translateY(var(--drift, 0px)) scale(1.02); }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgb(0 0 0 / .25), transparent 30%, transparent 55%, rgb(0 0 0 / .9)); pointer-events: none; }
.hero-photo__copy { container-type: inline-size; position: relative; z-index: 1; width: 100%; padding-bottom: clamp(2.5rem, 7vh, 5rem); }
.hero-photo h1 { font-size: min(clamp(2.4rem, 9vw, 7rem), calc(100cqi / var(--len, 6) / 1.12)); line-height: .9; }   /* Syne capitals are up to 1.1em wide */
.hero-photo__cap { max-width: 34rem; margin-top: 1rem; font-size: .9rem; color: var(--grey); opacity: .8; }
.scroll-cue { position: absolute; z-index: 1; right: clamp(1rem, 4vw, 2.5rem); bottom: 1.2rem; display: grid; justify-items: center; gap: .5rem; font: 500 .72rem var(--body); color: var(--grey); letter-spacing: .2em; text-transform: uppercase; }
.scroll-cue::after { content: ""; width: 1px; height: 2.4rem; background: linear-gradient(var(--orange), transparent); }

/* headings that rise into place the first time they scroll into view (site.js adds .in) */
.rise { overflow: hidden; }
.rise > span { display: inline-block; }

/* current members: tall portraits with the name over a dark fade; hover dims the others and lifts a bio teaser */
.people-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.pcard__open { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 1px solid #262626; background: var(--ink); overflow: hidden; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.pcard__open img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.pcard__open::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgb(0 0 0 / .92)); }
.pcard__tx { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: grid; gap: .15rem; padding: 1rem 1.1rem 1.1rem; }
.pcard__name { font: 700 1.15rem/1.2 var(--body); color: var(--orange); }
.pcard__role { font-size: .9rem; color: var(--white); }
.pcard__teaser { font-size: .85rem; line-height: 1.45; color: var(--grey); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; max-height: 0; opacity: 0; }
.pcard__more { font: 700 .8rem var(--body); color: var(--white); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; max-height: 0; opacity: 0; overflow: hidden; }
.pcard__open:hover, .pcard__open:focus-visible { border-color: var(--orange); outline: 0; }
.pcard__open:hover .pcard__teaser, .pcard__open:focus-visible .pcard__teaser { max-height: 6rem; opacity: 1; margin-top: .5rem; }
.pcard__open:hover .pcard__more, .pcard__open:focus-visible .pcard__more { max-height: 2rem; opacity: 1; margin-top: .3rem; }
.people-grid:has(.pcard__open:hover) .pcard__open:not(:hover) { opacity: .45; }
@media (hover: none) { .pcard__more { max-height: 2rem; opacity: 1; margin-top: .3rem; } }

/* the full bio, opened from a portrait */
.bio-dialog { width: min(56rem, calc(100vw - 2rem)); max-height: calc(100svh - 2rem); padding: 0; border: 1px solid var(--rule); background: #111; color: var(--grey); overflow: auto; }
.bio-dialog::backdrop { background: rgb(0 0 0 / .8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bio-dialog__body { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 2rem; padding: 2rem; }
.bio-dialog .frame { aspect-ratio: 4 / 5; }
.bio-dialog .prose { container-type: inline-size; display: grid; gap: .8rem; align-content: start; }
.bio-dialog .zoom-close { position: absolute; top: .4rem; right: .6rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero-photo__media { animation: settle 2.4s cubic-bezier(.2, .7, .2, 1) both; }
  .js .rise > span { transform: translateY(105%); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
  .js .rise.in > span { transform: none; }
  .scroll-cue::after { animation: cue 2s ease-in-out infinite; transform-origin: top; }
  .pcard__open, .pcard__open img, .pcard__teaser, .pcard__more { transition: opacity .35s, max-height .45s, margin .45s, transform .8s cubic-bezier(.2, .7, .2, 1), border-color .25s; }
  .pcard__open:hover img { transform: scale(1.06); }
  .bio-dialog[open] { animation: pop .35s cubic-bezier(.2, .7, .2, 1); }
}
@keyframes settle { from { transform: scale(1.14); filter: brightness(.5); } }
@keyframes cue { 0%, 100% { transform: scaleY(.3); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (max-width: 860px) {
  .hero-photo { height: auto; min-height: 0; aspect-ratio: 1; }   /* the group photo is landscape: square keeps everyone in */
  .scroll-cue { display: none; }
  .bio-dialog__body { grid-template-columns: minmax(0, 1fr); padding: 1.4rem; }
  .bio-dialog .frame { max-width: 14rem; }
}

/* ---------- publications page ---------- */
.featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.featured figure { margin: 0; display: grid; gap: .7rem; align-content: start; }
.featured .media { aspect-ratio: 16 / 10; background: var(--white); }
.featured .media img { object-position: top; }
.featured figcaption { display: grid; gap: .2rem; }
.featured figcaption a { color: var(--white); font-weight: 700; text-decoration: none; }
.featured figcaption a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.featured .media { border: 1px solid transparent; }
.featured figure:hover .media, .featured figure:focus-within .media { border-color: var(--orange); }
@media (prefers-reduced-motion: no-preference) {
  .featured .media, .featured .media img { transition: border-color .25s, transform .8s cubic-bezier(.2, .7, .2, 1); }
  .featured figure:hover .media img { transform: scale(1.04); }
}
.filters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: 1.5rem; }
.filters .label { font-size: .85rem; color: var(--dim); margin-right: .3rem; }
.year { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; border-top: 1px solid var(--char); padding-block: 1.2rem; }
.year > h2 { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.3rem; max-width: 52rem; }
.pub { display: grid; gap: .15rem; }
.pub .t { color: var(--white); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.pub .t:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.pub .a { font-size: .97rem; }
.pub .a .lab { color: var(--orange); }
.pub .j { font-size: .95rem; color: var(--dim); }
.pub .j i { color: var(--grey); }
/* timeline: a rail between the years and the papers fills orange down to just past mid-window as you scroll
   (site.js sets --p); each year sticks while its papers pass, its dot riding the rail, and lights once reached */
.timeline { --rail: 9rem; --col: 10.5rem; position: relative; }   /* years are 4.2em wide in Syne */
.timeline::before, .tl-fill { content: ""; position: absolute; left: var(--rail); top: 0; width: 1px; }
.timeline::before { bottom: 0; background: var(--char); }
.tl-fill { height: 100%; background: var(--orange); }
.js .tl-fill { height: var(--p, 0px); }
.timeline .year { grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: 3rem; border-top: 0; padding-block: 1.4rem 1.8rem; }
.timeline .year > h2 { position: sticky; top: 5.5rem; z-index: 1; align-self: start; font-size: 1.6rem; line-height: 1; color: var(--white); }
.js .timeline .year > h2 { color: var(--dim); }
.js .timeline .year.lit > h2 { color: var(--white); }
.timeline .year > h2::after, .timeline .pub::before { content: ""; position: absolute; border-radius: 50%; }
.timeline .year > h2::after { left: calc(var(--rail) - 5.5px); top: calc(.5em - 5.5px); width: 11px; height: 11px; box-sizing: border-box; background: var(--orange); border: 1px solid var(--orange); }
.js .timeline .year > h2::after { background: var(--black); border-color: var(--rule); }
.js .timeline .year.lit > h2::after { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 4px rgb(238 85 37 / .18); }
.timeline .pub { position: relative; }
.timeline .pub::before { left: calc(var(--rail) - var(--col) - 2.5px); top: calc(.81rem - 2.5px); width: 5px; height: 5px; background: var(--orange); }
.js .timeline .pub::before { background: var(--rule); }
.js .timeline .pub.lit::before { background: var(--orange); }
@media (prefers-reduced-motion: no-preference) {
  .timeline .year > h2, .timeline .year > h2::after, .timeline .pub::before { transition: color .3s, background-color .3s, border-color .3s, box-shadow .3s; }
}
.kind { display: inline-block; white-space: nowrap; font-size: .75rem; border: 1px solid var(--rule); border-radius: 3px; padding: 0 .35rem; margin-left: .45rem; color: var(--dim); font-weight: 400; vertical-align: .1em; }

/* ---------- news page: cards on both sides of a central rail, each with a dot and a short arm to the rail.
   site.js packs them (alternating sides, each card starting a little below the last, so the two sides
   interlock); without it, or on phones, they sit one per row. Cards slide in the first time they scroll into view. */
.news-tl { --rail: 50%; --arm: 2.5rem; max-width: 60rem; margin-inline: auto; }
.news-filters { max-width: 60rem; margin-inline: auto; }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.nyear { display: flex; justify-content: center; }
.nyear h2 { position: relative; z-index: 1; font-size: 1.25rem; line-height: 1; padding: .45rem 1rem; background: var(--black); border: 1px solid var(--rule); border-radius: 999px; color: var(--dim); }
.nyear.lit h2 { color: var(--white); border-color: var(--orange); }
.nitem { --from: -28px; position: relative; width: calc(50% - var(--arm)); }
.nitem:nth-child(even of .nitem:not([hidden])) { --from: 28px; margin-left: calc(50% + var(--arm)); }
.nitem::before, .nitem::after { content: ""; position: absolute; top: 1.3rem; }
.nitem::before { left: calc(100% + var(--arm) - 6px); width: 12px; height: 12px; box-sizing: border-box; border-radius: 50%; background: var(--black); border: 1px solid var(--rule); }
.nitem::after { left: 100%; width: calc(var(--arm) - 6px); margin-top: 5.5px; height: 1px; background: var(--rule); }
.nitem:nth-child(even of .nitem:not([hidden]))::before { left: calc(-1 * var(--arm) - 6px); }
.nitem:nth-child(even of .nitem:not([hidden]))::after { left: calc(-1 * var(--arm) + 6px); }
.nitem.lit::before { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 5px rgb(238 85 37 / .18); }
.nitem.lit::after { background: var(--orange); }
.news-list.packed { position: relative; display: block; }
.news-list.packed > li { position: absolute; left: 0; right: 0; }
/* packed: site.js has chosen each card's side, which overrides the one-per-row alternation above */
.news-list.packed > .nitem { right: auto; margin: 0 !important; }
.news-list.packed > .nitem[data-side="left"] { --from: -28px !important; }
.news-list.packed > .nitem[data-side="left"]::before { left: calc(100% + var(--arm) - 6px) !important; }
.news-list.packed > .nitem[data-side="left"]::after { left: 100% !important; }
.news-list.packed > .nitem[data-side="right"] { --from: 28px !important; left: calc(50% + var(--arm)); }
.news-list.packed > .nitem[data-side="right"]::before { left: calc(-1 * var(--arm) - 6px) !important; }
.news-list.packed > .nitem[data-side="right"]::after { left: calc(-1 * var(--arm) + 6px) !important; }
.ncard { background: #111; border: 1px solid #262626; overflow: hidden; }
.ncard:hover, .ncard:focus-within { border-color: var(--orange); }
.ncard .media { display: block; width: 100%; aspect-ratio: 3 / 2; padding: 0; border: 0; border-radius: 0; cursor: zoom-in; }
.ncard .media img { object-position: 50% 25%; }
.ncard .media.contain img { object-fit: contain; object-position: center; }
.nbody { display: grid; gap: .45rem; padding: .95rem 1.15rem 1.2rem; }
.nmeta { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; }
.nkind { font-weight: 700; color: var(--orange); }
.nmeta time { color: var(--dim); font-variant-numeric: tabular-nums; }
.nbody p:not(.nmeta) { color: var(--grey); line-height: 1.5; }
.nbody .more { justify-self: start; color: var(--white); font-weight: 700; text-decoration-color: var(--orange); }
@media (prefers-reduced-motion: no-preference) {
  .js .nitem > .ncard { opacity: 0; transform: translateX(var(--from)); transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1), border-color .25s; }
  .js .nitem.in > .ncard { opacity: 1; transform: none; }
  .nitem::before, .nitem::after, .nyear h2 { transition: background-color .3s, border-color .3s, box-shadow .3s, color .3s; }
  .ncard .media img { transition: transform .6s ease; }
  .ncard:hover .media img { transform: scale(1.04); }
  ::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
}
.news-teaser { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.news-teaser li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
.news-teaser time { color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---------- join and teaching ---------- */
/* join: the principles get an orange rule that draws across when they come into view (site.js adds .in) */
.how-card { position: relative; display: grid; gap: .6rem; align-content: start; border-top: 1px solid var(--rule); padding-top: 1.2rem; }
.how-card::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--orange); }
.how-card h3 { color: var(--white); }
@media (prefers-reduced-motion: no-preference) {
  .js .how-card::before { width: 0; transition: width 1.1s cubic-bezier(.2, .7, .2, 1); }
  .js .how-card.in::before { width: 100%; }
  .how-card:nth-child(2)::before { transition-delay: .15s; } .how-card:nth-child(3)::before { transition-delay: .3s; }
}
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.contact address { font-style: normal; }
.empty { border: 1px dashed var(--rule); border-radius: 4px; padding: 2rem; color: var(--dim); max-width: 40rem; }

/* footer */
.site-footer { background: var(--char); color: var(--dim); font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: space-between; gap: 1.5rem 3rem; padding-block: 2.5rem 3rem; }
.site-footer b { color: var(--white); display: block; margin-bottom: .3rem; }
.site-footer address { font-style: normal; }
.map-link { display: inline-block; text-decoration: none; }
.map-link:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--orange); }
.site-footer img { height: 2.6rem; width: auto; }
.site-footer .foot-logo { margin-bottom: .8rem; }
.site-footer .links { display: flex; flex-direction: column; }

@media (max-width: 960px) {
  .featured, .how { grid-template-columns: minmax(0, 1fr); }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand span { display: none; }
  .site-footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .stage { height: auto; min-height: 0; }
  .raster-box { position: relative; inset: auto; height: 55svh; margin-right: 3.6rem; }
  .bands { width: 3.6rem; height: 55svh; bottom: auto; font-size: .62rem; }
  .band { padding-left: .4rem; gap: .3rem; }
  .stage-meta { right: 4.2rem; }
  .hero-copy { position: static; background: none; }
  .hero-copy .wrap { padding-block: 1.5rem 0; }
  /* phones: the session strip and its buttons sit right under the raster, then the readouts, then the headline.
     The stage box steps aside (display: contents) so its children can be reordered with the console. */
  .hero { position: relative; display: flex; flex-direction: column; }
  .stage { display: contents; }
  .raster-box { order: 1; background: #050505; }
  .bands, .stage-meta { z-index: 1; }   /* reordering paints the raster later; keep these on top of it */
  .console { order: 2; }
  .console .wrap > .readout { order: 3; }
  .hero-copy { order: 3; }
  .hero-copy .wrap { padding-bottom: 2rem; }
  .console .wrap, .research-head, .cards, .brain-key, .split, .rcard, .pi, .contact { grid-template-columns: minmax(0, 1fr); }
  .controls .label:not(:first-child) { margin-left: 0; flex-basis: 100%; margin-top: .4rem; }
  .pi .frame { max-width: 20rem; }
  .rcard__fig { min-height: 0; aspect-ratio: 4 / 5; }
}
@media (max-width: 700px) {
  .js .menu { display: block; }
  .brand img { height: 2rem; }
  .brand span { display: none; }
  .js .nav ul { display: none; width: 100%; flex-direction: column; gap: 0; padding-block: .4rem; }
  .js .nav.open ul { display: flex; }
  .js .nav ul a { display: block; padding-block: .6rem; border-bottom: 1px solid var(--char); }
  .js .nav ul a[aria-current="page"] { border-bottom-color: var(--orange); }
  .year { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .timeline { --rail: .45rem; --col: 1.8rem; }
  .timeline .year { grid-template-columns: minmax(0, 1fr); padding-block: 1rem 1.4rem; }
  .timeline .year > h2 { top: 4rem; font-size: 1.6rem; padding: .5rem 0 .5rem var(--col); background: linear-gradient(var(--black) 75%, transparent); }
  .timeline .year > h2::after { top: calc(.5rem + .5em - 5.5px); }
  .timeline .pubs { padding-left: var(--col); }
  .rcard__body { padding: 1.3rem 1.2rem 1.5rem; }
  .teaser-pubs li { grid-template-columns: 6rem minmax(0, 1fr); }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .news-tl { --rail: .45rem; --arm: 1.45rem; }
  .news-list { gap: 1.6rem; }
  .nyear { justify-content: flex-start; }
  .nitem, .nitem:nth-child(n of .nitem:not([hidden])) { --from: 20px; width: auto; margin-left: calc(var(--rail) + var(--arm)); }
  .nitem::before, .nitem:nth-child(n of .nitem:not([hidden]))::before { left: calc(-1 * var(--arm) - 6px); }
  .nitem::after, .nitem:nth-child(n of .nitem:not([hidden]))::after { left: calc(-1 * var(--arm) + 6px); }
}
@media (max-width: 560px) {
  .people-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
