/* ==========================================================================
   High Energy Physics @ IIT Kanpur — shared stylesheet
   Light "classic academic" theme: off-white paper, serif text, hairline rules,
   maroon accent. No glow, no heavy shadow — structure comes from rules and
   white space, the way a printed journal does it.

   Structure: 1 tokens · 2 reset · 3 layout · 4 masthead/nav · 5 hero
              6 components · 7 figures & images · 8 page blocks · 9 footer
              10 utilities · 11 motion / print / a11y
   ========================================================================== */

/* ---------- 1. Design tokens ---------------------------------------------- */
:root {
  /* Paper & ink */
  --paper: #fbfaf6;          /* page background, warm off-white */
  --paper-2: #f4f2ea;        /* alternating band */
  --card: #ffffff;
  --ink: #1e2024;            /* body text */
  --ink-hi: #101216;         /* headings */
  --ink-mid: #5a6068;        /* secondary text */
  --ink-low: #6b7078;        /* captions, meta — 4.6:1 on paper */

  /* Rules */
  --rule: #ded9cd;
  --rule-strong: #c5bfae;

  /* Accents */
  --maroon: #7d1f2c;         /* primary — IIT Kanpur red */
  --maroon-dark: #5d1620;
  --maroon-tint: #f6ecec;
  --navy: #1d3557;
  --navy-tint: #eceff5;
  --gold: #8a6a24;
  --gold-tint: #f6f0e2;
  --green: #2f5d43;
  --accent: var(--maroon);

  /* Typography */
  --font-display: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--2: clamp(0.7rem, 0.68rem + 0.1vw, 0.76rem);
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.97rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.34vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.9rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step-4: clamp(2.1rem, 1.7rem + 2vw, 3.35rem);
  --step-5: clamp(2.5rem, 1.8rem + 3.4vw, 4.4rem);

  /* Space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* Shape & depth — restrained on purpose */
  --r-sm: 3px;
  --r-md: 4px;
  --r-lg: 6px;
  --shadow-1: 0 1px 2px rgba(30, 32, 36, 0.05);
  --shadow-2: 0 2px 10px -4px rgba(30, 32, 36, 0.12);
  --shadow-3: 0 10px 28px -14px rgba(30, 32, 36, 0.22);

  --wrap: 1180px;
  --wrap-narrow: 760px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. Reset & base ---------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--step-0);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* A faint laid-paper wash — no pattern, just warmth at the top of the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(56rem 34rem at 88% -8%, rgba(125, 31, 44, 0.05), transparent 60%),
    radial-gradient(48rem 30rem at 4% 2%, rgba(29, 53, 87, 0.045), transparent 58%),
    linear-gradient(180deg, #fffefb, var(--paper) 40%);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-hi);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.005em;
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}
h1 { font-size: var(--step-5); line-height: 1.08; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }

p { margin: 0 0 var(--sp-4); max-width: 70ch; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--maroon);
  text-decoration: underline;
  text-decoration-color: rgba(125, 31, 44, 0.32);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: color 0.15s var(--ease), text-decoration-color 0.15s var(--ease);
}
a:hover { color: var(--maroon-dark); text-decoration-color: currentColor; }

img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }
figure { margin: 0; }   /* browsers default to 40px side margins */

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.2rem; }
li { margin-bottom: 0.3rem; }
li::marker { color: var(--rule-strong); }

hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: var(--sp-7) 0;
}

blockquote {
  margin: 0;
  padding-left: var(--sp-5);
  border-left: 2px solid var(--rule-strong);
  font-style: italic;
  color: var(--ink-mid);
}

code, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 0.1em 0.35em;
  border-radius: var(--r-sm);
}

::selection { background: rgba(125, 31, 44, 0.16); }

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

/* ---------- 3. Layout ----------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section--tight { padding-block: clamp(1.75rem, 3.5vw, 3rem); }
.section + .section { padding-top: 0; }
.section--band {
  background: var(--paper-2);
  border-block: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 5vw, 4rem) !important;
}

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.stack > * + * { margin-top: var(--sp-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
}
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 880px) {
  .split, .split--even { grid-template-columns: 1fr; }
}

/* Section heading: small-caps label, name, hairline rule */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule);
}
.section-head h2 { margin: 0; min-width: 0; }
.section-head .section-head__aside {
  font-family: var(--font-ui);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-low);
  margin-left: auto;
}
@media (max-width: 720px) {
  .section-head .section-head__aside { margin-left: 0; }
}

.eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: var(--sp-3);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.62;
  color: var(--ink);
  max-width: 60ch;
}

/* Classic drop cap for the opening paragraph on the home page */
.dropcap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.5em;
  line-height: 0.82;
  font-weight: 600;
  color: var(--maroon);
  margin: 0.06em 0.12em 0 0;
}

/* Home page research cards: topics as one quiet line instead of boxes */
.card__topics {
  margin: var(--sp-4) 0 0;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: var(--step--2);
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--ink-low);
}

/* ---------- 4. Masthead & navigation ------------------------------------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -110%);
  z-index: 100;
  background: var(--maroon);
  color: #fff;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  text-decoration: none;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: #fff; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 246, 0.94);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 0 -2px var(--rule);
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink-hi);
}
.brand:hover { color: var(--ink-hi); }
.brand__mark {
  width: 38px;
  height: 38px;
  flex: none;
  color: var(--maroon);
}
/* Institute emblem, if assets/iitk-logo.svg is present */
.brand__logo {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.brand__logo[data-failed] { display: none; }
.brand:has(.brand__logo:not([data-failed])) .brand__mark { display: none; }

.brand__text { display: flex; flex-direction: column; line-height: 1.1;  row-gap: 0.3rem;}
.brand__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: -0.005em;
  color: var(--ink-hi);
}
.brand__sub {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-low);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-hi);
  border-radius: var(--r-sm);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  line-height: 0;
}
.nav-toggle svg { width: 20px; height: 20px; }

.nav ul {
  display: flex;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-mid);
  text-decoration: none;
  position: relative;
  transition: color 0.15s var(--ease);
}
.nav a:hover { color: var(--maroon); }
.nav a[aria-current="page"] { color: var(--ink-hi); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0;
  height: 2px;
  background: var(--maroon);
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-2);
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s var(--ease);
  }
  .nav > ul {
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    padding-inline: clamp(1.1rem, 4vw, 2.5rem);
  }
  .nav[data-open="true"] { grid-template-rows: 1fr; }
  .nav a { padding: 0.8rem 0.15rem; font-size: var(--step-0); }
  .nav li + li { border-top: 1px solid var(--rule); }
  .nav a[aria-current="page"]::after { left: 0.15rem; right: auto; width: 1.4rem; bottom: 0.45rem; }
  .nav > ul > li:last-child a { padding-bottom: 1.1rem; }
}

/* ---------- 5. Hero ------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(2.75rem, 7vw, 5.5rem);
}
.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
}
@media (max-width: 900px) {
  .hero { padding-bottom: var(--sp-2); }
  .hero__grid { grid-template-columns: 1fr; }
  /* one column (tablet / phone): heading and text first, the animation below */
  .hero__art { order: 0; max-width: 30rem; margin-inline: auto; margin-top: var(--sp-2); }
}
/* phones: the animation uses the full screen width (cancels the page's side margins) */
@media (max-width: 600px) {
  .hero__art { max-width: none; }
  .hero__art .merger {
    width: calc(100% + 2 * clamp(1.1rem, 4vw, 2.5rem));
    margin-inline: calc(-1 * clamp(1.1rem, 4vw, 2.5rem));
  }
}
.hero h1 {
  color: var(--ink-hi);
  font-size: var(--step-4);          /* a little smaller than other pages' h1 */
}
.hero h1 em {
  font-style: italic;
  color: var(--maroon);
}
.hero .lede { font-size: clamp(1.02rem, 0.98rem + 0.22vw, 1.16rem); }
.hero__rule {
  width: 4.5rem;
  height: 2px;
  background: var(--maroon);
  margin: var(--sp-5) 0;
}
.hero__actions { margin-top: var(--sp-6); }

/* Hero art: the group photo when present, the animation otherwise */
.hero__art { position: relative; width: 100%; }
.hero__art img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--card);
  padding: 6px;
}
.hero__art svg { width: 100%; height: auto; display: block; }
.hero__art:has(img:not([data-failed])) svg { display: none; }
.hero__art img[data-failed] { display: none; }
.hero__art:has(img[data-failed]) figcaption { display: none; }
.hero__art figcaption { text-align: right; }

