/* ==========================================================================
   Kapil Kumar Meena, Ph.D.
   Design system: warm paper, near-black ink, two functional accent colours
   that carry meaning — orange for exposure/pollution, teal for clean/green
   routing. Type: Instrument Serif (the name), Instrument Sans (structure),
   Newsreader (voice), DM Mono (data).
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
  color-scheme: light;

  --paper:      #fcfcfa;
  --paper-2:    #f4f3ef;
  --card:       #ffffff;
  --ink:        #0e0e10;
  --ink-2:      #3d3e46;
  --muted:      #74767f;
  --faint:      #83858d;
  --line:       #e4e2dc;
  --line-2:     #eeede9;

  /* Elevation is almost absent by design; these are the only two allowed. */
  --lift:    0 1px 2px rgba(14, 14, 16, 0.04), 0 6px 18px -8px rgba(14, 14, 16, 0.10);
  --lift-lg: 0 2px 4px rgba(14, 14, 16, 0.05), 0 20px 45px -18px rgba(14, 14, 16, 0.20);

  /* One colour per research area — used on facet dots, group headings and
     keyword highlights, never as decoration. */
  --c-behaviour: #3b3f9e;   /* travel behaviour & choice modelling */
  --c-exposure:  #d8430e;   /* air quality & exposure               */
  --c-learning:  #c2255c;   /* machine learning & prediction        */
  --c-active:    #0e7c66;   /* active mobility & accessibility      */
  --c-routing:   #9a6a00;   /* routing & decision tools             */

  --t-behaviour: #eeeefb;
  --t-exposure:  #fdf0ea;
  --t-learning:  #fdeef4;
  --t-active:    #e8f4f1;
  --t-routing:   #faf3e4;

  /* Legacy aliases kept so the figures keep their meaning */
  --exposure:      var(--c-exposure);
  --exposure-tint: var(--t-exposure);
  --clean:         var(--c-active);
  --clean-tint:    var(--t-active);
  --hindu:         #c8102e;

  --accent:      #c2255c;   /* the primary interface accent */
  --accent-tint: var(--t-learning);
  --accent-ring: rgba(194, 37, 92, 0.22);

  --display: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono:  "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap:   1240px;
  --gutter: clamp(1.15rem, 4vw, 3.25rem);
  /* Distance from the content edge out to the viewport edge — lets an element
     inside .wrap bleed past the centred column. */
  --bleed:  calc(max(0px, (100vw - var(--wrap)) / 2) + var(--gutter));
  --head-h: 62px;
  --top:    3px;              /* the spectrum rule above the header */
  --r:      4px;              /* deliberately small — sharp, not bubbly */
  --r-lg:   10px;

  --ease: cubic-bezier(0.22, 0.68, 0.16, 1);
  --t:    200ms;
  --t-2:  480ms;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --paper:      #0b0b0d;
  --paper-2:    #121215;
  --card:       #141418;
  --ink:        #f3f2ef;
  --ink-2:      #c6c6cd;
  --muted:      #92939c;
  --faint:      #6b6c74;
  --line:       #27272e;
  --line-2:     #1c1c21;

  --lift:    0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px -8px rgba(0, 0, 0, 0.5);
  --lift-lg: 0 2px 4px rgba(0, 0, 0, 0.35), 0 20px 45px -18px rgba(0, 0, 0, 0.7);

  --c-behaviour: #9298ff;
  --c-exposure:  #ff7a45;
  --c-learning:  #ff87b0;
  --c-active:    #3ac9a0;
  --c-routing:   #e0a94a;

  --t-behaviour: #15162b;
  --t-exposure:  #26170f;
  --t-learning:  #2a1520;
  --t-active:    #0e2420;
  --t-routing:   #241c0e;

  --exposure:      var(--c-exposure);
  --exposure-tint: var(--t-exposure);
  --clean:         var(--c-active);
  --clean-tint:    var(--t-active);
  --hindu:         #ff5a6e;

  --accent:      #ff87b0;
  --accent-tint: var(--t-learning);
  --accent-ring: rgba(255, 135, 176, 0.26);
}

/* --- Reset -------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  /* Anchor jumps land below the fixed header rather than under it. */
  scroll-padding-top: calc(var(--head-h) + var(--top) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--t-2) var(--ease), color var(--t-2) var(--ease);
}

img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: var(--accent); color: #fff; }

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

/* Touch: no blue flash on tap, and hover effects are reserved for devices that
   can actually hover — on a phone a :hover state sticks after the tap. */
