/* varrisdom.dev. The effect canvas is the hero; everything below it is plain
   text on hairlines. Tokens live in tokens.css; nothing here declares a colour
   or a face by value. */

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

html {
  background: var(--void);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font: 450 var(--s-15) / 1.55 var(--font-sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: clip;
  caret-color: var(--signal);
  scrollbar-color: var(--thumb) var(--void);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
kbd { font: inherit; }

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

::selection { background: var(--signal-deep); color: var(--bone); }

/* -- voices ----------------------------------------------------------------
   Three faces, three jobs. The display face is spent on section titles only;
   the mono face carries every label and every exact value; the sans face is
   for sentences. */
.lbl {
  font: 500 var(--s-11) / 16px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
}
.val {
  font: 400 var(--s-13) / 20px var(--font-mono);
  color: var(--bone-dim);
}
.title {
  font: 400 var(--s-32) / 40px var(--font-display);
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 60;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-control);
  font: 500 var(--s-13) / 20px var(--font-mono);
}
.skip:focus-visible { top: 16px; }

.sentinel {
  position: absolute;
  top: 24px;
  left: 0;
  width: 1px;
  height: 1px;
}

/* -- nav ------------------------------------------------------------------
   Text only while the hero is in view; the pill shows up on scroll. A
   transparent 1px border is reserved so nothing shifts when it does. */
.nav {
  position: fixed;
  inset: 14px 0 auto 0;
  z-index: 40;
  pointer-events: none;
}
.nav-in {
  position: relative;
  pointer-events: auto;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition:
    background var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
}
.nav[data-stuck="true"] .nav-in {
  background: rgba(11, 11, 13, 0.94);
  border-color: var(--line);
}
.nav[data-stuck="true"] a { text-shadow: none; }
.nav a {
  display: block;
  padding: 0 12px;
  text-shadow: 0 0 2px var(--void), 0 1px 8px var(--void);
  border-radius: 999px;
  font: 500 var(--s-11) / 32px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mute);
  transition: color var(--t-fast) linear, background var(--t-fast) linear;
}
.nav a:hover { color: var(--bone); }
.nav a:active { background: var(--raised); }
.nav a[aria-current="true"] { color: var(--bone); }
.nav-mark {
  position: absolute;
  bottom: 5px;
  left: var(--nl, 0);
  width: var(--nw, 0);
  height: 1px;
  background: var(--signal);
  opacity: var(--no, 0);
  transition:
    left var(--t-enter) var(--ease),
    width var(--t-enter) var(--ease),
    opacity var(--t-base) var(--ease);
}
.nav-rule {
  width: 1px;
  height: 16px;
  margin: 0 6px;
  background: var(--line-2);
}

/* -- stage ------------------------------------------------------------------
   Sticky, so the page slides over the hero instead of pushing it away. The engine pauses itself once it is covered. */
.stage {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  height: 100svh;
  min-height: min(520px, 100svh);
  overflow: hidden;
  background: var(--void);
}
#fx {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
@supports (animation-timeline: scroll()) {
  #fx {
    animation: hero-dim linear both;
    animation-timeline: scroll(root);
    animation-range: 0 100svh;
  }
}
@keyframes hero-dim {
  to {
    opacity: 0.3;
    transform: scale(0.94);
  }
}
.banner-static {
  display: none;
  position: absolute;
  inset: 0;
  margin: 0;
  place-content: center;
  font: 400 clamp(4px, 0.8vw, 12px) / 1.18 var(--font-mono);
  color: var(--bone-dim);
  white-space: pre;
}
html.no-js .banner-static,
html.hero-failed .banner-static { display: grid; }
html.no-js .hud > .hud-br,
html.no-js .ruler,
html.hero-failed .hud > .hud-br,
html.hero-failed .ruler,
html.no-js time[data-clock] { display: none; }

.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hud > div {
  position: absolute;
  display: grid;
  gap: 4px;
}
.hud-br { bottom: 44px; right: 24px; text-align: right; justify-items: end; }
.hud .lbl,
.hud .val,
.hud .clock,
.hud .key { text-shadow: 0 0 2px var(--void), 0 1px 8px var(--void); }
.hud a,
.hud button { pointer-events: auto; }



