@font-face {
  font-family: "Commit Mono";
  src: url("/assets/fonts/commit-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Commit Mono";
  src: url("/assets/fonts/commit-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Commit Mono";
  src: url("/assets/fonts/commit-mono-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/martian-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

@view-transition { navigation: auto; }

:root {
  --bg: #16130f;
  --bg-2: #201b15;
  --fg: #e9dfca;
  --dim: #9c927d;
  --faint: #4a4237;
  --amber: #f2a93b;
  --fire: #ec5b30;
  --cyan: #8fc6c6;
  --sage: #a3b07a;
  --violet: #b3a7ee;
  --reflop: #ff5a1f;

  --mono: "Commit Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --display: "Martian Mono", var(--mono);
  --col: 132ch;
  --pad: clamp(1rem, 3vw, 2.5rem);
  --bar: 2.75rem;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--faint) var(--bg);
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.9375rem;
  line-height: 1.65;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--amber); color: var(--bg); }

h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a {
  color: var(--cyan);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: color-mix(in srgb, var(--cyan) 40%, transparent);
}
a:hover { color: var(--bg); background: var(--cyan); text-decoration: none; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.25rem 0.75rem;
  background: var(--amber);
  color: var(--bg);
  z-index: 20;
}
.skip:focus { top: 0.5rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.dim { color: var(--dim); }
.amber { color: var(--amber); }

/* ---------- Top bar: tmux window list as the site menu ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5ch;
  height: var(--bar);
  padding: 0 var(--pad);
  background: var(--bg-2);
  border-bottom: 1px solid var(--faint);
  font-size: 0.9375rem;
  white-space: nowrap;
  view-transition-name: topbar;
}
.session { color: var(--bg); background: var(--sage); padding: 0.2rem 1ch; font-weight: 700; }
.windows { display: flex; gap: 0.5ch; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
.windows a {
  display: block;
  padding: 0.2rem 1ch;
  color: var(--dim);
  text-decoration: none;
}
.windows a:hover { color: var(--fg); background: var(--faint); }
.windows .wn { margin-right: 0.5ch; }
.windows .wl {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: color-mix(in srgb, var(--dim) 70%, transparent);
}
.windows a:hover .wl { text-decoration-color: var(--fg); }
.windows a[aria-current="page"] .wl { text-decoration-color: var(--bg); }
.windows .wn::after { content: ":"; }
.windows a[aria-current="page"] { color: var(--bg); background: var(--amber); }
.windows a[aria-current="page"]::after { content: "*"; }

/* ---------- Bottom bar: the shell prompt / window title ---------- */

.bottombar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 1ch;
  height: var(--bar);
  align-items: center;
  padding: 0 var(--pad);
  background: var(--bg);
  border-top: 1px solid var(--faint);
  color: var(--dim);
  font-size: 0.9375rem;
  white-space: nowrap;
  view-transition-name: bottombar;
}
.bottombar .host { color: var(--sage); }
.bottombar .path { color: var(--cyan); }

/* ---------- Screen ---------- */

.screen {
  width: 100%;
  max-width: calc(var(--col) + 2 * var(--pad));
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 2.75rem) var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  view-transition-name: screen;
}

.cmd { margin-bottom: 1.2rem; }
.ps1 { color: var(--amber); }

.js .out.is-waiting { visibility: hidden; }
.js .out.is-printing { animation: print 420ms steps(12, end) backwards; }
@keyframes print {
  from { clip-path: inset(-1.5em -1ch 100% -1ch); }
  to { clip-path: inset(-1.5em -1ch 0 -1ch); }
}

.typed.is-typing::after,
.cursor {
  content: "";
  display: inline-block;
  width: 1ch;
  height: 1.15em;
  vertical-align: -0.2em;
  background: var(--fg);
}
.cursor { animation: blink 1.1s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hint { margin-top: 1.75rem; color: var(--dim); font-size: 0.8125rem; }
.hint kbd { font: inherit; color: var(--amber); }

/* ---------- Panes ---------- */

.pane {
  position: relative;
  border: 1px solid var(--faint);
  border-radius: 6px;
  padding: 1.5rem 2ch 1.25rem;
  min-width: 0;
}

.pane-title {
  position: absolute;
  top: -0.85em;
  left: 1.5ch;
  right: 1.5ch;
  display: flex;
  justify-content: space-between;
  gap: 2ch;
  pointer-events: none;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: nowrap;
}
.pane-title > * { background: var(--bg); padding: 0 1ch; pointer-events: auto; }
.pane-title .t { color: var(--amber); overflow: hidden; text-overflow: ellipsis; }
.pane-title a { color: var(--cyan); }
.pane-title a:hover { color: var(--bg); background: var(--cyan); }

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

.home {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2.5ch;
  align-items: stretch;
}

.name {
  font-family: var(--display);
  font-stretch: 112.5%;
  font-weight: 760;
  font-size: clamp(2.25rem, 4.4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0.4rem 0 1rem;
}
.tagline { color: var(--fg); }

.kv { margin-top: 1.5rem; display: grid; gap: 0.15rem; }
.kv dd { white-space: nowrap; }
.uni { font-weight: 700; }
.uni-snu { color: var(--cyan); }
.uni-cau { color: var(--violet); }
.uni-reflop { color: var(--reflop); }
.kv a.uni, .kv a.lab { text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.kv a.lab { color: var(--fg); }
.kv a.uni:hover, .kv a.lab:hover { color: var(--bg); }
.kv a.uni-snu:hover { background: var(--cyan); }
.kv a.uni-cau:hover { background: var(--violet); }
.kv a.uni-reflop:hover { background: var(--reflop); }
.kv a.lab:hover { background: var(--fg); }
.kv div { display: grid; grid-template-columns: 8ch minmax(0, 1fr); }
.kv dt { color: var(--dim); }

.pane-sim { display: flex; flex-direction: column; padding-bottom: 0.9rem; }
.sim-lede { margin-bottom: 0.9rem; }
.sim-lede b { color: var(--amber); font-weight: 700; }
/* Inline code, set in its own small box. */
.sim-lede code {
  font: inherit;
  padding: 0.05em 0.6ch;
  border: 1px solid var(--faint);
  border-radius: 4px;
  background: var(--bg-2);
  white-space: nowrap;
}

.fire, .grasp {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 15rem;
}
.fire { cursor: crosshair; touch-action: manipulation; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 2ch;
  margin-top: 0.8rem;
  color: var(--dim);
  font-size: 0.8125rem;
}
.legend b { font-weight: 700; }
.legend .push { margin-left: auto; }
.legend .note { flex-basis: 100%; }
.c-fuel { color: var(--sage); }
.c-water { color: var(--cyan); }
.c-fire { color: var(--fire); }
.c-ash { color: var(--dim); }
.c-amber { color: var(--amber); }

/* ---------- Research: a tree of areas, one open at a time ---------- */

/* One hue per area: world models = amber, robotics = cyan, deep RL = fire. */
.f-wm { --hue: var(--amber); }
.f-rb { --hue: var(--cyan); }
.f-rl { --hue: var(--fire); }

.lede { font-size: inherit; font-weight: 700; line-height: 1.65; margin-bottom: 1.75rem; text-wrap: pretty; }

.tree { margin-top: 0.25rem; line-height: 1.6; color: var(--dim); white-space: pre; }
.tree .br { color: var(--faint); }
.tree a {
  color: var(--hue);
  padding: 0 0.5ch;
  margin: 0 -0.5ch;
  text-decoration-color: color-mix(in srgb, var(--hue) 55%, transparent);
}
.tree a:hover { color: var(--bg); background: var(--hue); }
.tree a[aria-current="true"] { color: var(--bg); background: var(--hue); text-decoration-color: var(--bg); }

/* With JS the three areas share one grid cell, so every box is the same
   size and switching never moves the layout. Without JS they stack. */
.areas { display: grid; gap: 1.75rem; }
.js .areas > .area { grid-area: 1 / 1; }
.js .areas > .area[hidden] { display: flex; visibility: hidden; opacity: 0; }
.area { display: flex; flex-direction: column; justify-content: center; border-color: color-mix(in srgb, var(--hue) 35%, var(--faint)); transition: opacity 160ms ease-out, visibility 160ms; }
.area .pane-title .t { color: var(--hue); }
.area .pane-title .role { color: var(--dim); }
.area-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3ch; align-items: center; padding: 0.75rem 0; }
.area-body p { max-width: 52ch; text-wrap: pretty; }
.area-body p + p { margin-top: 0.75rem; }
.area-name {
  font-family: var(--display);
  font-stretch: 112.5%;
  font-weight: 760;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
}
.see { margin-top: 1rem; color: var(--dim); font-size: 0.875rem; }
.see a { overflow-wrap: anywhere; }

.art { container-type: inline-size; min-width: 0; }
pre.ascii {
  width: fit-content;
  margin-inline: auto;
  font-size: min(0.9375rem, calc(100cqw / var(--cw)));
  line-height: 1.2;
  color: var(--dim);
  white-space: pre;
}
.ascii .b { color: var(--fg); }
.ascii .a { color: var(--amber); }
.ascii .ab { color: var(--amber); font-weight: 700; }
.ascii .c { color: var(--cyan); }
.ascii .v { color: var(--violet); }
.ascii .f { color: var(--fire); }
.ascii .s { color: var(--faint); }

/* ---------- Experience: only the months that have something in them ---------- */

.chart { width: 100%; position: relative; --lead: 29ch; }

/* Skipped months and the "now" line are drawn once, as columns over the
   track area, so they line up with the axis ticks in every row. */
.lanes {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--lead);
  right: 2ch;
  pointer-events: none;
}
.lanes .gap {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x0);
  width: calc(var(--x1) - var(--x0));
  background: color-mix(in srgb, var(--faint) 30%, transparent);
  border-left: 1px dashed var(--faint);
  border-right: 1px dashed var(--faint);
}
.lanes .now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x);
  border-left: 1px dashed color-mix(in srgb, var(--amber) 55%, transparent);
}
.axis, .rows { position: relative; }
.axis, .row {
  display: grid;
  grid-template-columns: 27ch minmax(0, 1fr);
  gap: 0 2ch;
  align-items: center;
}
.axis { color: var(--dim); margin-bottom: 0.5rem; }
.ticks > span { font-size: 0.8125rem; }
.ticks { position: relative; height: 1.4rem; margin-right: 2ch; border-bottom: 1px solid var(--faint); }
.ticks > span:not(.brk) {
  position: absolute;
  left: var(--x);
  bottom: 0;
  padding: 0 0 0.2em 0.6ch;
  border-left: 1px solid var(--faint);
  line-height: 1.3;
}
.ticks .tick-now { color: var(--amber); border-left-color: var(--amber); }

