/* ==========================================================================
   CHAKRAPANI LAB — one stylesheet for every page.
   Light theme throughout: warm cream ground, near-black ink, rust accent.
   Nothing downstream hard-codes a colour; change it once in :root.
   ========================================================================== */

:root {
  --bg:      #FAF8F4;   /* page ground */
  --bg-2:    #F2EEE5;   /* banded strips, footer */
  --card:    #FFFFFF;
  /* The surface the portraits sit on — the tile behind each photograph and the
     card it is mounted in. A very light beige rather than white, so the Team
     page sits in the same warm family as the rest of the site instead of
     reading as a sheet of white cards dropped onto cream. Kept as its own
     token, not folded into --card: the paper cards on the home page are still
     white on purpose, and want to stay that way. */
  --shot:    #F4EEE2;
  --ink:     #1D1D1F;
  --ink-2:   #37332F;
  --ink-3:   #4E4842;
  --muted:   #655C53;
  --rust:    #A85C3C;
  --rust-2:  #8B4526;
  --line:    rgba(29, 29, 31, 0.13);
  --line-2:  rgba(29, 29, 31, 0.07);

  --wrap:    1180px;
  --pad:     min(92vw, var(--wrap));
  --sans:    'Source Sans 3', 'Source Sans Pro', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 0.4vw + 14.4px, 19px);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  overflow-x: hidden;
  max-width: 100vw;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
sub, sup { font-size: 0.66em; line-height: 0; }