a, button, label, summary, select, input { -webkit-tap-highlight-color: transparent; }
@media (hover: none) {
  .btn:hover, .iconbtn:hover, .lnk:hover, .work:hover, .stop:hover { transition: none; }
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--line); border: 3px solid var(--paper-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

/* --- Type utilities ----------------------------------------------------- */

.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.prose {
  font-family: var(--serif);
  text-wrap: pretty;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.66;
  color: var(--ink-2);
  letter-spacing: -0.003em;
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }
.prose a {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--accent);
  transition: box-shadow var(--t) var(--ease), color var(--t) var(--ease);
}
.prose a:hover { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

/* Keyword highlight — a tinted ground behind the terms that matter. The tint
   is spread with a shadow rather than padding, so it never widens the inline
   box: a comma or full stop after the phrase still sits tight against it. */
.hl {
  --hl: var(--t-learning);
  background: var(--hl);
  box-shadow: 0 0 0 0.16em var(--hl);
  color: var(--ink);
  font-weight: 550;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hl--behaviour { --hl: var(--t-behaviour); }
.hl--exposure  { --hl: var(--t-exposure); }
.hl--learning  { --hl: var(--t-learning); }
.hl--active    { --hl: var(--t-active); }
.hl--routing   { --hl: var(--t-routing); }

/* --- Layout ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.sec {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  position: relative;
  scroll-margin-top: calc(var(--head-h) + var(--top));
}
.sec--tint { background: var(--paper-2); }

/* Section masthead: an oversized index numeral beside a tight title. */
.masthead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
  margin-bottom: clamp(2rem, 4.5vw, 3.5rem);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.masthead .idx {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 0.85;
  color: var(--line);
  letter-spacing: -0.04em;
  user-select: none;
}
html[data-theme="dark"] .masthead .idx { color: var(--line); }
.masthead h2 { font-size: clamp(1.9rem, 4.6vw, 3.25rem); text-wrap: balance; }
.masthead .eyebrow {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.7rem;
}
.masthead .dek {
  text-wrap: pretty;
  margin-top: 0.9rem;
  max-width: 58ch;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--muted);
  line-height: 1.6;
}
.masthead .side { grid-column: 2; margin-top: 1.25rem; }

/* On a phone the section number is a caption above the heading, not a column
   beside it — a 390 px screen cannot spare 80 px of left margin. */
@media (max-width: 700px) {
  .masthead { grid-template-columns: minmax(0, 1fr); gap: 0.45rem; }
  .masthead .idx {
    font-size: 0.6875rem;
    line-height: 1;
    letter-spacing: 0.18em;
    color: var(--faint);
  }
  .masthead .side { grid-column: 1; }
}

/* --- Controls ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 0.9rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease),
              border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--fill { background: var(--ink); color: var(--paper); }
.btn--fill:hover { background: var(--accent); color: #fff; box-shadow: var(--lift); }
/* Transparent, not carded — this sits on the inverted contact band too, where
   any opaque fill would erase the label. */
.btn--line { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--line:hover { border-color: var(--ink); background: var(--card); }
.btn--sm { min-height: 36px; padding: 0 0.9rem; font-size: 0.8125rem; }

.lnk {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color var(--t) var(--ease), gap var(--t) var(--ease);
}
.lnk:hover { color: var(--accent); gap: 0.6rem; }
.lnk svg { width: 13px; height: 13px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--card);
  white-space: nowrap;
  max-width: 100%;
}
@media (max-width: 620px) {
  .chip { white-space: normal; }
}
.chip--exp   { color: var(--exposure); border-color: var(--accent-ring); background: var(--exposure-tint); }
.chip--clean { color: var(--clean); border-color: transparent; background: var(--clean-tint); }
.chip--solid { color: var(--paper); background: var(--ink); border-color: var(--ink); }

/* --- Header ------------------------------------------------------------- */

.skip {
  position: fixed; top: 0; left: 50%;
  transform: translate(-50%, -110%);
  z-index: 300;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1.2rem; font-size: 0.85rem;
}
.skip:focus { transform: translate(-50%, 0); }

/* A 3 px rule across the top of every page, in the five research-area hues in
   their fixed order. It is the site's signature, and it is also a legend: the
   same five colours run through the facets, the group headings and the tags. */
.spectrum {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 101;
  height: 3px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  pointer-events: none;
}
.spectrum i:nth-child(1) { background: var(--c-behaviour); }
.spectrum i:nth-child(2) { background: var(--c-exposure); }
.spectrum i:nth-child(3) { background: var(--c-learning); }
.spectrum i:nth-child(4) { background: var(--c-active); }
.spectrum i:nth-child(5) { background: var(--c-routing); }

.head {
  position: fixed;
  inset: 3px 0 auto 0;
  z-index: 100;
  height: var(--head-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background-color var(--t-2) var(--ease), border-color var(--t-2) var(--ease);
  border-bottom: 1px solid transparent;
}
.head.stuck {
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom-color: var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
  .head.stuck { background: var(--paper); }
}

.head-in { display: flex; align-items: center; gap: 1.25rem; width: 100%; }

/* The bar holds a name, seven nav items, search, the theme toggle and the CV
   button inside a 1240 px column. That is already full, so the wordmark is the
   name and nothing else — the affiliation is two lines below it in the hero,
   and again in the ticker, the contact block and the footer.
   overflow: hidden is the structural guard: if anything is ever added back,
   it truncates instead of painting over the nav. */
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-right: auto;
  min-width: 0;
  overflow: hidden;
}
.wordmark .nm {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav { display: flex; align-items: center; gap: 0.1rem; flex: none; }
.nav > a {
  position: relative;
  padding: 0.45rem 0.7rem;
  font-size: 0.8375rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--t) var(--ease);
}
.nav > a::after {
  content: "";
  position: absolute;
  left: 0.7rem; right: 0.7rem; bottom: 0.28rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.nav > a:hover { color: var(--ink); }
.nav > a:hover::after, .nav > a.on::after { transform: scaleX(1); }
.nav > a.on { color: var(--ink); }

.head-act { display: flex; align-items: center; gap: 0.45rem; }

.iconbtn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.iconbtn:hover { border-color: var(--ink); background: var(--card); }
.iconbtn svg { width: 16px; height: 16px; }
.themebtn .moon { display: none; }
html[data-theme="dark"] .themebtn .sun { display: none; }
html[data-theme="dark"] .themebtn .moon { display: block; }
.menubtn { display: none; }

.rail { position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; pointer-events: none; }
.rail i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 90ms linear; }

.nav-act { display: none; }

@media (max-width: 1080px) {
  .nav {
    position: fixed;
    inset: calc(var(--head-h) + var(--top)) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem var(--gutter) calc(1.75rem + env(safe-area-inset-bottom));
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--lift-lg);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t);
    max-height: calc(100dvh - var(--head-h) - var(--top));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav > a {
    display: flex;
    align-items: baseline;
    padding: 0.95rem 0.15rem;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--ink);
    border-bottom: 1px solid var(--line-2);
  }
  .nav > a::after { display: none; }
  .nav > a.on { color: var(--accent); }
  .nav > a .n {
    font-family: var(--mono);
    font-size: 0.625rem;
    color: var(--faint);
    width: 2.1rem;
    flex: none;
    letter-spacing: 0.1em;
  }
  .nav > a.on .n { color: var(--accent); }

  /* Each link fades in a beat after the one above it, so the panel resolves
     rather than snapping. */
  .nav.open > a { animation: navin 260ms var(--ease) backwards; }
  .nav.open > a:nth-child(1) { animation-delay: 20ms; }
  .nav.open > a:nth-child(2) { animation-delay: 45ms; }
  .nav.open > a:nth-child(3) { animation-delay: 70ms; }
  .nav.open > a:nth-child(4) { animation-delay: 95ms; }
  .nav.open > a:nth-child(5) { animation-delay: 120ms; }
  .nav.open > a:nth-child(6) { animation-delay: 145ms; }
  .nav.open > a:nth-child(7) { animation-delay: 170ms; }
  .nav.open .nav-act { animation: navin 260ms var(--ease) 195ms backwards; }

  .nav-act { display: flex; gap: 0.6rem; margin-top: 1.5rem; }
  .nav-act .btn { flex: 1; min-height: 50px; }

  /* With the panel down, the bar above it must be solid — a frosted header
     over an opaque menu reads as a rendering glitch. */
  .head:has(.nav.open) { background: var(--paper); border-bottom-color: transparent; }

  .menubtn { display: grid; }
  .head-cv { display: none; }
}
@keyframes navin { from { opacity: 0; transform: translateY(9px); } }

.nav > a .n { display: none; }
@media (max-width: 1080px) { .nav > a .n { display: inline; } }

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(var(--head-h) + var(--top) + clamp(2rem, 5vw, 4.25rem));
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
}

.hero-kick {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 clamp(1rem, 2.5vw, 1.5rem);
  flex-wrap: wrap;
}
.hero-kick b { color: var(--ink); font-weight: 500; }
.beacon {
  position: relative;
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clean);
  flex: none;
  margin-right: 0.6rem;
  vertical-align: 0.12em;
}
.beacon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit;
  animation: beacon 2.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes beacon { 0% { transform: scale(1); opacity: 0.65; } 75%, 100% { transform: scale(3.2); opacity: 0; } }

/* The name is the masthead: one line, full measure, display serif. */
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.85rem, 8.1vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 .deg {
  font-style: italic;
  font-size: 0.42em;
  letter-spacing: -0.01em;
  color: var(--muted);
  white-space: nowrap;
}

.hero-title {
  margin: clamp(1rem, 2.4vw, 1.5rem) 0 0;
  padding-top: clamp(1rem, 2.4vw, 1.5rem);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.1rem;
  font-size: clamp(0.95rem, 1.35vw, 1.1rem);
  color: var(--ink);
  letter-spacing: -0.012em;
}
.hero-title .role { font-weight: 600; }
.hero-title .at { color: var(--muted); }
.hero-title .at a { box-shadow: inset 0 -1px 0 var(--accent-ring); transition: box-shadow var(--t) var(--ease), color var(--t) var(--ease); }
.hero-title .at a:hover { color: var(--accent); box-shadow: inset 0 -1px 0 var(--accent); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(1.75rem, 4.5vw, 4rem);
  align-items: start;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
}

.hero-bio p {
  font-family: var(--serif);
  text-wrap: pretty;
  font-size: clamp(1.02rem, 1.28vw, 1.15rem);
  line-height: 1.66;
  color: var(--ink-2);
  letter-spacing: -0.003em;
  max-width: 62ch;
}
.hero-bio p + p { margin-top: 0.9em; }