.key {
  padding: 4px 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: 500 var(--s-11) / 16px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  transition: color var(--t-fast) linear;
}
.key kbd {
  display: inline-block;
  min-width: 16px;
  margin-right: 4px;
  padding: 0 4px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  line-height: 14px;
  text-align: center;
  color: var(--bone-dim);
}
.key:hover { color: var(--bone); }
.key:active { transform: translateY(1px); }
.key[data-held="true"] { color: var(--signal); }
.keys {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}


.ruler-tip {
  position: absolute;
  bottom: 30px;
  left: 24px;
  transform: translateX(-50%);
  font: 500 var(--s-11) / 16px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bone-dim);
  text-shadow: 0 0 2px var(--void), 0 1px 8px var(--void);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fast) linear;
}
.ruler-tip[data-on="true"] { opacity: 1; }

/* One tick per effect in the engine's roster. The current tick is cyan, ticks
   already shown this cycle are lifted, so the rule is a true readout of where
   the shuffled bag is, not decoration. */
.ruler {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.ruler li { display: contents; }
.ruler button {
  pointer-events: none;
  width: 9px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  align-content: end;
  justify-content: center;
}
.ruler button::before {
  content: "";
  display: block;
  width: 1px;
  height: 12px;
  background: var(--tick);
  transition: background var(--t-base) var(--ease);
}
.ruler button:hover::before {
  height: 18px;
  background: var(--bone);
}
.ruler button::before { transition: background var(--t-base) var(--ease), height var(--t-fast) linear; }
.ruler button[data-state="shown"]::before { background: var(--mute); }
.ruler button[data-state="current"]::before {
  width: 2px;
  background: var(--signal);
}
@media (min-width: 1024px) and (pointer: fine) {
  .ruler button { pointer-events: auto; }
}

/* -- flow -------------------------------------------------------------------- */
.flow {
  position: relative;
  z-index: 1;
  background: var(--page);
  border-top: 1px solid var(--line);
}
.cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}
.field {
  position: sticky;
  top: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100svh;
  margin-bottom: -100vh;
  margin-bottom: -100svh;
  pointer-events: none;
}

/* Every effect, crawling past. Hover to stop it, click a name to play it. */
.ticker {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  padding: 10px 0;
  animation: ticker calc(var(--n, 37) * 2.4s) linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track button {
  flex: none;
  margin-right: 36px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: 500 var(--s-11) / 16px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  transition: color var(--t-fast) linear;
}
.ticker-track button:hover { color: var(--signal); }
@keyframes ticker {
  to { transform: translateX(-50%); }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sec {
  padding-block: 64px;
  scroll-margin-top: 64px;
}
.sec:first-child { padding-top: 72px; }

/* Group header: display title, hairline to the edge, a mono note at the end. */
.head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "l title r" ". idx .";
  align-items: center;
  justify-items: center;
  gap: 8px 20px;
  margin: 0 0 32px;
}
.head .title { grid-area: title; }
.head .rule:first-child { grid-area: l; width: 100%; }
.head .rule:nth-of-type(2) { grid-area: r; width: 100%; }
.head .idx { grid-area: idx; }
.head .title { margin: 0; }
.head .rule {
  height: 1px;
  background: var(--line);
  transform-origin: left;
}
html.reveal .head .rule { transform: scaleX(0); }
html.reveal .head[data-shown] .rule {
  transform: scaleX(1);
  transition: transform 700ms var(--ease) 120ms;
}
.head .title,
.panel h3 { cursor: default; }
.head .title::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.85em;
  margin-left: 0.2em;
  vertical-align: -0.08em;
  background: var(--signal);
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink {
  to { visibility: hidden; }
}

/* -- work -------------------------------------------------------------------- */
@property --ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform var(--t-base) var(--ease);
  transform-style: preserve-3d;
  gap: 48px;
  padding: 32px;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}
.panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(
    240px circle at var(--mx, -999px) var(--my, -999px),
    var(--signal),
    transparent 70%
  );
  opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
  pointer-events: none;
}
.panel:hover::before { opacity: 0.45; }
.panel::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--ang), transparent 0 78%, var(--signal) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.32;
  animation: orbit 9s linear infinite;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}
