/* Girish E · portfolio v2 · theme "Timetable" (see README.md)
   Paper, ink and one ultramarine route line. Newsreader for display, Geist for text, Geist Mono for data. */

/* ------------------------------------------------------------------ tokens */
:root {
  --paper: #f2f0ea;
  --paper-2: #e9e6dd;
  --paper-3: #dedacf;
  --ink: #141414;
  --ink-2: #3b3a36;
  --muted: #74716a;
  --rule: #d4d0c5;
  --rule-strong: #b9b4a7;
  --accent: #2b44ff;
  --accent-ink: #ffffff;
  --accent-soft: rgb(43 68 255 / .08);
  --ok: #17824a;
  --warn: #b26a00;
  --str: #9a4f1c;
  --code-bg: #e9e6dd;
  --shadow: 0 30px 60px -32px rgb(20 20 20 / .35);

  /* the departure board is always a dark object */
  --board: #121212;
  --flap: #1e1e1d;
  --flap-ink: #f3f0e7;
  --board-dim: #8b887f;
  --board-ok: #7fd69b;
  --board-warn: #f2c25b;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bar-h: 56px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111110; --paper-2: #191917; --paper-3: #23221f;
    --ink: #edeae2; --ink-2: #c4c1b8; --muted: #8d8a81;
    --rule: #2b2a27; --rule-strong: #3d3c37;
    --accent: #8796ff; --accent-ink: #0b0b0b; --accent-soft: rgb(135 150 255 / .1);
    --ok: #6fcf93; --warn: #e9b44c; --str: #e0a273; --code-bg: #181816;
    --shadow: 0 30px 60px -30px rgb(0 0 0 / .7);
    --board: #191918; --flap: #232321;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111110; --paper-2: #191917; --paper-3: #23221f;
  --ink: #edeae2; --ink-2: #c4c1b8; --muted: #8d8a81;
  --rule: #2b2a27; --rule-strong: #3d3c37;
  --accent: #8796ff; --accent-ink: #0b0b0b; --accent-soft: rgb(135 150 255 / .1);
  --ok: #6fcf93; --warn: #e9b44c; --str: #e0a273; --code-bg: #181816;
  --shadow: 0 30px 60px -30px rgb(0 0 0 / .7);
  --board: #191918; --flap: #232321;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html:has(dialog[open]) { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
code, kbd, pre { font-family: var(--mono); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  font-size: 11px; line-height: 1; color: var(--ink-2);
  border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--paper);
}
code { font-size: .88em; padding: .08em .3em; border-radius: 3px; background: var(--code-bg); }

.skip {
  position: fixed; left: 12px; top: -48px; z-index: 100; padding: 8px 14px;
  background: var(--ink); color: var(--paper); text-decoration: none; border-radius: 3px; transition: top .2s;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ top bar */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 40; height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, transform .45s var(--ease);
}
.bar.is-scrolled { border-bottom-color: var(--rule); }
.bar-name { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.bar-role { font-weight: 400; color: var(--muted); }
.bar-mark { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; }
.bar-mark::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.bar-right { display: flex; align-items: center; gap: 8px; }
.bar-clock { font: 500 12px/1 var(--mono); color: var(--muted); margin-right: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-clock time { color: var(--ink); }
.bar-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid var(--rule); border-radius: 4px; background: transparent; cursor: pointer;
  font: 500 12px/1 var(--mono); text-decoration: none; white-space: nowrap;
  transition: border-color .2s, background-color .2s, color .2s;
}
.bar-btn:hover { border-color: var(--ink); }
.bar-btn kbd { height: 18px; min-width: 18px; font-size: 10px; }
.bar-theme { width: 32px; justify-content: center; padding: 0; }
.bar-theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.bar-theme svg path { fill: currentColor; stroke: none; transition: transform .6s var(--ease); transform-origin: 10px 10px; }
:root[data-theme="dark"] .bar-theme svg path { transform: rotate(180deg); }
.bar-menu { display: none; }
.bar-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
  transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); display: none;
}
@media (max-width: 1179px) { .bar-progress { display: block; } }
@media (max-width: 860px) {
  .bar-clock, .bar-k, .bar-cv, .bar-role { display: none; }
  .bar-menu { display: inline-flex; }
}

/* ------------------------------------------------------------------ shell + rail */
.shell {
  max-width: 1400px; margin: 0 auto; padding: var(--bar-h) var(--gutter) 0;
}
@media (min-width: 1180px) {
  .shell { display: grid; grid-template-columns: 188px minmax(0, 1fr); column-gap: clamp(40px, 5vw, 80px); }
}
main { min-width: 0; max-width: 1080px; }

