/* T2 proposal — cold steel, chrome type, one red eye.
   Dark only: the look depends on it, so the page opts out of light mode. */

:root {
  color-scheme: dark;
  --bg: #0b0e12;
  --bg-raise: #10151b;
  --ink: #e3e8ee;
  --ink-soft: #a6b1bd;
  --ink-faint: #7a8693;
  --rule: #1c242d;
  --rule-strong: #2b3641;
  --steel: #8fbbe0;
  --steel-soft: #c3dcf1;
  --red: #ff3b2f;
  --red-text: #ff6a5c;
  --red-glow: rgba(255, 48, 32, 0.55);
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --display: "Chakra Petch", "Inter", sans-serif;
  --measure: 36rem;
  --shell: 58rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: break-word;
  /* a faint red dawn at the top and a HUD grid that fades out below the fold */
  background:
    radial-gradient(ellipse 70% 38rem at 50% -8rem, rgba(255, 50, 30, 0.07), transparent 70%),
    linear-gradient(to bottom, transparent, var(--bg) 60rem),
    repeating-linear-gradient(to right, rgba(143, 187, 224, 0.035) 0 1px, transparent 1px 4rem),
    repeating-linear-gradient(to bottom, rgba(143, 187, 224, 0.035) 0 1px, transparent 1px 4rem),
    var(--bg);
}

::selection {
  background: rgba(255, 59, 47, 0.35);
  color: #fff;
}

.page {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4.5rem);
  transition: filter 0.45s ease;
}

a {
  color: var(--steel);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--steel) 35%, transparent);
  transition: border-color 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
  a:hover {
    color: var(--steel-soft);
    border-bottom-color: var(--red);
  }
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  margin: 0;
}

.sep {
  color: var(--ink-faint);
  padding: 0 0.15em;
}

.muted {
  color: var(--ink-faint);
}

/* Sticky rail */

.rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.rail.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.rail-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0.75rem clamp(1.5rem, 5vw, 4.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.rail-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

/* the eye, shrunk to a status light */
.rail-name::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 6px 1px var(--red-glow);
}

.rail-nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-nav a {
  color: var(--ink-soft);
  border-bottom: none;
}

@media (hover: hover) {
  .rail-nav a:hover {
    color: var(--red-text);
  }
}

/* Masthead */

.masthead {
  position: relative;
  padding: clamp(4rem, 12vh, 8rem) 0 2.25rem;
  border-bottom: 1px solid var(--rule-strong);
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.eyebrow::before {
  content: "LOC // ";
  color: var(--red-text);
}

/* Chrome lettering, after the T2 title card. A light sheen runs across on hover. */
/* The name always stays on one line: the letter links (Š, T) would otherwise let
   it break mid-word, so it scales with the screen instead, leaving room for the eye. */
.masthead h1 {
  font-size: clamp(1.4rem, calc((100vw - 9rem) / 8.4), 3.9rem);
  white-space: nowrap;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  width: fit-content;
  background:
    linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.85) 50%, transparent 65%) -150% 0 / 60% 100% no-repeat,
    linear-gradient(180deg, #f5f8fb 0%, #cfd8e1 40%, #56636f 52%, #d9e2ea 64%, #8f9daa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6));
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .masthead h1:hover {
    animation: sheen 1.1s ease-out;
  }
}

@keyframes sheen {
  to {
    background-position: 250% 0, 0 0;
  }
}

/* The Š (music) and the T (travel) are hidden doors to side pages. It carries its own chrome so it can
   turn red and glow on hover without dropping out of the name's lettering. */
.s-link {
  position: relative;
  display: inline-block;
  border: 0;
  color: transparent;
  background: linear-gradient(180deg, #f5f8fb 0%, #cfd8e1 40%, #56636f 52%, #d9e2ea 64%, #8f9daa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 3px rgba(255, 59, 47, 0.3));
  transition: filter 0.2s ease;
}

/* At rest the doors breathe a faint red, in step with the eye's pulse. */
@media (prefers-reduced-motion: no-preference) {
  .s-link {
    animation: ember 3.2s ease-in-out infinite;
  }

  /* Now and then one shorts out (js/main.js adds .glitch). Listing ember
     again keeps its pulse running, and in step with the eye, underneath. */
  .s-link.glitch {
    animation: ember 3.2s ease-in-out infinite, spark 0.7s steps(1) 1;
  }

  .s-link:hover,
  .s-link:focus-visible {
    animation: none;
  }
}

@keyframes ember {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 59, 47, 0.12)); }
  50% { filter: drop-shadow(0 0 4px rgba(255, 59, 47, 0.45)); }
}