.panel:nth-child(odd)::after { animation-delay: -4.5s; }
.panel:hover::after { opacity: 0; }
@keyframes orbit {
  to { --ang: 360deg; }
}
.panel + .panel { margin-top: 24px; }
.panel-one { grid-template-columns: minmax(0, 1fr); }
.panel-one .tags { margin-top: 20px; }
.panel h3 {
  margin: 10px 0 8px;
  font: 400 var(--s-32) / 40px var(--font-display);
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.panel .lead {
  margin: 0 0 12px;
  font: 500 var(--s-20) / 28px var(--font-sans);
  color: var(--bone);
}
.panel p {
  margin: 0;
  max-width: 56ch;
  color: var(--bone-dim);
}
.panel .link { display: inline-block; margin-top: 20px; }

.chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-chip);
  background: var(--raised);
  font: 500 var(--s-11) / 16px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bone-dim);
  white-space: nowrap;
  transition: background var(--t-fast) linear, color var(--t-fast) linear, border-color var(--t-fast) linear;
}
.tags .chip:hover {
  background: var(--bone);
  border-color: var(--bone);
  color: var(--void);
}
.big-inline {
  font: 300 var(--s-32) / 40px var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--bone);
  margin-right: 6px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Languages as a tick ruler: one hairline, one tick per name, no bars and no
   ranking implied. Goes vertical on narrow screens. */
.ticks {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 8px 0 0;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.ticks li {
  position: relative;
  font: 400 var(--s-13) / 20px var(--font-mono);
  color: var(--bone-dim);
}
.ticks li::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  width: 1px;
  height: 8px;
  background: var(--line-2);
}
.ticks li:last-child { text-align: right; }
.ticks li:last-child::before { left: auto; right: 0; }
}

.link {
  font: 400 var(--s-13) / 20px var(--font-mono);
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast) linear;
}
.link:hover { text-decoration-color: var(--bone); }

/* label : value rows on a shared grid; one hairline above each row, never
   below, so a list is one rule per item and not a cage. */
dl { margin: 0; }
dd { margin: 0; }
.readout { align-content: start; }
@supports (animation-timeline: view()) {
  .readout {
    animation: lag linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 45%;
  }
}
@keyframes lag {
  from { transform: translateY(36px); }
  to { transform: none; }
}
.row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.rows .row:last-child { border-bottom: 1px solid var(--line); }
.row .big {
  font: 300 var(--s-32) / 40px var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--bone);
  text-align: right;
  white-space: nowrap;
}
.row dd { color: var(--bone-dim); }

/* cards made of cells: hairlines between, brackets around, nothing else */
.cells {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
}
.cell {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px 28px;
  border-top: 1px solid var(--line);
}
.cells .cell:nth-child(1),
.cells .cell:nth-child(2):not(.cell-wide) { border-top: 0; }
.cells .cell:nth-child(1).cell-wide + .cell { border-top: 1px solid var(--line); }
.cell:nth-child(2n):not(.cell-wide) { border-left: 1px solid var(--line); }
.cell-wide { grid-column: 1 / -1; }
.cell p { margin: 0; max-width: none; color: var(--bone-dim); }
.cell .big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font: 300 var(--s-32) / 40px var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--bone);
}
.cell .ticks { margin-top: 12px; }

/* -- contact ---------------------------------------------------------------- */
.handle {
  font: 400 var(--s-15) / 24px var(--font-mono);
  color: var(--bone);
}
a.handle {
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast) linear;
}
a.handle:hover { text-decoration-color: var(--bone); }

/* -- footer --------------------------------------------------------------- */
.foot {
  position: relative;
  z-index: 1;
  background: var(--page);
}
.foot-in {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px var(--gutter) 40px;
}
.foot-in::before {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 0;
  height: 1px;
  background: var(--line);
}
.foot-in { position: relative; }
.foot a { transition: color var(--t-fast) linear; }
.foot a:hover { color: var(--bone-dim); }