.rail { display: none; }
@media (min-width: 1180px) {
  .rail {
    display: block; position: sticky; top: calc(var(--bar-h) + 48px); align-self: start;
    max-height: calc(100vh - var(--bar-h) - 72px); padding-left: 22px;
    font: 500 12px/1.2 var(--mono);
  }
}
.rail-track { position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--rule-strong); }
.rail-fill { position: absolute; inset: 0 0 auto; height: var(--fill, 0px); background: var(--accent); width: 1px; }
.rail-bus {
  position: absolute; left: -5px; top: 0; width: 11px; height: 17px; border-radius: 3px;
  background: var(--accent); transform: translateY(var(--bus, 0px));
  box-shadow: 0 0 0 3px var(--paper);
}
.rail-bus::before, .rail-bus::after { content: ""; position: absolute; left: 2px; right: 2px; height: 3px; border-radius: 1px; background: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.rail-bus::before { top: 3px; }
.rail-bus::after { bottom: 3px; height: 2px; }
.rail-zones > li + li { margin-top: 22px; }
.rail-zone { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; margin-bottom: 8px; }
.rail-zones ol li a {
  position: relative; display: block; padding: 6px 0; color: var(--muted); text-decoration: none;
  transition: color .25s, transform .35s var(--ease);
}
.rail-zones ol li a::before {
  content: ""; position: absolute; left: -22px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%; background: var(--paper); border: 1.5px solid var(--rule-strong);
  transition: background-color .3s, border-color .3s, transform .3s var(--ease);
}
.rail-zones ol li a:hover { color: var(--ink); transform: translateX(3px); }
.rail-zones ol li a.is-past { color: var(--ink-2); }
.rail-zones ol li a.is-past::before { background: var(--ink); border-color: var(--ink); }
.rail-zones ol li a.is-here { color: var(--ink); }
.rail-zones ol li a.is-here::before { background: var(--accent); border-color: var(--accent); transform: scale(1.25); }

/* ------------------------------------------------------------------ reveal motion */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js [data-split] .w { display: inline-block; overflow: clip; vertical-align: top; padding: 0 .07em .1em 0; margin: 0 -.07em -.1em 0; }
.js [data-split] .w > span { display: inline-block; transform: translateY(108%); transition: transform 1.05s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-split].is-in .w > span { transform: none; }
.no-anim .reveal, .no-anim [data-split] .w > span { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; transition: opacity .4s linear; }
  .js [data-split] .w > span { transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ------------------------------------------------------------------ shared pieces */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px;
  border: 1px solid var(--ink); border-radius: 4px; background: transparent; cursor: pointer;
  font: 500 15px/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn span { transition: transform .4s var(--ease); }
.btn:hover span { transform: translateY(3px); }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--muted); }
.dot-green { background: var(--ok); }
.dot-amber { background: var(--warn); }

.tag { display: inline-block; padding: 3px 8px; border: 1px solid var(--rule-strong); border-radius: 3px; text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; white-space: nowrap; color: var(--ink-2); }
.tag-green { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.tag-amber { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }

/* drafting-paper grid behind visuals */
.grid-bg {
  background-color: var(--paper-2);
  background-image:
    linear-gradient(var(--grid, rgb(20 20 20 / .045)) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid, rgb(20 20 20 / .045)) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ------------------------------------------------------------------ blocks & zones */
.block { padding-top: clamp(72px, 10vw, 128px); scroll-margin-top: var(--bar-h); }
.block-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 4.5vw, 56px); }
.label { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; }
.block-title {
  font: 380 clamp(2rem, 1.25rem + 2.7vw, 3.5rem)/1.05 var(--serif);
  letter-spacing: -.018em; max-width: 21ch; text-wrap: balance;
}
.block-intro { color: var(--muted); max-width: 40em; font-size: 1.05rem; }
.block-aside { color: var(--muted); }