/* Home page animation (assets/js/merger.js): no frame or background of its own */
.merger {
  position: relative;
  width: min(100%, 36rem);
  margin-inline: auto;
  aspect-ratio: 1;
}
.merger canvas { display: block; width: 100%; height: 100%; }

@keyframes spin { to { transform: rotate(360deg); } }
/* ---------- 6. Components ------------------------------------------------ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--maroon);
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease),
    border-color 0.16s var(--ease);
}
.btn svg { width: 1em; height: 1em; flex: none; }

.btn--primary { background: var(--maroon); color: #fff; }
.btn--primary:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); color: #fff; }

.btn--ghost { background: transparent; border-color: var(--rule-strong); color: var(--ink-hi); }
.btn--ghost:hover { border-color: var(--maroon); color: var(--maroon); background: var(--maroon-tint); }

/* Card */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: clamp(1.25rem, 2.4vw, 1.9rem);
  box-shadow: var(--shadow-1);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset-inline: -1px;
  top: -1px;
  height: 3px;
  background: var(--accent);
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.card:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-2); }
.card h3 { margin-bottom: var(--sp-2); }
.card p { color: var(--ink-mid); font-size: var(--step--1); }

.card--link { display: block; text-decoration: none; color: inherit; }
.card--link:hover { color: inherit; }
.card--flat::before { display: none; }

.card__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.card__icon svg { width: 1.25rem; height: 1.25rem; }

/* Accent variants — set --accent, everything follows */
.accent-maroon { --accent: var(--maroon); }
.accent-navy { --accent: var(--navy); }
.accent-gold { --accent: var(--gold); }
.accent-green { --accent: var(--green); }

/* Stat row — hairline dividers, serif numerals */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.stat {
  padding: clamp(1rem, 2.2vw, 1.5rem) var(--sp-3);
  text-align: center;
  border-left: 1px solid var(--rule);
}
.stat:first-child { border-left: 0; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1;
  color: var(--ink-hi);
  font-variant-numeric: lining-nums tabular-nums;
}
.stat__label {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-ui);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-low);
}

/* Pills / tags */
.pill {
  display: inline-block;
  padding: 0.22rem 0.62rem;
  border-radius: 2px;
  border: 1px solid var(--rule-strong);
  background: var(--card);
  font-family: var(--font-ui);
  font-size: var(--step--2);
  color: var(--ink-mid);
  white-space: nowrap;
}
.pill--accent {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  color: color-mix(in srgb, var(--accent) 88%, #000);
}
.pill-list { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.pill-list li { margin: 0; max-width: 100%; }
.pill-list .pill { max-width: 100%; white-space: normal; }  /* long topics wrap instead of overflowing */

/* Person card — large portrait, name, interests.
   Portraits are deliberately big (4:5, ~10rem wide) to match the old site,
   where each member had a full-size photograph rather than a thumbnail. */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
  gap: var(--sp-6) var(--sp-6);
}
.person {
  display: grid;
  grid-template-columns: minmax(7rem, 10.5rem) minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 420px) {
  .person { grid-template-columns: 8rem minmax(0, 1fr); gap: var(--sp-3); }
}
.person__avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 4.5 / 5;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--ink-low);
  box-shadow: var(--shadow-1);
}
.person__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.person__avatar img[data-failed] { display: none; }
.person__body { min-width: 0; }
.person__name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--ink-hi);
  margin: 0 0 0.1rem;
}
.person__interests {
  font-size: var(--step--1);
  color: var(--ink-mid);
  margin: 0.3rem 0 0.7rem;
  line-height: 1.55;
}
.person__interests b {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.82em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-low);
}
.person__links { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Small outlined link chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.18rem 0.55rem;
  border-radius: 2px;
  border: 1px solid var(--rule-strong);
  background: var(--card);
  font-family: var(--font-ui);
  font-size: var(--step--2);
  color: var(--ink-mid);
  text-decoration: none;
  transition: all 0.15s var(--ease);
}
.chip svg { width: 0.75rem; height: 0.75rem; flex: none; }
.chip span { overflow-wrap: anywhere; min-width: 0; }
.chip:hover { color: #fff; background: var(--maroon); border-color: var(--maroon); }
.chip--muted { opacity: 0.4; pointer-events: none; }

/* Photo wall — postdocs and graduate students, portrait per person */
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: var(--sp-4) var(--sp-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.wall li { margin: 0; }
.wall__item {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);   /* ← portrait width goes HERE */
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: var(--sp-4);
  row-gap: 0.35rem;
  align-items: start;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule);
}
.wall__body  { display: contents; }
.wall__name  { grid-column: 2; grid-row: 2; min-width: 0; }
.wall__links { grid-column: 2; grid-row: 3; flex-wrap: wrap; }
.wall__photo {
  position: relative;
  grid-column: 1;
  grid-row: 1 / -1;
  width: 100%;
  aspect-ratio: 4.5 / 5;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-low);
  box-shadow: var(--shadow-1);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.wall__item:hover .wall__photo { box-shadow: var(--shadow-2); border-color: var(--rule-strong); }
