@charset "utf-8";
/* ==========================================================================
   WeatherFLOW — Honours Project website
   University of Cape Town, Department of Computer Science, 2026
   Hand-written stylesheet. No frameworks, no external requests.
   ========================================================================== */

/* --------------------------------------------------------------- fonts -- */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-normal-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-normal-400-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-italic-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-italic-400-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-normal-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-normal-400-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------- tokens -- */
:root {
  --serif: "Source Serif 4", ui-serif, Georgia, "Iowan Old Style", Palatino, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --paper: #ffffff;
  --paper-2: #f7f9fb;
  --paper-3: #eef2f6;
  --ink: #0b1220;
  --ink-2: #4a5768;
  --ink-3: #7b8899;
  --rule: #e7ecf1;
  --rule-2: #d3dae3;

  --accent: #0d6e8c;
  --accent-ink: #084d63;
  --accent-bright: #22a5c8;
  --accent-wash: #ecf7fa;

  /* workstream identities — matched to the colours used in the papers */
  --ct: #7340a8;         --ct-wash: #f4eefb;
  --diff: #1d6fb8;       --diff-wash: #e9f2fb;
  --light: #b06a10;      --light-wash: #fbf1e0;
  --base: #0f766e;       --base-wash: #e6f4f2;

  --measure: 68ch;
  --wide: 1200px;
  --radius: 10px;
  --radius-sm: 6px;

  --sh-1: 0 1px 2px rgba(11, 18, 32, .04);
  --sh-2: 0 1px 2px rgba(11, 18, 32, .04), 0 8px 24px -14px rgba(11, 18, 32, .18);
  --sh-3: 0 2px 4px rgba(11, 18, 32, .05), 0 18px 44px -20px rgba(11, 18, 32, .26);

  --ease: cubic-bezier(.22, .75, .25, 1);
  --fast: .18s var(--ease);
  --med: .32s var(--ease);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0425rem;
  line-height: 1.68;
  letter-spacing: -0.003em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -0.021em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 1.5rem + 3.3vw, 4rem); font-weight: 700; letter-spacing: -0.032em; }
h2 { font-size: clamp(1.65rem, 1.3rem + 1.5vw, 2.3rem); margin-top: 0; }
h3 { font-size: 1.3rem; letter-spacing: -0.016em; }
h4 {
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  letter-spacing: -0.005em; margin: 0 0 .5em; line-height: 1.4;
}

p, ul, ol, dl { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .4em; }
li::marker { color: var(--accent); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transition: color var(--fast), text-decoration-color var(--fast);
}
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

strong { font-weight: 600; color: var(--ink); }
em { font-family: var(--serif); font-style: italic; font-size: 1.04em; }
abbr[title] { text-decoration: underline dotted; cursor: help; }
code, kbd, samp { font-family: var(--mono); font-size: .86em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
img { max-width: 100%; height: auto; }
::selection { background: color-mix(in srgb, var(--accent-bright) 26%, transparent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 100;
  background: var(--accent); color: #fff; padding: .65rem 1.1rem;
  border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500;
  text-decoration: none; transition: top var(--fast);
}
.skip-link:focus { top: .5rem; color: #fff; }

/* --------------------------------------------------------------- layout -- */
.wrap {
  width: 100%; max-width: var(--wide); margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.75rem);
}
.prose { max-width: var(--measure); }
.prose-wide { max-width: 86ch; }

section { padding-block: clamp(3rem, 6.5vw, 5.5rem); position: relative; }
section + section { border-top: 1px solid var(--rule); }
.band { background: var(--paper-2); }

.lede { font-size: 1.22rem; line-height: 1.6; color: var(--ink-2); }

.eyebrow {
  font-size: .715rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  margin: 0 0 1rem; font-variant-numeric: lining-nums tabular-nums;
  display: flex; align-items: center; gap: .6rem;
}
.eyebrow::after {
  content: ""; flex: 0 0 auto; width: 1.6rem; height: 1px;
  background: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* ------------------------------------------------------------------ nav -- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(1.8) blur(14px);
  -webkit-backdrop-filter: saturate(1.8) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--med), box-shadow var(--med), background var(--med);
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--paper); } }
.site-header.stuck {
  border-bottom-color: var(--rule);
  box-shadow: 0 1px 24px -12px rgba(11, 18, 32, .3);
}