.zone {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: clamp(18px, 3vw, 36px);
  margin-top: clamp(110px, 15vw, 200px); padding-bottom: clamp(22px, 3vw, 32px);
}
.zone-no {
  font: 300 clamp(5.5rem, 3rem + 9vw, 11.5rem)/.74 var(--serif); letter-spacing: -.05em;
  font-variant-numeric: lining-nums; color: var(--ink);
}
.zone-name { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.zone-title { font: 400 clamp(1.9rem, 1.4rem + 1.6vw, 2.8rem)/1.05 var(--serif); letter-spacing: -.015em; margin: 4px 0 8px; }
.zone-desc { color: var(--muted); max-width: 34em; }
.zone-rule { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform-origin: 0 50%; }
.js .zone .zone-rule { transform: scaleX(0); transition: transform 1.4s var(--ease-in-out) .1s; }
.js .zone.is-in .zone-rule { transform: scaleX(1); }
.js .zone .zone-no { clip-path: inset(0 0 100% 0); transform: translateY(24px); transition: clip-path 1.1s var(--ease), transform 1.1s var(--ease); }
.js .zone.is-in .zone-no { clip-path: inset(-10% -10% -10% -10%); transform: none; }
.js .zone > div { opacity: 0; transform: translateY(12px); transition: opacity .9s var(--ease) .25s, transform .9s var(--ease) .25s; }
.js .zone.is-in > div { opacity: 1; transform: none; }
.no-anim .zone .zone-rule { transform: none !important; }
.no-anim .zone .zone-no { clip-path: none !important; transform: none !important; }
.no-anim .zone > div { opacity: 1 !important; transform: none !important; }

/* ------------------------------------------------------------------ hero */
.hero { padding-top: clamp(28px, 5vw, 64px); }
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--rule);
}
.hero-title {
  font: 340 clamp(2.75rem, 1.1rem + 6.1vw, 6.6rem)/.98 var(--serif);
  letter-spacing: -.03em; margin: clamp(28px, 5vw, 64px) 0 clamp(32px, 5vw, 64px);
  max-width: 14.5ch; text-wrap: balance;
}
.hero-title em, .contact-title em { font-style: italic; font-weight: 320; color: var(--accent); }
.hero-grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(40px, 5vw, 72px); align-items: start; } }
.lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.28rem); line-height: 1.55; color: var(--ink-2); max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 36px; }
.hero-facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.hero-facts div, .facts div { padding: 10px 0; border-top: 1px solid var(--rule); }
.hero-facts dt, .facts dt { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
.hero-facts dd { color: var(--ink); font-size: 12.5px; margin-top: 2px; }
@media (max-width: 520px) { .hero-facts { grid-template-columns: 1fr; } }
/* phones: the board follows the buttons, the facts come last */
@media (max-width: 959px) {
  .hero-grid { gap: 0; }
  .hero-copy { display: contents; }
  .board-wrap { order: 1; margin-bottom: 40px; }
  .hero-facts { order: 2; }
}

/* ---- departure board ---- */
.board-wrap figcaption { color: var(--muted); margin-top: 12px; }
.board {
  container-type: inline-size;
  --pad: clamp(12px, 3cqi, 18px);
  background: var(--board); color: var(--flap-ink); border-radius: 8px; padding: var(--pad);
  box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / .05);
  --cells: 31; --groups-gap: 2;
}
/* cqi is the board's content width; the variable lives on its children because a container can't query itself */
.board > * { --cw: min(22px, calc((100cqi - var(--groups-gap) * 10px - (var(--cells) - 1) * 2px) / var(--cells))); }
@container (max-width: 430px) {
  .board-rows .g-to, .board-cols span:nth-child(2) { display: none !important; }
  .board > * { --cells: 17; --groups-gap: 1; }
}
.board-head { display: flex; justify-content: space-between; align-items: center; font: 600 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 14px; }
.board-head > span:first-child { display: flex; align-items: center; gap: 8px; }
.board-head > span:first-child::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--board-warn); box-shadow: 0 0 0 3px rgb(242 194 91 / .15); }
.board-clock { display: flex; gap: 2px; }
.board-cols, .board-row { display: flex; gap: 10px; }
.board-cols { font: 500 9.5px/1 var(--mono); color: var(--board-dim); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.board-cols span:nth-child(1) { width: calc(var(--cw) * 10 + 18px); }
.board-cols span:nth-child(2) { width: calc(var(--cw) * 14 + 26px); }
.board-rows { display: grid; gap: 6px; }
.board-row .g { display: flex; gap: 2px; }
.board-row .g-status { color: var(--status, var(--flap-ink)); }
.board-row[data-tone="ok"] { --status: var(--board-ok); }
.board-row[data-tone="warn"] { --status: var(--board-warn); }
.board-foot { display: flex; justify-content: space-between; margin-top: 14px; font: 500 9.5px/1 var(--mono); color: var(--board-dim); letter-spacing: .1em; text-transform: uppercase; }

.fl {
  position: relative; width: var(--cw); height: calc(var(--cw) * 1.42); flex: none;
  font: 600 calc(var(--cw) * 1.02)/1 var(--mono); perspective: 140px;
}
.fl > b {
  position: absolute; inset: 0; display: grid; place-items: center; font-weight: inherit;
  background: var(--flap); border-radius: 2px; backface-visibility: hidden;
}
.fl > .t, .fl > .ft { clip-path: inset(0 0 50% 0); }
.fl > .b, .fl > .fb { clip-path: inset(50% 0 0 0); }
.fl > .ft, .fl > .fb { visibility: hidden; }
.fl > .t { background: linear-gradient(#232322, var(--flap)); }
.fl::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -.5px; background: rgb(0 0 0 / .55); z-index: 3; }
.clock-cell { --cw: 13px; }

/* ------------------------------------------------------------------ about */
.about { display: grid; gap: 40px; }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 5vw, 72px); align-items: start; } }
.portrait { padding: 10px 10px 0; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; max-width: 460px; }
.portrait img { width: 100%; height: auto; filter: grayscale(1) contrast(1.06); transition: filter 1.2s var(--ease); }
.portrait:hover img { filter: grayscale(0) contrast(1); }
.portrait figcaption { display: flex; justify-content: space-between; padding: 10px 2px; color: var(--muted); }
.js .portrait.reveal img { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease) .1s, filter 1.2s var(--ease); }
.js .portrait.reveal.is-in img { clip-path: inset(0); }
.no-anim .portrait img { clip-path: none !important; }
.prose p { font-size: 1.08rem; line-height: 1.72; color: var(--ink-2); max-width: 36em; }
.prose p + p { margin-top: 1.1em; }
.kn { font-weight: 600; color: var(--accent); }
.facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; margin-top: 36px; max-width: 40em; }
.facts dd { font-size: 14.5px; margin-top: 2px; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ now */
.now li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.now li:last-child { border-bottom: 1px solid var(--rule); }
.now p { color: var(--ink-2); max-width: 46em; }
.now strong { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) { .now li { grid-template-columns: 1fr; gap: 8px; } .now .tag { justify-self: start; } }

/* ------------------------------------------------------------------ selected work */
.work {
  display: grid; gap: 28px; padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--ink);
}
.work:last-child { border-bottom: 1px solid var(--ink); }
@media (min-width: 960px) { .work { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 4vw, 56px); align-items: center; } }
.work-visual {
  position: relative; aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; cursor: pointer;
  display: grid; place-items: center; isolation: isolate;
}
.work-visual > * { transition: transform 1.1s var(--ease), scale 1.1s var(--ease); }
.work:hover .work-visual > * { scale: 1.025; }
.work-no { color: var(--accent); }
.work-title { font: 400 clamp(1.9rem, 1.3rem + 1.8vw, 2.7rem)/1.05 var(--serif); letter-spacing: -.02em; margin: 8px 0 12px; }
.work-sum { font-size: 1.06rem; color: var(--ink-2); max-width: 30em; }
.work-meta { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; margin: 24px 0; }
.work-meta div { padding: 9px 0; border-top: 1px solid var(--rule); }
.work-meta dt { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }
.work-meta dd { font-size: 12px; color: var(--ink); }
.work-open {
  display: inline-flex; gap: 10px; align-items: center; padding: 0 0 4px; border: 0; cursor: pointer;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  font: 500 15px/1.2 var(--sans); transition: color .25s, background-size .5s var(--ease);
}
.work-open span { transition: transform .45s var(--ease); }
.work-open:hover, .work:hover .work-open { color: var(--accent); }
.work-open:hover span, .work:hover .work-open span { transform: translateX(6px); }