/* Research interests. Tagged rather than written out, and coloured with the
   same five hues the publications explorer uses, so one hue means one area
   wherever it appears. */
.interests { margin: clamp(1.25rem, 2.6vw, 1.7rem) 0; max-width: 62ch; }
.hero-bio .interests-lbl {
  font-family: var(--mono);
  font-size: 0.6563rem;
  line-height: 1;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.7rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--r);
  background: var(--tag-tint);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: -0.004em;
}
.tag::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tag-hue);
}
.tag--behaviour { --tag-hue: var(--c-behaviour); --tag-tint: var(--t-behaviour); }
.tag--exposure  { --tag-hue: var(--c-exposure);  --tag-tint: var(--t-exposure); }
.tag--learning  { --tag-hue: var(--c-learning);  --tag-tint: var(--t-learning); }
.tag--active    { --tag-hue: var(--c-active);    --tag-tint: var(--t-active); }
.tag--routing   { --tag-hue: var(--c-routing);   --tag-tint: var(--t-routing); }
.hero-lineage {
  margin-top: 1.4rem !important;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans) !important;
  font-size: 0.8438rem !important;
  line-height: 1.6 !important;
  color: var(--muted) !important;
}
.hero-lineage strong { color: var(--ink); font-weight: 600; }
.hero-bio strong { color: var(--ink); font-weight: 600; }
.hero-bio em { font-style: italic; }
.hero-bio a {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--accent);
  transition: box-shadow var(--t) var(--ease), color var(--t) var(--ease);
}
.hero-bio a:hover { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

.hero-meta {
  display: grid;
  gap: 0.5rem;
  margin: clamp(1.5rem, 3vw, 2rem) 0;
  padding-top: clamp(1.25rem, 2.5vw, 1.6rem);
  border-top: 1px solid var(--line-2);
}
.hero-meta div { display: flex; gap: 0.9rem; align-items: baseline; font-size: 0.875rem; }
.hero-meta dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  width: 66px;
  flex: none;
}
.hero-meta dd { margin: 0; color: var(--ink-2); }
.hero-meta dd b { color: var(--ink); font-weight: 550; }
.hero-meta dd .adv { color: var(--muted); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Portrait — bleeds to the right edge of the viewport */
.hero-shot { position: relative; }
.hero-shot .frame {
  position: relative;
  width: calc(100% + var(--bleed));
  margin-right: calc(var(--bleed) * -1);
  aspect-ratio: 4 / 5;
  max-height: 64vh;
  overflow: hidden;
  background: var(--paper-2);
}
.hero-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; }
.hero-shot .frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--paper) 0%, transparent 22%);
  pointer-events: none;
}
.hero-tag { margin-top: 0.9rem; max-width: 42ch; }
.hero-tag .t {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.hero-tag .d { font-size: 0.8125rem; color: var(--muted); line-height: 1.45; }

/* Below the two-column hero the portrait runs full-bleed under the masthead.
   It gets wider as the viewport does, so it never swallows the first screen:
   4:3 on a phone, 2:1 on a tablet. */
@media (max-width: 940px) {
  .hero { padding-top: calc(var(--head-h) + var(--top) + 1.1rem); padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 1.35rem; }
  .hero-shot { order: -1; margin-bottom: clamp(1.35rem, 4vw, 2.25rem); }
  .hero-shot .frame {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    aspect-ratio: 4 / 3;
    max-height: 42vh;
  }
  .hero-shot img { object-position: 50% 9%; }
  .hero-shot .frame::after { background: linear-gradient(to top, var(--paper) 0%, transparent 44%); }
  .hero-tag { margin-top: -2.4rem; position: relative; z-index: 1; max-width: 92%; }
  .hero-head { order: 0; }
}
@media (min-width: 641px) and (max-width: 940px) {
  .hero-shot .frame { aspect-ratio: 2 / 1; max-height: 38vh; }
  .hero-shot img { object-position: 50% 16%; }
}

/* --- Ticker ------------------------------------------------------------- */

.ticker {
  border-block: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  position: relative;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: slide 46s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.ticker-set { display: flex; align-items: center; }
.ticker-set span {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.ticker-set span::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--line); margin-left: 0.8rem; }
.ticker-set span b { color: var(--ink); font-weight: 500; }
.ticker-set span em { color: var(--accent); font-style: normal; }

/* --- Figures (the "at a glance" infographics) --------------------------- */

.glance {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cell { background: var(--paper); padding: clamp(1.25rem, 2.6vw, 1.9rem); }
.sec--tint .cell { background: var(--paper-2); }
.cell--wide { grid-column: span 6; }
.cell--half { grid-column: span 3; }
.cell--full { grid-column: span 12; }

.cell .lbl {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cell .lbl .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.bignum {
  font-size: clamp(2.6rem, 5.6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.9;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  display: block;
}
.bignum .u { font-size: 0.42em; letter-spacing: -0.02em; color: var(--accent); vertical-align: 0.5em; margin-left: 0.06em; }
.cell .cap { margin-top: 0.6rem; font-size: 0.8125rem; color: var(--muted); line-height: 1.45; }

@media (max-width: 900px) {
  .cell--wide { grid-column: span 12; }
  .cell--half { grid-column: span 6; }
}
@media (max-width: 520px) {
  .cell--half { grid-column: span 12; }
}

/* Year bar chart */
.years { display: flex; align-items: flex-end; gap: clamp(0.4rem, 1.4vw, 0.9rem); height: 150px; }
.year-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 0.5rem; }
.year-col .stack { width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; }
.year-col .seg {
  width: 100%;
  transform-origin: bottom;
  transform: scaleY(1);
  transition: transform 900ms var(--ease);
  min-height: 3px;
}
html.js .year-col .seg { transform: scaleY(0); }
html.js .is-in .year-col .seg { transform: scaleY(1); }
.year-col .seg--j { background: var(--ink); }
.year-col .seg--c { background: var(--accent); }
.year-col .seg--p { background: var(--clean); }
.year-col .yl { font-family: var(--mono); font-size: 0.625rem; color: var(--muted); letter-spacing: 0.04em; }
.year-col .yn { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink); font-weight: 500; }
.year-col:nth-child(1) .seg { transition-delay: 40ms; }
.year-col:nth-child(2) .seg { transition-delay: 110ms; }
.year-col:nth-child(3) .seg { transition-delay: 180ms; }
.year-col:nth-child(4) .seg { transition-delay: 250ms; }
.year-col:nth-child(5) .seg { transition-delay: 320ms; }
.year-col:nth-child(6) .seg { transition-delay: 390ms; }

.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.1rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.legend i { width: 9px; height: 9px; display: inline-block; }

/* --- Currently band ------------------------------------------------------ */

.now-band {
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.band-label {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

/* Three strands of current work, ruled apart like columns of a page. The rule
   is centred because the gap either side of it is the same measure. */
.now-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 2.8vw, 2.5rem);
}
@media (min-width: 1001px) {
  .now + .now {
    border-left: 1px solid var(--line);
    padding-left: clamp(1.5rem, 2.8vw, 2.5rem);
  }
}
@media (max-width: 1000px) {
  .now-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .now + .now { padding-top: 2rem; border-top: 1px solid var(--line); }
  .now h3 { font-size: clamp(1.85rem, 6vw, 2.4rem); }
}

.now .tagline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.now .tagline i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }

.now h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.85rem, 2.6vw, 2.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
  text-wrap: balance;
}

