:root {
    color-scheme: dark;
    --ink: #eeebed;
    --muted: #b1afc2;
    --background: #11101a;
    --panel: #1b192a;
    --line: #514966;
    --amber: #f4be78;
    --focus: #94bee4;
    --system: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
    margin: 0 auto;
    max-width: 1360px;
    padding: 0 clamp(18px, 4vw, 64px);
    background: var(--background);
    color: var(--ink);
    font: 16px/1.6 system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, canvas:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
img { display: block; width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--system); line-height: 1.12; }
h1 { font-size: clamp(34px, 5.9vw, 80px); letter-spacing: -.085em; }
h2 { font-size: clamp(26px, 4.1vw, 48px); letter-spacing: -.055em; }
h3 { font-size: clamp(18px, 2.2vw, 27px); letter-spacing: -.035em; }
small, kbd { font: 14px/1.4 var(--system); }
small { color: var(--muted); }
header, nav, .brand, .heading, .card div, footer { display: flex; align-items: center; }
header, .heading, .card div, footer { justify-content: space-between; }
header { min-height: 78px; gap: 14px; border-bottom: 1px solid var(--line); }
.brand { gap: 8px; font: 700 clamp(15px, 2.1vw, 22px) var(--system); white-space: nowrap; }
.brand img { width: 33px; height: auto; }
nav { flex-wrap: wrap; gap: 8px clamp(12px, 2.2vw, 26px); font: 14px/1.4 var(--system); }
header nav { justify-content: flex-end; }
nav a[aria-current], nav a:hover, .plain-link:hover, .back:hover, .contact-link:hover { color: var(--amber); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
[hidden] { display: none !important; }
.plain-link, .about a, .timeline-work a, .station-work a, .missing a { text-decoration: underline; text-underline-offset: 4px; }

.explore { margin-top: clamp(28px, 5vw, 56px); }
.explore-heading { display: flex; gap: 12px 24px; justify-content: space-between; align-items: end; margin-bottom: 23px; }
.explore-heading p { margin-top: 9px; color: var(--muted); }
.explore-heading > a { flex: none; font: 14px/1.45 var(--system); }
.game { border: 1px solid #6e5877; background: #171524; }
.game-screen { position: relative; container-type: inline-size; background: #101022; }
.game-screen canvas { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; image-rendering: pixelated; }
.game-screen canvas:focus-visible { outline-offset: -3px; }
.game button {
    padding: 8px 13px;
    min-height: 44px;
    background: #222039;
    border: 1px solid #726586;
    color: var(--ink);
    font: 14px/1.3 var(--system);
    cursor: pointer;
}
.game button:hover { border-color: var(--amber); color: var(--amber); }
.game .game-start {
    position: absolute;
    left: 50%; top: 78%;
    transform: translate(-50%, -50%);
    padding: 12px clamp(20px, 5cqw, 64px);
    background: var(--amber);
    color: #21182b;
    border-color: #fdd39a;
    box-shadow: 5px 5px #362536;
    font-size: clamp(17px, 2.5cqw, 26px);
    font-weight: 800;
}
.game .game-start:hover { background: #ffce8a; color: #1b1421; }
.game-controls { border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 14px; }
.game-controls p { color: var(--muted); font: 14px/1.7 var(--system); }
.game-controls kbd { color: var(--amber); }
.touch-controls { display: none; gap: 5px; }
.touch-controls button { touch-action: none; min-width: 44px; padding: 7px; }
.station-info { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: start; gap: 12px clamp(14px, 3vw, 37px); border-top: 1px solid var(--line); padding: clamp(17px, 3vw, 29px) 14px; }
.station-year { color: var(--amber); font: 700 clamp(19px, 3vw, 33px) var(--system); }
.station-info h2 { font-size: clamp(21px, 3vw, 32px); margin-bottom: 7px; }
.station-description, .station-timeline { color: var(--muted); }
.station-work { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 9px 0 5px; }
.station-work:empty { display: none; }
.station-timeline { display: inline-block; margin-top: 7px; }
.stations { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); margin-top: 12px; gap: 0; }
.stations a { min-height: 56px; padding: 9px 10px; color: var(--muted); overflow-wrap: anywhere; }
.stations a:not(:last-child) { border-right: 1px solid var(--line); }
.stations span { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.stations a[aria-current] { background: #282035; color: var(--ink); box-shadow: inset 0 -2px var(--amber); }
.stations a[aria-current] span, .stations a:hover span { color: var(--amber); }

.heading { margin: clamp(46px, 7vw, 84px) 0 24px; align-items: baseline; gap: 12px; }
.heading p, .card p, .credit { color: var(--muted); }
.grid, .gallery, .intro, .about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px clamp(18px, 3vw, 38px); }
.card figure, .lead { background: #191629; border: 1px solid var(--line); }
.card figure { overflow: hidden; }
.card img { aspect-ratio: 1.64; object-fit: cover; transition: transform .25s; }
.card:hover img { transform: scale(1.025); }
.card:hover h3 { color: var(--amber); }
.card div { margin: 13px 0 3px; gap: 10px; }
.card p { font-size: 15px; }
footer { margin-top: 86px; border-top: 1px solid var(--line); padding: 29px 0 38px; gap: 20px; }
footer small { display: block; }
.contact-link { font: 700 clamp(20px, 3vw, 28px) var(--system); }
.social { color: var(--muted); }
article, .missing { padding-top: 30px; }
.back { font: 15px/1.4 var(--system); }
.intro { align-items: center; gap: 22px 36px; margin: 32px 0; }
.intro h1, .about h1 { margin-top: 11px; }
.intro p, .about p { font-size: clamp(17px, 1.55vw, 21px); max-width: 58ch; }
.lead { max-height: 80vh; object-fit: contain; }
.gallery { margin-top: 2.5vw; align-items: center; gap: 2.5vw; }
.gallery img:only-child, .gallery img:first-child:nth-last-child(3) { grid-column: 1 / -1; max-width: 850px; margin: auto; }
.gallery .phone { max-width: 320px; margin: auto; }
.next { display: block; margin-top: 60px; color: var(--amber); font: 700 clamp(23px, 3vw, 38px) var(--system); }
.next small { display: block; margin-bottom: 7px; }
.about { padding-top: 52px; }
.about img { margin-top: 24px; }
.about p { margin-bottom: 1.15em; }
.about .credit { font-size: 15px; }
.career { max-width: 1050px; margin: 0 auto; padding-top: clamp(34px, 6vw, 78px); }
.career-intro p { max-width: 48ch; margin-top: 16px; font-size: clamp(18px, 2vw, 22px); color: var(--muted); }
.timeline-jump { gap: 4px 22px; padding: 0 0 14px; margin-top: 34px; }
.timeline-jump a { color: var(--amber); padding: 7px 0; }
.timeline-list { list-style: none; padding: 0; margin: 0; }
.timeline-entry { display: grid; grid-template-columns: minmax(185px, 1fr) 3fr; gap: 8px 36px; border-top: 1px solid var(--line); padding: 25px 0; }
.timeline-entry:target { border-top-color: var(--amber); }
.timeline-date { padding-top: 6px; color: var(--amber); font: 15px/1.45 var(--system); }
.timeline-entry h2 { font-size: clamp(24px, 3.3vw, 38px); margin-bottom: 6px; }
.timeline-role { margin-bottom: 9px; font-weight: 600; }
.timeline-entry p { max-width: 64ch; }
.timeline-work { display: flex; flex-wrap: wrap; gap: 6px 19px; list-style: none; padding: 0; margin: 12px 0 0; }

@media (pointer: coarse), (max-width: 670px) {
    .game-controls p { display: none; }
    .touch-controls { display: flex; flex-wrap: wrap; }
}
@media (max-width: 670px) {
    header { min-height: 68px; }
    header nav { column-gap: 11px; font-size: 13px; }
    .brand img { width: 25px; }
    .explore-heading { align-items: start; flex-direction: column; }
    .station-info { grid-template-columns: 1fr; gap: 8px; }
    .station-info .train-button { justify-self: start; }
    .stations { grid-template-columns: repeat(3, 1fr); }
    .stations a:nth-child(3) { border-right: 0; }
    .stations a:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
    .heading { align-items: flex-start; flex-direction: column; gap: 5px; }
    .grid, .intro, .gallery, .about, .timeline-entry { grid-template-columns: 1fr; }
    .gallery { margin-top: 18px; gap: 18px; }
    .timeline-date { padding-top: 0; }
    .timeline-jump { column-gap: 16px; }
    footer { margin-top: 52px; }
}
@media (max-width: 350px) {
    body { padding: 0 12px; }
    .brand { gap: 5px; }
    .brand img { width: 20px; }
    header nav { column-gap: 8px; font-size: 12px; }
    .game-controls { padding: 7px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .card img { transition: none; }
}