.phones { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 26px); --p: 0; }
.phone {
  width: clamp(112px, 15vw, 186px); aspect-ratio: 600 / 1298; border-radius: clamp(16px, 2vw, 24px);
  border: clamp(4px, .5vw, 6px) solid #141414; background: #000; overflow: hidden;
  box-shadow: var(--shadow); transition: transform 1.1s var(--ease);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phones .phone:nth-child(1) { transform: translateY(calc(var(--p) * -16px - 14px)); }
.phones .phone:nth-child(2) { transform: translateY(calc(var(--p) * 16px + 22px)); }
.work:hover .phones .phone:nth-child(1) { transform: translateY(calc(var(--p) * -16px - 24px)) rotate(-1.5deg); }
.work:hover .phones .phone:nth-child(2) { transform: translateY(calc(var(--p) * 16px + 30px)) rotate(1.5deg); }
.phones-one .phone { transform: translateY(calc(var(--p) * -12px)) !important; }
.annot { display: grid; gap: 14px; align-self: center; }
.annot span { position: relative; padding-left: 26px; color: var(--ink-2); }
.annot span::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 1px; background: var(--ink); }
.annot span::after { content: ""; position: absolute; left: -3px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--accent); }

.window {
  width: 90%; border-radius: 8px; overflow: hidden; background: #0a0e1a; box-shadow: var(--shadow);
  border: 1px solid #000; transform: translateY(calc(var(--p, 0) * -10px));
}
.window-bar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; background: #111626; border-bottom: 1px solid #1c2236; }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2c3348; }
.window-bar span { margin-left: 8px; font: 500 10px/1 var(--mono); color: #7d869e; }
.window img { width: 100%; height: auto; }

.tickets { display: grid; gap: 8px; width: min(86%, 420px); transform: translateY(calc(var(--p, 0) * -10px)); }
.ticket {
  position: relative; display: grid; grid-template-columns: 62px auto minmax(0, 1fr); align-items: baseline; gap: 12px;
  padding: 12px 18px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 3px;
  transition: transform .9s var(--ease); transform: translateX(calc(var(--i, 0) * 10px));
  -webkit-mask: radial-gradient(circle 6px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 6px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 6px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 6px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.ticket span { color: var(--accent); }
.ticket b { font: 400 1.3rem/1 var(--serif); }
.ticket em { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tickets .ticket:nth-child(1) { --i: 0; } .tickets .ticket:nth-child(2) { --i: 1; } .tickets .ticket:nth-child(3) { --i: 2; }
.tickets .ticket:nth-child(4) { --i: 3; } .tickets .ticket:nth-child(5) { --i: 4; }
.work:hover .ticket { transform: translateX(calc(var(--i) * 4px)); }

/* ------------------------------------------------------------------ system diagram */
.system { border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.system-canvas { padding: clamp(12px, 3vw, 28px); }
.system-canvas svg { width: 100%; height: auto; overflow: visible; }
.system-caption {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 16px clamp(16px, 3vw, 28px); border-top: 1px solid var(--rule); background: var(--paper); min-height: 76px;
}
.system-caption-k { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 640px) { .system-caption { grid-template-columns: 1fr; gap: 4px; } }
.system.is-built .system-list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.system-list { padding: 20px; display: grid; gap: 10px; }
.system-list li::before { content: attr(data-label) " · "; font-weight: 600; }

.sys-edge { fill: none; stroke: var(--rule-strong); stroke-width: 1.2; transition: stroke .3s, opacity .3s; }
.sys-node rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1; transition: fill .3s, stroke .3s; }
.sys-node.core rect { fill: var(--ink); }
.sys-node text { font: 500 13px var(--sans); fill: var(--ink); pointer-events: none; transition: fill .3s; }
.sys-node .sub { font: 500 9.5px var(--mono); fill: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.sys-node.core text { fill: var(--paper); }
.sys-node.core .sub { fill: color-mix(in srgb, var(--paper) 65%, transparent); }
.sys-node { cursor: pointer; outline: none; }
.sys-node:hover rect, .sys-node.is-on rect, .sys-node:focus-visible rect { stroke: var(--accent); }
.sys-node.is-on:not(.core) rect { fill: var(--accent-soft); }
.sys-node.core.is-on rect { fill: var(--accent); stroke: var(--accent); }
.sys-node.core.is-on text { fill: var(--accent-ink); }
.sys-col { font: 500 10px var(--mono); fill: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.sys-packet { fill: var(--accent); }
[data-system].has-focus .sys-edge { opacity: .25; }
[data-system].has-focus .sys-edge.is-on { opacity: 1; stroke: var(--accent); stroke-width: 1.6; }
[data-system].has-focus .sys-packet { opacity: .2; }
[data-system].has-focus .sys-packet.is-on { opacity: 1; }
.js .system .sys-edge { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.js .system.is-in .sys-edge { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s var(--ease-in-out) var(--d, 0ms), stroke .3s, opacity .3s; }
.js .system .sys-node { opacity: 0; transition: opacity .7s var(--ease) var(--d, 0ms); }
.js .system.is-in .sys-node { opacity: 1; }

/* ------------------------------------------------------------------ index */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  height: 32px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: 4px; background: transparent;
  cursor: pointer; font: 500 12px/1 var(--mono); transition: background-color .25s, color .25s, border-color .25s;
}
.chip sup { font-size: 9.5px; margin-left: 2px; color: var(--muted); vertical-align: 4px; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] sup { color: color-mix(in srgb, var(--paper) 70%, transparent); }

.index-head, .index-row {
  display: grid; grid-template-columns: 44px minmax(0, 1.15fr) minmax(0, 2fr) minmax(0, 1.1fr) minmax(0, 1.05fr); gap: 16px; align-items: baseline;
}
.index-head { padding: 0 0 10px; color: var(--muted); border-bottom: 1px solid var(--ink); text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
.index-list li { border-bottom: 1px solid var(--rule); }
.index-list li[hidden] { display: none; }
.index-row { position: relative; padding: 15px 0; text-decoration: none; isolation: isolate; }
.index-row::before {
  content: ""; position: absolute; inset: 0 -12px; z-index: -1; background: var(--accent-soft);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .55s var(--ease);
}
a.index-row:hover::before { transform: scaleX(1); }
.i-no { color: var(--muted); font-variant-numeric: tabular-nums; }
.i-name { font-weight: 600; letter-spacing: -.01em; transition: transform .45s var(--ease), color .25s; }
a.index-row:hover .i-name { transform: translateX(6px); color: var(--accent); }
a.index-row[target] .i-name::after { content: " ↗"; font-weight: 400; color: var(--muted); }
.i-what { color: var(--ink-2); font-size: 15px; }
.i-stack, .i-status { color: var(--ink-2); }
@media (max-width: 820px) {
  .index-head { display: none; }
  .index-row { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "no name status" ". what what"; row-gap: 4px; }
  .i-no { grid-area: no; } .i-name { grid-area: name; } .i-status { grid-area: status; text-align: right; }
  .i-what { grid-area: what; font-size: 14.5px; } .i-stack { display: none; }
}
@media (max-width: 480px) {
  .index-row { grid-template-areas: "no name" ". what" ". status"; grid-template-columns: 30px minmax(0, 1fr); }
  .i-status { text-align: left; }
}

.peek {
  position: fixed; left: 0; top: 0; z-index: 30; width: 168px; pointer-events: none;
  border: 4px solid #141414; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow);
  opacity: 0; scale: .92; transform-origin: 0 50%; transition: opacity .25s, scale .4s var(--ease);
}
.peek.is-wide { width: 300px; border-width: 1px; border-radius: 6px; }
.peek.is-on { opacity: 1; scale: 1; }
.peek img { width: 100%; height: auto; }

/* ------------------------------------------------------------------ principles */
.principles li {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; align-items: baseline;
  padding: 26px 0; border-top: 1px solid var(--rule);
}
.principles li:last-child { border-bottom: 1px solid var(--rule); }
.p-no { font: italic 400 1.6rem/1 var(--serif); color: var(--muted); transition: color .3s, transform .5s var(--ease); }
.principles li:hover .p-no { color: var(--accent); transform: translateX(4px); }
.principles h3 { font: 400 1.55rem/1.15 var(--serif); letter-spacing: -.01em; }
.principles p { color: var(--ink-2); }
@media (max-width: 820px) {
  .principles li { grid-template-columns: 48px minmax(0, 1fr); }
  .principles p { grid-column: 2; }
}

/* ------------------------------------------------------------------ field notes */
.note { border-top: 1px solid var(--rule); }
.note:last-child { border-bottom: 1px solid var(--rule); }
.note summary {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) 28px; gap: 16px; align-items: start;
  padding: 24px 0; cursor: pointer; list-style: none;
}
.note summary::-webkit-details-marker { display: none; }
.note-no { color: var(--muted); padding-top: 4px; }
.note-head { display: grid; gap: 6px; }
.note-tag { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
.note-title { font: 400 clamp(1.3rem, 1.1rem + .7vw, 1.65rem)/1.18 var(--serif); letter-spacing: -.01em; transition: color .25s; }
.note summary:hover .note-title { color: var(--accent); }
.note-sum { color: var(--muted); }
.note-x { position: relative; width: 28px; height: 28px; border: 1px solid var(--rule-strong); border-radius: 50%; margin-top: 2px; transition: transform .5s var(--ease), border-color .25s, background-color .25s; }
.note-x::before, .note-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; margin: -.75px 0 0 -5.5px; background: currentColor; }
.note-x::after { transform: rotate(90deg); }
.note summary:hover .note-x { border-color: var(--ink); }
.note[open]:not(.is-closing) .note-x { transform: rotate(45deg); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.note-body { padding: 0 0 32px 68px; display: grid; gap: 22px; overflow: hidden; }
@media (max-width: 640px) { .note summary { grid-template-columns: 36px minmax(0, 1fr) 28px; gap: 12px; } .note-body { padding-left: 0; } }
.note-dl { display: grid; gap: 14px; max-width: 48em; }
.note-dl div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
.note-dl dt { font: 500 11px/1.9 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.note-dl dd { color: var(--ink-2); }
@media (max-width: 560px) { .note-dl div { grid-template-columns: 1fr; gap: 2px; } }
.code {
  position: relative; margin: 0; padding: 18px 20px; max-width: 100%; overflow-x: auto;
  background: var(--code-bg); border: 1px solid var(--rule); border-radius: 4px;
  font: 400 13px/1.65 var(--mono); color: var(--ink); tab-size: 2;
}
.code::before { content: attr(data-lang); position: absolute; right: 12px; top: 8px; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.code code { padding: 0; background: none; font-size: inherit; }
.c-k { color: var(--accent); }
.c-s { color: var(--str); }
.c-c { color: var(--muted); font-style: italic; }
.note-lesson { font: italic 400 1.18rem/1.4 var(--serif); }
.note-lesson span { font-style: normal; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; margin-right: 10px; vertical-align: 2px; }

/* ------------------------------------------------------------------ toolbox */
.tools { display: grid; gap: clamp(28px, 4vw, 48px) clamp(28px, 4vw, 56px); }
@media (min-width: 820px) { .tools { grid-template-columns: 1fr 1fr; } }
.tool-group h3 { color: var(--accent); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.tool-group dl div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--rule); transition: background-color .3s; }
.tool-group dt { font-weight: 600; font-size: 15px; letter-spacing: -.005em; }
.tool-group dd { color: var(--muted); font-size: 14.5px; }
.tool-group dl div:hover dd { color: var(--ink-2); }
@media (max-width: 480px) { .tool-group dl div { grid-template-columns: 1fr; gap: 2px; } }

/* ------------------------------------------------------------------ experience log */
.log { position: relative; }
.log-item { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--rule); }
.log-item:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 821px) {
  .log::before, .log::after { content: ""; position: absolute; left: 176px; top: 0; bottom: 0; width: 1px; }
  .log::before { background: var(--rule); }
  .log::after { background: var(--accent); transform-origin: 50% 0; transform: scaleY(var(--log, 0)); }
  .log-item::before {
    content: ""; position: absolute; left: 172px; top: 34px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--paper); border: 1.5px solid var(--rule-strong); z-index: 1; transition: background-color .4s, border-color .4s;
  }
  .log-item.is-past::before { background: var(--accent); border-color: var(--accent); }
}
.log-when { color: var(--muted); padding-top: 6px; }
.log-body h3 { font: 400 1.55rem/1.2 var(--serif); letter-spacing: -.01em; }
.log-body h3 span { font: 400 1rem/1.4 var(--sans); color: var(--muted); letter-spacing: 0; }
.log-body ul { margin-top: 14px; display: grid; gap: 8px; max-width: 44em; }
.log-body li { position: relative; padding-left: 20px; color: var(--ink-2); }
.log-body li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--ink); }
@media (max-width: 820px) { .log-item { grid-template-columns: 1fr; gap: 6px; } .log-when { padding-top: 0; } }

/* ------------------------------------------------------------------ contact + colophon */
.contact { padding-bottom: clamp(48px, 8vw, 96px); }
.contact-title { font: 330 clamp(2.6rem, 1.2rem + 5.4vw, 6rem)/1 var(--serif); letter-spacing: -.03em; max-width: 15ch; text-wrap: balance; }
.contact-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: clamp(36px, 5vw, 56px) 0 28px; }
.mail {
  font: 400 clamp(1.25rem, .8rem + 2.4vw, 2.5rem)/1.2 var(--sans); letter-spacing: -.02em; text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
  padding-bottom: 4px; transition: background-size .6s var(--ease), color .3s; overflow-wrap: anywhere;
}
.mail:hover { background-size: 100% 2px; color: var(--accent); }
.copy { min-width: 96px; justify-content: center; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.contact-links a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; transition: border-color .25s, color .25s; }
.contact-links a:hover { color: var(--accent); border-color: var(--accent); }
.contact-time { color: var(--muted); margin-top: 28px; }
.contact-time time { color: var(--ink); font-variant-numeric: tabular-nums; }

.colophon {
  display: grid; gap: 28px; padding: 36px 0 56px; border-top: 1px solid var(--ink); font-size: 14.5px; color: var(--ink-2);
}
@media (min-width: 820px) { .colophon { grid-template-columns: 1.6fr 1fr 1fr; } }
.colophon p.mono { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; margin-bottom: 8px; }
@media (hover: none) { .colophon-keys { display: none; } }
.colophon-end { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; color: var(--muted); }
@media (min-width: 820px) { .colophon-end { align-items: flex-end; justify-content: flex-end; } }
.colophon-end a { color: var(--ink); text-decoration: none; }
.colophon-end a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ case study dialog */
.case {
  width: min(1120px, calc(100vw - 32px)); height: calc(100dvh - 32px); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 1px solid var(--ink); border-radius: 8px;
  background: var(--paper); color: var(--ink); overflow: hidden; box-shadow: var(--shadow);
}
.case::backdrop { background: rgb(17 17 16 / .5); }
.case[open] { display: flex; flex-direction: column; animation: case-in .6s var(--ease); }
.case.is-vt[open] { animation: none; }
.case.is-closing { animation: case-out .35s var(--ease-in-out) forwards; }
@keyframes case-in { from { opacity: 0; transform: translateY(28px); } }
@keyframes case-out { to { opacity: 0; transform: translateY(20px); } }
@media (max-width: 640px) { .case { width: 100vw; height: 100dvh; border: 0; border-radius: 0; } }
.case-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px clamp(14px, 3vw, 24px); border-bottom: 1px solid var(--rule); flex: none; }
.case-count { color: var(--muted); }
.case-nav { display: flex; gap: 6px; }
.case-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: clamp(24px, 5vw, 64px) clamp(18px, 5vw, 64px) 48px; }
.case-kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.case-title { font: 360 clamp(2.6rem, 1.4rem + 4.5vw, 5.2rem)/1 var(--serif); letter-spacing: -.03em; margin: 12px 0 20px; }
.case-lede { font-size: clamp(1.08rem, 1rem + .4vw, 1.28rem); line-height: 1.6; color: var(--ink-2); max-width: 40em; }
.case-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; margin: 32px 0; }
.case-meta div { padding: 10px 0; border-top: 1px solid var(--ink); }
.case-meta dt { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }
@media (max-width: 760px) { .case-meta { grid-template-columns: 1fr 1fr; } }
.case-visual { aspect-ratio: 16 / 8; border-radius: 4px; overflow: hidden; display: grid; place-items: center; margin-bottom: clamp(32px, 5vw, 56px); --p: 0; }
.case-visual > * { transform: none !important; }
@media (max-width: 640px) { .case-visual { aspect-ratio: 4 / 3; } }
.case-body { display: grid; gap: clamp(32px, 4vw, 48px); }
.case-body section { display: grid; gap: 14px; }
@media (min-width: 860px) { .case-body section { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; } }
.case-body h3 { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; padding-top: 6px; }
.case-body p { color: var(--ink-2); max-width: 44em; }
.case-list li, .case-dl div { padding: 13px 0; border-top: 1px solid var(--rule); color: var(--ink-2); }
.case-list b, .case-dl dt { color: var(--ink); font-weight: 600; }
.case-dl dd { margin-top: 3px; }
.case-dl a, .case-body p a { color: var(--accent); }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.figures div { border-top: 1px solid var(--ink); padding-top: 10px; }
.figures dt { font: 500 10.5px/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.figures dd { font: 340 clamp(2rem, 1.4rem + 2vw, 3.2rem)/1.1 var(--serif); letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: lining-nums; }
.figures small { font: 500 12px var(--mono); color: var(--muted); margin-left: 4px; }
@media (max-width: 640px) { .figures { grid-template-columns: 1fr 1fr; } }
.case-links { display: flex; flex-wrap: wrap; gap: 10px; }
.case-links a {
  display: inline-flex; padding: 8px 12px; border: 1px solid var(--rule-strong); border-radius: 4px;
  text-decoration: none; font: 500 13px/1.2 var(--mono); transition: border-color .2s, color .2s;
}
.case-links a:hover { border-color: var(--accent); color: var(--accent); }
.case-note { color: var(--muted); }
.case-next {
  display: flex; justify-content: space-between; align-items: end; gap: 16px; width: 100%;
  margin-top: clamp(48px, 7vw, 80px); padding: 24px 0 0; border: 0; border-top: 1px solid var(--ink);
  background: none; cursor: pointer; text-align: left;
}
.case-next small { display: block; font: 500 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.case-next strong { font: 380 clamp(1.8rem, 1.2rem + 2.4vw, 3.2rem)/1 var(--serif); letter-spacing: -.02em; transition: color .3s; }
.case-next i { font-style: normal; font-size: 2rem; transition: transform .5s var(--ease); }
.case-next:hover strong { color: var(--accent); }
.case-next:hover i { transform: translateX(8px); color: var(--accent); }
.js .case-scroll [data-in] { opacity: 0; transform: translateY(14px); animation: case-rise .8s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes case-rise { to { opacity: 1; transform: none; } }

/* view transitions: the work card's picture becomes the case study's picture */
::view-transition-group(*) { animation-duration: .6s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
.theme-vt::view-transition-old(root), .theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-vt::view-transition-new(root) { animation: theme-wipe .7s var(--ease-in-out); }
@keyframes theme-wipe { from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); } to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 0)); } }