@media (max-width: 420px) {
  .wall__item { grid-template-columns: 4.75rem minmax(0, 1fr); }
}
.wall__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.wall__photo img[data-failed] { display: none; }
.wall__name {
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.24;
  color: var(--ink-hi);
}
.wall__links { display: flex; gap: 0.3rem; }

/* Compact roster (kept for lists without photos) */
.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: 0.35rem var(--sp-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.roster li { margin: 0; }
.roster__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.15rem;
  border-bottom: 1px solid var(--rule);
  font-size: var(--step--1);
}
.roster__thumb {
  position: relative;
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-low);
}
.roster__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.roster__thumb img[data-failed] { display: none; }
.roster__name { color: var(--ink-hi); flex: 1 1 auto; min-width: 0; }
.roster__links { display: flex; gap: 0.25rem; flex: none; }
.icon-link {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  color: var(--ink-low);
  text-decoration: none;
  transition: all 0.15s var(--ease);
}
.icon-link svg { width: 0.78rem; height: 0.78rem; }
.icon-link:hover { color: #fff; background: var(--maroon); border-color: var(--maroon); }

/* Alumni list with dotted leaders */
.alumni {
  list-style: none;
  margin: 0;
  padding: 0;
  /* border-top: 1px solid var(--rule); */
}
.alumni li {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) 7rem 1fr;
  gap: var(--sp-3);
  align-items: baseline;
  padding: 0.6rem 0.2rem;
  margin: 0;
  border-bottom: 1px dotted var(--rule-strong);
  font-size: var(--step--1);
}
.alumni__name { color: var(--ink-hi); }
.alumni__year {
  font-family: var(--font-ui);
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--maroon);
}
.alumni__now { color: var(--ink-mid); }
@media (max-width: 720px) {
  .alumni li { grid-template-columns: 1fr auto; row-gap: 0.1rem; }
  .alumni__now { grid-column: 1 / -1; }
}

/* Timeline (news, symposia) */
.timeline { position: relative; margin: 0; padding: 0 0 0 1.6rem; list-style: none; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1px;
  background: var(--rule-strong);
}
.timeline > li { position: relative; margin: 0 0 var(--sp-5); }
.timeline > li::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.55rem;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.08rem;
  border-radius: 50%;
  background: var(--maroon);
}
.timeline h3 { font-size: var(--step-0); margin-bottom: 0.25rem; }
.timeline p { font-size: var(--step--1); color: var(--ink-mid); }
.meta {
  font-family: var(--font-ui);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-low);
  display: block;
  margin-bottom: 0.2rem;
}

