/* ==========================================================================
   Site styles. Colours live in the variables below; change them here and
   every page (and every canvas plot) follows.
   ========================================================================== */

:root {
  --bg: #fdfcfa;
  --surface: #ffffff;
  --ink: #1d2126;
  --ink-soft: #464b53;
  --muted: #7b8089;
  --rule: #e6e2db;
  --grid: #f0eee9;
  --fid: #2563b8;      /* time domain: the FID */
  --spec: #d4461a;     /* frequency domain: the spectrum */
  --green: #7cb594;    /* extra colours, for one object that needs its own: e.g. a battery */
  --red: #b8233f;      /* … or RF pulses */
  --accent: #d4461a;   /* links */
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 56px;
  --gutter: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111316;
    --surface: #171a1e;
    --ink: #e9e7e3;
    --ink-soft: #c2c0bc;
    --muted: #8d939b;
    --rule: #2a2f35;
    --grid: #1c2025;
    --fid: #6aa5ff;
    --spec: #ff8857;
    --green: #5d9c79;
    --red: #ff6b7f;
    --accent: #ff8857;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video, canvas, iframe { display: block; max-width: 100%; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { font-weight: 300; line-height: 1.1; letter-spacing: -0.015em; margin: 0; }

code, .mono { font-family: var(--mono); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Navigation ---------- */

.nav {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap-wide { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.brand svg { flex: none; }
.nav-links { display: flex; gap: 22px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.nav-links a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 1.5px solid transparent; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Page headers ---------- */

/* Each page's title matches your name on Home: the same size, the same
   height below the menu bar (--title-size and --title-top, under Home). */
.page-head { padding-top: var(--title-top); padding-bottom: 32px; }
.page-head h1 { font-size: var(--title-size); font-weight: 400; }
.page-head .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 640px; margin: 20px 0 0; }

/* ---------- Home ---------- */

/* The hero (see js/hero.js). Your name sits at the top and stays there:
   when the page scrolls on it shrinks up into the menu bar. A slim strip of
   signal runs behind the name, centred on it; below come the subtitle, the
   intro and the ways into the site. The first screen holds still for a
   stretch of scrolling while the signal plays, then a little longer on the
   finished spectrum (REST in js/hero.js: the last fifth of the hold).
   --band-h: the strip's height. --hold: how long the first screen holds. */
:root {
  --band-h: clamp(120px, 21vh, 200px);
  --name-gap: clamp(20px, 3.5vh, 36px); /* space between the menu bar and your name */
  --signal-alpha: 0.4; /* 1 = solid signal line, lower = fainter behind your name */
  --hold: 100vh;
  --title-size: clamp(2.2rem, 5.4vw, 3.6rem); /* your name, and the other pages' titles */
  /* your name sits in the upper third of the strip, with just enough room above */
  --title-top: max(var(--name-gap), calc(var(--band-h) * 0.33 - var(--title-size) * 0.55 + 4px));
  --name-h: 150px; /* measured by js/hero.js */
}

.hero-name {
  padding-top: var(--title-top);
  pointer-events: none;
}
.hero-name a { pointer-events: auto; }
.hero-name h1 { font-size: var(--title-size); line-height: 1.1; font-weight: 400; width: fit-content; transform-origin: 0 0; }

/* the strip is pulled up behind your name, so the name sits in its upper third */
/* the strip's last 22px (where the axis used to sit) is trimmed: the axis now sits inside it */
.hero-band { height: calc(var(--band-h) - 22px); margin-top: calc(var(--title-size) * -0.55 - var(--band-h) * 0.33); }
.hero .tagline { font-family: var(--mono); color: var(--muted); font-size: 14px; letter-spacing: 0.04em; margin: 8px 0 0; }
.hero-signal.is-hoverable { pointer-events: auto; cursor: crosshair; }
.hero .tagline span { white-space: nowrap; } /* lines break between items, not inside them */
.hero-signal { display: block; width: 100%; max-width: none; height: 100%; pointer-events: none; }

.hero-stage { display: flex; flex-direction: column; }
.hero-stage > .wrap { width: 100%; }
.hero-intro { padding-top: 12px; }
.hero .hero-intro p + p { margin-top: 0.8em; }
.hero .hero-intro p { margin: 0; text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
.hero-intro::after { content: ""; display: block; clear: both; }
/* your photo sits in the About text, which wraps around it */
.about-photo {
  float: left;
  width: 104px; height: 104px; margin: 4px 20px 6px 0;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px var(--rule);
}
.hero-links { margin-top: 20px; }
/* Home panels: Publications (your newest paper) and Code (a strip of
   project cards that scrolls on its own). See js/latest.js. */
.panel { border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); padding: 16px 18px 16px; margin: 0 0 14px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-head h3 { font-size: 1.4rem; margin: 0 0 4px; }
.panel-head h3 a { color: inherit; text-decoration: none; }
.panel-head h3 a:hover { color: var(--accent); }
.panel-all { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.panel-sub { margin: 0; color: var(--ink-soft); font-size: 15px; }

.latest-paper { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.latest-paper:empty { display: none; }
.latest-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.latest-tag { color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.latest-paper h4 { font-size: 1.1rem; font-weight: 500; line-height: 1.3; margin: 0; }
.latest-paper h4 a { color: var(--ink); text-decoration: none; }
.latest-paper h4 a:hover { color: var(--accent); }
.panel .latest-text { font-size: 15px; color: var(--ink-soft); margin: 6px 0 0; }
.latest-link { display: inline-block; font-family: var(--mono); font-size: 13px; margin-top: 8px; }

.marquee {
  margin-top: 14px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-set { display: flex; gap: 14px; }
@keyframes marquee { to { transform: translateX(calc(-1 * var(--set-w, 50%))); } }
.project-card {
  width: 420px; flex: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
  border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; background: var(--bg);
}
.project-card-with-image { grid-template-columns: minmax(0, 1fr) 190px; }
.project-card-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.project-thumbnail { display: flex; align-items: center; justify-content: center; align-self: center; width: 100%; aspect-ratio: 3 / 2; min-width: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; }
.project-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.project-card a:focus-visible { outline: 3px solid var(--fid); outline-offset: 3px; }
.project-card h4 { font-family: var(--mono); font-size: 1rem; font-weight: 500; margin: 0; }
.project-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin: 0; }
.panel .project-text { font-size: 15px; color: var(--ink-soft); margin: 0; }
.project-link { font-family: var(--mono); font-size: 13px; margin-top: auto; padding-top: 2px; }
/* reduced motion: no drifting, just a row you can scroll sideways */
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

.tagline-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.hero-links .elsewhere { margin: 0; padding-bottom: 32px; justify-content: center; }
.scroll-hint { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); margin: 0; }

/* With JavaScript: the name stays under the menu bar (and rises into it), and
   the rest of the first screen holds still for a while. */
.hero-js .hero-name { position: sticky; top: var(--nav-h); z-index: 25; }
.hero-js .hero-stage { position: sticky; top: calc(var(--nav-h) + var(--name-h)); }
/* the hold: while this spacer scrolls past, the first screen stays put and
   the next section rises to meet it */
.hero-hold { display: none; }
.hero-js .hero-hold { display: block; height: var(--hold); }
/* On Home the name in the menu bar is the hero's own title, once it arrives. */
.page-home .brand-name { visibility: hidden; }


/* Screens too short to show the whole first screen: don't hold it. */
@media (max-height: 640px) {
  .hero-js .hero-stage { position: relative; top: 0; }
  .hero-js .hero-hold, .scroll-hint { display: none; }
}


.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 2.2rem; margin: 2.2em 0 0.6em; }

.elsewhere { display: flex; flex-wrap: wrap; gap: 10px 22px; font-family: var(--mono); font-size: 14px; padding: 0; margin: 0 0 56px; list-style: none; }

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

.pubs { max-width: 1040px; }
.code-page { max-width: 1040px; }
/* the subtitle spans the map and panel, so it sits on one line on laptops,
   with the same space below it as above (20px, with the map's own margin) */
.pubs .page-head { padding-bottom: 12px; }
.pubs .page-head .lede { max-width: none; }
.pub-explorer { margin: 4px 0 56px; scroll-margin-top: calc(var(--nav-h) + 16px); }

.pub-detail {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 24px;
  position: relative; margin: 18px 0 0; padding: 18px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface);
}
.pub-detail-media { align-self: start; margin: 0; position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--rule); background: var(--bg); }
.pub-detail-media > * { width: 100%; height: 100%; display: block; object-fit: cover; border: 0; }
.pub-detail-media > canvas[hidden] { display: none; }
.pub-detail-body { display: flex; flex-direction: column; min-width: 0; }
.pub-meta { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 10px; }
.pub-year { color: var(--fid); font-weight: 500; }
.pub-theme { color: var(--accent); }
.pub-detail-title { font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.2; margin: 0; }
.pub-detail-title a { color: inherit; text-decoration: none; }
.pub-detail-title a:hover { color: var(--accent); }
.pub-sub { color: var(--ink-soft); margin: 10px 0 0; }
.pub-sub:empty { display: none; }
.pub-authors { color: var(--muted); font-size: 15px; margin: 10px 0 0; }
.pub-authors strong { color: var(--ink-soft); font-weight: 500; }
.pub-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 14px; margin: 12px 0 0; }
.pub-detail-nav { display: contents; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pub-detail-nav > .step-btn { position: absolute; top: var(--pub-arrow-y, 150px); transform: translateY(-50%); }
.pub-detail-nav > [data-step="-1"] { left: -22px; }
.pub-detail-nav > [data-step="1"] { right: -22px; }
.pub-detail-count { grid-column: 1 / -1; grid-row: 2; text-align: center; }
.step-btn { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink-soft); font-family: var(--mono); cursor: pointer; }
.pub-detail-nav > .step-btn, .fig-dialog-step { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 0; line-height: 1; padding: 0; z-index: 2; }
.pub-detail-nav > .step-btn, .fig-dialog-step {
  background: color-mix(in srgb, var(--fid) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--fid) 30%, var(--rule));
}
/* A centred icon avoids the font's asymmetric arrow bearings and baseline. */
.pub-detail-nav > .step-btn::before, .fig-dialog-step::before {
  content: ''; width: 24px; height: 24px; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h16m-6-6 6 6-6 6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pub-detail-nav > [data-step="-1"]::before, .fig-dialog-step.is-newer::before { transform: rotate(180deg); }
.step-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.step-btn:disabled { opacity: 0.35; cursor: default; }

/* the enlarge button on an animated figure, and the enlarged view (js/publications.js) */
.pub-detail-media > canvas { cursor: zoom-in; }
.pub-detail-media > .fig-expand {
  position: absolute; top: 8px; right: 8px; z-index: 1; width: 32px; height: 32px;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink-soft);
  opacity: 0; transition: opacity 0.2s;
}
.pub-detail-media:hover > .fig-expand, .pub-detail-media > .fig-expand:focus-visible { opacity: 1; }
.pub-detail-media > .fig-expand:hover { border-color: var(--accent); color: var(--accent); }
.pub-detail-media > .fig-expand[hidden] { display: none; }

.fig-dialog {
  width: min(1200px, calc(100% - 2 * max(var(--gutter), 24px))); max-width: none;
  max-height: calc(100vh - 2 * var(--gutter)); max-height: calc(100dvh - 2 * var(--gutter));
  padding: 20px; border: 1px solid var(--rule); border-radius: 14px;
  background: var(--surface); color: var(--ink); overflow: visible;
}
.fig-dialog::backdrop { background: color-mix(in srgb, var(--bg) 85%, transparent); }
.fig-dialog-inner { max-height: calc(100dvh - 2 * var(--gutter) - 44px); overflow-y: auto; margin-inline: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.fig-dialog-media {
  margin: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--rule); background: var(--bg);
  max-width: calc((100vh - 2 * var(--gutter) - 86px) * 4 / 3);   /* fits short screens too, with the scrubber */
}
.fig-dialog-left { min-width: 0; }
/* play/pause and the scrubber, styled like the animation preview's */
.fig-dialog-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-family: var(--mono); font-size: 13px; }
.fig-dialog-bar[hidden], .fig-dialog-bar > [hidden] { display: none; }
.fig-dialog-bar button { font: inherit; min-width: 7ch; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.fig-dialog-bar button:hover { border-color: var(--accent); color: var(--accent); }
.fig-dialog-bar input[type="range"] { flex: 1; min-width: 0; margin: 0; accent-color: var(--accent); cursor: pointer; }
.fig-dialog-media canvas { width: 100%; height: 100%; }
.fig-dialog-body { min-width: 0; }
.fig-dialog-step { position: absolute; top: var(--fig-arrow-y, 180px); transform: translateY(-50%); z-index: 1; }
.fig-dialog-step.is-newer { left: -22px; }
.fig-dialog-step.is-older { right: -22px; }
.fig-dialog-close { position: absolute; top: 12px; right: 12px; font-size: 18px; line-height: 1; }
@media (max-width: 980px) {
  .fig-dialog { padding: 54px 14px 16px; }
  .fig-dialog-inner { max-height: calc(100dvh - 2 * var(--gutter) - 72px); grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .fig-dialog-body { padding-right: 0; }
}

/* the full list, CV style */
.pub-all { border-top: 1px solid var(--rule); padding-top: 32px; margin-bottom: 64px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.pub-all-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pub-all h2 { font-size: 2rem; }
.pub-all-note { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.cv-year { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; color: var(--fid); margin: 26px 0 6px; }
.cv-list { list-style: none; margin: 0; padding: 0; }
.cv-item { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 0 12px; padding: 9px 6px; border-top: 1px solid var(--grid); border-radius: 6px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.cv-num { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; padding-top: 3px; }
.cv-item strong { color: var(--ink); font-weight: 600; }
.cv-title { color: var(--ink); text-decoration: none; font-weight: 500; }
.cv-title:hover { color: var(--accent); text-decoration: underline; }
.cv-doi { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.cv-item.is-current { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.pub-all-more { color: var(--muted); font-size: 15px; margin: 24px 0 0; }

@media (max-width: 760px) {
  .pub-detail { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; }
  .pub-detail-count { grid-row: 3; }
}

/* ---------- Publication map (js/pubmap.js) ---------- */

.map-wrap { position: relative; margin: 8px 0 0; }
.map-wrap canvas { width: 100%; height: 270px; display: block; outline-offset: 4px; }
/* theme buttons beside the map (inside it on narrow screens) */
.map-labels { position: absolute; inset: 0; pointer-events: none; }
.map-label {
  position: absolute; transform: translateY(-50%); pointer-events: auto;
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft); white-space: nowrap;
  background: none; border: 1px solid transparent; border-radius: 999px; padding: 2px 8px; cursor: pointer;
}
.map-label:hover { color: var(--accent); border-color: var(--rule); }
.map-label[aria-pressed="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.map-label.is-all { color: var(--muted); }
.map-label.is-all[aria-pressed="true"] { color: var(--muted); background: none; border-color: var(--rule); }
.map-labels.is-narrow .map-label { transform: none; font-size: 11px; padding: 1px 6px; }
/* the hover card on the map: a label only, so clicks always reach the peaks */
.map-tip {
  position: absolute; z-index: 5; max-width: 340px; pointer-events: none;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.10); padding: 8px 12px;
}
.map-tip-head { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.map-tip-title { margin: 0; font-size: 14px; line-height: 1.35; color: var(--ink); }
@media (max-width: 640px) { .map-wrap canvas { height: 280px; } }

/* ---------- Code ---------- */

.terminal { font-family: var(--mono); font-size: 15px; color: var(--ink-soft); margin: 26px 0 0; min-height: 1.6em; }
.terminal .prompt { color: var(--accent); }
.terminal .cursor { display: inline-block; width: 0.6em; height: 1.1em; background: var(--ink-soft); vertical-align: -0.18em; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.repo-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 8px 0 64px; padding: 0; }
.repo { min-width: 0; padding: 24px 20px; border: 1px solid var(--rule); }
.repo:nth-child(even) { background: var(--grid); }
.repo-heading { display: grid; grid-template-columns: minmax(0, 1fr) 76px; grid-template-rows: auto auto; column-gap: 12px; align-items: center; margin-bottom: 12px; }
.repo-heading .repo-name { grid-column: 1; grid-row: 1; margin: 0; min-width: 0; }
.repo-heading .repo-meta { grid-column: 1; grid-row: 2; margin: 6px 0 0; }
.repo-icon { grid-column: 2; grid-row: 1 / 3; width: 76px; max-width: 100%; height: 40px; place-self: center; }
.repo-image { width: 100%; height: auto; margin: 16px 0 0; border: 3px solid var(--rule); }
.repo-image-purple { border: 8px solid transparent; background: linear-gradient(120deg, #5368ef, #783fb7) border-box; }
.repo-name { font-family: var(--mono); font-size: 1.35rem; font-weight: 500; }
.repo-name a { text-decoration: none; }
.repo-meta { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 10px; }
.repo-live:empty { display: none; }
.repo-github { font-weight: 700; }
.lang-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.repo-summary { margin: 0; font-size: 1.15rem; }
.repo-context { color: var(--ink-soft); font-size: 16px; margin: 10px 0 0; }
.repo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.repo-tags li { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 10px; }

@media (max-width: 800px) {
  .repo-list { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* ---------- Small screens ---------- */


@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .pub-detail { margin-inline: 8px; }
  body { font-size: 17px; }
  .nav-links { gap: 14px; font-size: 12px; letter-spacing: 0.03em; }
  /* phones: the logo is the way home */
  .nav-home { display: none; }
  .brand .brand-name { display: none; }
  .page-head { padding-bottom: 24px; }
  :root { --band-h: clamp(110px, 18vh, 160px); }
  .hero .tagline { font-size: 13px; letter-spacing: 0.02em; }
  .about-photo { width: 76px; height: 76px; margin: 3px 14px 4px 0; }
  /* narrow lines beside the photo justify badly: keep hyphenation, drop justify */
  .hero .hero-intro p { text-align: left; }
  .project-card { width: min(360px, calc(100vw - 90px)); grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Project metadata and keyboard focus. */
.repo-meta { align-items: center; }
.repo-meta a { display: inline-flex; align-items: center; min-height: 28px; font-weight: 700; }
.repo-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 7px; border: 1px solid var(--rule); border-radius: 4px; }
.repo a:focus-visible, .repo button:focus-visible, .repo summary:focus-visible { outline: 3px solid var(--fid); outline-offset: 4px; }