a { color: var(--rust); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--rust-2); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 3px;
}
::selection { background: rgba(168, 92, 60, 0.18); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.wrap { width: var(--pad); margin: 0 auto; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--rust); color: #FFF; padding: 10px 18px; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; color: #FFF; }

/* --------------------------------------------------------------- header --- */
/* Above the menu overlay, so that the brand and the cross stay put and stay
   pressable while the panel is drawn down behind them. */
.site-head {
  position: sticky; top: 0; z-index: 80;
  /* A beige band, so the header reads as its own strip rather than dissolving
     into the cream of the page. Kept translucent with the blur behind it so
     that what scrolls underneath still shows through faintly — a flat opaque
     bar would sit on the page rather than over it. */
  background: rgba(234, 222, 202, 0.9);
  backdrop-filter: saturate(1.7) blur(14px);
  -webkit-backdrop-filter: saturate(1.7) blur(14px);
  border-bottom: 1px solid rgba(140, 115, 85, 0.28);
  box-shadow: 0 1px 0 rgba(255, 253, 248, 0.55) inset;
}
.site-head__in {
  position: relative;
  width: var(--pad); margin: 0 auto;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
}
/* The brand's padding is what sets the height of the whole band, so the band is
   shortened here rather than by giving the header a height of its own — a
   fixed height would crop the brand instead of tightening around it. */
.brand { display: block; color: var(--ink); padding: 12px 0; line-height: 1.18; }
.brand:hover { color: var(--ink); }
.brand b { display: block; font-size: clamp(15px, 0.4vw + 13.5px, 18px); font-weight: 600; letter-spacing: -0.012em; }

/* ------------------------------------------------------------- the menu ---
   Three bars with the word MENU beside them, at the right of the header. The
   bars on their own were being missed; the word is what makes it
   unmistakably a menu. Pressing it opens the full-screen panel below. */
.nav-toggle {
  margin-left: auto; flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 13px 6px 11px;
  background: none; border: 1px solid transparent; border-radius: 9px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.nav-toggle:hover { background: rgba(255, 253, 248, 0.55); border-color: rgba(140, 115, 85, 0.3); }

.nav-toggle__bars {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 26px;
}
.nav-toggle__bars span {
  display: block; flex: none; width: 26px; height: 3px; border-radius: 3px;
  background: var(--ink);
  transition: transform 0.34s cubic-bezier(0.2, 0.7, 0.2, 1),
              opacity 0.2s ease, background 0.25s ease;
}
.nav-toggle__label {
  font-size: clamp(11px, 0.24vw + 10.5px, 13px); font-weight: 600;
  letter-spacing: 0.19em; text-transform: uppercase; color: var(--ink);
  transition: color 0.25s ease;
}
.nav-toggle:hover .nav-toggle__bars span { background: var(--rust); }
.nav-toggle:hover .nav-toggle__label { color: var(--rust); }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------------------------------------------------------- the overlay ---
   The menu is a panel over the whole window that draws itself down from under
   the header, in the manner of harvard.edu: the header stays exactly where it
   is and the page is covered, rather than a small card being hung off the
   corner. The pages are set large, and each one arrives a moment after the one
   above it.

   It is a sibling of the header, not a child of it, and it has to be. The
   header carries `backdrop-filter`, and a filtered element becomes the
   containing block for any `position: fixed` inside it — the panel would have
   been pinned to the 65px-tall header instead of to the window, and only the
   top of it would ever have been seen. */
.nav {
  position: fixed; inset: 0; z-index: 55;
  display: flex; align-items: flex-start;
  padding: clamp(88px, 13vh, 168px) 0 clamp(28px, 5vh, 72px);
  overflow-y: auto;
  background:
    radial-gradient(115% 80% at 82% 4%, #FFFDF9 0%, var(--bg) 42%, #F0EAE0 100%);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.62s cubic-bezier(0.66, 0, 0.24, 1),
              visibility 0s linear 0.62s;
}
.nav[data-open="1"] {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.62s cubic-bezier(0.24, 0.6, 0.2, 1), visibility 0s;
}
.nav__in { width: var(--pad); margin: 0 auto; }
.nav__kicker {
  padding-bottom: clamp(12px, 1.6vh, 22px); margin-bottom: clamp(10px, 1.4vh, 20px);
  border-bottom: 1px solid var(--line-2);
  font-size: clamp(10px, 0.46vw, 12.5px); letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--muted);
}
.nav a {
  display: block; width: fit-content;
  padding: clamp(5px, 0.9vh, 12px) 0;
  color: var(--ink); font-weight: 300;
  font-size: clamp(26px, 4.2vw, 54px); letter-spacing: -0.026em; line-height: 1.12;
  transition: color 0.3s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav a:hover { color: var(--rust); transform: translateX(14px); }

/* Each line waits its turn on the way in, and none of them wait on the way
   out — a menu that dawdles when it is dismissed feels broken. */
.nav__in > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav[data-open="1"] .nav__in > * {
  opacity: 1; transform: none;
  transition: opacity 0.5s ease, transform 0.62s cubic-bezier(0.16, 0.84, 0.28, 1);
}
.nav[data-open="1"] .nav__in > :nth-child(1) { transition-delay: 0.13s; }
.nav[data-open="1"] .nav__in > :nth-child(2) { transition-delay: 0.19s; }
.nav[data-open="1"] .nav__in > :nth-child(3) { transition-delay: 0.25s; }
.nav[data-open="1"] .nav__in > :nth-child(4) { transition-delay: 0.31s; }
.nav[data-open="1"] .nav__in > :nth-child(5) { transition-delay: 0.37s; }
.nav[data-open="1"] .nav__in > :nth-child(6) { transition-delay: 0.43s; }
.nav[data-open="1"] .nav__in > :nth-child(7) { transition-delay: 0.49s; }
.nav[data-open="1"] .nav__in > :nth-child(8) { transition-delay: 0.55s; }

/* The page behind must not scroll under an open menu. */
body[data-menu="open"] { overflow: hidden; }

/* The page you are on: set once by <body data-page="…">, no JS needed. */
body[data-page="home"]          .nav a[href="index.html"],
body[data-page="research"]      .nav a[href="research.html"],
body[data-page="publications"]  .nav a[href="publications.html"],
body[data-page="team"]          .nav a[href="team.html"],
body[data-page="alumni"]        .nav a[href="alumni.html"],
body[data-page="announcements"] .nav a[href="announcements.html"],
body[data-page="photos"]        .nav a[href="photos.html"],
body[data-page="news"]          .nav a[href="news.html"],
body[data-page="teaching"]      .nav a[href="teaching.html"],
body[data-page="join"]          .nav a[href="join.html"],
body[data-page="contact"]       .nav a[href="contact.html"],
body[data-page="home"]          .nav a[href="#home"],
body[data-page="research"]      .nav a[href="#research"],
body[data-page="publications"]  .nav a[href="#publications"],
body[data-page="team"]          .nav a[href="#team"],
body[data-page="alumni"]        .nav a[href="#alumni"],
body[data-page="announcements"] .nav a[href="#announcements"],
body[data-page="photos"]        .nav a[href="#photos"],
body[data-page="join"]          .nav a[href="#join"],
body[data-page="contact"]       .nav a[href="#contact"] {
  color: var(--rust);
}

/* ---------------------------------------------------------- page header --- */
.page-head { padding: clamp(46px, 6vw, 92px) 0 clamp(26px, 2.6vw, 42px); border-bottom: 1px solid var(--line); }
.page-head h1 {
  font-size: clamp(38px, 4.4vw, 76px); font-weight: 300;
  letter-spacing: -0.024em; line-height: 1.06;
}
.kicker {
  font-size: clamp(10.5px, 0.5vw, 13px); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.page-head .kicker { margin-bottom: 16px; }
.lede {
  max-width: 68ch; margin-top: clamp(26px, 3vw, 48px);
  font-size: clamp(18px, 0.7vw + 15px, 27px); font-weight: 300;
  line-height: 1.45; letter-spacing: -0.012em; color: #2B2823;
}

.section { padding: clamp(38px, 4.6vw, 78px) 0 clamp(56px, 7vw, 112px); }

/* --------------------------------------------------------------- buttons --- */
.btn {
  display: inline-block; padding: 0.68em 1.45em; border-radius: 6px;
  background: var(--rust); color: #FDFCFA; border: 1px solid var(--rust);
  font-size: clamp(14px, 0.3vw + 13px, 17px); letter-spacing: 0.01em;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.btn:hover { background: var(--rust-2); border-color: var(--rust-2); color: #FDFCFA; box-shadow: 0 10px 26px rgba(168, 92, 60, 0.24); transform: translateY(-1px); }
.btn--ghost { background: none; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: rgba(168, 92, 60, 0.06); border-color: var(--rust); color: var(--ink); box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============================================================ home page ===
   The hero fills the screen; the footer sits below it and is reached by a
   short scroll. That is the one change from version 5, where the whole page
   was locked and the footer squeezed in above the fold.

   `min-height`, not `height`, and no `overflow: hidden` — the body is allowed
   to grow past the viewport by exactly the height of the footer.

   `dvh` rather than `vh`: on a phone `vh` is the height of the viewport with
   the browser's own bars *retracted*, so a page built to `100vh` is always
   taller than what is actually on screen and the bottom of it is cut off.
   `dvh` is the height as it stands. */
body[data-page="home"] {
  min-height: 100dvh;
  display: flex; flex-direction: column;
}
/* `flex-shrink: 0` matters: without it the hero would be squeezed to make the
   footer fit above the fold, which is the very thing this stopped doing. */
body[data-page="home"] > main { flex: 1 0 auto; display: flex; }
/* A full screen less the header, so the footer always begins below the fold.
   The header's height is measured by site.js into `--head-h` rather than
   guessed at: the brand's type is set in clamps, so the header is not the same
   height on a phone as on a desktop, and a hard-coded 65px would leave a strip
   of footer showing on one and a scrollbar for nothing on the other. */
body[data-page="home"] .hero-band {
  flex: 1 0 auto; display: flex; align-items: center;
  min-height: calc(100dvh - var(--head-h, 65px));
}
/* `width: var(--pad)`, not `width: 100%`. The hero also carries `.wrap`, whose
   whole job is to hold it to the text column and centre it — and this rule is
   the more specific of the two, so `100%` here quietly overrode it and let the
   grid span the entire window. That is what had the heading hard against the
   left edge of the screen: it was not the heading that was misplaced, it was
   the column it sits in. The auto margins centre it as a flex item. */
body[data-page="home"] .hero {
  width: var(--pad); margin-inline: auto;
  padding: clamp(6px, 1.6vh, 30px) 0;
}

/* And then brought in a little further off that edge, so the sentence has
   somewhere to sit rather than starting flush with the page. */
body[data-page="home"] .hero__copy { padding-left: clamp(0px, 3.4vw, 58px); }

/* The dial is square, so on a wide but short window it is the height that
   binds, not the width. */


/* ------------------------------------------------------- the home footer ---
   The full footer of version 2 — the lab, the address, the pages and the
   links — rather than the single line it had become, but drawn tight: the home
   page is one screen and every pixel the footer takes is a pixel off the
   model. The two lists run across in rows instead of down in columns, which is
   most of the height saved, and every gap and every rule of space above and
   below is pulled in. */
.home-foot {
  flex: none; background: var(--bg-2); border-top: 1px solid var(--line);
  padding: clamp(14px, 1.8vh, 24px) 0 clamp(10px, 1.2vh, 16px);
}
/* The four columns are not equal. Grid cells share the tallest one's height,
   so an address squeezed into a quarter of the width wraps to five lines and
   makes every other column five lines tall with it. Given the room it needs,
   it sits on two and the whole strip is half the height. */
.home-foot .foot-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: clamp(12px, 2vw, 34px);
}
@media (min-width: 900px) {
  .home-foot .foot-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.35fr) minmax(0, 1.1fr) minmax(0, 1.25fr);
  }
}
/* The strapline and the outward links were the two that wrapped hardest, and
   between them they set the height of the whole strip. */
.home-foot .foot-tag { font-size: clamp(10px, 0.18vw + 9.5px, 12px); letter-spacing: 0.14em; }
.home-foot h2 { font-size: clamp(14px, 0.34vw + 13px, 16.5px); font-weight: 600; letter-spacing: -0.01em; }
.home-foot .kicker { margin-bottom: 5px; }
.home-foot p, .home-foot li {
  font-size: clamp(11.5px, 0.2vw + 11px, 13.5px); line-height: 1.42; color: var(--ink-2);
}
.home-foot .foot-tag { margin-top: 3px; }
.home-foot .foot-list {
  display: flex; flex-flow: row wrap; gap: 2px 14px;
}
.home-foot .foot-list a { color: var(--ink-2); }
.home-foot .foot-list a:hover { color: var(--rust); }
.home-foot .foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 20px;
  margin-top: clamp(10px, 1.3vh, 18px); padding-top: clamp(7px, 0.9vh, 12px);
  border-top: 1px solid var(--line-2);
  font-size: clamp(11px, 0.18vw + 10.5px, 12.5px); color: var(--muted);
}
.home-foot .foot-base p { font-size: inherit; color: inherit; }
.home-foot .foot-base a { color: var(--muted); border-bottom: 1px solid rgba(138, 129, 119, 0.45); }
.home-foot .foot-base a:hover { color: var(--rust); }

/* A short window, or a narrow one where the hero stacks into a column, holds
   less than the hero needs. Rather than cut it off, let that case scroll. */
@media (max-width: 900px), (max-height: 560px) {
  body[data-page="home"] { min-height: 100dvh; }

}

/* ------------------------------------------------------------- welcome ---
   A cream panel over the whole window that greets the reader and then lifts
   away. Everything about it is declared here and played by CSS; the script
   does nothing but decide whether it appears and take the node away
   afterwards, so with scripting off the page simply loads without it.

   `--intro-out` is the moment the panel starts to leave; the script reads it
   back so the two can never disagree about the timing. */
.intro {
  --intro-out: 3050ms;
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  /* Nothing in the greeting is pressable, so it must not be in the way of
     anything that is. Lying over the page and taking presses, it swallowed the
     first one a reader made: pressing Menu while it was up dismissed the
     greeting and did nothing else, which reads exactly like a menu that does
     not work. The press now goes through to whatever is underneath, and
     site.js takes the panel off on the same gesture. */
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, #FFFDF9 0%, var(--bg) 46%, #F1EBE0 100%);
  animation: introLift 900ms cubic-bezier(0.62, 0.02, 0.35, 1) var(--intro-out) both;
}
.intro__in { width: min(88vw, 900px); text-align: center; }
.intro__kicker {
  font-size: clamp(10px, 0.46vw, 12.5px); letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--muted);
  animation: introRise 900ms cubic-bezier(0.16, 0.84, 0.28, 1) 80ms both;
}
.intro__t { margin-top: clamp(14px, 1.8vw, 26px); font-weight: 300; }
/* The line is a window the words rise through, so it has to clip — and a clip
   box drawn to the line height alone cuts the tail off the p in Chakrapani.
   The padding gives the descenders their room and the negative margin takes
   that room back out of the layout. */
.intro__t span {
  display: block; overflow: hidden;
  padding-bottom: 0.18em; margin-bottom: -0.18em;
}
.intro__t i {
  display: block; font-style: normal;
  animation: introRise 1000ms cubic-bezier(0.16, 0.84, 0.28, 1) both;
}
.intro__welcome {
  font-size: clamp(17px, 1.5vw, 27px); letter-spacing: 0.02em; color: var(--ink-3);
}
.intro__welcome i { animation-delay: 300ms; }
.intro__name {
  margin-top: 0.16em;
  font-size: clamp(29px, 5.2vw, 78px); letter-spacing: -0.028em; line-height: 1.14;
  color: var(--ink);
}
.intro__name i { animation-delay: 560ms; }
.intro__name b { font-weight: 600; }
.intro__rule {
  width: min(340px, 52vw); height: 2px; margin: clamp(20px, 2.6vw, 38px) auto 0;
  background: linear-gradient(90deg, transparent, var(--rust) 22%, var(--rust) 78%, transparent);
  transform: scaleX(0); transform-origin: center;
  animation: introRule 1000ms cubic-bezier(0.16, 0.84, 0.28, 1) 980ms both;
}
.intro__sub {
  margin-top: clamp(14px, 1.6vw, 22px);
  font-size: clamp(11.5px, 0.44vw + 10px, 15px); letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted);
  animation: introRise 900ms cubic-bezier(0.16, 0.84, 0.28, 1) 1220ms both;
}

@keyframes introRise {
  from { opacity: 0; transform: translateY(1.05em); }
  to   { opacity: 1; transform: none; }
}
@keyframes introRule {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
/* `pointer-events` is deliberately not set here. It used to be `auto` at the
   start and `none` at the end, and because the animation is filled `both` and
   does not begin for three seconds, that opening frame held `auto` over the
   whole greeting — outranking the `pointer-events: none` on the panel itself,
   since an animated value beats an ordinary declaration. The panel therefore
   went on swallowing presses for exactly as long as it was worth swallowing
   them. Left out of the keyframes, the rule on `.intro` governs throughout. */
@keyframes introLift {
  from { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
  to   { opacity: 1; transform: translateY(-12%); clip-path: inset(0 0 100% 0); }
}

/* The page itself settles in behind the panel as it goes. The delay is the
   moment the panel starts to leave, a hair later — kept in step with
   `--intro-out` above by hand, since a custom property cannot be used as an
   animation delay. */
body[data-intro] .hero__copy > *, body[data-intro] .hub {
  animation: introSettle 1000ms cubic-bezier(0.16, 0.84, 0.28, 1) 3150ms both;
}
@keyframes introSettle {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Asked for no motion: the greeting is still shown, but it is simply there and
   then simply gone. */
@media (prefers-reduced-motion: reduce) {
  .intro { animation: introFade 400ms linear 1200ms both; }
  .intro__kicker, .intro__t i, .intro__sub { animation: none; }
  .intro__rule { animation: none; transform: none; }
  body[data-intro] .hero__copy > *, body[data-intro] .hub { animation: none; }
  @keyframes introFade { to { opacity: 0; visibility: hidden; } }
}

/* The header band. The connecting field is painted across its full width,
   behind everything, and never takes the pointer. */
.hero-band { position: relative; overflow: clip; }
.hero-band__net {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; pointer-events: none;
}
.hero-band .hero { position: relative; z-index: 1; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  align-items: center; gap: clamp(28px, 4.5vw, 72px);
  padding: clamp(36px, 5vw, 84px) 0 clamp(40px, 5vw, 80px);
}
.hero h1 {
  font-size: clamp(40px, 4.6vw, 82px); font-weight: 300;
  letter-spacing: -0.026em; line-height: 1.05; max-width: 15ch;
}
.hero h1 b { font-weight: 600; }
.hero .kicker { margin-bottom: clamp(16px, 2vw, 28px); }
.hero__lede {
  margin-top: clamp(20px, 2.4vw, 36px); max-width: 52ch;
  color: var(--ink-2); font-size: clamp(16.5px, 0.44vw + 14.5px, 21px); line-height: 1.55;
}
.hero .btn-row { margin-top: clamp(24px, 2.8vw, 42px); }

/* the 3D structure ------------------------------------------------------- */
.stage { position: relative; width: 100%; max-width: 620px; margin-inline: auto; }
.stage__canvas {
  display: block; width: 100%; aspect-ratio: 1 / 1;
  touch-action: pan-y; cursor: grab;
}
.stage__canvas:active { cursor: grabbing; }
.stage__hint {
  margin-top: 6px; text-align: center;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
/* The connecting field behind the header is the background now — the wash the
   model used to sit on would only mute it. */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: clamp(28px, 5vw, 48px); }
  .hero h1 { max-width: 18ch; }
  .stage { max-width: 460px; order: -1; }
  /* The showcase stays BELOW the welcome when the two columns stack. It is not
     a picture like the model was: it is four paragraphs of reading, and putting
     it first would push the greeting and the buttons off the bottom of a
     phone screen. */
  .hub { order: 0; }
}

.band { background: var(--bg-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.band__in { display: flex; flex-wrap: wrap; gap: clamp(20px, 3.4vw, 72px); padding: clamp(42px, 5.5vw, 92px) 0; }
.band__in .kicker { flex: 1 1 180px; }
.band__in p:last-child {
  flex: 3 1 min(100%, 440px); min-width: 0; max-width: 72ch;
  font-size: clamp(18px, 0.66vw + 15px, 27px); font-weight: 300;
  line-height: 1.45; letter-spacing: -0.012em; color: #2B2823;
}

.mod { padding: clamp(46px, 6vw, 96px) 0; }
.mod__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 14px; padding-bottom: clamp(18px, 2vw, 32px); border-bottom: 1px solid var(--line);
}
.mod__head h2 { font-size: clamp(28px, 2.5vw, 46px); font-weight: 300; letter-spacing: -0.02em; }
.more { font-size: clamp(11.5px, 0.5vw, 14px); letter-spacing: 0.13em; text-transform: uppercase; white-space: nowrap; }

/* Cards for the four most recent papers on the home page. */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 28px); padding-top: clamp(24px, 2.8vw, 42px); }
@media (max-width: 820px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card {
  display: block; color: var(--ink); background: var(--card);
  border: 1px solid var(--line-2); border-radius: 12px; padding: clamp(18px, 1.7vw, 28px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover { color: var(--ink); border-color: rgba(168, 92, 60, 0.4); box-shadow: 0 12px 32px rgba(29, 29, 31, 0.07); transform: translateY(-2px); }
.card__yr { font-size: 11px; letter-spacing: 0.17em; text-transform: uppercase; color: var(--rust); }
.card__t { margin-top: 9px; font-size: clamp(16.5px, 0.5vw + 14px, 21px); font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
.card__a { margin-top: 9px; color: var(--ink-3); font-size: clamp(13px, 0.24vw + 12px, 15px); line-height: 1.5; }
.card__v { margin-top: 5px; font-style: italic; color: var(--ink-2); font-size: clamp(13px, 0.24vw + 12px, 15px); }

/* ============================================================== research === */
.areas {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(30px, 3.4vw, 60px) clamp(26px, 2.8vw, 52px);
  padding-top: clamp(34px, 4vw, 68px);
}
.area { padding-top: clamp(16px, 1.6vw, 26px); border-top: 2px solid rgba(168, 92, 60, 0.45); }
.area h2 { margin-top: 10px; font-size: clamp(23px, 1.55vw, 34px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.area p { margin-top: 12px; color: var(--ink-2); font-size: clamp(15px, 0.34vw + 13.5px, 18px); line-height: 1.6; }

/* ========================================================== publications === */
.year {
  display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 44px);
  padding: clamp(28px, 3.2vw, 56px) 0; border-bottom: 1px solid var(--line);
}
.year__n {
  position: sticky; top: 96px; align-self: start;
  font-size: clamp(22px, 1.7vw, 38px); font-weight: 600; letter-spacing: -0.01em; color: var(--rust);
}
.papers { display: flex; flex-direction: column; gap: clamp(22px, 2.2vw, 40px); min-width: 0; }
.paper__t {
  display: block; color: var(--ink); max-width: 62ch;
  font-size: clamp(16.5px, 0.55vw + 14px, 23px); font-weight: 600; line-height: 1.32; letter-spacing: -0.012em;
}
.paper__t:hover { color: var(--rust); }
.paper__a { margin-top: 7px; max-width: 86ch; color: var(--ink-3); font-size: clamp(13.5px, 0.28vw + 12px, 16px); line-height: 1.5; }
.paper__v { margin-top: 5px; font-style: italic; color: var(--ink-2); font-size: clamp(13px, 0.26vw + 12px, 16px); }
.paper__note {
  display: inline-block; margin-top: 9px; padding: 3px 9px;
  font-size: clamp(10.5px, 0.22vw + 9.5px, 12.5px); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--rust); border: 1px solid rgba(168, 92, 60, 0.35); border-radius: 4px;
}
/* Patents, listed under the papers. The same shape as a paper — a line of
   type, then who — with the year standing where the journal would be. It is
   set as a label rather than in the papers' italic, because a bare year in
   italic reads as a volume number that has lost its journal. */
.patents { padding-top: clamp(22px, 2.6vw, 40px); }
.patents .paper__v {
  margin: 0 0 7px; font-style: normal; color: var(--rust);
  font-size: clamp(10.5px, 0.22vw + 9.5px, 12.5px);
  letter-spacing: 0.17em; text-transform: uppercase;
}
.patents .paper__t { margin: 0; }

.archive {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  max-width: 78ch; padding-top: clamp(24px, 2.6vw, 42px); color: var(--ink-3);
  font-size: clamp(14px, 0.28vw + 12.5px, 16.5px);
}
@media (max-width: 640px) {
  .year { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .year__n { position: static; }
}

/* ================================================================== team === */
.pi {
  display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 56px); align-items: start;
  padding: clamp(34px, 4vw, 70px) 0 clamp(38px, 4.6vw, 80px); border-bottom: 1px solid var(--line);
}
.pi__shot .shot { aspect-ratio: 4 / 5; border-radius: 16px; }
.pi .kicker { margin-bottom: 12px; }
.pi h2 { font-size: clamp(28px, 2.3vw, 46px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.pi__role { margin-top: 6px; color: var(--ink-3); font-size: clamp(15px, 0.34vw + 13.5px, 18px); }
.pi__bio { margin-top: 14px; max-width: 68ch; color: var(--ink-2); line-height: 1.62; }
.pi__role + .pi__bio { margin-top: clamp(18px, 1.8vw, 30px); }
.pi__bio + p { margin-top: 14px; }
@media (max-width: 760px) {
  .pi { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pi__shot { max-width: 210px; }
}

/* ------------------------------------------------------------- portraits ---
   One slot per person, photograph or not: with `photo` still empty in
   content.js the initials are drawn on a warm tile, so the grid reads as a
   considered blank rather than a missing image. */
.shot {
  position: relative; overflow: hidden;
  aspect-ratio: 3 / 4;
  display: grid; place-items: center;
  background: var(--shot);
}
/* Laid over the slot rather than placed in it. `height: 100%` on a grid item
   does not resolve against a row whose height comes from the slot's own
   `aspect-ratio`, so the picture was left at its natural proportions — 275 by
   490 in a 275 by 367 hole — and simply hung out of the bottom, which
   `overflow: hidden` then cut off.

   That is worth spelling out because of what it quietly did to everything
   below. A picture whose box already has the picture's own proportions gives
   `object-fit: cover` nothing to crop, and with nothing to crop there is
   nothing for `object-position` to move: every `focus` value in content.js was
   being read, written to the element, and ignored. The only control still
   doing anything was the zoom, which is why the people photographed from
   furthest away could not be brought back however their numbers were set.

   Taking the picture out of the flow gives it the slot's box exactly, and the
   two controls work as they are described below. The initials keep their place
   in the grid and stay centred, being still in the flow. */
.shot-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.shot__initials {
  font-size: clamp(30px, 3.2vw, 50px); font-weight: 300; letter-spacing: 0.05em;
  color: rgba(140, 115, 85, 0.42);
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.45s ease;
}

.people {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 218px), 1fr));
  gap: clamp(16px, 1.7vw, 28px); padding-top: clamp(34px, 4vw, 64px);
}
.person {
  position: relative; overflow: hidden;
  background: var(--shot); border: 1px solid var(--line-2); border-radius: 14px;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}
.person:hover, .person:focus-within {
  transform: translateY(-4px);
  border-color: rgba(168, 92, 60, 0.42);
  box-shadow: 0 16px 38px rgba(29, 29, 31, 0.11);
}
.person:hover .shot-img, .person:focus-within .shot-img { transform: scale(1.06); }
.person:hover .shot__initials, .person:focus-within .shot__initials {
  transform: scale(1.09); color: rgba(140, 115, 85, 0.3);
}

.person__body { padding: clamp(13px, 1.1vw, 17px) clamp(14px, 1.2vw, 19px) clamp(15px, 1.3vw, 21px); }
.person__name {
  font-size: clamp(15.5px, 0.32vw + 14px, 18px); font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.28; transition: color 0.3s ease;
}
.person:hover .person__name, .person:focus-within .person__name { color: var(--rust); }
.person__role { margin-top: 4px; color: var(--ink-3); font-size: clamp(12.5px, 0.22vw + 11.5px, 14.5px); }
.person__detail { font-size: clamp(13px, 0.24vw + 12px, 15px); line-height: 1.5; }
.person__note { margin-top: 6px; font-size: clamp(11.5px, 0.2vw + 10.5px, 13px); }

/* Without a pointer there is no hover, so the detail simply sits under the
   name where it can always be read. */
.person__more { margin-top: 11px; color: var(--ink-2); }
.person__more .person__note { color: var(--muted); }

/* With a pointer it lifts over the portrait instead. */
@media (hover: hover) and (pointer: fine) {
  .person__more {
    position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 3 / 4;
    margin: 0; padding: clamp(13px, 1.2vw, 19px);
    display: flex; flex-direction: column; justify-content: flex-end;
    background: linear-gradient(to top, rgba(40, 31, 23, 0.95) 16%, rgba(40, 31, 23, 0.72) 58%, rgba(40, 31, 23, 0.14) 100%);
    color: #F6F1E8;
    opacity: 0; transform: translateY(10px); pointer-events: none;
    transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .person__more .person__note { color: #D9C6B4; }
  .person:hover .person__more, .person:focus-within .person__more {
    opacity: 1; transform: none; pointer-events: auto;
  }
}
.alumni {
  max-width: 74ch; margin-top: clamp(30px, 3.4vw, 56px); padding-top: clamp(20px, 2.2vw, 34px);
  border-top: 1px solid var(--line); color: var(--ink-3);
}

/* ================================================================== news === */
.news { padding-top: clamp(20px, 2.4vw, 36px); }
.news li {
  display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr);
  gap: clamp(12px, 2vw, 44px);
  padding: clamp(18px, 2vw, 32px) 0; border-bottom: 1px solid var(--line-2);
}
.news__d { font-size: clamp(11.5px, 0.24vw + 10.5px, 14px); letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
.news__t { max-width: 74ch; font-size: clamp(15.5px, 0.42vw + 13.5px, 20px); line-height: 1.55; color: #2B2823; }
.news__link { white-space: nowrap; font-size: clamp(13px, 0.24vw + 12px, 15px); border-bottom: 1px solid rgba(168, 92, 60, 0.35); }
@media (max-width: 620px) { .news li { grid-template-columns: minmax(0, 1fr); gap: 5px; } }

/* ============================================================== teaching === */
.courses {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(24px, 2.6vw, 48px); padding-top: clamp(34px, 4vw, 64px);
}
.course { padding-top: clamp(16px, 1.6vw, 26px); border-top: 2px solid rgba(168, 92, 60, 0.45); }
.course h2 { margin-top: 10px; font-size: clamp(19px, 1.2vw, 28px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.22; }
.course p { margin-top: 11px; color: var(--ink-2); font-size: clamp(15px, 0.34vw + 13.5px, 18px); line-height: 1.6; }

/* ============================================================ join/contact === */
.split {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(26px, 4vw, 72px); align-items: start; padding-top: clamp(32px, 4vw, 64px);
}
.split h2 {
  font-size: clamp(29px, 2.7vw, 53px); font-weight: 300;
  letter-spacing: -0.022em; line-height: 1.12; max-width: 24ch;
}
.split h2 b { font-weight: 600; }
.split p { max-width: 58ch; color: var(--ink-2); }
.split p + p { margin-top: 14px; }
.split .btn-row { margin-top: clamp(24px, 2.6vw, 40px); }

.contact-block p { line-height: 1.75; }
.contact-block .kicker { margin-bottom: 10px; }
.contact-block + .contact-block { margin-top: clamp(26px, 2.8vw, 44px); }
.contact-addr { font-size: clamp(16.5px, 0.44vw + 14.5px, 21px); line-height: 1.5; max-width: 30ch; }

/* ================================================================ footer === */
.site-foot {
  background: var(--bg-2); border-top: 1px solid var(--line);
  padding: clamp(42px, 5vw, 84px) 0 clamp(22px, 2.4vw, 38px);
}
.foot-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: clamp(26px, 3vw, 56px);
}
.foot-grid h2 { font-size: clamp(16px, 0.4vw + 14.5px, 19px); font-weight: 600; letter-spacing: -0.01em; }
.foot-grid .kicker { margin-bottom: 12px; }
.foot-grid p, .foot-grid li { font-size: clamp(13.5px, 0.26vw + 12.5px, 16px); color: var(--ink-2); }
.foot-list { display: flex; flex-direction: column; gap: 8px; }
.foot-list a { color: var(--ink-2); }
.foot-list a:hover { color: var(--rust); }
.foot-tag { margin-top: 8px; }
.foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: clamp(32px, 4vw, 64px); padding-top: clamp(16px, 1.8vw, 26px);
  border-top: 1px solid var(--line-2);
  font-size: clamp(12px, 0.22vw + 11px, 14px); color: var(--muted);
}
.foot-base a { color: var(--muted); border-bottom: 1px solid rgba(138, 129, 119, 0.45); }
.foot-base a:hover { color: var(--rust); }

/* ------------------------------------------------------------- reveal ---
   Blocks animate in as they enter view, and again every time they come back
   into it, so going up the page plays it rather than showing a screen of
   things already standing still. The hidden state is applied by JS, so with
   scripting off the page simply renders as normal.

   An animation rather than a transition: a `transition` here would override
   the one a card already declares for its hover.

   `backwards` and not `forwards`. The fill matters because the blocks in a
   list are staggered, and without it an element would sit in its ORDINARY
   state through its delay and then jump back to the start of the animation to
   begin — a flash of the finished thing before it arrives. `backwards` holds
   the opening frame through the delay instead. Filling forwards as well would
   pin `transform` at the end and stop a card lifting under the pointer, which
   is why only the half that is needed is asked for. */
[data-revealed="0"] { opacity: 0; }
[data-revealed="1"] {
  animation: revealIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 38ms);
}
@keyframes revealIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------ reveal: headings ---
   A heading comes up from behind its own baseline. The mask is a box with
   nothing outside it, and the line inside it starts below the bottom edge, so
   what is seen is the words rising into a space that was empty.

   The padding and the matching negative margin are not decoration: `overflow:
   hidden` on a line box cuts the descenders off the g and the y, and the box
   has to be given the room back below the baseline without the heading
   occupying any more of the page than it did. */
[data-reveal="rise"] { --rise-room: 0.16em; }
.rise {
  display: block; overflow: hidden;
  padding-bottom: var(--rise-room, 0.16em);
  margin-bottom: calc(var(--rise-room, 0.16em) * -1);
}
.rise__i { display: block; will-change: transform; }

/* The block itself does not move — only the line inside it. Two entrances laid
   over each other read as a fault rather than as emphasis. */
[data-reveal="rise"][data-revealed="0"],
[data-reveal="words"][data-revealed="0"] { opacity: 1; }
[data-reveal="rise"][data-revealed="1"],
[data-reveal="words"][data-revealed="1"] { animation: none; }

[data-revealed="0"] .rise__i { transform: translateY(115%); }
[data-revealed="1"] .rise__i {
  animation: riseIn 0.92s cubic-bezier(0.16, 0.84, 0.28, 1) both;
}
@keyframes riseIn {
  from { transform: translateY(115%); }
  to   { transform: none; }
}

/* --------------------------------------------------------- reveal: words ---
   An opening passage assembles from the left, each word just behind the one
   before it. `--i` is the word's place in the passage, written on it by
   site.js and capped there, so that a long paragraph is not still arriving
   after the reader has finished reading it. */
.word { display: inline-block; will-change: transform, opacity; }
[data-revealed="0"] .word { opacity: 0; transform: translateY(0.42em); }
[data-revealed="1"] .word {
  animation: wordIn 0.62s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 30ms);
}
@keyframes wordIn {
  from { opacity: 0; transform: translateY(0.42em); }
  to   { opacity: 1; transform: none; }
}

/* Asked for no motion: the page is simply there. Said here as well as in
   site.js because the two do different halves of it — the script stops the
   blocks being hidden in the first place, and this stops the animations that
   would otherwise still be attached to them from running at all. The blanket
   rule at the top of this file shortens every animation to nothing, but it
   leaves the delays, and a staggered passage would still arrive a word at a
   time, a second late, in jumps. */
@media (prefers-reduced-motion: reduce) {
  [data-revealed] { animation: none !important; }
  [data-revealed] .rise__i,
  [data-revealed] .word {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ------------------------------------------- the model, now on Research ---
   It used to be the home page's picture; it introduces the research instead. */
.stage--research {
  max-width: min(520px, 58vh); margin-inline: auto;
  padding-top: clamp(14px, 2vw, 30px);
}
@media (min-width: 901px) {
  .research-head {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
    gap: clamp(24px, 4vw, 64px); align-items: center;
  }
  .stage--research { padding-top: 0; }
}





/* ============================================================== the hub ===
   The figure from the 2026 document, in the right half of the home page:
   HC Lab at the centre, the four themes around it, joined by spokes.

   The square is held by aspect-ratio rather than a height, so the whole figure
   scales as one thing — every position inside it is a percentage of that
   square, which means the spokes and the circles can never drift apart at any
   window size. */
.hub {
  position: relative; width: 100%; cursor: grab; touch-action: pan-y;
  max-width: min(520px, 58vh);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}

.hub__lines {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}

/* The seats never move; the ring they sit on is what turns. Rotating one
   element is handed to the compositor, where moving four elements by their
   `left` and `top` made the browser re-measure the page on every frame — which
   is what the unevenness was. */
.hub__ring {
  position: absolute; inset: 0;
  --turn: 0deg;
  transform: rotate(var(--turn));
  will-change: transform;
}
.hub__lines line {
  stroke: rgba(140, 115, 85, 0.5);
  stroke-width: 0.5;
  stroke-linecap: round;
  /* Each spoke draws itself outward from the centre. The dash pattern is the
     whole length of the line, so offsetting by that length hides it entirely
     and winding the offset back to zero pays it out. */
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  transition: stroke-dashoffset 0.75s cubic-bezier(0.16, 0.84, 0.28, 1) 0.15s;
}
.hub[data-ready] .hub__lines line { stroke-dashoffset: 0; }

/* ------------------------------------------------------------ the centre --- */
.hub__core {
  position: absolute; left: 50%; top: 50%;
  width: 38%; aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 32% 26%, #4A423A 0%, #241F1B 62%);
  color: #F6F1E8; text-align: center;
  font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  font-size: clamp(19px, 2vw, 32px); font-weight: 600; letter-spacing: -0.012em;
  box-shadow:
    0 3px 8px rgba(58, 42, 28, 0.16),
    0 16px 36px rgba(58, 42, 28, 0.20);
  opacity: 0; scale: 0.82;
  transition: opacity 0.6s ease, scale 0.75s cubic-bezier(0.34, 1.3, 0.5, 1);
}
.hub[data-ready] .hub__core { opacity: 1; scale: 1; }

/* ------------------------------------------------------------- the nodes --- */
.hub__node {
  position: absolute;
  width: 34%; aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  padding: 6%;
  border-radius: 50%;
  /* Light beige, not near-white. Set at #FFFDF9 on a #FAF8F4 page the circles
     were within a couple of shades of the ground they sat on, so the figure
     read as four faint outlines rather than as four things — which is the
     whole reason it was not holding anyone's eye. This is far enough from the
     page to separate cleanly and still light enough to carry near-black
     lettering at full contrast. */
  background: linear-gradient(158deg, #F6EBD8 0%, #E9DBC1 100%);
  border: 1px solid rgba(140, 115, 85, 0.42);
  color: var(--ink); text-align: center;
  box-shadow: 0 2px 5px rgba(58, 42, 28, 0.07), 0 10px 26px rgba(58, 42, 28, 0.10);
  opacity: 0;
  transition: opacity 0.55s ease, box-shadow 0.4s ease,
              border-color 0.35s ease, color 0.3s ease,
              scale 0.5s cubic-bezier(0.34, 1.35, 0.5, 1);
}
/* Held back behind the spoke that reaches it, so each circle appears to be
   delivered by its own line rather than waiting there for it. */
.hub[data-ready] .hub__node {
  opacity: 1;
  transition-delay: calc(0.42s + var(--i) * 0.11s);
}
.hub__node:hover {
  color: var(--rust);
  border-color: rgba(168, 92, 60, 0.6);
  scale: 1.05;
  box-shadow: 0 3px 8px rgba(58, 42, 28, 0.10), 0 16px 34px rgba(168, 92, 60, 0.20);
}

/* A serif, against the sans the rest of the site is set in, so the figure
   reads as a plate rather than as more of the page — the way a diagram is
   lettered differently from the text around it in a printed paper. Named
   faces that are already on the machine, so nothing is fetched: this file
   embeds one webfont and one only.

   Turned back by exactly what the ring was turned by, so the words stay
   upright the whole way round. */
.hub__name {
  font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  font-size: clamp(13px, 1.3vw, 21px); font-weight: 600;
  line-height: 1.22; letter-spacing: -0.004em;
  text-wrap: balance;
  transform: rotate(calc(-1 * var(--turn)));
}

/* Asked for no motion: the figure is simply there. */
@media (prefers-reduced-motion: reduce) {
  .hub__lines line { stroke-dashoffset: 0; }
  .hub__core { opacity: 1; scale: 1; }
  .hub[data-ready] .hub__node { opacity: 1; transition-delay: 0s; }
}

@media (max-width: 900px) {
  .hub { max-width: min(400px, 86vw); margin-top: clamp(20px, 4vw, 36px); }
}

/* ============================================ research: the four themes ===
   The four themes of the document set out in full, with the six areas nested
   inside the first of them. Each carries the id the home page's diagram links
   to, hence the scroll margin, which stops the sticky header covering the
   heading of whichever theme was arrived at. */
.briefs {
  display: flex; flex-direction: column;
  gap: clamp(34px, 4.4vw, 70px);
  padding-top: clamp(24px, 3vw, 44px);
}
.brief {
  display: grid; grid-template-columns: minmax(0, 62px) minmax(0, 1fr);
  gap: clamp(12px, 2vw, 30px);
  scroll-margin-top: calc(var(--head-h, 46px) + 26px);
}
.brief__no {
  font-size: clamp(11px, 0.22vw + 10.5px, 13px); font-weight: 600;
  letter-spacing: 0.2em; color: var(--rust);
  padding-top: 0.55em;
}
.brief__t {
  font-size: clamp(27px, 2.2vw, 46px); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.14;
  padding-bottom: clamp(10px, 1.2vw, 16px);
  border-bottom: 1px solid rgba(140, 115, 85, 0.28);
}
.brief__p {
  margin-top: clamp(12px, 1.4vw, 20px); max-width: 74ch;
  color: var(--ink-2); font-size: clamp(15px, 0.34vw + 13.6px, 18px); line-height: 1.62;
}

/* The six areas, inside the theme they belong to. Indented and ruled down the
   left so that they read as part of it rather than as six more themes. */
.brief__nest {
  margin-top: clamp(22px, 2.6vw, 38px);
  padding-left: clamp(14px, 1.6vw, 26px);
  border-left: 2px solid rgba(168, 92, 60, 0.28);
}
.brief__nest-label {
  font-size: clamp(10px, 0.2vw + 9.5px, 12px); font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.brief__nest .areas { padding-top: clamp(18px, 2.2vw, 30px); }
.brief__nest .area h3 {
  margin-top: 10px;
  font-size: clamp(19px, 1.2vw, 26px); font-weight: 600;
  letter-spacing: -0.014em; line-height: 1.2;
}

@media (max-width: 640px) {
  .brief { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .brief__no { padding-top: 0; }
}

/* ============================================================ portraits ===
   These are phone photographs of people standing at a bench, so each one puts
   its subject in the middle of a great deal of room, and the head sits at a
   different height in every one. Two controls, doing two different jobs.

   `object-position` chooses which band of the picture the 3:4 frame keeps.
   Pulled up near the top, it keeps the head rather than centring the body.

   `transform` then enlarges what is left — and the ORIGIN of that enlargement
   is the part worth explaining, because it was wrong before. Scaling about a
   point pushes everything away from that point. Anchored at the three-tenths
   line, which sits BELOW the head, every face was driven upward and off the
   top of its frame — the harder the zoom, the worse it got. Anchored at the
   top edge, the face is pushed DOWN, away from the crop, and lands in the
   upper portion of the frame with room above it. The stronger the zoom now,
   the better it sits.

   A third control, `--shift-x` / `--shift-y`, moves the enlarged picture
   bodily inside the frame. It is needed because `object-position` can only
   move a photograph along the axis on which the frame actually crops it, and
   for a 9:16 telephone picture in a 3:4 frame that axis is the vertical one
   only — the width fits exactly, so no horizontal value has any effect at all.
   Anyone standing off to one side of their own photograph therefore stayed off
   to one side of their tile however the other two numbers were set. The shift
   is written after the scale in the transform list, which means it is applied
   to the already-enlarged image and is not multiplied by the zoom: one per
   cent is one per cent of the tile, whatever the zoom happens to be.

   Done in the stylesheet, not by cutting the files, so nothing is resampled
   and the full resolution stays there for high-density screens. */
.shot-img {
  --zoom: 1.3;                    /* all four replaced per person by site.js */
  --shift-x: 0%;
  --shift-y: 0%;
  object-fit: cover;
  object-position: center 50%;
  /* Anchored on the line the faces sit on — 32% down. Scaling about a point
     leaves that point where it is, so the zoom can be set per person for the
     size of their head without moving their face off the line. Anchored at the
     top edge instead, as it was, enlarging dragged every face downward, and
     the people photographed from furthest away — who needed the most zoom —
     were pushed the furthest out of place. */
  transform: translate(var(--shift-x), var(--shift-y)) scale(var(--zoom));
  transform-origin: center 32%;
}
.person:hover .shot-img,
.person:focus-within .shot-img {
  transform: translate(var(--shift-x), var(--shift-y)) scale(calc(var(--zoom) * 1.05));
}


/* ------------------------------------------------- research, shortened ---
   No numbering, so the brief is a single column. Redox Chemical Biology is a
   heading and a way through rather than a passage; it is given a little more
   room and a cue, so that it reads as a door and not as a theme whose text
   went missing. */
.brief { display: block; }
.brief__t a, a.brief__t { color: var(--ink); display: inline-block; }
.brief--link .brief__t:hover { color: var(--rust); }
/* The linked heading carries a mark after it instead of a line of copy
   underneath — the same signal, without a sentence explaining the obvious. */
.brief--link .brief__t::after {
  content: " →";
  color: var(--rust);
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.16, 0.84, 0.28, 1);
}
.brief--link .brief__t:hover::after { transform: translateX(6px); }

/* The heading over the six areas on the Redox page. */
.sub-head {
  margin-top: clamp(34px, 4vw, 66px);
  padding-bottom: clamp(14px, 1.6vw, 24px);
  border-bottom: 1px solid var(--line);
}
.sub-head .kicker { margin-bottom: 10px; }
.sub-head h2 {
  font-size: clamp(28px, 2.5vw, 46px); font-weight: 300; letter-spacing: -0.02em;
}

/* The page you are on, for the Redox page too. */
body[data-page="redox"] .nav a[href="research.html"],
body[data-page="redox"] .nav a[href="#research"] { color: var(--rust); }

/* The ring is dragged, so it must say so, and the browser must not claim the
   gesture as a scroll before the handler ever sees it. */
.hub:active { cursor: grabbing; }
.hub__node { cursor: pointer; -webkit-user-drag: none; user-select: none; }
/* Positioned by the script every frame, so no transition on left/top — one
   would fight the drag and lag a frame behind the pointer. */
.hub__node { transition: opacity 0.55s ease, box-shadow 0.4s ease,
                         border-color 0.35s ease, color 0.3s ease,
                         scale 0.5s cubic-bezier(0.34, 1.35, 0.5, 1); }
.hub__ring { transition: none; }
.hub__lines line { transition: none; stroke-dasharray: none; stroke-dashoffset: 0; }

/* ========================================================= dark footer ===
   Both footers on a dark grey ground with light lettering. The page above
   stays cream; the footer becomes the base it sits on, which is also what
   stops the two of them running together at the fold.

   Written as one block that overrides the earlier colours rather than by
   editing each rule where it stands, so the whole of the footer palette can be
   read, and changed, in one place.

   The link colour is not the rust used everywhere else. Rust on dark grey
   falls below the contrast a small line of type needs; this is the same hue
   lifted until it carries. */
.site-foot,
.home-foot {
  --foot-bg:   #2E2E30;
  --foot-ink:  #FFFFFF;
  --foot-ink-2:#DAD7D2;
  --foot-mute: #9E9A94;
  --foot-link: #E9C7AE;

  background: var(--foot-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--foot-ink-2);
}

.site-foot .foot-grid h2,
.home-foot .foot-grid h2,
.site-foot h2,
.home-foot h2 { color: var(--foot-ink); }

.site-foot .kicker,
.home-foot .kicker { color: var(--foot-mute); }

.site-foot .foot-grid p, .site-foot .foot-grid li,
.home-foot p, .home-foot li { color: var(--foot-ink-2); }

.site-foot .foot-list a,
.home-foot .foot-list a { color: var(--foot-ink-2); }
.site-foot .foot-list a:hover,
.home-foot .foot-list a:hover { color: var(--foot-link); }

.site-foot .foot-base,
.home-foot .foot-base {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--foot-mute);
}
.site-foot .foot-base p,
.home-foot .foot-base p { color: var(--foot-mute); }
.site-foot .foot-base a,
.home-foot .foot-base a {
  color: var(--foot-mute);
  border-bottom-color: rgba(255, 255, 255, 0.28);
}
.site-foot .foot-base a:hover,
.home-foot .foot-base a:hover { color: var(--foot-link); }

/* Anything else that finds its way into a footer keeps the light link colour
   rather than falling back to the rust used on cream. */
.site-foot a,
.home-foot a { color: var(--foot-link); }
.site-foot a:hover,
.home-foot a:hover { color: var(--foot-ink); }

/* ------------------------------------------- chemical labels keep their case ---
   The area labels are formulae, not words, and in a formula the case IS the
   meaning: RSeS is reactive selenium species, because Se is the symbol for
   selenium. Run through the uppercase every other small label gets, it came
   out as RSES, which is not the name of anything.

   Only these are exempted. Every other kicker on the site is a phrase, where
   uppercasing changes nothing but the look. The labels are written in the case
   they should appear in, in content.js. */
.area .kicker { text-transform: none; }

/* =========================================== alumni & announcements empty === */
.empty-box {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 48px);
  text-align: center;
  max-width: 680px;
  margin: clamp(24px, 3vw, 42px) auto 0;
}
.empty-box__t {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.empty-box__p {
  color: var(--muted);
  font-size: clamp(15px, 0.35vw + 13.5px, 17.5px);
  line-height: 1.6;
}

/* ==================================================== lab group photos === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(20px, 2.5vw, 36px);
  padding-top: clamp(28px, 3.4vw, 54px);
}
.photo-card {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.photo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 92, 60, 0.4);
  box-shadow: 0 14px 34px rgba(29, 29, 31, 0.08);
}
.photo-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--shot);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.photo-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-card__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.photo-card__placeholder svg {
  width: 38px;
  height: 38px;
  stroke: var(--rust);
  opacity: 0.85;
}
.photo-card__placeholder span {
  font-size: 13px;
  letter-spacing: 0.03em;
  line-height: 1.45;
  color: var(--ink-3);
}
.photo-card__placeholder small {
  font-size: 11.5px;
  color: var(--muted);
}
.photo-card__body {
  padding: clamp(16px, 1.8vw, 22px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.photo-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.photo-card__yr {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
}
.photo-card__t {
  font-size: clamp(17px, 0.35vw + 15px, 20px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.photo-card__caption {
  font-size: clamp(13px, 0.22vw + 12px, 15px);
  color: var(--ink-2);
  line-height: 1.5;
}


/* Version 17: interaction refinements within the existing visual design. */
/* Redox areas: larger titles with distinct, softly rounded detail bubbles. */
#redox-areas { grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(38px, 5vw, 70px) clamp(28px, 3.5vw, 52px); }
#redox-areas .area { border-top: 0; padding-top: 0; min-width: 0; }
#redox-areas .area h2 { font-size: clamp(30px, 2.8vw, 42px);
  line-height: 1.12; letter-spacing: -.025em; margin-top: 10px; }
#redox-areas .area__detail { margin-top: 22px;
  padding: clamp(22px, 2.6vw, 34px); border-radius: 26px 26px 26px 8px;
  background: #F2EBDD; border: 1px solid rgba(140, 115, 85, .16);
  box-shadow: 0 8px 24px rgba(58, 42, 28, .035); line-height: 1.75; }
body[data-page="redox"] .stage--research { max-width: min(640px, 72vh); }
@media (min-width: 901px) {
  body[data-page="redox"] .research-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    gap: clamp(24px, 3vw, 44px);
  }
}
@media (max-width: 760px) {
  #redox-areas { grid-template-columns: minmax(0, 1fr); }
  body[data-page="redox"] .stage--research { max-width: 520px; }
}
.nav { clip-path: inset(0 0 100% 0 round 0 0 8vw 8vw);
  transition: clip-path 380ms cubic-bezier(.4,0,.2,1), visibility 0s linear 380ms;
  overscroll-behavior: contain; }
.nav[data-open="1"] { clip-path: inset(0 round 0);
  transition: clip-path 780ms cubic-bezier(.22,1,.36,1), visibility 0s; }
.nav__in > * { opacity: 0; transform: translateY(28px);
  transition: opacity 130ms ease, transform 200ms ease; }
.nav[data-open="1"] .nav__in > * {
  transition: opacity 420ms ease, transform 620ms cubic-bezier(.22,1,.36,1);
  transition-delay: calc(120ms + var(--menu-order, 0) * 75ms); }
.nav[data-open="1"] a:hover, .nav[data-open="1"] a:focus-visible { transform: translateX(14px); }
.hub[data-ready] .hub__node {
  transition: opacity 400ms ease, box-shadow 180ms ease, border-color 160ms ease,
              color 160ms ease, scale 200ms cubic-bezier(.2,.8,.2,1);
  transition-delay: 0s; }
.hub__node:focus-visible { scale: 1.05; color: var(--rust);
  box-shadow: 0 3px 8px rgba(58,42,28,.10), 0 16px 34px rgba(168,92,60,.20); }
.paper__heading { max-width: 62ch; font-size: clamp(16.5px, 0.55vw + 14px, 23px); font-weight: 600; line-height: 1.55; }
.brief__t, .area h3 { color: var(--rust-2); }
.paper__heading .paper__t {
  display: inline; color: var(--ink); background: var(--bg-2);
  padding: .04em .16em; border-radius: 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.paper__t:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .18em; }
.paper__description { margin-top: 10px; max-width: 78ch; color: var(--ink-2);
  font-size: clamp(15px, .3vw + 13px, 17px); line-height: 1.65; }
.papers > li + li { border-top: 1px solid var(--line-2); padding-top: clamp(22px,2.2vw,40px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-delay: 0s !important; transition-delay: 0s !important; }
}

/* Version 18: a vertical academic menu with a quiet editorial companion. */
.alumni-source { margin-top: 24px; max-width: 80ch; font-size: 16px; color: var(--ink-2); }
.alumni-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 40px; }
.alumni-jump a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 30px;
  font-size: 14px; color: var(--ink-2); background: var(--bg-2); }
.alumni-jump a:hover { color: var(--rust-2); border-color: var(--rust); }
.alumni-category { margin-top: 48px; scroll-margin-top: calc(var(--head-h, 65px) + 24px); }
.alumni-category__title { font-size: clamp(24px, 2.2vw, 34px); margin-bottom: 24px; }
.alumni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 26px; }
.alumni-card { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--shot); }
.alumni-photo { padding: 20px 20px 0; }
.alumni-photo-img { width: 100%; height: 260px; object-fit: contain; border-radius: 10px; }
.alumni-card__body { padding: 22px; }
.alumni-card__name { font-size: 21px; font-weight: 600; line-height: 1.25; }
.alumni-card__period { font-size: 14px; margin-top: 8px; color: var(--rust-2); }
.alumni-card__detail, .alumni-card__position { font-size: 16px; line-height: 1.6; margin-top: 14px; color: var(--ink-2); }
.alumni-card__position { border-top: 1px solid var(--line); padding-top: 14px; }
.alumni-grid--names .alumni-card__body { padding: 20px; }
.nav { padding-top: clamp(80px, 11vh, 118px); }
.nav .nav__in > .nav__layout,
.nav[data-open="1"] .nav__in > .nav__layout { opacity: 1; transform: none; transition: none; }
.nav__layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 100px); align-items: center; }
.nav__links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.nav__links > li { width: fit-content; max-width: 100%; opacity: 0; transform: translateY(25px);
  transition: opacity 130ms ease, transform 200ms ease; }