.site-header .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 3.75rem; flex-wrap: wrap;
}

.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: transform .08s linear;
}

.brand {
  font-weight: 600; font-size: .95rem; letter-spacing: -.018em;
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: .55rem; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand .mark { color: var(--accent); display: inline-flex; transition: transform var(--med); }
.brand:hover .mark { transform: rotate(-12deg) scale(1.08); }
.brand .sub { color: var(--ink-3); font-weight: 400; font-size: .82rem; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .1rem .35rem;
}
.site-nav li { margin: 0; }
.site-nav a {
  position: relative; font-size: .875rem; color: var(--ink-2);
  text-decoration: none; padding: .45rem .6rem; display: inline-block;
  border-radius: var(--radius-sm); transition: color var(--fast), background var(--fast);
}
.site-nav a::after {
  content: ""; position: absolute; left: .6rem; right: .6rem; bottom: .18rem;
  height: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: 50%; transition: transform var(--med);
}
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a:hover::after { transform: scaleX(.5); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ----------------------------------------------------------------- hero -- */
.hero {
  padding-block: clamp(3.25rem, 7vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto 30%; height: 150%;
  background:
    radial-gradient(44% 46% at 72% 32%, rgba(34, 165, 200, .13), transparent 70%),
    radial-gradient(38% 40% at 94% 60%, rgba(13, 110, 140, .11), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero > .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: .3em; }
.hero .tagline {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem);
  color: var(--ink-2); max-width: 34ch; margin-bottom: 1.7rem; line-height: 1.45;
}
.hero-art { position: relative; }
.hero-art img { display: block; width: 100%; height: auto; }
@media (max-width: 880px) { .hero-art { max-width: 460px; margin-inline: auto; } }

.byline { font-size: .93rem; color: var(--ink-2); margin-bottom: .45rem; line-height: 1.8; }
.byline a { color: var(--ink); text-decoration-color: var(--rule-2); font-weight: 500; }
.byline a:hover { color: var(--accent-ink); }
.byline .sep { color: var(--ink-3); margin-inline: .45rem; }
.affil { font-size: .85rem; color: var(--ink-3); margin-bottom: 1.9rem; }

/* --------------------------------------------------------------- chiclets */
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.3rem; padding: 0; list-style: none; }
.pill-row li { margin: 0; }

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .875rem; font-weight: 500;
  padding: .55rem .85rem; border-radius: 100px;
  border: 1px solid var(--rule-2); color: var(--ink);
  background: var(--paper); text-decoration: none; box-shadow: var(--sh-1);
  transition: transform var(--fast), box-shadow var(--fast),
              border-color var(--fast), background var(--fast), color var(--fast);
}
.pill:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-wash); color: var(--accent-ink);
  transform: translateY(-2px); box-shadow: var(--sh-2);
}
.pill:active { transform: translateY(0); }
.pill svg { width: 15px; height: 15px; flex: none; transition: transform var(--med); }
.pill:hover svg { transform: translateX(2px); }
.pill.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-ink));
  border-color: transparent; color: #fff;
  box-shadow: 0 1px 2px rgba(11,18,32,.1), 0 10px 24px -12px rgba(13,110,140,.7);
}
.pill.primary:hover {
  color: #fff; background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow: 0 2px 4px rgba(11,18,32,.12), 0 16px 32px -12px rgba(13,110,140,.8);
}

.tag {
  display: inline-block; font-size: .685rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; padding: .26rem .55rem;
  border-radius: 100px; background: var(--paper-3); color: var(--ink-2);
  font-variant-numeric: lining-nums;
}
.tag.ct    { background: var(--ct-wash);    color: var(--ct); }
.tag.diff  { background: var(--diff-wash);  color: var(--diff); }
.tag.light { background: var(--light-wash); color: var(--light); }
.tag.base  { background: var(--base-wash);  color: var(--base); }

