/* Swiss-modernist layer (prototype).
   Loaded after site.css and only overrides it: same markup, same palette
   tokens. Structure comes from type and space, not lines: upright heavy
   headlines set tight, a monospace face for every label, index and date,
   square corners, and almost no rules. The few lines left are the rail edge
   and controls that need an edge to read as clickable. */

:root {
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
/* Pure white ground in light mode. Scoped away from dark, which sets --bg
   with equal specificity in site.css and would otherwise lose to this file. */
:root:not([data-theme="dark"]) { --bg: #FFFFFF; }
/* Labels, indices, dates and counts all share one mono register. */
.rail-status, .rail-section, .rail-nav a .num, .rail-nav a .key,
.hero-eyebrow, .sup-label, .hero-side .overlay .label, .hero-side .overlay span,
.page-head .kicker, #publications .kicker, .section-kicker, .section-link,
.rr-num, .rd-num, .rd-meta-label, .rd-meta .tag,
.pub-filter, .pub-action, .pub-badge, .badge-award, .year-group .yr small,
.tools-label, .tool-tag, .teach-card .tc-code, .cv-date, .cv-tag, .news-date,
.gal-jump-meta, .gal-n, .contact-card .cc-label, footer p, .footer-links a,
.kbd-hint, .kbd-hint kbd, .lb-count {
  font-family: var(--mono);
  font-feature-settings: normal;
}

/* Nothing is rounded, nothing floats on a shadow. */
.rail-nav a, .rail-nav a .key, .rail-links a, .hero-side, .rd-meta .tag,
.pub-filter, .pub-item, .pub-action, .pub-badge, .badge-award, .tool-tag,
.teach-card, .teach-card .tc-code, .cv-tag, .contact-card, .kbd-hint, .kbd-hint kbd,
.theme-toggle, .theme-toggle .theme-knob {
  border-radius: 0;
  box-shadow: none;
}

/* Upright type throughout: emphasis is weight and colour, never italic. */
.hero-h1 .accent, .page-head h1 .accent, .section-title .accent, .h1-opt.active,
.hero-bio em, .pub-venue {
  font-style: normal;
}

/* ── Lines removed: space does the separating ─────────── */
.rail-top, .rail-nav a,
.hero, .page-head, .section, .hero-meta-row, .tools-strip,
.research-row, .research-row:first-child,
.research-detail, .research-detail:first-child,
.year-group, .year-group:first-child,
.news-row, .news-row:first-child,
.gal-index, .gal-jump {
  border: 0;
}
#publications .pub-rule { display: none; }

/* ── Rail ─────────────────────────────────────────────── */
.rail-top { padding-bottom: 0.5rem; margin-bottom: 2.25rem; }
.rail-mark { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.rail-mark span { font-weight: 700; }
.rail-status, .rail-section {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.rail-status .dot { border-radius: 0; width: 5px; height: 5px; }
.rail-section { color: var(--ink3); }

.rail-nav { gap: 2px; }
.rail-nav a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  padding: 9px 8px;
  grid-template-columns: 30px 1fr 14px;
}
.rail-nav a .num { font-size: 10.5px; font-weight: 500; letter-spacing: 0; }
.rail-nav a .key { font-size: 10px; font-weight: 500; }

.rail-links a { font-size: 12px; }

/* Affiliation logos in greyscale so the page stays in ink; colour returns
   on hover. The dark-mode logos are already white, so this only shows in
   light mode. */
.hero-affil img { filter: grayscale(1); transition: opacity 0.2s, filter 0.2s; }
.hero-affil img:hover { filter: none; }

/* Nav as a stack of large bold words: no index numbers, no key hints, no
   filled block. The current page is marked by the accent colour alone. */
.rail-section { display: none; }
.rail-nav { gap: 0; }
.rail-nav a,
[data-theme="dark"] .rail-nav a {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  /* The negative margin cancels the rail's side padding, so the hover bar
     runs edge to edge across the rail while the words stay flush with it. */
  padding: 11px 1.5rem;
  margin: 0 -1.5rem;
  color: var(--ink);
  background: none;
}
.rail-nav a .key { display: none; }
/* Index number ahead of each word: small mono on the word's baseline, and
   quieter than the word so the word still leads. */
.rail-nav a .num,
[data-theme="dark"] .rail-nav a .num,
.rail-nav a.active .num,
[data-theme="dark"] .rail-nav a.active .num {
  display: inline-block;
  width: 1.6em;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: baseline;
  color: inherit;
  opacity: 0.45;
}
/* Hover inverts the word: an ink bar with the ground colour on top, black on
   white in light mode and the reverse in dark. */
.rail-nav a:hover,
.rail-nav a.active:hover,
[data-theme="dark"] .rail-nav a:hover,
[data-theme="dark"] .rail-nav a.active:hover {
  background: var(--ink);
  color: var(--bg);
}
.rail-nav a.active,
[data-theme="dark"] .rail-nav a.active { background: none; color: var(--accent); }
.rail-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Hero ─────────────────────────────────────────────── */
.hero { padding-bottom: 2rem; }

.hero-eyebrow, .page-head .kicker, #publications .kicker, .section-kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.hero-eyebrow::before,
.page-head .kicker::before,
#publications .kicker::before {
  width: 8px;
  height: 8px;
  background: var(--accent);
}
.section-kicker::before { width: 8px; height: 8px; }

.hero-h1 {
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.9;
}
/* Titles are set in ink; only the closing period carries the accent. */
.hero-h1 .accent { color: var(--ink); font-weight: 700; }

.hero-meta-row {
  grid-template-columns: minmax(0, 1fr) 300px;
  margin-top: 4rem;
  padding-top: 0;
}
.hero-bio { font-weight: 400; font-size: 16px; line-height: 1.7; }
.hero-bio em { font-weight: 500; }

.hero-supervisors { margin-top: 2.5rem; }
.sup-label { font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; }
.sup-entry p { font-weight: 700; letter-spacing: -0.015em; }

/* Portrait as a captioned figure: square plate, solid caption bar. */
.hero-side { min-height: 340px; }
.hero-side img.portrait { filter: grayscale(0.35) contrast(1.05); }
.hero-side .overlay {
  background: var(--navy);
  padding: 0.75rem 1rem;
}
.hero-side .overlay .label { font-size: 10px; font-weight: 500; letter-spacing: 0.06em; }
.hero-side .overlay .label::before { display: none; }
.hero-side .overlay strong { font-size: 14px; font-weight: 700; }
.hero-side .overlay span { font-size: 11px; }

/* ── Page heads and section titles ────────────────────── */
.page-head { padding-bottom: 1.5rem; }
.page-head h1 {
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.92;
}
/* In page heads .accent wraps only the closing period; in section titles it
   wraps words, which stay ink, and .period marks the coloured stop. */
.page-head h1 .accent { font-weight: 700; }
.section-title .accent { color: inherit; font-weight: 700; }
.section-title .period { color: var(--accent); }
.page-head .lede { font-weight: 400; }

.h1-opt.active { color: var(--accent); font-weight: 700; }

.section { padding-top: 2.25rem; padding-bottom: 2.25rem; }
.section-header { margin-bottom: 2rem; }
.section-title {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.section-link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-bottom-width: 1px;
}
.section-link:hover { color: var(--ink); border-color: var(--ink); }

/* ── Home: research index ─────────────────────────────── */
.research-row {
  grid-template-columns: 64px 1fr 24px;
  padding: 0.7rem 0;
}
.research-row:hover { padding-left: 0; }
.research-row .rr-num {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink3);
  transition: color 0.15s;
}
.research-row h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.research-row::after {
  content: "→";
  color: var(--ink4);
  justify-self: end;
  transition: color 0.15s, transform 0.15s;
}
.research-row:hover .rr-num,
.research-row:hover::after { color: var(--accent); }
.research-row:hover::after { transform: translateX(3px); }

/* ── Research threads ─────────────────────────────────── */
.research-detail { padding: 0 0 3rem; }
.research-detail:last-child { padding-bottom: 0; }
.research-detail .rd-num {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--accent);
  padding-top: 0.55rem;
}
.research-detail .rd-num::before { content: "Thread "; color: var(--ink3); }
.research-detail h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.04em; }
.research-detail p { font-weight: 400; line-height: 1.65; }
.rd-meta .rd-meta-label { font-size: 10.5px; font-weight: 500; color: var(--ink3); }
/* Tags are tinted blocks rather than outlined boxes. */
.rd-meta .tag {
  font-size: 10.5px;
  background: var(--bg2);
  border: 0;
  padding: 4px 8px;
}