.rows { display: grid; }
.row { padding: 0.7rem 0; border-bottom: 1px dashed color-mix(in srgb, var(--faint) 70%, transparent); }
.row .who { line-height: 1.35; }
.row .role { display: block; font-weight: 700; }
.row .org { display: block; color: var(--dim); font-size: 0.8125rem; }
.track { position: relative; height: 2.7em; margin-right: 2ch; }
.meter {
  position: absolute;
  top: 0.1em;
  height: 1.3em;
  left: var(--x0);
  width: max(1ch, calc(var(--x1) - var(--x0)));
  border-radius: 2px;
}
.cut-mark { position: absolute; left: -2ch; top: 0; color: var(--dim); line-height: 1.2; }
.when {
  position: absolute;
  top: 1.6em;
  font-size: 0.8125rem;
  line-height: 1.2;
  white-space: nowrap;
}
.when.at-start { left: var(--x0); }
.when.at-end { right: calc(100% - var(--x1)); }
.when.at-center { left: calc((var(--x0) + var(--x1)) / 2); transform: translateX(-50%); }

.row.hl.hue-amber { --hue: var(--amber); }
.row.hl.hue-cyan { --hue: var(--cyan); }
.row.hl.hue-fire { --hue: var(--fire); }
.row.hl.hue-fg { --hue: var(--fg); }
.row.hl .role { color: var(--hue); }
.row.hl .meter { background: var(--hue); }
.row.hl .when { color: var(--fg); }
.row.minor .role { font-weight: 400; color: var(--dim); }
.row.minor .meter { background: var(--faint); top: 0.4em; height: 0.6em; }
.row.minor .when { color: var(--dim); }