.now .sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
/* Two lines' worth, so the rule under each subtitle lands on the same line
   across all three columns however long the subtitle runs. */
@media (min-width: 1001px) { .now .sub { min-height: 3em; } }

.now > p:not(.tagline):not(.sub):not(.note) {
  font-family: var(--serif);
  text-wrap: pretty;
  font-size: clamp(1rem, 1.25vw, 1.0938rem);
  line-height: 1.62;
  color: var(--ink-2);
  margin-bottom: 1.1rem;
}

.now .note {
  font-family: var(--mono);
  font-size: 0.5938rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0;
}
.now .note em { font-style: normal; color: var(--muted); }

/* Research programme */
.programme { margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.stance-col { max-width: 74ch; margin-bottom: clamp(2rem, 4vw, 3rem); }

.programme .stance {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.programme .stance strong { font-weight: 600; }
.programme .stance + p {
  margin-top: 1.1rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
@media (max-width: 820px) { .pillars { grid-template-columns: minmax(0, 1fr); } }
.pillar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--line-2);
  align-items: start;
}
.pillar { padding: 1.35rem 0; }
@media (min-width: 821px) {
  .pillar:nth-child(-n+2) { border-top: 0; padding-top: 1.5rem; }
}
@media (max-width: 820px) { .pillar:first-child { border-top: 0; } }
.pillar .k {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  width: 22px;
  padding-top: 0.2rem;
}
.pillar h4 { font-size: 0.9688rem; letter-spacing: -0.022em; margin-bottom: 0.3rem; }
.pillar p { font-size: 0.875rem; line-height: 1.55; color: var(--muted); margin: 0; }
.pillar p strong { color: var(--ink); font-weight: 550; }
.pillar .fields {
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Seasonal panel figure */
.season { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .season { grid-template-columns: minmax(0, 1fr); } }

.season h3 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin-bottom: 0.85rem; letter-spacing: -0.032em; }
.season p { font-family: var(--serif); font-size: 0.9688rem; line-height: 1.62; color: var(--muted); }
.season p + p { margin-top: 0.8rem; }

.scale { display: flex; flex-wrap: wrap; gap: 0 clamp(1.25rem, 3vw, 2.25rem); margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-2); }
.scale div { padding: 0.35rem 0; }
.scale b {
  display: block;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.scale span {
  display: block;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 0.3rem;
}

.compare { display: grid; gap: 1.4rem; }
.compare .grp .t {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.7rem;
}
.bar { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; margin-bottom: 0.45rem; }
.bar .who { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-2); }
.bar .fill { height: 10px; background: var(--line-2); position: relative; overflow: hidden; }
.bar .fill i {
  position: absolute; inset: 0 auto 0 0;
  display: block;
  width: var(--w, 0%);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 900ms var(--ease);
}
html.js .bar .fill i { transform: scaleX(0); }
html.js .is-in .bar .fill i { transform: scaleX(1); }
.bar--winter .fill i { background: var(--exposure); }
.bar--summer .fill i { background: var(--clean); }
.bar .val { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink); font-weight: 500; min-width: 34px; text-align: right; }
.compare .grp:nth-child(2) .fill i { transition-delay: 160ms; }
.compare .note { font-size: 0.75rem; color: var(--faint); font-family: var(--serif); font-style: italic; margin-top: 0.9rem; }

/* Method pipeline */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.pipeline::before {
  content: "";
  position: absolute;
  left: 10%; right: 10%; top: 21px;
  height: 1px;
  background: var(--line);
}
.stage { position: relative; padding: 0 0.75rem; text-align: left; }
.stage .pin {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  display: grid; place-items: center;
  color: var(--ink);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.sec--tint .stage .pin { background: var(--paper-2); }
.stage:hover .pin { border-color: var(--accent); color: var(--accent); }
.stage .pin svg { width: 18px; height: 18px; }
.stage .n {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--faint);
  display: block;
  margin-bottom: 0.35rem;
}
.stage h4 { font-size: 0.95rem; letter-spacing: -0.02em; margin-bottom: 0.35rem; }
.stage p { font-size: 0.8125rem; color: var(--muted); line-height: 1.5; margin: 0; }
.stage:first-child { padding-left: 0; }
.stage:last-child { padding-right: 0; }

@media (max-width: 860px) {
  .pipeline { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pipeline::before { left: 21px; right: auto; top: 8px; bottom: 30px; width: 1px; height: auto; }
  .stage { padding: 0 0 1.6rem 3.75rem; }
  .stage .pin { position: absolute; left: 0; top: 0; margin: 0; }
  .stage:last-child { padding-bottom: 0; }
}

/* --- Research themes ---------------------------------------------------- */

.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.theme {
  background: var(--paper);
  padding: clamp(1.5rem, 3.2vw, 2.4rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: start;
  transition: background-color var(--t) var(--ease);
}
.sec--tint .theme { background: var(--paper-2); }
.theme:hover { background: var(--card); }
.theme .num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding-top: 0.35rem;
}
.theme h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); margin-bottom: 0.6rem; letter-spacing: -0.03em; }
.theme p { font-family: var(--serif); font-size: 0.95rem; line-height: 1.6; color: var(--muted); margin-bottom: 1rem; }
.theme .stat {
  display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
  padding-top: 0.9rem; border-top: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--muted);
  text-transform: uppercase;
}
.theme .stat b { font-size: 1.15rem; color: var(--ink); letter-spacing: -0.02em; font-weight: 500; }
.theme .go { margin-top: 1rem; }
@media (max-width: 760px) {
  .themes { grid-template-columns: minmax(0, 1fr); }
  .theme { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  .theme .num { padding-top: 0; }
}

/* --- Media / The Hindu -------------------------------------------------- */

.media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 900px) { .media { grid-template-columns: minmax(0, 1fr); } }

/* A designed preview of the live article, framed like a browser window */
.preview {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card);
  display: block;
  color: inherit;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  box-shadow: 0 1px 2px rgba(14, 14, 16, 0.04);
}
.preview:hover {
  border-color: var(--faint);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -22px rgba(14, 14, 16, 0.35);
}
html[data-theme="dark"] .preview:hover { box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.8); }

.preview .bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.preview .dots { display: flex; gap: 5px; }
.preview .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.preview .url {
  flex: 1;
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.24rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.preview .url svg { width: 10px; height: 10px; flex: none; color: var(--clean); }

.preview .body { padding: clamp(1.15rem, 2.5vw, 1.75rem); }
.preview .brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--hindu);
  text-transform: uppercase;
  line-height: 1;
}
.preview .kicker {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--hindu);
  display: block;
}
.preview h3 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 1rem 0 0.7rem;
  font-weight: 600;
}
.preview .dek { font-size: 0.875rem; color: var(--muted); line-height: 1.55; margin-bottom: 1.1rem; }
.preview .byline {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center;
  padding-top: 0.9rem; border-top: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint);
}
.preview .byline .go { margin-left: auto; color: var(--ink); display: inline-flex; align-items: center; gap: 0.35rem; }
.preview:hover .byline .go { color: var(--accent); }

.pullquote {
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  padding-left: clamp(1rem, 2.5vw, 1.75rem);
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.012em;
}
.pullquote cite {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}

.clip { margin: 0; }
.clip .frame {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 8px;
  cursor: zoom-in;
  overflow: hidden;
}
.clip img { width: 100%; transition: transform 700ms var(--ease); }
.clip .frame:hover img { transform: scale(1.02); }
.clip figcaption {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex; gap: 0.5rem; align-items: center;
}

/* --- Publications explorer ---------------------------------------------- */