/* Thread figures: solid, still and in ink, like a plate in a paper, rather
   than a faint floating ghost. Only the tg-hot mark takes the accent. */
.thread-graph {
  opacity: 1;
  animation: none;
  color: var(--ink2);
}
.thread-graph .tg-hot { fill: var(--accent); fill-opacity: 1; }
.tg-rsa svg { max-width: 70%; }

/* Hero network (home, assets/js/nn.js): the original drifting network with
   signals running along its edges, bleeding off the hero's top-right corner
   as before, only larger and fainter. Squares instead of dots and no glow
   or rotation, so it sits with the thread figures; the travelling signals
   are its one accent. site.css's 900px display:none still applies. */
.nn-graph {
  top: -110px;
  right: -130px;
  width: 620px;
  height: 480px;
  opacity: 0.22;
  color: var(--ink);
}
.nn-graph svg { animation: none; }
.nn-graph .edges line { stroke: currentColor; stroke-width: 0.6; opacity: 0.6; }
/* Input and output units are solid. Bottleneck units are outlines filled with
   the page ground (opaque, so edges do not show through); nn.js blends that
   fill to ink while a signal passes through, so activation reads as the
   square going solid. */
.nn-graph .node { fill: currentColor; opacity: 0.9; }
.nn-graph .node.hidden { fill: var(--bg); stroke: currentColor; stroke-width: 1; }.nn-graph .signal { fill: var(--accent); filter: none; }
[data-theme="dark"] .nn-graph { opacity: 0.3; }
@media (max-width: 1100px) {
  .nn-graph { width: 380px; height: 300px; top: -70px; right: -90px; }
}