/* A dying-bulb stutter: flare, drop out, one red frame, settle. */
@keyframes spark {
  0% {
    filter: drop-shadow(0 0 5px rgba(255, 59, 47, 0.85)) drop-shadow(0 0 14px rgba(255, 59, 47, 0.35));
    transform: translateX(1px);
  }
  12% {
    filter: none;
    opacity: 0.5;
    transform: none;
  }
  22% {
    filter: drop-shadow(0 0 6px rgba(255, 59, 47, 0.9)) drop-shadow(0 0 16px rgba(255, 59, 47, 0.45));
    background-image: linear-gradient(180deg, #ffe1db 0%, #ff6a5c 40%, #b3140c 54%, #ff3b2f 68%, #7a0a00 100%);
    opacity: 1;
    transform: translateX(-1px);
  }
  34% {
    filter: none;
    opacity: 0.7;
    transform: none;
  }
  46% {
    filter: drop-shadow(0 0 5px rgba(255, 59, 47, 0.7));
  }
  60%, 100% {
    filter: drop-shadow(0 0 3px rgba(255, 59, 47, 0.3));
  }
}

.s-link::after {
  content: "♪";
  position: absolute;
  top: -0.3em;
  right: -0.45em;
  font-size: 0.42em;
  color: var(--red);
  text-shadow: 0 0 8px var(--red-glow);
  opacity: 0;
  transform: translateY(0.3em);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.s-link:hover,
.s-link:focus-visible {
  color: transparent;
  outline: none;
  background-image: linear-gradient(180deg, #ffe1db 0%, #ff6a5c 40%, #b3140c 54%, #ff3b2f 68%, #7a0a00 100%);
  filter: drop-shadow(0 0 6px rgba(255, 59, 47, 0.9)) drop-shadow(0 0 18px rgba(255, 59, 47, 0.5));
}

.s-link:hover::after,
.s-link:focus-visible::after {
  opacity: 1;
  transform: none;
}

/* the T opens the travel log */
.t-link::after {
  content: "\2708\FE0E";
  right: -0.55em;
}

.role {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  color: var(--ink-soft);
}

.masthead-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.25rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.masthead-links a::before {
  content: "> ";
  color: var(--red-text);
}

/* The eye sits on the name's centre line; its label hangs below without
   counting towards that alignment. */

.name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.9rem;
}

.eye {
  position: relative;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.eye svg {
  display: block;
  width: clamp(5.5rem, 12vw, 8.5rem);
  height: auto;
  overflow: visible;
}

.eye-iris {
  filter: drop-shadow(0 0 4px #ff2a16) drop-shadow(0 0 10px rgba(255, 42, 22, 0.6));
  transform: translate(var(--ex, 0px), var(--ey, 0px));
  transition: transform 0.12s linear;
}

.eye-glow {
  transform-origin: 80px 40px;
  transform-box: view-box;
  animation: pulse 3.2s ease-in-out infinite;
}

.eye.flicker .eye-iris,
.eye.flicker .eye-glow {
  animation: flicker 0.5s steps(1) 1;
}

.eye-label {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.2s ease;
}

.eye-label b {
  font-weight: 400;
  color: var(--red-text);
}

.eye-exit {
  display: none;
}

.t800 .eye-label {
  padding: 0.25rem 0.45rem;
  background: rgba(20, 0, 0, 0.7);
  color: #fff;
  text-align: center;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
}

.t800 .eye-label b {
  color: #fff;
}

.t800 .eye-exit {
  display: block;
  margin-top: 0.15rem;
  font-weight: 600;
  animation: blink 1.2s steps(1) infinite;
}

@media (hover: hover) {
  .eye:hover .eye-label {
    color: var(--ink-soft);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes flicker {
  0%, 30%, 60% { opacity: 0.1; }
  15%, 45%, 100% { opacity: 1; }
}

/* Lede */

.lede {
  padding: clamp(2.5rem, 7vh, 4rem) 0;
}

.lede p {
  max-width: 44rem;
  font-size: clamp(1.08rem, 2.1vw, 1.25rem);
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 1.25rem;
}

.lede p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.lede em {
  font-style: normal;
  color: var(--red-text);
  text-shadow: 0 0 14px rgba(255, 59, 47, 0.35);
}

/* Section labels — HUD readouts */

.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-label::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--red);
  box-shadow: 0 0 6px var(--red-glow);
}

.section-label.spaced {
  margin-top: 2.5rem;
}

/* Selected impact */

.impact {
  padding: clamp(0.9rem, 2vh, 1.25rem) 0 clamp(3rem, 8vh, 4.5rem);
  border-top: 1px solid var(--rule);
}

.impact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  /* the counters sit 1.55rem above each item, so leave room for them
     below the section label and between rows */
  padding-top: 1.55rem;
  gap: 3.3rem 2.5rem;
  counter-reset: impact;
}

.impact-list li {
  counter-increment: impact;
  position: relative;
  padding-top: 1.25rem;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, #dfe7ee, #6b7885 55%, #2b3641) 1;
}

.impact-list li::before {
  content: counter(impact, decimal-leading-zero);
  position: absolute;
  top: -1.55rem;
  left: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--red-text);
}

/* target-lock brackets on hover */
.impact-list li::after {
  --c: var(--red);
  content: "";
  position: absolute;
  inset: 0.4rem -0.9rem -0.9rem;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background:
    linear-gradient(var(--c), var(--c)) top left / 12px 1px,
    linear-gradient(var(--c), var(--c)) top left / 1px 12px,
    linear-gradient(var(--c), var(--c)) top right / 12px 1px,
    linear-gradient(var(--c), var(--c)) top right / 1px 12px,
    linear-gradient(var(--c), var(--c)) bottom left / 12px 1px,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 12px,
    linear-gradient(var(--c), var(--c)) bottom right / 12px 1px,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 12px;
  background-repeat: no-repeat;
}

@media (hover: hover) {
  .impact-list li:hover::after {
    opacity: 1;
    transform: none;
  }
}

.impact-list h3 {
  font-size: 1.12rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.impact-list p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Experience */

.experience {
  padding: clamp(0.9rem, 2vh, 1.25rem) 0 clamp(2.5rem, 6vh, 3.5rem);
  border-top: 1px solid var(--rule-strong);
}

.entry {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
}

.entry:first-of-type {
  border-top: none;
  padding-top: 0.5rem;
}

.dates {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  padding-top: 0.5rem;
}

/* "online" light on the current role */
.entry:first-of-type .dates::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 0.5rem;
  border-radius: 50%;
  vertical-align: 0.1em;
  background: var(--red);
  box-shadow: 0 0 6px var(--red-glow);
}

.entry-what h3 {
  font-size: clamp(1.3rem, 2.8vw, 1.55rem);
  line-height: 1.22;
  margin-bottom: 0.35rem;
}

.org {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.entry-summary {
  margin: 0 0 1.1rem;
  max-width: var(--measure);
  padding-left: 0.9rem;
  border-left: 2px solid var(--rule-strong);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.entry-what ul {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: var(--measure);
}

.entry-what li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.65rem;
  font-size: 0.935rem;
  line-height: 1.62;
}

.entry-what li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.5rem;
  height: 1px;
  background: var(--red);
}

.entry-what li:last-child {
  margin-bottom: 0;
}

/* Two-column block */

.grid-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 3rem;
  padding: clamp(0.9rem, 2vh, 1.25rem) 0 clamp(2.5rem, 6vh, 3.5rem);
  border-top: 1px solid var(--rule-strong);
}

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* chamfered chips: an outer steel shape with an inner dark one */
.tags li {
  --cut: 7px;
  position: relative;
  z-index: 0;
  font-size: 0.8rem;
  padding: 0.32rem 0.8rem;
  color: var(--ink-soft);
  background: var(--rule-strong);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.tags li::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--bg-raise);
  clip-path: inherit;
}