/* ---------------------------------------------------------------- stats -- */
.stat-row {
  display: grid; gap: 1px; margin: 2.25rem 0 0;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  background: var(--rule); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--sh-1);
}
.stat { background: var(--paper); padding: 1.15rem 1.25rem; transition: background var(--fast); }
.stat:hover { background: var(--accent-wash); }
.stat .n {
  display: block; font-family: var(--serif); font-size: 1.95rem; font-weight: 600;
  line-height: 1.05; letter-spacing: -.028em;
  font-variant-numeric: lining-nums tabular-nums;
  background: linear-gradient(135deg, var(--ink) 30%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .l { display: block; font-size: .775rem; color: var(--ink-3); margin-top: .35rem; line-height: 1.4; }

/* ---------------------------------------------------------------- cards -- */
.grid { display: grid; gap: 1.35rem; }
/* min() caps the track minimum at the container width, so on a viewport
   narrower than the minimum (a 320px phone) the column collapses to fit
   instead of forcing the whole page to scroll sideways. */
.grid.two   { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(265px, 100%), 1fr)); }

.card {
  position: relative; background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.5rem 1.6rem; display: flex; flex-direction: column;
  box-shadow: var(--sh-1);
  transition: transform var(--med), box-shadow var(--med), border-color var(--med);
}
.card:hover {
  transform: translateY(-4px); box-shadow: var(--sh-3);
  border-color: var(--rule-2);
}
.card h3 { margin-bottom: .45rem; font-size: 1.2rem; }
.card p:last-child { margin-bottom: 0; }
.card .more { margin-top: auto; padding-top: 1rem; font-size: .875rem; font-weight: 500; }
.card .more a { text-decoration: none; }
.card .more a::after { content: ""; }
.card:hover .more a { text-decoration: underline; }