.explorer {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}
.results-col { min-width: 0; }
.pub-main { min-width: 0; }

/* --- filter rail --- */
.rail-col { position: sticky; top: calc(var(--head-h) + 1.25rem); }
.rail-toggle { display: none; }

.find { position: relative; }
.find svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--faint); }
.find input {
  width: 100%; min-height: 40px;
  padding: 0.4rem 0.7rem 0.4rem 2.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.875rem;
}
.find input::placeholder { color: var(--faint); }
.find input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.find-hint {
  margin: 0.55rem 0 1.6rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.find-hint kbd {
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.05rem 0.3rem;
  background: var(--card);
  color: var(--ink-2);
}

.facet + .facet { margin-top: 1.6rem; }
.facet > h3 {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.7rem;
  font-weight: 500;
}
.facet ul { display: grid; gap: 0.1rem; }
.facet li.hide { display: none; }

.opt {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: start;
  padding: 0.33rem 0;
  cursor: pointer;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-2);
  transition: color var(--t) var(--ease);
}
.opt:hover { color: var(--ink); }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt .box {
  width: 15px; height: 15px;
  margin-top: 0.12rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--card);
  display: grid;
  place-items: center;
  transition: all var(--t) var(--ease);
}
.opt .box svg { width: 10px; height: 10px; color: var(--paper); opacity: 0; transition: opacity var(--t) var(--ease); }
.opt input:checked + .box { background: var(--ink); border-color: var(--ink); }
.opt input:checked + .box svg { opacity: 1; }
.opt input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt input:checked ~ .lab { color: var(--ink); font-weight: 550; }
.opt .n { font-family: var(--mono); font-size: 0.625rem; color: var(--faint); padding-top: 0.15rem; }
.opt .lab { display: flex; align-items: baseline; gap: 0.5rem; }
.opt .swatch { width: 7px; height: 7px; border-radius: 50%; flex: none; transform: translateY(-1px); }

.more {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-bottom: 1px solid var(--accent-ring);
}
.more:hover { border-bottom-color: var(--accent); }

.clear {
  margin-top: 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.clear:hover { color: var(--accent); border-color: var(--accent-ring); }
.clear svg { width: 11px; height: 11px; }

/* --- results --- */
.results-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 0.5rem;
}
.results-n {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.selects { margin-left: auto; display: flex; gap: 0.5rem; }
.sel { position: relative; display: inline-flex; align-items: center; }
.sel select {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.8125rem;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  min-height: 34px;
  cursor: pointer;
  transition: border-color var(--t) var(--ease);
}
.sel select:hover { border-color: var(--ink); }
.sel select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sel > svg { position: absolute; right: 9px; width: 13px; height: 13px; color: var(--muted); pointer-events: none; }

.grp-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 2rem 0 0.25rem;
  padding: 0.5rem 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  color: var(--ink);
}
.pubs > .grp-head:first-child { margin-top: 0.75rem; }
.grp-head .caret { width: 11px; height: 11px; color: var(--muted); transition: transform var(--t) var(--ease); flex: none; }
.grp-head[aria-expanded="false"] .caret { transform: rotate(-90deg); }
.grp-head .t {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--grp, var(--accent));
}
.grp-head .swatch { width: 8px; height: 8px; border-radius: 50%; background: var(--grp, var(--accent)); flex: none; }
.grp-head { border-bottom-color: var(--grp, var(--line)); border-bottom-width: 1px; }
.grp-head .n { font-family: var(--mono); font-size: 0.6875rem; color: var(--faint); }
.grp-head:hover .t { color: var(--ink); }

.pub {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding: 1.1rem 0.9rem;
  margin: 0 -0.9rem;
  border-radius: var(--r);
  border-bottom: 1px solid var(--line-2);
  align-items: start;
  transition: background-color var(--t) var(--ease);
}
.pub:hover { background: var(--card); }
.pub .id {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 0.15rem;
  letter-spacing: 0.02em;
}
.pub[data-topics="behaviour"] .id { color: var(--c-behaviour); }
.pub[data-topics="exposure"]  .id { color: var(--c-exposure); }
.pub[data-topics="learning"]  .id { color: var(--c-learning); }
.pub[data-topics="active"]    .id { color: var(--c-active); }
.pub[data-topics="routing"]   .id { color: var(--c-routing); }

.pub h3 {
  font-size: 1.0313rem;
  font-weight: 550;
  line-height: 1.38;
  letter-spacing: -0.018em;
  margin-bottom: 0.35rem;
}
.pub h3 a { transition: color var(--t) var(--ease); }
.pub h3 a:hover { color: var(--accent); }
.pub .au { font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.28rem; line-height: 1.5; }
.pub .au .me { color: var(--ink); font-weight: 600; }
.pub .vn { font-family: var(--serif); font-style: italic; font-size: 0.9375rem; color: var(--ink-2); line-height: 1.45; }
.pub .vn .yr { font-style: normal; font-family: var(--mono); font-size: 0.6875rem; color: var(--faint); margin-left: 0.5rem; letter-spacing: 0.06em; }
.pub .acts { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; padding-top: 0.1rem; }

.act {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.24rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t) var(--ease);
}
.act:hover { color: var(--accent); border-color: var(--accent-ring); background: var(--exposure-tint); }
.act svg { width: 11px; height: 11px; }
.act--doi { color: var(--ink); border-color: var(--ink); }
.act--doi:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.act--review { color: var(--muted); border-style: dashed; cursor: default; }
.act--review:hover { background: transparent; color: var(--muted); border-color: var(--line); }

.noresults { padding: 3rem 0; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; display: none; }
.noresults.on { display: block; }

@media (max-width: 1000px) {
  .explorer { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .rail-col { position: static; }
  .rail-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 46px;
    padding: 0 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--card);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 550;
    cursor: pointer;
  }
  .rail-toggle span { display: inline-flex; align-items: center; gap: 0.5rem; }
  .rail-toggle svg { width: 14px; height: 14px; }
  .rail-toggle .rail-count { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted); font-weight: 400; }
  .rail-body {
    display: none;
    padding: 1.25rem 0 0.5rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0.5rem;
  }
  .rail-body.open { display: block; }
  .facet { break-inside: avoid; }
}

@media (max-width: 800px) {
  .pub { grid-template-columns: 44px minmax(0, 1fr); padding: 1.05rem 0.6rem; margin: 0 -0.6rem; }
  .pub .acts { grid-column: 2; justify-content: flex-start; margin-top: 0.65rem; }
}
/* Phones: nudge the smallest type up and grow the tap targets. */
@media (max-width: 640px) {
  .lnk { padding-block: 0.55rem; font-size: 0.9375rem; }
  .masthead .side .lnk + .lnk { margin-left: 1.25rem; }
  .hero-meta dd a, .hero-bio a, .prose a, .hero-title .at a { display: inline-block; padding-block: 0.35rem; }
  .foot-in nav a { padding-block: 0.45rem; }
  .pub h3 { font-size: 1.0625rem; line-height: 1.4; }
  .pub .au { font-size: 0.875rem; }
  .pub .vn { font-size: 0.9688rem; }
  .act { font-size: 0.6875rem; padding: 0.4rem 0.65rem; }
  .act svg { width: 12px; height: 12px; }
  .opt { padding: 0.5rem 0; font-size: 0.875rem; }
  .facet > h3 { font-size: 0.625rem; }
  .grp-head .t { font-size: 1.0625rem; }
  .find input { min-height: 46px; font-size: 1rem; }
  .sel select { min-height: 42px; font-size: 0.875rem; }
  .lnk { font-size: 0.9375rem; }
  .row .v { font-size: 1rem; }
  .row .s { font-size: 0.875rem; }
  .stage p, .pillar p { font-size: 0.9063rem; }
  .work p { font-size: 0.9375rem; }
  .cell .cap { font-size: 0.875rem; }
}