.defs {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
}

.defs dt {
  font-weight: 500;
}

.defs dd {
  margin: 0;
  color: var(--ink-soft);
}

.plain {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.plain li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--rule);
  line-height: 1.5;
}

.plain li:last-child {
  border-bottom: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.site-footer p {
  margin: 0;
}

.sign-off::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.55rem;
  border-radius: 50%;
  vertical-align: 0.1em;
  background: var(--red);
  box-shadow: 0 0 6px var(--red-glow);
}

/* T-800 vision — switched on by clicking the eye */

.hud {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  font-family: var(--mono);
  font-size: clamp(0.62rem, 1.4vw, 0.8rem);
  line-height: 1.55;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
}

/* scanlines and a dark vignette */
.hud::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(40, 0, 0, 0.65));
}

/* Everything turns greyscale except the eye, which stays in colour above the
   red layer so it reads as the way out. */
.t800 .page > :not(.masthead),
.t800 .masthead > :not(.name-row),
.t800 .name-row > h1 {
  filter: grayscale(1) contrast(1.15) brightness(1.15);
}

.t800 .eye {
  z-index: 31;
}

.t800 .eye svg {
  border-radius: 50%;
  animation: beacon 1.6s ease-out infinite;
}

@keyframes beacon {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
  100% { box-shadow: 0 0 0 1.4rem rgba(255, 255, 255, 0); }
}