/* -- entrances ------------------------------------------------------------ */
html.reveal [data-reveal] {
  opacity: 0;
  transform: translateY(6px);
}
html.reveal [data-reveal][data-shown] {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--t-enter) var(--ease),
    transform var(--t-enter) var(--ease);
  transition-delay: var(--d, 0ms);
}
html.reduce [data-reveal],
html.reduce [data-reveal][data-shown] {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.reveal [data-reveal],
  html.reveal [data-reveal][data-shown] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ruler button::before,
  .nav-in,
  .nav-mark,
  .panel,
  .panel::before { transition: none; }
  #fx,
  .ticker-track,
  .head .title::after,
  .panel::after,
  .readout { animation: none; }
  .panel { transform: none; }
  .field { display: none; }
  html.reveal .head .rule { transform: none; transition: none; }
  .key:active { transform: none; }
}

/* -- collapse ------------------------------------------------------------- */
@media (max-width: 1023px) {
  .panel { grid-template-columns: 1fr; gap: 24px; }
  .row .big { text-align: left; }
}

@media (max-width: 640px) {
  /* Specificity matches the base rules (.hud > div, .nav a) on purpose. */
  .hud > .hud-br { bottom: 24px; right: 16px; }
  .key kbd { display: none; }
  /* 37 ticks at a 7px pitch is noise, not a readout. */
  .ruler { display: none; }
  .panel { transform: none; }
  .panel::after { animation: none; opacity: 0; }
  .ticks {
    flex-direction: column;
    gap: 12px;
    padding: 0 0 0 16px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .ticks li::before {
    top: 50%;
    left: -16px;
    width: 8px;
    height: 1px;
  }
  .ticks li:last-child { text-align: left; }
  .ticks li:last-child::before { right: auto; left: -16px; }
  .nav a.nav-out,
  .nav .nav-rule { display: none; }
  .nav a { padding: 0 10px; }
  .sec { padding-block: 48px; }
  .sec:first-child { padding-top: 56px; }
  .well { padding: 16px; }
  .panel { padding: 20px; }
  .panel-contact { padding: 4px 20px; }
  .row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .cells { grid-template-columns: 1fr; }
  .cell { padding: 18px 20px; border-left: 0 !important; border-top: 1px solid var(--line) !important; }
  .cells .cell:first-child { border-top: 0 !important; }
  .head { gap: 6px 12px; }
  .num { font-size: var(--s-32); line-height: 40px; }
  .foot-in {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ==========================================================================
   HUD chrome. Corner brackets, edge rails, section indices, scanlines: the
   measuring-frame vocabulary from the inspiration library, in the
   screensaver's own cyan. Everything here is decoration with a job: the
   brackets say "panel", the rails say where you are, the indices count.
   ========================================================================== */

/* corner bracket marks, drawn with eight gradients so any box can wear them */
.corners {
  --ck: var(--line-2);
  --cl: 12px;
  background-image:
    linear-gradient(var(--ck), var(--ck)), linear-gradient(var(--ck), var(--ck)),
    linear-gradient(var(--ck), var(--ck)), linear-gradient(var(--ck), var(--ck)),
    linear-gradient(var(--ck), var(--ck)), linear-gradient(var(--ck), var(--ck)),
    linear-gradient(var(--ck), var(--ck)), linear-gradient(var(--ck), var(--ck));
  background-repeat: no-repeat;
  background-size:
    var(--cl) 1px, 1px var(--cl),
    var(--cl) 1px, 1px var(--cl),
    var(--cl) 1px, 1px var(--cl),
    var(--cl) 1px, 1px var(--cl);
  background-position:
    left top, left top,
    right top, right top,
    left bottom, left bottom,
    right bottom, right bottom;
  transition: --ck var(--t-base) var(--ease);
}
.panel {
  --ck: var(--line-2);
  --cl: 12px;
  background-color: var(--panel);
  background-image:
    linear-gradient(var(--ck), var(--ck)), linear-gradient(var(--ck), var(--ck)),
    linear-gradient(var(--ck), var(--ck)), linear-gradient(var(--ck), var(--ck)),
    linear-gradient(var(--ck), var(--ck)), linear-gradient(var(--ck), var(--ck)),
    linear-gradient(var(--ck), var(--ck)), linear-gradient(var(--ck), var(--ck));
  background-repeat: no-repeat;
  background-size:
    var(--cl) 1px, 1px var(--cl),
    var(--cl) 1px, 1px var(--cl),
    var(--cl) 1px, 1px var(--cl),
    var(--cl) 1px, 1px var(--cl);
  background-position:
    left top, left top,
    right top, right top,
    left bottom, left bottom,
    right bottom, right bottom;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.panel:hover { --ck: var(--signal); }

/* the hero as a specimen: crop marks inset from the viewport edge */
.frame {
  position: absolute;
  inset: 16px;
  pointer-events: none;
  --ck: var(--line-2);
  --cl: 18px;
}
@media (max-width: 640px) {
  .frame { inset: 10px; --cl: 12px; }
}

/* edge rails: brand and a scroll ruler on the left, the current section on
   the right, both rotated, both out of the way */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 30;
  width: 40px;
  pointer-events: none;
  display: none;
}
.rail-l { left: 0; border-right: 1px solid var(--line); }
.rail-r { right: 0; border-left: 1px solid var(--line); }
.rail .lbl {
  position: absolute;
  left: 50%;
  writing-mode: vertical-rl;
  transform: translateX(-50%);
  color: var(--dim);
  white-space: nowrap;
}
.rail-l .lbl { top: 24px; }
.rail-r .lbl {
  bottom: 24px;
  transform: translateX(-50%) rotate(180deg);
  color: var(--bone-dim);
  transition: opacity var(--t-base) var(--ease);
}
.rail-r .lbl:empty { opacity: 0; }
.rail-ticks {
  position: absolute;
  top: 160px;
  bottom: 160px;
  left: 50%;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px 24px);
}
.rail-ticks::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  width: 7px;
  height: 1px;
  background: var(--signal);
  box-shadow: 0 0 6px var(--signal);
}
@supports (animation-timeline: scroll()) {
  .rail-ticks::after {
    animation: rail-scroll linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes rail-scroll {
  to { top: 100%; }
}
@media (min-width: 1200px) {
  .rail { display: block; }
}

/* section index at the end of each hairline */
.head .idx {
  font: 400 var(--s-11) / 16px var(--font-mono);
  color: var(--dim);
  letter-spacing: 0.08em;
}


/* nav: the block-letter mark before the links */
.nav-mark-v {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 6px 0 8px;
  color: var(--bone-dim);
}
.nav a[aria-current="page"] { color: var(--bone); }

/* scanlines on the glass, faint enough to feel rather than see */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 4px);
  mix-blend-mode: normal;
}

/* footer: the banner again, small, still alive */
.foot-fx {
  display: block;
  width: 100%;
  height: 140px;
  background: var(--void);
  border-bottom: 1px solid var(--line);
}
.foot { background: var(--void); }
.foot-in::before { display: none; }

/* readout numerals carry a small unit rider */
.big small {
  margin-left: 6px;
  font: 500 var(--s-11) / 16px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

@media (prefers-reduced-motion: reduce) {
  .rail-ticks::after { animation: none; }
}

/* -- the voice of hidden things -------------------------------------------- */
.whisper {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 70;
  transform: translate(-50%, 8px);
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(11, 11, 13, 0.94);
  font: 500 var(--s-11) / 16px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-dim);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.whisper[data-on="true"] {
  opacity: 1;
  transform: translate(-50%, 0);
}
.egg-count { margin-left: auto; }
.egg-count[data-all="true"] { color: var(--signal); }

html.hax { --signal: #33ff66; --signal-deep: #0f5a2a; --bone: #c8ffd6; --bone-dim: #9be7ad; --mute: #6fb381; --dim: #4f8a5f; }
html.inverted { filter: invert(1); }
html.flipped { transform: rotate(180deg); transition: transform 600ms var(--ease); }
html.flash-cyan body::after { background: rgba(0, 209, 255, 0.08); }
html.party #fx { animation: hue 1.2s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg); } }

@media print {
  body > * { display: none !important; }
  body::before {
    content: "you printed a screensaver. it did not survive the trip. varrisdom.dev";
    display: block;
    padding: 2cm;
    font: 14px monospace;
    color: #000;
  }
}