@media (max-width: 560px) {
  .results-bar { gap: 0.6rem; }
  .selects { margin-left: 0; width: 100%; }
  .sel { flex: 1; }
  .sel select { width: 100%; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .pub .id { padding-top: 0; }
  .pub .acts { grid-column: 1; }
}

/* --- Timeline (horizontal) ---------------------------------------------- */

.track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stop { background: var(--paper); padding: clamp(1.15rem, 2.4vw, 1.6rem); position: relative; transition: background-color var(--t) var(--ease); }
.sec--tint .stop { background: var(--paper-2); }
.stop:hover { background: var(--card); }
.stop .yr { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.1em; color: var(--faint); display: block; margin-bottom: 0.9rem; }
.stop .mark { width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin-bottom: 0.9rem; }
.stop.now .mark { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.stop.now .yr { color: var(--accent); }
.stop h4 { font-size: 0.95rem; letter-spacing: -0.02em; margin-bottom: 0.3rem; }
.stop .org { font-size: 0.8125rem; color: var(--ink-2); line-height: 1.45; }
.stop .adv { margin-top: 0.5rem; font-size: 0.75rem; color: var(--muted); font-family: var(--serif); font-style: italic; }
.stop .adv b { font-style: normal; font-weight: 550; color: var(--ink-2); }
@media (max-width: 1000px) { .track { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .track { grid-template-columns: minmax(0, 1fr); } }

/* --- Simple two-column lists (roles, awards, service) ------------------- */

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

.subh {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex; align-items: center; gap: 0.8rem;
  margin-bottom: 1.25rem;
}
.subh::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.subh--spaced { margin-top: 2.5rem; }
.subh-n { color: var(--accent); letter-spacing: 0.12em; }

/* Journals reviewed for — set as titles, the way a CV sets them, rather than
   crammed into uppercase chips. */
.jrnls { list-style: none; margin: 0; padding: 0; display: grid; }
.jrnls li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--line-2);
}
.jrnls li:last-child { border-bottom: 0; }
.jrnls li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}
.jrnls cite {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9688rem;
  line-height: 1.45;
  color: var(--ink);
}

.rows { display: grid; }
.row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line-2);
  align-items: baseline;
}
.row:last-child { border-bottom: 0; }
.row .k { font-family: var(--mono); font-size: 0.6875rem; color: var(--faint); letter-spacing: 0.04em; }
.row .v { display: block; font-size: 0.9375rem; color: var(--ink); font-weight: 550; letter-spacing: -0.012em; line-height: 1.4; }
.row .s { display: block; font-size: 0.8125rem; color: var(--muted); font-family: var(--serif); margin-top: 0.2rem; line-height: 1.5; }
@media (max-width: 460px) { .row { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; } }

.tagwrap { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* --- Projects ----------------------------------------------------------- */

.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.work {
  background: var(--paper);
  padding: clamp(1.25rem, 2.6vw, 1.8rem);
  display: flex; flex-direction: column; gap: 0.65rem;
  transition: background-color var(--t) var(--ease);
  min-height: 210px;
}
.sec--tint .work { background: var(--paper-2); }
.work:hover { background: var(--card); }
.work .top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.work .top svg { width: 18px; height: 18px; color: var(--accent); }
.work h3 { font-size: 1.0625rem; letter-spacing: -0.025em; }
.work p { font-family: var(--serif); font-size: 0.9rem; line-height: 1.55; color: var(--muted); margin: 0; flex: 1; }
.work .foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); padding-top: 0.75rem; border-top: 1px solid var(--line-2); }
.work:hover .foot .go { color: var(--accent); }
@media (max-width: 940px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .works { grid-template-columns: minmax(0, 1fr); } }

/* --- Contact ------------------------------------------------------------ */

.contact { background: var(--ink); color: var(--paper); padding-block: clamp(3.5rem, 8vw, 6.5rem); scroll-margin-top: calc(var(--head-h) + var(--top)); }
html[data-theme="dark"] .contact { background: var(--paper-2); border-top: 1px solid var(--line); }
.contact h2 { color: var(--paper); font-size: clamp(2.4rem, 7vw, 5rem); letter-spacing: -0.05em; }
html[data-theme="dark"] .contact h2 { color: var(--ink); }
.contact .lead { font-family: var(--serif); font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; color: rgba(252, 252, 250, 0.66); max-width: 46ch; margin-top: 1.25rem; }
html[data-theme="dark"] .contact .lead { color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.reach { display: grid; }
.reach a, .reach div {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid rgba(252, 252, 250, 0.12);
  color: inherit;
  transition: padding-left var(--t) var(--ease);
}
html[data-theme="dark"] .reach a, html[data-theme="dark"] .reach div { border-bottom-color: var(--line); }
.reach a:hover { padding-left: 0.5rem; }
.reach .k { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(252, 252, 250, 0.45); width: 82px; flex: none; }
html[data-theme="dark"] .reach .k { color: var(--faint); }
.reach .v { font-size: 0.9375rem; color: var(--paper); word-break: break-word; }
html[data-theme="dark"] .reach .v { color: var(--ink); }
.reach .go { margin-left: auto; opacity: 0.5; }
.reach a:hover .go { opacity: 1; color: var(--exposure); }
.contact .btn--fill { background: var(--paper); color: var(--ink); }
.contact .btn--fill:hover { background: var(--exposure); color: #fff; }
.contact .btn--line { border-color: rgba(252, 252, 250, 0.28); color: var(--paper); }
.contact .btn--line:hover { border-color: var(--paper); background: rgba(252, 252, 250, 0.08); }
html[data-theme="dark"] .contact .btn--fill { background: var(--ink); color: var(--paper); }
html[data-theme="dark"] .contact .btn--line { border-color: var(--line); color: var(--ink); }

.foot {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding-top: 1.75rem;
  padding-bottom: calc(1.75rem + env(safe-area-inset-bottom));
}
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); }
.foot-in a:hover { color: var(--accent); }
.foot-in nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* --- Overlays ----------------------------------------------------------- */

.top-btn {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: calc(clamp(1rem, 3vw, 2rem) + env(safe-area-inset-bottom));
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--lift);
  color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all var(--t) var(--ease);
  z-index: 90;
}
.top-btn.on { opacity: 1; visibility: visible; transform: none; }
.top-btn:hover { border-color: var(--ink); }