.nav[data-open="1"] .nav__links > li { opacity: 1; transform: none;
  transition: opacity 420ms ease, transform 620ms cubic-bezier(.22,1,.36,1);
  transition-delay: calc(150ms + var(--menu-order, 0) * 90ms); }
.nav .nav__links a { font-size: clamp(28px, 3.3vw, 46px); line-height: 1.08;
  padding: 7px 0; max-width: 100%; }
.nav .nav__links a[aria-current="page"] { color: var(--rust-2); }
.nav .nav__links a:hover, .nav[data-open="1"] .nav__links a:focus-visible { transform: none; }
.nav__label { position: relative; display: inline-block; isolation: isolate;
  transform-origin: left center; transition: transform 320ms cubic-bezier(.22,1,.36,1), opacity 250ms ease, filter 250ms ease; }
.nav__label::before { content: ""; position: absolute; inset: -3px -10px;
  background: #E9DBC1; border-radius: 5px; z-index: -1;
  transform: scaleX(0); transform-origin: right; transition: transform 400ms cubic-bezier(.22,1,.36,1); }
.nav .nav__links .nav__sub { margin: 0 0 7px 20px; padding: 3px 0;
  font-size: clamp(17px, 1.6vw, 21px); font-weight: 400; color: var(--ink-2); }