/* Embed frame (Google Calendar / Sheets) */
.embed {
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-1);
}
.embed__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  font-family: var(--font-ui);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-low);
}
.embed iframe { display: block; width: 100%; border: 0; background: #fff; }
.embed--calendar iframe { height: 620px; }
.embed--sheet iframe { height: 460px; }
@media (max-width: 640px) {
  .embed--calendar iframe { height: 480px; }
  .embed--sheet iframe { height: 380px; }
}

/* Callout */
.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: color-mix(in srgb, var(--accent) 5%, #fff);
  padding: var(--sp-5);
}
.callout h3 { color: color-mix(in srgb, var(--accent) 85%, #000); }

/* Search field (members filter) */
.field {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 24rem;
  flex: 1 1 18rem;
}
.field svg {
  position: absolute;
  left: 0.75rem;
  width: 1rem;
  height: 1rem;
  color: var(--ink-low);
  pointer-events: none;
}
.field input {
  width: 100%;
  padding: 0.6rem 0.9rem 0.6rem 2.35rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule-strong);
  background: var(--card);
  color: var(--ink-hi);
  font-family: var(--font-serif);
  font-size: var(--step--1);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.field input::placeholder { color: var(--ink-low); }
.field input:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(125, 31, 44, 0.1);
}

/* Sub-navigation (in-page anchors) */
.subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  margin-bottom: var(--sp-6);
  padding-block: 0.6rem;
  background: rgba(251, 250, 246, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.subnav ul {
  display: flex;
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a {
  display: block;
  padding: 0.2rem 0;
  font-family: var(--font-ui);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.subnav a:hover { color: var(--maroon); }
.subnav a.is-active { color: var(--maroon); border-bottom-color: var(--maroon); }

/* Page masthead band, optionally with a drawn illustration alongside */
.page-head {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 2.5vw, 2rem);
  border-bottom: 1px solid var(--rule);
}
.page-head h1 { font-size: var(--step-4); margin-bottom: var(--sp-3); }
.page-head p { color: var(--ink-mid); max-width: 62ch; margin: 0; }
.page-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 17rem);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.page-head__illus img { width: 100%; }
@media (max-width: 760px) {
  .page-head__grid { grid-template-columns: 1fr; }
  .page-head__illus { max-width: 18rem; }
}

/* Drawn artwork at the top of a card */
.card__art {
  display: block;
  margin: calc(-1 * clamp(1.25rem, 2.4vw, 1.9rem)) calc(-1 * clamp(1.25rem, 2.4vw, 1.9rem)) var(--sp-5);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}
.card__art img {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: contain;   /* line drawings must not be cropped */
}

/* Illustration inside a research subgroup panel */
.thrust__illus {
  display: block;
  margin-bottom: var(--sp-4);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--card);
  overflow: hidden;
}
.thrust__illus img { width: 100%; }

/* Definition grid (contact) */
.dl {
  display: grid;
  border-top: 1px solid var(--rule-strong);
  margin: 0;
}
.dl > div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: var(--sp-4);
  padding: 0.8rem 0.2rem;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.dl dt {
  font-family: var(--font-ui);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-low);
}
.dl dd { margin: 0; color: var(--ink-hi); font-size: var(--step--1); }
@media (max-width: 560px) {
  .dl > div { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ---------- 7. Figures & images ------------------------------------------ */
.figure {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: var(--shadow-1);
}
.figure img {
  width: 100%;
  border-radius: 2px;
  background: var(--paper-2);
}
.figure figcaption {
  font-size: var(--step--2);
  line-height: 1.5;
  color: var(--ink-mid);
  padding: 0.6rem 0.4rem 0.3rem;
  border-top: 1px solid var(--rule);
  margin-top: 6px;
}
.figure figcaption b {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92em;
  color: var(--ink-hi);
}
/* a figure whose file is missing removes itself completely */
.figure:has(img[data-failed]) { display: none; }

/* Wide banner strip under a page masthead */
.banner {
  margin: 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  overflow: hidden;
}
.banner img {
  width: 100%;
  height: clamp(130px, 22vw, 240px);
  object-fit: cover;
  object-position: center;
}
.banner figcaption {
  font-family: var(--font-ui);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-low);
  text-align: right;
  padding: 0.35rem clamp(1.1rem, 4vw, 2.5rem);
}
.banner:has(img[data-failed]) { display: none; }

/* Figure slideshow inside each research area (research.py + assets/carousel.js).
   Without JavaScript it is a swipeable strip; the script adds autoplay,
   the dots, the counter and the buttons. Colours follow the area's accent. */
.carousel {
  container-type: inline-size;
  margin-bottom: var(--sp-5);
}
.carousel__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--card);
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.slide { margin: 0; height: 100%; display: flex; flex-direction: column; }
.slide__img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 2;
  padding: var(--sp-3);
  background: #fff;
  border-bottom: 1px solid var(--rule);
}
.slide__img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.slide__cap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--sp-4);
}
.slide__text { margin: 0; font-size: var(--step--1); line-height: 1.5; color: var(--ink); }
.slide__paper {
  margin-top: auto;
  padding-top: var(--sp-1);
  font-size: var(--step--2);
  line-height: 1.45;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}
.slide__paper:hover { color: var(--accent); text-decoration-color: currentColor; }
.slide__paper span {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--ink-low);
  white-space: nowrap;
}