.lbox {
  position: fixed; inset: 0; z-index: 300;
  display: none; place-items: center;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  background: rgba(8, 8, 10, 0.92);
  backdrop-filter: blur(4px);
}
.lbox.on { display: grid; }
.lbox img { max-width: 100%; max-height: 92vh; animation: pop 280ms var(--ease) both; background: #fff; }
@keyframes pop { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.lbox .x {
  position: absolute; top: 1rem; right: 1rem;
  width: 42px; height: 42px; border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.lbox .x:hover { background: rgba(255, 255, 255, 0.18); }

.toast {
  position: fixed; left: 50%; bottom: calc(clamp(1.25rem, 4vw, 2.25rem) + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  z-index: 400;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.65rem 1.1rem;
  background: var(--ink); color: var(--paper);
  border-radius: var(--r);
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.07em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t-2) var(--ease);
  max-width: calc(100vw - 2rem);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 13px; height: 13px; flex: none; }


/* --- Mobile refinements --------------------------------------------------
   Everything here exists because it was wrong on a phone first: type that was
   set for a 62-character measure, tap targets sized for a mouse, and rhythm
   that assumed a tall window.
   ------------------------------------------------------------------------ */

@media (max-width: 640px) {
  :root { --head-h: 58px; }

  /* Comfortable tap targets everywhere a finger lands. */
  .iconbtn { width: 42px; height: 42px; }
  .btn { min-height: 48px; }
  .hero-cta .btn { flex: 1 1 auto; min-width: calc(50% - 0.3rem); }
  .reach a, .reach div { padding-block: 1rem; }
  .top-btn { width: 46px; height: 46px; }

  /* Reading measure: a little more air between lines, a little less between
     blocks, because the screen is doing the framing. */
  .hero-bio p { font-size: 1.0625rem; line-height: 1.7; }
  .prose { font-size: 1.0625rem; line-height: 1.7; }
  .masthead .dek { font-size: 1rem; line-height: 1.62; }
  .sec { padding-block: clamp(3rem, 11vw, 4.5rem); }

  .tags { gap: 0.35rem; }
  .tag { font-size: 0.8125rem; padding: 0.42rem 0.6rem; }

  .jrnls cite { font-size: 0.9375rem; }
  .jrnls li { padding: 0.7rem 0; }

  /* The ticker is decorative; at phone width it should not shout. */
  .ticker-set span { padding: 0.75rem 1rem; font-size: 0.625rem; }
}

@media (max-width: 400px) {
  .hero-meta div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .hero-meta dt { width: auto; }
  .hero-cta .btn { min-width: 100%; }
}

/* --- Elevation on the things you can act on ------------------------------ */

@media (hover: hover) {
  .work, .stop, .reach a { transition: background-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
  .work:hover, .stop:hover { box-shadow: var(--lift); position: relative; z-index: 1; }
}


/* =========================================================================
   Interactive pieces
   Three things run in the page rather than being described in it: the choice
   model, the co-authorship network and the command palette. They share the
   design system above — same hues, same hairlines, same 4 px corners.
   ========================================================================= */

/* Modes get their own small scale. Deliberately NOT the research-area hues:
   those five mean one thing each across the whole site. */
:root {
  --m-car:   #3f4a63;
  --m-2w:    #c2593b;
  --m-metro: #2b6f6a;
  --m-walk:  #8a6a2f;
}
html[data-theme="dark"] {
  --m-car:   #8f9ec2;
  --m-2w:    #ea8a6a;
  --m-metro: #58b5ac;
  --m-walk:  #d2a95a;
}

kbd {
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1;
  padding: 0.25em 0.4em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--card);
  color: var(--muted);
  white-space: nowrap;
}

/* --- The live choice model ---------------------------------------------- */

.sim {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  overflow: hidden;
}

.sim-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.25rem, 2.8vw, 1.9rem);
  border-bottom: 1px solid var(--line);
}
.sim-intro { max-width: 62ch; }
.sim-kick {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.sim-intro h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: -0.03em; }
.sim-intro p {
  margin: 0.55rem 0 0;
  font-family: var(--serif);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.sim-reset, .net-reheat {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  min-height: 36px;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.sim-reset:hover, .net-reheat:hover { color: var(--ink); border-color: var(--ink); }
.sim-reset svg, .net-reheat svg { width: 13px; height: 13px; }

.sim-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 0;
}
.sim-controls {
  padding: clamp(1.25rem, 2.8vw, 1.9rem);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 1.35rem;
  align-content: start;
}
.sim-out { padding: clamp(1.25rem, 2.8vw, 1.9rem); min-width: 0; }

.ctl label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.ctl output {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.ctl-hint {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: var(--faint);
  line-height: 1.4;
}

/* One slider design, both themes, both engines. */
.ctl input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;          /* the tap target, not the track */
  background: transparent;
  cursor: pointer;
  display: block;
}
.ctl input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: var(--line);
}
.ctl input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 99px;
  background: var(--line);
}
.ctl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--accent);
  transition: transform var(--t) var(--ease);
}
.ctl input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--accent);
}
.ctl input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
.ctl input[type="range"]:focus-visible { outline: none; }
.ctl input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-ring); }
.ctl input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-ring); }

.sim-lbl, .net-head .sim-kick {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
}
.sim-lbl { display: block; margin-bottom: 0.7rem; }

.split {
  display: flex;
  height: 30px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--paper-2);
}
.split i {
  display: block;
  height: 100%;
  min-width: 0;
  transition: flex-grow 420ms var(--ease);
  flex-grow: 0;
  flex-basis: 0;
}

.modes {
  width: 100%;
  margin-top: 1.35rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.modes th, .modes td {
  text-align: right;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.modes th {
  font-family: var(--mono);
  font-size: 0.5938rem;
  font-weight: 400;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 0.55rem;
}
.modes th:first-child, .modes td:first-child { text-align: left; }
.modes tbody tr:last-child th, .modes tbody tr:last-child td { border-bottom: 0; }
.modes td { color: var(--muted); }
.modes .m-name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ink);
}
.modes .m-name i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.modes .m-share { color: var(--ink); font-weight: 600; }
.modes tr.lead .m-share { color: var(--accent); }
.modes .m-v { font-family: var(--mono); font-size: 0.75rem; }