/* multiplying the greyscale page by red gives the film's red monochrome */
.hud-tint {
  position: fixed;
  inset: 0;
  z-index: 29;
  pointer-events: none;
  background: #ff2414;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.t800 .hud-tint {
  opacity: 1;
}

.t800 .hud {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
  animation: boot 0.45s steps(2) 1;
}

@keyframes boot {
  0% { opacity: 0; }
  30% { opacity: 1; }
  45% { opacity: 0.2; }
  100% { opacity: 1; }
}

/* the scan readout, with the response menu right below it */
.hud-stack {
  position: absolute;
  top: 1rem;
  left: 1rem;
  max-width: calc(100vw - 2rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.hud-panel {
  margin: 0;
  padding: 0.6rem 0.8rem;
  background: rgba(20, 0, 0, 0.55);
  font: inherit;
}

.hud-analysis {
  white-space: pre;
}

.hud-analysis:empty {
  display: none;
}

/* appears once the readout has finished typing */
.hud-responses {
  pointer-events: auto;
  visibility: hidden;
}

.hud-responses.ready {
  visibility: visible;
}

.hud-responses ul {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
}

.hud-responses a {
  position: relative;
  padding-left: 1.3em;
  color: #fff;
  border: 0;
}

.hud-responses a:hover,
.hud-responses a:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  color: #7a0000;
  text-shadow: none;
}

.hud-responses li:first-child a::before {
  content: "▶";
  position: absolute;
  left: 0.1em;
  animation: blink 1s steps(1) infinite;
}

.hud-reticle {
  position: absolute;
  left: 0;
  top: 0;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transform: translate(var(--rx, 50vw), var(--ry, 50vh));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.hud-reticle::before,
.hud-reticle::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.7);
}

.hud-reticle::before {
  left: 50%;
  top: -14px;
  bottom: -14px;
  width: 1px;
}

.hud-reticle::after {
  top: 50%;
  left: -14px;
  right: -14px;
  height: 1px;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Reveal */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.shown {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .rail,
  .page,
  .eye-iris {
    transition: none;
  }
  .eye-glow,
  .t800 .eye svg,
  .t800 .eye-exit,
  .t800 .hud,
  .hud-responses li:first-child a::before {
    animation: none;
  }
}

/* Touch: grow the tap area to ~44px without shifting the underline */

@media (pointer: coarse) {
  .masthead-links a,
  .rail-nav a {
    position: relative;
  }

  .masthead-links a::after,
  .rail-nav a::after {
    content: "";
    position: absolute;
    inset: -0.6rem -0.35rem;
  }

  .hud-reticle {
    display: none;
  }
}

@media (max-width: 40rem) {
  .entry {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 2rem 0;
  }

  .dates {
    padding-top: 0;
  }

  .entry:first-of-type {
    padding-top: 0;
  }

  .masthead-links {
    gap: 1rem 1.25rem;
  }

  /* room for the eye's label, which hangs below the row */
  .name-row {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .eye svg {
    width: 4.6rem;
  }

  /* the eye sits at the right edge, so its label lines up to the right too */
  .eye-label {
    left: auto;
    right: 0;
    transform: none;
    text-align: right;
  }

  .t800 .eye-label {
    text-align: right;
  }

  .grid-section {
    gap: 2.25rem;
  }

  .section-label {
    margin-bottom: 1.35rem;
  }
}

@media (max-width: 26rem) {
  .rail-inner {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }

  .rail-name {
    font-size: 0.85rem;
  }

  .rail-nav {
    gap: 1rem;
    font-size: 0.68rem;
  }

  .tags li {
    font-size: 0.78rem;
    padding: 0.28rem 0.65rem;
  }

  .entry-what li {
    padding-left: 1.1rem;
  }
}

@media print {
  :root {
    color-scheme: light;
    --bg: #fff;
    --bg-raise: #fff;
    --ink: #000;
    --ink-soft: #333;
    --ink-faint: #666;
    --rule: #ccc;
    --rule-strong: #999;
    --steel: #000;
    --red: #000;
    --red-text: #000;
  }

  html,
  body {
    background: #fff;
  }

  .rail,
  .eye,
  .hud,
  .hud-tint {
    display: none !important;
  }

  .page,
  .s-link {
    filter: none !important;
    animation: none !important;
  }

  body {
    font-size: 10.5pt;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .masthead {
    padding-top: 0;
  }

  .masthead h1 {
    background: none;
    color: #000;
    filter: none;
  }

  .entry,
  .impact-list li {
    break-inside: avoid;
  }

  a {
    border-bottom: none;
  }
}