.card.work { overflow: hidden; }
.card.work::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--rule-2); transform: scaleX(1); transform-origin: 0 50%;
}
.card.work.ct::before    { background: linear-gradient(90deg, var(--ct), color-mix(in srgb, var(--ct) 45%, #fff)); }
.card.work.diff::before  { background: linear-gradient(90deg, var(--diff), color-mix(in srgb, var(--diff) 45%, #fff)); }
.card.work.light::before { background: linear-gradient(90deg, var(--light), color-mix(in srgb, var(--light) 45%, #fff)); }

.card .who { font-size: .825rem; color: var(--ink-3); margin: -.25rem 0 .85rem; }
.card .models {
  font-family: var(--mono); font-size: .775rem; color: var(--accent);
  margin: 0 0 .9rem; letter-spacing: -.01em; font-weight: 500;
}

/* ------------------------------------------------------------- findings -- */
.finding {
  position: relative; background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.3rem 1.5rem 1.35rem; margin: 1.5rem 0;
  box-shadow: var(--sh-1);
  transition: transform var(--med), box-shadow var(--med);
}
.finding::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
}
.finding:hover { transform: translateX(3px); box-shadow: var(--sh-2); }
.finding p:last-child { margin-bottom: 0; }
.finding .eyebrow { margin-bottom: .55rem; }

.note {
  border: 1px solid var(--rule); border-left: 3px solid var(--rule-2);
  background: var(--paper-2); padding: 1.05rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .945rem; color: var(--ink-2); margin: 1.8rem 0;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--ink); }

/* --------------------------------------------------------------- tables -- */
.table-scroll {
  overflow-x: auto; margin: 1.75rem 0;
  border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--sh-1); background: var(--paper);
}
table { border-collapse: collapse; width: 100%; font-size: .885rem; }
caption {
  caption-side: top; text-align: left; padding: 1rem 1.15rem .5rem;
  font-size: .85rem; color: var(--ink-2); line-height: 1.55;
}
caption b { color: var(--ink); font-weight: 600; }
th, td { padding: .6rem .9rem; text-align: right; border-bottom: 1px solid var(--rule); }
th:first-child, td:first-child { text-align: left; }
thead th {
  font-size: .715rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); border-bottom: 1px solid var(--rule-2); white-space: nowrap;
  background: var(--paper-2);
}
tbody th { font-weight: 500; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td { font-variant-numeric: lining-nums tabular-nums; }
td.best { font-weight: 600; color: var(--accent-ink); }
tr.baseline th, tr.baseline td { color: var(--ink-3); font-style: italic; }
tbody tr { transition: background var(--fast); }
tbody tr:hover { background: var(--accent-wash); }
/* Tables whose cells are prose rather than figures read left-aligned. */
.t-text th, .t-text td { text-align: left; }

tbody.group-head th {
  background: var(--paper-3); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .09em; color: var(--ink-2); font-weight: 600;
}
tbody.group-head tr:hover { background: var(--paper-3); }

/* -------------------------------------------------------------- figures -- */
figure { margin: 2.25rem 0; }
/* Every figure PNG carries real width/height attributes (set at extraction
   time), so leaving CSS width unset renders each one at its native pixel
   size — crisp, and never larger than the source. max-width still shrinks
   it to fit a narrow viewport or a grid column; nothing here stretches a
   small source image up to fill a wide desktop column the way `width:100%`
   used to. */
figure img {
  display: block; max-width: 100%; height: auto; margin-inline: auto;
  background: #fff;
  border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--sh-1); transition: box-shadow var(--med), transform var(--med);
}
figure:hover img { box-shadow: var(--sh-2); }
figcaption {
  max-width: 52rem; margin: .85rem auto 0;
  font-size: .855rem; line-height: 1.6; color: var(--ink-2);
}
figcaption b { color: var(--ink); font-weight: 600; }
figcaption .src { display: block; margin-top: .35rem; color: var(--ink-3); font-size: .79rem; }

/* ------------------------------------------------------------ documents -- */
.doclist { list-style: none; margin: 1.3rem 0; padding: 0; border-top: 1px solid var(--rule); }
.doclist li { margin: 0; border-bottom: 1px solid var(--rule); }
.doclist a {
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  padding: 1rem .9rem; text-decoration: none; color: var(--ink);
  border-radius: var(--radius-sm);
  transition: background var(--fast), padding-left var(--fast);
}
.doclist a:hover { background: var(--accent-wash); color: var(--accent-ink); padding-left: 1.35rem; }
.doclist .t { font-weight: 600; font-size: 1rem; }
.doclist a:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.doclist .d { font-size: .86rem; color: var(--ink-3); flex: 1 1 14rem; }
.doclist .meta {
  font-size: .7rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
  font-variant-numeric: lining-nums; padding: .22rem .5rem;
  background: var(--paper-3); border-radius: 100px;
}
.doclist a:hover .meta { background: #fff; color: var(--accent); }

/* ---------------------------------------------------------------- people */
.people {
  list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}
.people li {
  margin: 0; padding: 1.2rem 1.3rem; border: 1px solid var(--rule);
  border-radius: var(--radius); background: var(--paper); box-shadow: var(--sh-1);
  transition: transform var(--med), box-shadow var(--med);
}
.people li:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.people .nm { font-weight: 600; font-size: 1.05rem; display: block; letter-spacing: -.012em; }
.people .rl { font-size: .82rem; color: var(--ink-3); display: block; margin-top: .2rem; }
.people .em { font-family: var(--mono); font-size: .76rem; display: block; margin-top: .6rem; word-break: break-all; }

/* --------------------------------------------------------------- bibtex -- */
details.bib {
  margin: 1.5rem 0; border: 1px solid var(--rule);
  border-radius: var(--radius); background: var(--paper-2); overflow: hidden;
}
details.bib summary {
  cursor: pointer; padding: .9rem 1.15rem; font-size: .875rem;
  font-weight: 500; color: var(--ink-2); transition: background var(--fast), color var(--fast);
}
details.bib summary:hover { color: var(--ink); background: var(--paper-3); }
details.bib[open] summary { border-bottom: 1px solid var(--rule); }
details.bib pre {
  margin: 0; padding: 1.1rem 1.15rem; overflow-x: auto; background: var(--paper);
  font-size: .79rem; line-height: 1.65; color: var(--ink-2);
}

/* ----------------------------------------------------------- page intro -- */
.page-head {
  padding-block: clamp(2.5rem, 5.5vw, 4rem) clamp(1.5rem, 3vw, 2.25rem);
  position: relative; overflow: hidden;
}
.page-head::before {
  content: ""; position: absolute; inset: -60% -20% auto 45%; height: 170%;
  background: radial-gradient(40% 42% at 70% 40%, rgba(34, 165, 200, .10), transparent 70%);
  pointer-events: none;
}
.page-head > .wrap { position: relative; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); }
.page-head .tagline {
  font-family: var(--serif); font-size: 1.2rem; color: var(--ink-2);
  max-width: 60ch; margin-bottom: 0; line-height: 1.5;
}

/* ------------------------------------------------------------------- toc */
.toc {
  font-size: .875rem; margin: 2rem 0 0; padding: 1.1rem 1.3rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--sh-1); max-width: 34rem;
}
.toc p {
  font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 .7rem;
}
.toc ol { margin: 0; padding-left: 1.25em; }
.toc li { margin-bottom: .34em; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent-ink); text-decoration: underline; }

/* ----------------------------------------------------------------- misc -- */
.next-prev {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .9rem; font-weight: 500; margin-top: 2rem;
  padding-top: 1.5rem; border-top: 1px solid var(--rule);
}
.next-prev a { text-decoration: none; }
.next-prev a:hover { text-decoration: underline; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.4rem; font-size: .95rem; }
dl.kv dt {
  font-size: .72rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3); padding-top: .3rem;
}
dl.kv dd { margin: 0; }
@media (max-width: 560px) { dl.kv { grid-template-columns: 1fr; gap: .1rem .5rem; } dl.kv dd { margin-bottom: .7rem; } }

/* --------------------------------------------------------------- footer -- */
.site-footer {
  border-top: 1px solid var(--rule); background: var(--paper-2);
  padding-block: 3rem 3.25rem; font-size: .875rem; color: var(--ink-2);
}
.site-footer .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }
.site-footer h2 {
  font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .8rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .42rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent-ink); text-decoration: underline; }