.sim-read {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.sim-read b {
  display: block;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-top: 0.1rem;
}
.sim-read em {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.45;
}

.sim-note {
  margin: 0;
  padding: 1rem clamp(1.25rem, 2.8vw, 1.9rem);
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}
.sim-note b { color: var(--ink); font-weight: 600; }

@media (max-width: 640px) {
  .ctl input[type="range"] { height: 36px; }
}
@media (max-width: 900px) {
  .sim-grid { grid-template-columns: minmax(0, 1fr); }
  .sim-controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .sim-head { flex-direction: column; gap: 1.1rem; }
}
@media (max-width: 560px) {
  .modes th:nth-child(5), .modes td:nth-child(5) { display: none; }  /* utility column */
  .sim-read { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

/* --- Co-authorship network ----------------------------------------------- */

.net-wrap {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(1.75rem, 3.5vw, 2.5rem);
}
.net-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}
.net-head h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: -0.03em; }
.net-head p {
  margin: 0.55rem 0 0;
  max-width: 62ch;
  font-family: var(--serif);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.net {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  overflow: hidden;
}
.net svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.net .edge { stroke: var(--line); fill: none; transition: stroke var(--t) var(--ease), stroke-opacity var(--t) var(--ease); }
.net .node { cursor: pointer; }
.net .node circle {
  stroke: var(--card);
  stroke-width: 1.5;
  transition: opacity var(--t) var(--ease);
}
.net .node text {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 550;
  fill: var(--ink);
  text-anchor: middle;
  pointer-events: none;
  transition: opacity var(--t) var(--ease);
}
.net.busy .node text { opacity: 0; }
.net .node.dim circle, .net .node.dim text { opacity: 0.22; }
.net .edge.lit { stroke: var(--accent); stroke-opacity: 0.85; }
.net .node.me circle { stroke: var(--accent); stroke-width: 2.5; }

.net-tip {
  position: absolute;
  top: 0; left: 0;
  transform: translate(-50%, -132%);
  padding: 0.45rem 0.6rem;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.net-tip.on { opacity: 1; }
.net-tip b { display: block; font-weight: 600; }
.net-tip span { color: rgba(252, 252, 250, 0.62); font-family: var(--mono); font-size: 0.625rem; }

@media (max-width: 700px) {
  .net-head { flex-direction: column; gap: 1rem; }
}

/* --- Export button ------------------------------------------------------- */

.expbt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.expbt:hover { color: var(--ink); border-color: var(--ink); }
.expbt svg { width: 13px; height: 13px; }

/* --- Command palette ----------------------------------------------------- */

.palbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 36px;
  padding: 0 0.5rem 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.palbtn:hover { border-color: var(--ink); color: var(--ink); }
.palbtn svg { width: 14px; height: 14px; }
.palbtn kbd { border-bottom-width: 1px; font-size: 0.625rem; }
@media (max-width: 1320px) {
  .palbtn-t, .palbtn kbd { display: none; }
  .palbtn { padding: 0; width: 36px; justify-content: center; }
}

.pal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: clamp(3rem, 12vh, 9rem) clamp(0.75rem, 4vw, 2rem) 2rem;
  background: color-mix(in srgb, var(--ink) 34%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: palfade 140ms var(--ease);
}
.pal[hidden] { display: none; }
@keyframes palfade { from { opacity: 0; } }

.pal-box {
  width: min(620px, 100%);
  max-height: min(560px, 76vh);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--lift-lg);
  overflow: hidden;
  animation: palrise 180ms var(--ease);
}
@keyframes palrise { from { opacity: 0; transform: translateY(-8px) scale(0.985); } }

.pal-in {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 0.9rem;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.pal-in svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.pal-in input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 1rem 0;
  outline: none;
}
.pal-in input::placeholder { color: var(--faint); }

.pal-list { overflow-y: auto; overscroll-behavior: contain; padding: 0.4rem; flex: 1; }
.pal-grp {
  font-family: var(--mono);
  font-size: 0.5938rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0.7rem 0.6rem 0.35rem;
}
.pal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.pal-item.on { background: var(--accent-tint); }
.pal-item.on .pal-ic { color: var(--accent); }
.pal-ic { width: 15px; height: 15px; flex: none; color: var(--faint); }
.pal-txt { min-width: 0; flex: 1; }
.pal-t {
  display: block;
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: -0.012em;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pal-s {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pal-hit { color: var(--accent); font-weight: 700; }
.pal-item.on .pal-hit { color: var(--accent); }
.pal-tag {
  flex: none;
  font-family: var(--mono);
  font-size: 0.5938rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.pal-empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; }

.pal-foot {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 0.6875rem;
  color: var(--faint);
  flex: none;
}
.pal-foot span { display: inline-flex; align-items: center; gap: 0.3rem; }
.pal-foot kbd { font-size: 0.5938rem; padding: 0.2em 0.35em; }
.pal-foot-n { margin-left: auto; font-family: var(--mono); }

@media (max-width: 560px) {
  .pal { padding-top: 4.5rem; }
  .pal-foot span:nth-child(2) { display: none; }
}

/* A publication the palette jumped to, so the eye lands on the right row. */
.pub.flash { animation: flash 1.8s var(--ease); }
@keyframes flash {
  0%, 12% { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
  100%    { background: transparent; box-shadow: inset 3px 0 0 transparent; }
}

/* --- Theme change as a wipe, where the browser supports it ---------------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
/* The incoming theme is always on top, and JS clips it open from the toggle,
   so the change reads as a wipe from the button rather than a flash. */
::view-transition-old(root) { z-index: 0; }
::view-transition-new(root) { z-index: 1; }


/* --- The news line in the hero ------------------------------------------ */

.news {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: clamp(1rem, 2vw, 1.35rem);
  padding: 0.5rem 0.85rem 0.5rem 0.5rem;
  border: 1px solid var(--accent-ring);
  border-radius: 99px;
  background: var(--accent-tint);
  font-size: 0.8438rem;
  line-height: 1.4;
  color: var(--ink-2);
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.news:hover { border-color: var(--accent); }
.news-tag {
  flex: none;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.5938rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.news-t b { color: var(--ink); font-weight: 600; }
.news-go { width: 14px; height: 14px; flex: none; color: var(--accent); transition: transform var(--t) var(--ease); }
.news:hover .news-go { transform: translateX(3px); }

@media (max-width: 640px) {
  .news { border-radius: var(--r); align-items: flex-start; padding: 0.6rem 0.75rem; }
  .news-go { display: none; }
}

/* --- The DRUM arc --------------------------------------------------------- */

.arc {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--head-h) + var(--top) + 1.5rem);
}
.arc-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.arc-head h3 { font-size: clamp(1.35rem, 2.5vw, 1.9rem); letter-spacing: -0.032em; }
.arc-head p {
  margin: 0.6rem 0 0;
  max-width: 62ch;
  font-family: var(--serif);
  font-size: 0.9688rem;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

/* Five steps, ruled apart, with the live one picked out in the accent. */
.arc-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  list-style: none;
  margin: 0;
  padding: 0;
}
.arc-step {
  background: var(--paper-2);
  padding: clamp(0.9rem, 2vw, 1.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-top: 2px solid transparent;
}
.arc-step .arc-when {
  font-family: var(--mono);
  font-size: 0.5938rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}
.arc-step b { font-size: 0.9063rem; font-weight: 600; letter-spacing: -0.018em; color: var(--ink); line-height: 1.3; }
.arc-step .arc-d { font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.arc-step em { font-style: italic; }

.arc-step--now {
  background: var(--accent-tint);
  border-top-color: var(--accent);
}
.arc-step--now .arc-when { color: var(--accent); }

@media (max-width: 900px) {
  .arc-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arc-step:last-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .arc-track { grid-template-columns: minmax(0, 1fr); }
  .arc-step:last-child { grid-column: auto; }
}

/* --- The patent record ---------------------------------------------------- */

.patent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.1rem, 2.5vw, 1.75rem);
  align-items: start;
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  padding: clamp(1.25rem, 2.8vw, 1.9rem);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  background: var(--card);
}
.patent-mark {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
}
.patent-mark svg { width: 22px; height: 22px; }
.patent-lbl {
  font-family: var(--mono);
  font-size: 0.5938rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.5rem;
}
.patent-body h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.patent-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem 1.5rem;
  margin: 1.15rem 0 0;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line-2);
}
.patent-meta dt {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.28rem;
}
.patent-meta dd { margin: 0; font-size: 0.875rem; font-weight: 550; color: var(--ink); letter-spacing: -0.01em; }
.patent-meta dd a { box-shadow: inset 0 -1px 0 var(--accent); transition: color var(--t) var(--ease); }
.patent-meta dd a:hover { color: var(--accent); }
.patent-no { font-family: var(--mono) !important; font-size: 0.8125rem !important; letter-spacing: 0.02em; }

@media (max-width: 560px) {
  .patent { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
  .patent-mark { width: 40px; height: 40px; }
}

/* --- Motion ------------------------------------------------------------- */

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

html.js [data-rise] { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
html.js [data-rise].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html.js [data-rise] { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
  .year-col .seg { transform: scaleY(1); }
}

@media print {
  .head, .top-btn, .toast, .pubbar, .lbox, .ticker, .hero-cta, .hero-shot, .clip { display: none !important; }
  :root { --paper: #fff; --paper-2: #fff; --ink: #000; --ink-2: #222; }
  body { font-size: 10.5pt; }
  .sec { padding-block: 1rem; break-inside: avoid; }
  .pub { break-inside: avoid; padding: 0.4rem 0; }
  .contact { background: #fff; color: #000; }
  .contact h2, .reach .v { color: #000; }
}