.carousel__controls { display: none; }
.carousel.is-ready .carousel__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-4);
  margin-top: var(--sp-3);
}
.carousel__dots { display: flex; align-items: center; gap: 0.45rem; }
.carousel__dot {
  position: relative;
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--rule-strong);
  cursor: pointer;
  overflow: hidden;
  transition: width 0.35s var(--ease), background-color 0.35s var(--ease);
}
.carousel__dot::after {           /* bigger, invisible tap target */
  content: "";
  position: absolute;
  inset: -0.6rem -0.25rem;
}
.carousel__dot:hover { background: var(--ink-low); }
.carousel__dot[aria-current="true"] { width: 1.6rem; background: var(--accent); }
/* while playing, the active dot fills up to show when the next figure comes */
.carousel.is-running .carousel__dot[aria-current="true"] {
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.carousel.is-running .carousel__dot[aria-current="true"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left center;
  animation: carousel-fill var(--carousel-delay, 6s) linear forwards;
}
@keyframes carousel-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.carousel__count {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  color: var(--ink-low);
}
.carousel__count b { font-weight: 600; color: var(--ink-hi); }
.carousel__buttons { display: flex; gap: 0.4rem; margin-left: auto; }
.carousel__btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-hi);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.carousel__btn:hover { border-color: var(--accent); color: var(--accent); }
.carousel__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.carousel__btn svg { width: 1rem; height: 1rem; }
.carousel__btn .icon-play { display: none; }
.carousel.is-paused .carousel__btn .icon-pause { display: none; }
.carousel.is-paused .carousel__btn .icon-play { display: block; }

/* narrow panel: drop the dots, the counter and buttons are enough */
@container (max-width: 340px) {
  .carousel__dots { flex: 1 0 100%; }
}
/* full-width panel on tablets: put the caption beside the figure */
@container (min-width: 560px) {
  .slide { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .slide__img { border-bottom: 0; border-right: 1px solid var(--rule); }
  .slide__img { aspect-ratio: 4 / 3; }
  .slide__cap { justify-content: center; padding: var(--sp-5); }
  .slide__paper { margin-top: var(--sp-2); }
}
@media (prefers-reduced-motion: reduce) {
  .carousel__dot { transition: none; }
}

/* Poster beside a symposium entry */
.poster {
  margin: 0;
  flex: none;
  width: min(100%, 15rem);
}
.poster img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--card);
  padding: 5px;
  box-shadow: var(--shadow-1);
}
.poster:has(img[data-failed]) { display: none; }

/* ---------- 8. Page-specific blocks -------------------------------------- */

/* Research thrust block */
.thrust + .thrust { margin-top: var(--sp-7); }
.thrust__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-2);
  border-bottom: 2px solid var(--accent);
}
.thrust__num {
  font-family: var(--font-ui);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.thrust__head h2 { margin: 0; font-size: var(--step-2); }
.thrust__body {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}
@media (max-width: 960px) { .thrust__body { grid-template-columns: 1fr; } }
.thrust__topics { columns: 2; column-gap: var(--sp-5); list-style: none; margin: 0; padding: 0; }
@media (max-width: 520px) { .thrust__topics { columns: 1; } }
.thrust__topics li {
  position: relative;
  padding-left: 1rem;
  font-size: var(--step--1);
  break-inside: avoid;
}
.thrust__topics li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.55;
}
/* On wide screens the slideshow stays in view while the faculty list scrolls past */
@media (min-width: 961px) {
  .thrust__sticky { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }
}

/* Each area's text: the paragraph ("blurb"), then the topic list with a thin rule above it */
.thrust__body p.muted { margin: 0; }
.thrust__body .thrust__topics {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule);
}

.thrust__side {
  border-left: 1px solid var(--rule);
  padding-left: var(--sp-5);
}
@media (max-width: 960px) {
  .thrust__side {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: var(--sp-4);
  }
}
.thrust__side h3 {
  font-family: var(--font-ui);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-low);
  margin-bottom: var(--sp-3);
}

/* Symposium entry */

.symposium {
  display: grid;
  grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  gap: var(--sp-5) clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}