.colophon {
  margin-top: 2.25rem; padding-top: 1.4rem; border-top: 1px solid var(--rule);
  font-size: .8rem; color: var(--ink-3);
}
.colophon p { margin-bottom: .4rem; }

/* ----------------------------------------------------------- animations -- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Hero intro — runs on load, no JS needed. */
.hero .eyebrow,
.hero h1,
.hero .tagline,
.hero .byline,
.hero .affil,
.hero .pill-row,
.hero .stat-row { animation: rise .75s var(--ease) both; }
.hero h1        { animation-delay: .05s; }
.hero .tagline  { animation-delay: .12s; }
.hero .byline   { animation-delay: .18s; }
.hero .affil    { animation-delay: .22s; }
.hero .pill-row { animation-delay: .27s; }
.hero .stat-row { animation-delay: .34s; }
.hero-art       { animation: fade 1.3s var(--ease) .15s both; }

/* Page-head intro — above the fold, so it runs on load like the hero. */
.page-head .eyebrow,
.page-head h1,
.page-head .tagline,
.page-head .pill-row,
.page-head .toc { animation: rise .7s var(--ease) both; }
.page-head h1        { animation-delay: .05s; }
.page-head .tagline  { animation-delay: .12s; }
.page-head .pill-row { animation-delay: .18s; }
.page-head .toc      { animation-delay: .24s; }

/* Scroll reveal — armed only when JS is present, so content is never
   hidden if scripting is unavailable. */
/* The structural part sits in :where() so it contributes no specificity:
   the whole rule weighs exactly one class (.js), which lets the plain
   `.in` rule below out-rank it. With :is() here instead, the hiding rule
   outweighed `.in` and revealed content stayed invisible. */
.js :where(section:not(.hero):not(.page-head) > .wrap)
  > :where(h2, h3, p, .eyebrow, .prose, .grid, figure, .table-scroll, .note,
           .doclist, .people, .stat-row, details.bib, dl.kv, .next-prev),
.js :where(section:not(.hero):not(.page-head) > .wrap > .prose-wide)
  > :where(h2, h3, p, .finding, .note, .next-prev) {
  opacity: 0;
  transform: translateY(20px);
}
.js .in {
  opacity: 1;
  transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--rd, 0s);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Zero the delay as well as the duration: a delayed animation with
     fill-mode both would otherwise hold its element invisible for the
     length of the delay, which is exactly what reduced motion must avoid. */
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js section .wrap *, .js .prose-wide > * { opacity: 1 !important; transform: none !important; }
}

/* ----------------------------------------------------------------- print */
@media print {
  .site-header, .site-footer, .skip-link, .toc, .hero-art, .next-prev { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  section { padding-block: 1rem; border: 0; }
  .hero::before, .page-head::before { display: none; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
  figure, table, .card, .finding { break-inside: avoid; box-shadow: none; }
  * { animation: none !important; opacity: 1 !important; transform: none !important; }
  .js section > .wrap > *, .js .prose-wide > * { opacity: 1 !important; transform: none !important; }
}