/* ---------- Projects: list on the left, live preview on the right ---------- */

.fm {
  display: grid;
  grid-template-columns: 30ch minmax(0, 1fr);
  gap: 2.5ch;
  align-items: stretch;
}
.fm-list { display: flex; flex-direction: column; }
.fm-list ul { display: grid; gap: 0.15rem; margin-top: 0.25rem; }
.fm-list li a {
  display: flex;
  justify-content: space-between;
  gap: 1ch;
  padding: 0.1rem 1ch;
  margin: 0 -1ch;
  color: var(--fg);
  text-decoration: none;
}
.fm-list li a .date { color: var(--dim); }
.fm-list li a:hover { background: var(--faint); color: var(--fg); }
.fm-list li a[aria-current="true"] { background: var(--amber); color: var(--bg); }
.fm-list li a[aria-current="true"] .date { color: var(--bg); }
.fm-list .hint { margin-top: auto; padding-top: 1.5rem; }
.fm-more { margin-top: 0.5rem; color: var(--dim); font-size: 0.8125rem; }
.fm-list .hint + .fm-more { margin-top: 0.4rem; }
.fm-list .hint-keys + .fm-more { margin-top: 0.4rem; }

.preview { display: flex; flex-direction: column; }
.preview[hidden] { display: none; }
/* Every preview's stage is the same height, so the project boxes match. */
.stage { flex: none; height: 20rem; display: flex; flex-direction: column; justify-content: center; container-type: inline-size; }
.stage canvas { width: 100%; height: 20rem; display: block; }
/* A lede one line longer than the rest takes that line back from its stage,
   so its box still matches the others. */