/* ------------------------------------------------------------------ command palette */
.palette {
  width: min(620px, calc(100vw - 24px)); max-height: min(560px, calc(100dvh - 24px)); margin: 12vh auto auto; padding: 0;
  border: 1px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); overflow: hidden;
}
.palette::backdrop { background: rgb(17 17 16 / .35); }
.palette[open] { animation: pal-in .35s var(--ease); }
@keyframes pal-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
@media (max-width: 640px) { .palette { margin-top: 12px; max-height: calc(100dvh - 24px); } }
.palette-box { display: flex; flex-direction: column; max-height: inherit; }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--rule); flex: none; }
.palette-search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.6; flex: none; }
.palette-search input { flex: 1; min-width: 0; height: 54px; border: 0; outline: none; background: transparent; font: 400 16px var(--sans); color: var(--ink); }
.palette-search input::placeholder { color: var(--muted); }
.palette-list { flex: 1; overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.palette-group { padding: 12px 10px 6px; font: 500 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.palette-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 4px; cursor: pointer; }
.palette-item span:last-child { font: 500 11px var(--mono); color: var(--muted); white-space: nowrap; }
.palette-item[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.palette-item[aria-selected="true"] span:last-child { color: color-mix(in srgb, var(--paper) 65%, transparent); }
.palette-empty { padding: 28px 12px; color: var(--muted); text-align: center; }
.palette-foot { display: flex; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--rule); color: var(--muted); flex: none; }
.palette-foot kbd { margin-right: 3px; }
@media (hover: none) { .palette-foot { display: none; } }

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; padding: 10px 14px; border-radius: 4px;
  background: var(--ink); color: var(--paper); pointer-events: none;
  opacity: 0; transform: translate(-50%, 12px); transition: opacity .3s, transform .45s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ print */
@media print {
  .bar, .rail, .board-wrap, .filters, .peek, .toast, .work-open, .copy { display: none !important; }
  .shell { padding-top: 0; display: block; }
  .js .reveal, .js [data-split] .w > span { opacity: 1 !important; transform: none !important; }
  .note-body { display: grid !important; }
  body { font-size: 11pt; background: #fff; color: #000; }
}