/* ── Publications ─────────────────────────────────────── */
.pub-filter {
  font-size: 11px;
  border-width: 1px;
  padding: 6px 11px;
}
.year-group { padding: 1.5rem 0 2.5rem; }
.year-group .yr {
  font-size: 44px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.05em;
}
.year-group .yr small { font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; }

/* Entries are separated by space; the only mark is the accent bar on hover. */
.pub-list { gap: 1.75rem; }
.pub-item {
  border: 0;
  padding: 0 0 0 1rem;
  background: transparent;
  position: relative;
}
.pub-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s ease;
}
.pub-item:hover { transform: none; }
.pub-item:hover::before { transform: scaleY(1); }
.pub-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.pub-meta { font-size: 13px; }
.pub-venue { color: var(--ink2); }

.pub-action { font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; }
.pub-action:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Type badges keep their colours as plain coloured labels, no box. */
.pub-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  background: transparent;
  padding: 0;
}
[data-theme="dark"] .pub-badge { background: transparent; }
.badge-award, .cv-tag { font-weight: 500; letter-spacing: 0.04em; }

/* ── CV and news ──────────────────────────────────────── */
.cv-date, .news-date { font-size: 12px; font-weight: 500; }
.cv-title { font-weight: 500; }
.cv-subhead { font-weight: 700; color: var(--ink); }
/* Tags follow the last word of the title, inline. */
.cv-title > .cv-tag { margin-left: 0.6rem; vertical-align: 0.1em; }
.news-row { padding: 0.8rem 0; }
.cv-title a:not(.cv-tag):not(.pub-action),
.cv-detail a:not(.cv-tag):not(.pub-action),
.news-text a,
.page-head .lede a { border-bottom-width: 1px; }
/* CV links read as text: ink rather than accent, marked only by a light grey
   underline that darkens to ink on hover. */
.cv-title a:not(.cv-tag):not(.pub-action),
.cv-detail a:not(.cv-tag):not(.pub-action) {
  color: var(--ink);
  border-bottom-color: var(--border-strong);
  transition: border-color 0.15s;
}
.cv-title a:not(.cv-tag):not(.pub-action):hover,
.cv-detail a:not(.cv-tag):not(.pub-action):hover { border-bottom-color: var(--ink); }

/* ── Other blocks ─────────────────────────────────────── */
.teach-card:hover { transform: none; border-color: var(--ink); }
.teach-card h3 { font-weight: 700; }
.gal-jump-name { font-weight: 700; }
.gal-item { border: 0; }
.gal-item figcaption { border-top: 0; }

/* ── Footer and chrome ────────────────────────────────── */
footer { padding-top: 3rem; }
footer p, .footer-links a { font-size: 11px; letter-spacing: 0.02em; }

.theme-toggle .theme-knob { top: 3px; left: 3px; width: 16px; height: 16px; }

/* Key hint as a boxed label: a square ink outline and no keycaps, keys in
   ink and words in grey on a ground-coloured plate. Hover inverts it to an
   ink bar, as the rail nav does, with the keys picking up the accent. */
.kbd-hint {
  border: 1px solid var(--ink);
  padding: 7px 10px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  opacity: 1;
  transition: background 0.15s, color 0.15s;
}
.kbd-hint kbd {
  background: none;
  border: 0;
  padding: 0;
  margin: 0 0.35em 0 0;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.15s;
}
.kbd-hint kbd + kbd { margin-left: 0; }
.kbd-hint:hover { background: var(--ink); color: var(--bg); }
.kbd-hint:hover kbd { color: var(--accent); }

@media (max-width: 900px) {
  .rail { border-bottom: 0; }
  .rail-top { margin-bottom: 0.5rem; }
  .rail-nav { gap: 0.5rem; }
  .rail-nav a,
  [data-theme="dark"] .rail-nav a {
    font-size: 17px;
    padding: 4px 6px;
    margin: 0;
  }
  .hero-meta-row { grid-template-columns: 1fr; margin-top: 2.5rem; }
  .section-title { font-size: 34px; }
  .research-row h3 { font-size: 18px; }
  .research-row { grid-template-columns: 44px 1fr 20px; }
}