.nav__sub::before { content: "↳"; display: inline-block; margin-right: 9px; color: var(--rust); }
.nav .nav__links a:hover .nav__label, .nav .nav__links a:focus-visible .nav__label {
  transform: scale(1.08); opacity: 1; filter: none; color: var(--ink); }
.nav .nav__links a:hover .nav__label::before, .nav .nav__links a:focus-visible .nav__label::before {
  transform: scaleX(1); transform-origin: left; }
@media (hover: hover) and (pointer: fine) {
  .nav[data-hovering="1"] .nav__links a:not(:hover):not(:focus-visible) .nav__label { opacity: .38; filter: blur(1.5px); }
}
.nav__aside { padding: clamp(24px, 3.5vw, 50px); background: rgba(242,235,221,.72);
  border: 1px solid rgba(140,115,85,.16); border-radius: 28px;
  opacity: 0; transform: translateY(22px); transition: opacity 160ms ease, transform 180ms ease; }
.nav[data-open="1"] .nav__aside { opacity: 1; transform: none;
  transition: opacity 600ms ease 280ms, transform 800ms cubic-bezier(.22,1,.36,1) 280ms; }
.nav__aside h2 { font-size: clamp(28px, 2.8vw, 42px); line-height: 1.16; font-weight: 400;
  letter-spacing: -.025em; margin: 20px 0; }