.stage.stage-short, .stage-short canvas { height: calc(20rem - 1.65em); }
.stage .fire { cursor: crosshair; }
.stage-hw { display: grid; grid-template-columns: minmax(0, 1fr) 22ch; gap: 2ch; align-items: stretch; }
.hw { display: grid; grid-template-rows: repeat(3, 1fr); gap: 1.1rem; height: 20rem; padding-top: 0.5rem; }
.hw-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 0;
  border: 1px solid var(--faint);
  border-radius: 6px;
  padding: 0.6rem 1ch 0.4rem;
}
.hw-label {
  position: absolute;
  top: -0.8em;
  left: 1ch;
  padding: 0 0.75ch;
  background: var(--bg);
  color: var(--amber);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.hw-art { width: 100%; height: 3.8rem; flex: 1 1 auto; min-height: 0; }
.hw-name { font-style: italic; color: var(--fg); font-size: 0.8125rem; text-align: center; line-height: 1.3; }
pre.mak {
  width: fit-content;
  margin-inline: auto;
  font-size: min(0.875rem, calc(100cqw / 36));
  line-height: 1.3;
  color: var(--fg);
}
.mak .a-cyan { color: var(--cyan); }
.mak .a-sage { color: var(--sage); }
.mak .a-fire { color: var(--fire); }
.mak .m-dim, .mak .m-line { color: var(--dim); }
.mak .m-code { color: var(--fg); }
.mak .m-old { color: var(--faint); }
.mak .m-new { color: var(--fg); }
.mak .m-ok { color: var(--sage); }
.mak .m-cur { color: var(--amber); }
.mak-stat .m-dim { color: var(--dim); }
.mak-stat .m-new { color: var(--fg); }
.mak-stat .m-cur { color: var(--amber); }
.reflop-stat .r-dim { color: var(--dim); }
.reflop-stat .r-done { color: var(--fg); }
.reflop-stat .r-cur { color: var(--amber); }
.reflop-stat .r-sp { margin-left: 2ch; }

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

.contact { display: grid; gap: 0.6rem; margin-top: 1rem; }
.contact div { display: grid; grid-template-columns: 16ch minmax(0, 1fr); align-items: center; }
.contact dt { color: var(--dim); display: flex; align-items: center; gap: 1.25ch; }
.contact dd a { overflow-wrap: anywhere; }
.icon { width: 1.25em; height: 1.25em; flex: none; color: var(--fg); }
.contact div:hover .icon { color: var(--cyan); }
.cmd-last { margin-top: 2.25rem; margin-bottom: 0; }
.contact-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4ch;
  align-items: start;
}
pre.arm { font-size: 0.9375rem; line-height: 1.15; color: var(--fg); margin-top: -0.5rem; }
.arm .j { color: var(--dim); }
.arm .l { color: var(--fg); }
.arm .c { color: var(--cyan); }
.arm .g { color: var(--amber); }
.arm .b { color: #cdb27a; }
.arm .t { color: var(--faint); }
.arm .m { color: var(--dim); }

/* ---------- Narrow screens ---------- */

@media (max-width: 82rem) {
  .home { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .kv dd { white-space: normal; }
}

@media (max-width: 64rem) {
  .contact-page { grid-template-columns: minmax(0, 1fr); }
  pre.arm { font-size: min(1rem, calc((100vw - 2rem) / 28)); }
  .fm { grid-template-columns: minmax(0, 1fr); }
  .fm-list .hint { display: none; }
  .area-body { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .preview[hidden] { display: none; }
}

@media (max-width: 40rem) {
  body { font-size: 0.875rem; }
  .legend .push { margin-left: 0; }
  .contact div { grid-template-columns: 2.5em minmax(0, 1fr); }
  .contact .k {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .stage { height: 17rem; }
  .stage canvas { height: 17rem; }
  .stage.stage-short, .stage-short canvas { height: calc(17rem - 1.65em); }
  /* Diagrams that stack top to bottom on phones size their own canvas. */
  .stage.stage-stack { height: auto; }
  .stage-hw { grid-template-columns: minmax(0, 1fr); height: auto; }
  .hw { height: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; gap: 1ch; }
  .hw-art { height: 2.6rem; flex: none; }
  .hw-name { font-size: 0.75rem; }
}

@media (hover: none) { .hint-keys { display: none; } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .cursor { animation: none; }
  .js .out.is-printing { animation: none; }
  .area { transition: none; }
}


/* Project footer: note on the left, the full repository link on the right. */
.pane-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 2ch;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed color-mix(in srgb, var(--faint) 70%, transparent);
  font-size: 0.8125rem;
}
.pane-foot .note { color: var(--dim); }
.repo {
  display: inline-flex;
  align-items: center;
  gap: 1ch;
  margin-left: auto;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.repo .icon { width: 1.15em; height: 1.15em; color: currentColor; }

.bottombar .prompt { overflow: hidden; text-overflow: ellipsis; }

/* On phones only the left side fits: drop the shell name and tighten up. */
@media (max-width: 40rem) {
  .bottombar { padding: 0 0.5rem; font-size: 0.875rem; }
  .bottombar .shell { display: none; }
}

/* ---------- Phones: the window list becomes a tmux status line at the bottom ----------
   Five equal cells, number over name, so every page is visible and in thumb
   reach. The shell prompt moves up to take the top bar's place. */

@media (max-width: 40rem) {
  body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; }

  .bottombar {
    grid-row: 1;
    top: 0;
    bottom: auto;
    border-top: 0;
    border-bottom: 1px solid var(--faint);
  }
  .screen { grid-row: 2; }
  .topbar {
    grid-row: 3;
    top: auto;
    bottom: 0;
    height: auto;
    padding: 0.3rem 0.5rem calc(0.3rem + env(safe-area-inset-bottom));
    border-bottom: 0;
    border-top: 1px solid var(--faint);
  }
  .session { display: none; }

  /* Cells hug their names and the leftover width is shared out evenly, so
     the space between every pair of names is the same. The type scales with
     the viewport so all five always fit on one line. */
  .windows {
    display: flex;
    justify-content: space-between;
    gap: 0;
    overflow: visible;
  }
  .windows a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.15rem 0.9ch;
    border-radius: 2px;
    color: var(--fg);
    font-size: min(0.8125rem, calc((100vw - 1rem) / 30));
    line-height: 1.25;
    touch-action: manipulation;
  }
  .windows .wn { margin: 0; color: var(--dim); }
  .windows .wn::after,
  .windows a[aria-current="page"]::after { content: none; }
  .windows a[aria-current="page"],
  .windows a[aria-current="page"] .wn { color: var(--bg); }
}

/* ---------- Narrow screens: the experience timeline runs top to bottom ----------
   Newest at the top. Each role gets a vertical bar whose share of the spare
   height follows its length in months (--grow), so the chart fills a tall
   screen instead of squeezing a horizontal axis into a narrow one. */

@media (max-width: 46rem) {
  .chart {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 2 * var(--bar) - 9rem);
  }
  .lanes, .axis { display: none; }
  .rows { display: flex; flex-direction: column; flex: 1 1 auto; }
  .row {
    flex: var(--grow, 1) 1 auto;
    grid-template-columns: 1.25ch minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    gap: 0 2ch;
    align-items: start;
    padding: 0;
    border-bottom: 0;
  }
  .row .who { grid-column: 2; grid-row: 1; }
  .row .track { display: contents; }
  .row .meter {
    position: static;
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: stretch;
    justify-self: center;
    width: 100%;
    height: auto;
    margin-bottom: 3px;
  }
  .row.minor .meter { width: 0.5ch; height: auto; }
  .row .when {
    position: static;
    grid-column: 2;
    grid-row: 2;
    transform: none;
    margin-top: 0.15rem;
    padding-bottom: 1.1rem;
  }
  .row .cut-mark { position: static; grid-column: 1; grid-row: 4; justify-self: center; line-height: 1; }
  /* Months with nothing in them: a short dashed stretch under the bar. */
  .row.gap-below::after {
    content: "";
    grid-column: 1;
    grid-row: 4;
    justify-self: center;
    height: 1.5rem;
    margin-bottom: 3px;
    border-left: 1px dashed var(--faint);
  }
}