.symposium + .symposium {
  margin-top: var(--sp-7);
  padding-top: var(--sp-7);
  border-top: 1px solid var(--rule);
}
.symposium__poster {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: var(--shadow-2);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.symposium__poster:hover { box-shadow: var(--shadow-3); transform: translateY(-2px); }
.symposium__poster img {
  width: 100%;
  max-height: 26rem;          /* tall portrait posters don't tower over the text */
  object-fit: contain;
  border-radius: 2px;
}
.symposium__poster:has(img[data-failed]) { display: none; }
.symposium:has(.symposium__poster img[data-failed]) { grid-template-columns: 1fr; }

.symposium__body { min-width: 0; padding-top: var(--sp-2); }
.symposium__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.symposium__dates {
  font-family: var(--font-ui);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon);
}
.symposium__title { font-size: var(--step-3); margin-bottom: var(--sp-3); }
.symposium__actions { margin-top: var(--sp-5); }

/* Open/close bars: the programme on the Conferences page (.symposium__schedule)
   and the calendar and roster on the Seminars page (.fold) */
.symposium__schedule { grid-column: 1 / -1; }
.fold { margin-top: var(--sp-4); }
:is(.symposium__schedule, .fold) > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--paper-2);
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-hi);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
:is(.symposium__schedule, .fold) > summary::-webkit-details-marker { display: none; }
:is(.symposium__schedule, .fold) > summary::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--maroon);
  border-bottom: 2px solid var(--maroon);
  transform: rotate(-45deg);
  transition: transform 0.2s var(--ease);
}
:is(.symposium__schedule, .fold)[open] > summary::before { transform: rotate(45deg); }
:is(.symposium__schedule, .fold) > summary:hover { background: var(--maroon-tint); border-color: var(--rule-strong); }
:is(.symposium__schedule, .fold)[open] > summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.symposium__summary-close,
.symposium__schedule[open] .symposium__summary-open,
.fold__close,
.fold[open] .fold__open { display: none; }
.symposium__schedule[open] .symposium__summary-close,
.fold[open] .fold__close { display: inline; }
:is(.symposium__schedule, .fold) .embed {
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.symposium__schedule .embed iframe { height: 34rem; }

@media (max-width: 760px) {
  .symposium { grid-template-columns: 1fr; }
  .symposium__poster { max-width: 22rem; }
  .symposium__schedule .embed iframe { height: 26rem; }
}
/* Funding logos row */
.funders { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.funder {
  padding: 0.5rem 0.9rem;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  color: var(--ink-mid);
}
/* when the real logo strip is present, the placeholders step aside */
.funders-block:has(.figure img:not([data-failed])) .funders { display: none; }

/* ---------- 9. Footer ----------------------------------------------------- */
.site-footer {
  margin-top: var(--sp-9);
  border-top: 3px double var(--rule-strong);
  background: var(--paper-2);
  padding-block: var(--sp-7) var(--sp-5);
  font-size: var(--step--1);
  color: var(--ink-mid);
}
.footer-grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(8rem, 1fr));
  margin-bottom: var(--sp-6);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h2 {
  font-family: var(--font-ui);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-hi);
  margin-bottom: var(--sp-3);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--ink-mid); text-decoration: none; }
.site-footer a:hover { color: var(--maroon); text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
  font-size: var(--step--2);
  color: var(--ink-low);
}

/* ---------- 10. Utilities ------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--ink-mid); }
.dim { color: var(--ink-low); }
.nowrap { white-space: nowrap; }
.is-hidden { display: none !important; }
.credit {
  font-family: var(--font-ui);
  font-size: var(--step--2);
  letter-spacing: 0.04em;
  color: var(--ink-low);
}

/* ---------- 11. Motion, print, a11y -------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  /* transition-delay: var(--reveal-delay, 0ms); */
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@keyframes slide-up-once {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
[data-reveal="once"],
.js [data-reveal="once"] {
  opacity: 1;
  transform: none;
  transition: none;
  animation: slide-up-once 0.5s var(--ease) 0.1s backwards;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal="once"],
  .js [data-reveal="once"] { animation: none; }
}

@media print {
  body { background: #fff; color: #000; font-size: 10.5pt; }
  body::before { display: none; }
  .site-header, .site-footer, .subnav, .nav-toggle, .skip-link, .hero__art,
  .banner, .embed { display: none !important; }
  .section, .section--tight { padding-block: 0.6rem !important; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #444; }
  .card, .figure, .poster img, .person__avatar {
    border: 1px solid #bbb !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .person, .timeline > li, .alumni li, .thrust { break-inside: avoid; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