.nav__aside p { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.nav__aside .kicker { font-size: 10px; }
.nav__aside .nav__address { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.nav__orbit { position: relative; width: 160px; height: 160px; border: 1px solid rgba(140,115,85,.3);
  border-radius: 50%; margin: 24px 0; display: grid; place-items: center; }
.nav__orbit::before { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(140,115,85,.18); border-radius: 50%; }
.nav__orbit span { width: 76px; height: 76px; border-radius: 50%; background: #3A342E;
  color: #FAF8F4; display: grid; place-items: center; font-weight: 600; }
.nav__orbit i { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #C4AA7F;
  left: 16px; top: 20px; }
.nav__orbit i:nth-of-type(2) { left: auto; right: -8px; top: 65px; background: #B77958; }
.nav__orbit i:nth-of-type(3) { left: 55px; top: auto; bottom: -8px; background: #9DA689; }
.heading-motion { transform-origin: left center; transition: scale 300ms cubic-bezier(.22,1,.36,1); }
@media (hover: hover) and (pointer: fine) {
  .heading-motion:hover { scale: 1.025; }
}
.section--alumni, .section--contact { scroll-margin-top: calc(var(--head-h, 65px) + 24px); }
.section--contact .split { margin-top: 32px; }
.home-foot { --foot-mute: #C2BDB5; }
.stage__hint { color: var(--ink-3); }
@media (max-height: 760px) and (min-width: 761px) {
  .nav__orbit { display: none; }
  .nav__aside { padding: 26px; }
}
@media (max-width: 760px) {
  .nav__layout { grid-template-columns: minmax(0, 1fr); }
  .nav__aside { display: none; }
  .nav .nav__links a { font-size: clamp(27px, 7.4vw, 36px); padding: 7px 0; }
  .nav .nav__links .nav__sub { font-size: 18px; padding: 2px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .heading-motion:hover, .nav .nav__links a:hover .nav__label, .nav .nav__links a:focus-visible .nav__label { scale: 1; transform: none; }
  .nav[data-hovering="1"] .nav__links a .nav__label { opacity: 1 !important; filter: none !important; }
}

/* v18 menu refinement: lateral reveal and balanced, larger navigation. */
.nav { clip-path: inset(0 100% 0 0); transition: clip-path 480ms cubic-bezier(.4,0,.2,1), visibility 0s linear 480ms; padding-top: clamp(90px,14vh,140px); }
.nav[data-open="1"] { clip-path: inset(0); transition: clip-path 920ms cubic-bezier(.22,1,.36,1), visibility 0s; }
.nav__layout { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); align-items: start; gap: clamp(35px,6vw,100px); }
.nav__links { gap: 8px; }
.nav__links--right { padding-top: 0; gap: 40px; }
.nav__links > li { transform: translateX(-38px); filter: blur(8px); opacity: 0; transition: opacity 200ms, transform 400ms, filter 250ms; }
.nav[data-open="1"] .nav__links > li { opacity: 1; transform: none; filter: blur(0); transition: opacity 480ms, transform 760ms cubic-bezier(.22,1,.36,1), filter 640ms; transition-delay: calc(130ms + var(--menu-order,0) * 85ms); }
.nav .nav__links a { font-size: clamp(42px,4.95vw,69px); line-height: 1.15; padding: 7px 0; }
.nav .nav__links .nav__sub { font-size: clamp(18px,1.9vw,24px); margin-top: 8px; }
.nav__char { display: inline-block; transform: scale(calc(1 + var(--letter-grow,0) * .22),calc(1 + var(--letter-grow,0) * .13)); transition: transform 250ms ease-out; }
.nav .nav__links a:not(.nav__sub):hover .nav__label { transform: none; }
.nav .nav__links a:not(.nav__sub):focus-visible .nav__char { transform: scale(1.08); }
.nav .nav__links a:focus-visible { outline: 2px solid var(--rust-2); outline-offset: 5px; border-radius: 4px; }
.alumni-category__title { width: fit-content; transform-origin: left center; transition: transform 350ms cubic-bezier(.22,1,.36,1), color 300ms; }
@media (hover:hover) and (pointer:fine) { .alumni-category__title:hover { transform: translateX(6px) scale(1.035); color: var(--rust-2); } }
.photo-card__img { object-fit: contain; background: var(--bg-2); }
@media (max-width:760px) {
  .nav { padding-top: 90px; }
  .nav__layout { grid-template-columns: 1fr; gap: 18px; }
  .nav__links { gap: 3px; }
  .nav__links--right { gap: 14px; }
  .nav .nav__links a { font-size: clamp(34px,9.5vw,46px); padding: 4px 0; }
  .nav .nav__links .nav__sub { font-size: 19px; margin-top: 2px; }
}
@media (prefers-reduced-motion:reduce) {
  .nav, .nav[data-open="1"], .nav__links > li, .nav[data-open="1"] .nav__links > li { transition: none; filter: none; }
  .nav__char, .nav .nav__links a:focus-visible .nav__char, .alumni-category__title:hover { transform: none; transition: none; }
}

/* Large group photographs with gentle crossfades. */
.nav .nav__links a { font-size: clamp(38px,4.4vw,61px); }
.nav .nav__links .nav__sub { font-size: clamp(17px,1.7vw,22px); }
.nav__sub::before { content: none; }
.gallery-slideshow { grid-column: 1 / -1; margin-bottom: 12px; }
.gallery-slideshow__stage { position: relative; height: clamp(340px,58vw,680px); border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.gallery-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 850ms ease, visibility 0s linear 850ms; border: 0; border-radius: 0; }
.gallery-slide.is-active { opacity: 1; visibility: visible; transition: opacity 850ms ease, visibility 0s; }
.gallery-slide .photo-card__media { height: 100%; aspect-ratio: auto; }
.gallery-slide .photo-card__img { object-fit: contain; }
.gallery-slideshow__controls { display: flex; justify-content: center; gap: 12px; padding: 16px 0; }
.gallery-slideshow__button { padding: 9px 18px; border: 1px solid var(--line-2); border-radius: 24px; background: var(--bg-2); color: var(--ink); font: inherit; cursor: pointer; transition: background 200ms; }
.gallery-slideshow__button:hover { background: #E9DBC1; }
.gallery-slideshow__button:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
@media(max-width:760px) {
  .nav .nav__links a { font-size: clamp(31px,8.5vw,41px); }
  .nav .nav__links .nav__sub { font-size: 18px; }
  .gallery-slideshow__stage { height: clamp(240px,70vw,460px); }
}
@media(prefers-reduced-motion:reduce) { .gallery-slide, .gallery-slide.is-active { transition: none; } }

/* Research themes arrive individually with their descriptions. */
#themes-list { gap: clamp(44px,7vh,84px); }
#themes-list .research-topic { min-height: clamp(320px,52vh,520px); display: block; transform-origin: center top; }
#themes-list.research-ready .research-topic { opacity: 0; transform: translateY(42px) scale(.975); transition: opacity 850ms ease, transform 900ms cubic-bezier(.22,1,.36,1); }
#themes-list.research-ready .research-topic[data-topic-visible="1"] { opacity: 1; transform: none; }
#pi-shot .shot-img { object-position: center 12%; }
#announcements-list .news > li { grid-template-columns: minmax(0,1fr); }
@media(prefers-reduced-motion:reduce) { #themes-list.research-ready .research-topic { opacity: 1; transform: none; transition: none; } }

/* Scroll focus: a clear foreground topic against fading, blurred neighbours. */
#themes-list.research-focus { display: block; position: relative; height: 400vh; padding-top: 0; }
.research-focus-stage { display: flex; flex-direction: column; gap: clamp(44px,7vh,84px); }
.research-focus .research-focus-stage { display: block; position: sticky; top: 80px; height: calc(100vh - 100px); overflow: hidden; }
#themes-list.research-focus .research-topic { position: absolute; top: 50%; left: 4%; width: 92%; min-height: 0; transform-origin: center; transition: none; padding: 20px 8px; }
#themes-list.research-focus .brief__t { font-size: clamp(28px,3.4vw,48px); }
#themes-list.research-focus .brief__p { font-size: clamp(16px,1.55vw,20px); line-height: 1.55; }
.pi { grid-template-columns: minmax(0,400px) minmax(0,1fr); }
.pi__shot .shot { aspect-ratio: 3 / 5; }
.pi h2 { font-weight: 700; }
.pi__role { font-weight: 600; color: var(--ink); }
.pi__bio { font-weight: 600; color: var(--ink); font-size: clamp(18px,1.6vw,21px); }
@media(max-width:760px) {
 .pi { grid-template-columns: minmax(0,1fr); }
 .pi__shot { width: 100%; max-width: 400px; }
 #themes-list.research-focus .research-topic { left: 3%; width: 94%; padding: 12px 0; }
 #themes-list.research-focus .brief__t { font-size: 27px; }
 #themes-list.research-focus .brief__p { font-size: 16px; }
}
@media(prefers-reduced-motion:reduce) {
 #themes-list.research-focus { height: auto; }
 .research-focus .research-focus-stage { position: static; height: auto; overflow: visible; }
 #themes-list.research-focus .research-topic { position: static; width: 100%; opacity: 1 !important; filter: none !important; transform: none !important; }
}

body[data-page='research'] { overflow-x: clip; }

/* Reference-inspired title interaction with the existing lab typeface. */
.page-title-motion, .page-title__label { font-family: LabMenu, 'Source Sans 3', sans-serif; }
.heading-word { display: inline-block; white-space: nowrap; }
.page-title__label { display: inline; }
.page-head .page-title-motion { font-size: clamp(38px,5vw,80px); line-height: 1.15; }
.page-head .page-title-motion.heading-motion:hover { scale: 1; }
.nav__char { font-variation-settings: 'wght' calc(300 + var(--letter-grow,0) * 500); transform: scale(calc(1 + var(--letter-grow,0) * .10),calc(1 + var(--letter-grow,0) * .08)); transition: font-variation-settings 280ms ease-out, transform 280ms ease-out; }
.page-title-motion { animation: title-arrive 750ms cubic-bezier(.22,1,.36,1) both; }
@keyframes title-arrive { from { opacity: 0; transform: translateY(18px); filter: blur(5px); } to { opacity: 1; transform: none; filter: blur(0); } }
.nav .nav__links .nav__sub { font-size: clamp(23px,2.15vw,29px); }
@media(max-width:760px) { .nav .nav__links .nav__sub { font-size: 23px; } .page-head .page-title-motion { font-size: clamp(35px,9vw,48px); } }
@media(prefers-reduced-motion:reduce) { .page-title-motion { animation: none; } .nav__char { font-variation-settings: 'wght' 300; transform: none !important; transition: none; } }

/* Small, keyboard-accessible motion control on the photograph itself. */
.gallery-motion-toggle { position: absolute; right: 14px; bottom: 14px; z-index: 20; padding: 8px 16px; min-height: 44px; min-width: 64px; border: 1px solid #D3C7B4; border-radius: 24px; background: #FAF8F4; color: #37332F; font: 600 15px 'Source Sans 3',sans-serif; cursor: pointer; box-shadow: 0 2px 12px #00000012; }
.gallery-motion-toggle:hover { background: #E9DBC1; }
.gallery-motion-toggle:focus-visible { outline: 3px solid #A85C3C; outline-offset: 3px; }

/* Equal dimensions prevent long labels from stretching the research circles. */
.hub__node { height: 34%; min-height: 0; min-width: 0; padding: 4%; box-sizing: border-box; }
.hub__name { max-width: 100%; line-height: 1.16; }
#themes-list.research-focus .research-topic { transform-origin: center top; }
@media(max-height:419px) { #themes-list .research-topic { min-height: 0; } }
