/* First Light. One authored theme (ruling 15): the world carries the colour, night ink and snow on top, paper at the end. */

@font-face { font-family: 'Imbue'; src: url('fonts/imbue-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('fonts/inter-tight-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/plex-mono-500-latin.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  /* colour */
  --night: #0b111b;      /* night ink: the brief's #0d1424 family, darker than ERA ink #17233b (era-residence tokens.json color.ink) */
  --night-2: #151b27;    /* slate field of the intro: Igloo's slate idea (igloo-inc color.bg #A0A5B1) taken into the night */
  --snow: #f1f3f6;       /* snow white for text on the world */
  --mist: #b4bfcf;       /* quiet text on the world: Montfort navy-blue-3 #a9bfd2 family (montfort tokens.json) */
  --paper: #f0efe7;      /* paper: ERA paper #f3f3ec family (era-residence color.paper), own hex */
  --ink: #18223a;        /* navy ink: ERA ink #17233b family (era-residence color.ink), own hex */
  --ink-2: #4b5468;      /* secondary ink on paper, 7.3:1 on --paper */
  --rule: rgba(24, 34, 58, .16);
  --sun: #ff7b21;        /* the one accent, the sun: White Desert orange #ff7e15 family (white-desert color.orange), own hex */

  /* type */
  --f-display: 'Imbue', 'Didot', 'Bodoni 72', serif;            /* ERA's clone face (era-residence font.display) */
  --f-sans: 'Inter Tight', system-ui, sans-serif;                /* White Desert's sans (white-desert font.sans), ruling 22 */
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;            /* Igloo's face (igloo-inc typography.ui) */
  --monument: clamp(68px, 18.6vw, 360px);                         /* ERA h1 12vw scale class, line-height .875, -0.024em (era-residence typography.h1), sized up to a White Desert monument width */
  --title: clamp(40px, 5.2vw, 92px);                              /* ERA h3 6rem@1vw family (era-residence typography.h3) */
  --body: clamp(16px, 1.22vw, 19px);
  --small: 12px;

  /* motion: one house ease for reveals, the others each with one job */
  --ease-out: cubic-bezier(.25, 1, .5, 1);       /* ERA "Out": reveal-h 1.2 s, stagger .05/.1 (era-residence motion.md reveal-h) */
  --ease-settle: cubic-bezier(.14, 1, .34, 1);   /* Montfort immg.expoOut: TextBlock lines 1.2 s, y .6em (montfort motion.md TextBlock) */
  --ease-wd: cubic-bezier(.76, 0, .24, 1);       /* White Desert wd: menu clip .45 s, page-enter .8 s, mist wipe (white-desert motion.md) */
  --ease-text: cubic-bezier(.39, .575, .565, 1); /* Igloo sine.out: scramble 0.4 s wipe, 0.75 s settle (igloo-inc motion.md text-scramble) */
  --d-reveal: 1.2s;  /* era-residence duration.l */
  --d-hover: .8s;    /* era-residence duration.m, nav-item-l2 hover */
  --d-wipe: .8s;     /* white-desert duration.page */
  --d-fast: .45s;    /* white-desert duration.wd */

  /* layout */
  --gut: clamp(16px, 2.2vw, 40px);
  --hud: clamp(16px, 2.2vw, 34px);
  --z-world: 0; --z-veil: 1; --z-main: 2; --z-paper: 3; --z-hud: 5; --z-intro: 8; --z-skip: 10;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body { margin: 0; background: var(--night); color: var(--snow); font: 400 var(--body)/1.55 var(--f-sans); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
.mono { font-family: var(--f-mono); font-weight: 500; font-size: var(--small); letter-spacing: .04em; text-transform: uppercase; line-height: 1.5; }
::selection { background: var(--sun); color: var(--night); }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 2px; }
.skip { position: fixed; left: var(--hud); top: -60px; z-index: var(--z-skip); background: var(--snow); color: var(--night); padding: 12px 16px; font: 500 14px var(--f-sans); text-decoration: none; }
.skip:focus { top: var(--hud); }

/* ---------- world layers ---------- */
.world, .veil { display: none; }
.gl .world { display: block; position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: var(--z-world); }
.gl .veil { display: block; position: fixed; inset: 0; z-index: var(--z-veil); pointer-events: none; background: var(--night-2); opacity: 0; transition: opacity var(--d-reveal) var(--ease-out); }
.gl.booting .veil { opacity: 1; transition: none; }

/* ---------- HUD ---------- */
.hud { position: relative; z-index: var(--z-hud); color: var(--snow); }
.gl .hud { position: fixed; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: var(--hud); pointer-events: none; transition: color var(--d-hover) var(--ease-out); }
.gl .hud--foot { top: auto; bottom: 0; align-items: flex-end; }
.hud > * { pointer-events: auto; }
.hud__id { display: flex; flex-direction: column; gap: 2px; }
.hud__sub, .hud__time { opacity: .72; }
.hud__for { opacity: .9; }
.hud__nav { display: flex; gap: clamp(14px, 2vw, 30px); }
.hud__nav a { text-decoration: none; position: relative; display: inline-flex; align-items: center; min-height: 44px; margin-top: -14px; }
.hud__nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform var(--d-hover) var(--ease-out); }
.hud__nav a:hover::after, .hud__nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.hud__left { display: flex; align-items: center; gap: 22px; }
.sound { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.sound:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
.sound__wave { width: 18px; height: 10px; background: linear-gradient(currentColor, currentColor) 0 50%/100% 1px no-repeat; opacity: .8; }
.sound[aria-pressed="true"] .sound__wave { background: none; border-bottom: 1px solid currentColor; height: 6px; border-radius: 0 0 50% 50% / 0 0 100% 100%; animation: wave 1.6s var(--ease-wd) infinite alternate; }
@keyframes wave { to { transform: scaleY(-1); } }
html[data-tone="light"] .hud { color: var(--ink); }
.gl .hud:not(.hud--foot)::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(240, 239, 231, .82); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 1px 0 var(--rule); transform: translateY(-101%); transition: transform var(--d-wipe) var(--ease-wd); }
html[data-paper] .hud:not(.hud--foot)::before { transform: none; }
html[data-paper] .hud { color: var(--ink); }
.gl .hud--foot { transition: opacity var(--d-fast) var(--ease-wd), color var(--d-hover) var(--ease-out); }
html[data-paper] .hud--foot, html[data-sheet] .hud--foot { opacity: 0; pointer-events: none; }
html[data-paper] .hud--foot *, html[data-sheet] .hud--foot * { pointer-events: none; }
html[data-finale] .hud--foot { opacity: 0; pointer-events: none; }
html[data-finale] .hud--foot * { pointer-events: none; }

/* ---------- stations ---------- */
main { position: relative; z-index: var(--z-main); }
.station { position: relative; }
.station__in { position: relative; min-height: 100svh; padding: calc(var(--hud) + 72px) var(--gut) calc(var(--hud) + 64px); display: grid; align-content: center; overflow: hidden; }
.still { position: absolute; inset: 0; z-index: -1; }
.still img { width: 100%; height: 100%; object-fit: cover; }
.still::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 17, 27, .35), rgba(11, 17, 27, .1) 40%, rgba(11, 17, 27, .45)); }

.monument { font-family: var(--f-display); font-weight: 340; font-size: var(--monument); line-height: .875; letter-spacing: -.024em; text-transform: uppercase; text-align: center; white-space: nowrap; color: var(--snow); font-optical-sizing: auto; }
.monument__line { display: inline-block; }
/* the hairlines of the display face hold over city lights and snow: a soft halo, not a band */
.station .monument { text-shadow: 0 0 2px rgba(3, 6, 12, .8), 0 0 7px rgba(3, 6, 12, .7), 0 0 22px rgba(3, 6, 12, .45), 0 0 60px rgba(3, 6, 12, .3); }
.title { font-family: var(--f-display); font-weight: 360; font-size: var(--title); line-height: .92; letter-spacing: -.024em; text-transform: uppercase; margin-bottom: .42em; }
.block p + p { margin-top: 1em; }
.block { max-width: 34rem; text-shadow: 0 1px 24px rgba(11, 17, 27, .28); }
.meta { margin-top: 1.6em !important; color: var(--mist); }
.gl .meta { color: #cfd6e2; }
.role { font-weight: 500; }
.quiet { color: var(--mist); margin-top: .5em; }

/* hero */
.station--night .station__in { align-content: end; justify-items: center; }
.night__text { order: -1; justify-self: start; max-width: 22rem; margin-bottom: 18vh; }
.station--night .monument { width: 100%; }


/* person */
.station--person { color: var(--snow); }
.person { display: grid; gap: 40px; align-items: center; }
.portrait { position: relative; width: min(440px, 100%); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: #2a1d14; }
/* graded to the scene: a duotone from night ink to first-light peach, a little grain */
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 0% 50%; filter: saturate(.82) contrast(1.06) brightness(.96) sepia(.08); }
/* graded to the city light: warm highlights from the lamp, the shadows pulled towards the night */
.portrait::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(60% 55% at 17.5% 32.75%, rgba(255, 196, 128, .26), rgba(255, 196, 128, 0) 70%), linear-gradient(180deg, rgba(10, 16, 30, 0) 45%, rgba(10, 16, 30, .42)); mix-blend-mode: soft-light; }
.portrait::after { content: ''; position: absolute; inset: -50%; z-index: 2; opacity: .22; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: overlay; }
.person__text { max-width: 32rem; }
.person .title { font-size: clamp(38px, 4vw, 72px); }
.person__text p + p { margin-top: 1em; }

/* first light */
.station--light { color: var(--snow); }
.station--light .station__in { align-content: end; justify-items: center; }
.monument--end { color: var(--snow); width: 100%; }
.block--intern { justify-self: end; max-width: 27rem; margin-bottom: 10vh; order: -1; text-shadow: none; }
.lead { font-size: clamp(19px, 1.5vw, 23px); line-height: 1.4; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px !important; }
.btn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 4px; font: 500 15px/1 var(--f-sans); text-decoration: none; overflow: hidden; isolation: isolate; transition: color var(--d-hover) var(--ease-out); }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform var(--d-hover) var(--ease-out); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn--sun { background: var(--sun); color: var(--night); }
.btn--sun:hover, .btn--sun:focus-visible { color: var(--paper); }
.btn--ghost { color: var(--snow); box-shadow: inset 0 0 0 1px currentColor; }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--paper); }
.gl .station--light .btn--ghost { background: rgba(3, 6, 12, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink::before { background: var(--sun); }
.btn--ink:hover, .btn--ink:focus-visible { color: var(--night); }
.btn__note { opacity: .7; font-size: 13px; }

/* ---------- the short version: paper ---------- */
.paper { position: relative; z-index: var(--z-paper); background: var(--paper); color: var(--ink); }
.gl .paper { background: none; padding: 0 clamp(12px, 3.2vw, 56px); }
.gl .paper__sheet { position: relative; max-width: 1360px; margin: 0 auto; background: rgba(240, 239, 231, .86); -webkit-backdrop-filter: blur(26px) saturate(1.12); backdrop-filter: blur(26px) saturate(1.12); border-radius: 6px; box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 40px 120px -40px rgba(24, 34, 58, .35); transform-origin: 50% 0; will-change: transform, opacity; }
.paper__in { max-width: 1320px; margin: 0 auto; padding: clamp(80px, 10vw, 150px) var(--gut) 40px; }
.paper__title { font-family: var(--f-display); font-weight: 360; font-size: clamp(54px, 8.5vw, 150px); line-height: .88; letter-spacing: -.024em; text-transform: uppercase; margin-bottom: clamp(48px, 6vw, 96px); }
/* one second display tier for the whole sheet (ERA h3 family, below --title): the asks, the names, the quote */
.paper__in { --tier: clamp(32px, 3.5vw, 60px); }
.sv { margin-top: clamp(80px, 10vw, 160px); }
.sv--ask { margin-top: 0; }
.sv__label { display: flex; align-items: center; gap: 14px; color: var(--ink-2); margin-bottom: clamp(26px, 3vw, 44px); }
.sv__label::before { content: ''; flex: 0 0 36px; height: 1px; background: currentColor; transform-origin: 0 50%; transform: scaleX(var(--k, 1)); }
.ask { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px var(--gut); }
/* hairlines between items set in display type are in the taste (ruling 16); the line draws in with the item */
.ask__item { position: relative; padding-top: 18px; }
.ask__item::before, .tl__row::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--rule); transform-origin: 0 50%; transform: scaleX(var(--k, 1)); }
.ask dt { color: var(--ink-2); }
.ask__big { display: block; margin-top: 14px; font-family: var(--f-display); font-weight: 360; font-size: var(--tier); line-height: .9; letter-spacing: -.015em; text-transform: uppercase; }
.ask__note { display: block; margin-top: 14px; max-width: 22rem; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.ask__more { margin-top: clamp(28px, 3vw, 44px); max-width: 44rem; font-size: 16px; line-height: 1.55; }

/* work and study: every row carries its own span on one shared axis, so study and work read side by side */
.tl { --trackw: 36%; --when: 9.5rem; position: relative; }
.tl__axis { position: relative; height: 46px; margin-left: auto; width: var(--trackw); color: var(--ink-2); }
.tl__axis [data-year], .tl__intern-label { position: absolute; bottom: 4px; transform: translateX(-1px); font-size: 11px; }
.tl__axis [data-year]::before { content: ''; position: absolute; left: 0; bottom: -6px; width: 1px; height: 5px; background: currentColor; opacity: .5; }
.tl__intern-label { bottom: 24px; transform: translateX(-50%); color: var(--ink); white-space: nowrap; }
.tl__lines { position: absolute; top: 46px; bottom: 0; right: 0; width: var(--trackw); pointer-events: none; }
.tl__band { position: absolute; top: 0; bottom: 0; left: calc(var(--a, 0) * 100%); width: calc(var(--w, 0) * 100%); background: rgba(255, 123, 33, .13); transform-origin: 50% 0; transform: scaleY(var(--k, 1)); }
.tl__now { position: absolute; top: 0; bottom: 0; left: calc(var(--now, .72) * 100%); width: 1px; background: var(--sun); transform-origin: 50% 0; transform: scaleY(var(--k, 1)); }
/* a narrower track shortens the years to '21 */
@media (max-width: 1100px) { .tl__cent { font-size: 0; } .tl__cent::after { content: "'"; font-size: 11px; } }
.tl__now-label { position: absolute; left: 6px; bottom: -4px; transform: translateY(100%); font-size: 11px; color: var(--ink); }
.tl__group { margin: clamp(30px, 3vw, 44px) 0 0; padding-bottom: 12px; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.tl__group:first-of-type { margin-top: 10px; }
.tl__row { position: relative; display: grid; grid-template-columns: var(--when) minmax(0, 1fr) var(--trackw); column-gap: var(--gut); padding: 22px 0 26px; }
.tl__when { color: var(--ink-2); padding-top: calc(var(--tier) * .22); }
.tl__name { display: block; font-family: var(--f-display); font-weight: 360; font-size: var(--tier); line-height: .9; letter-spacing: -.015em; text-transform: uppercase; transition: transform var(--d-hover) var(--ease-out); }
.tl__text { margin-top: 12px; max-width: 34rem; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.tl__text b { color: var(--ink); font-weight: 500; }
.tl__rows--small .tl__row, .tl__row--small { padding: 14px 0 16px; }
.tl__rows--small .tl__when, .tl__row--small .tl__when { padding-top: 2px; }
.tl__rows--small .tl__text, .tl__row--small .tl__text { margin-top: 0; color: var(--ink); }
.tl__track { position: relative; height: 1px; margin-top: calc(var(--tier) * .45); background: var(--rule); color: var(--ink); }
.tl__rows--small .tl__track, .tl__row--small .tl__track { margin-top: 11px; }
.tl__row--small .tl__track { background: none; }
.tl__bar { position: absolute; top: -1px; height: 3px; left: calc(var(--a, 0) * 100%); width: calc((var(--b, 0) - var(--a, 0)) * 100%); border-radius: 2px; background: currentColor; transform-origin: 0 50%; transform: scaleX(var(--k, 1)); transition: color var(--d-fast) var(--ease-out), opacity var(--d-fast) var(--ease-out); }
.tl__bar::before { content: ''; position: absolute; left: -3px; top: -2px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tl__bar::after { content: ''; position: absolute; right: -3px; top: -2px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
/* still going: the bar runs to now and fades on; still ahead: dashed to the expected end */
.tl__row.is-now .tl__bar::after { right: auto; left: 100%; top: 0; width: 22px; height: 3px; border-radius: 0; background: linear-gradient(90deg, currentColor, transparent); }
.tl__row.is-ahead .tl__bar::after { display: none; }
.tl__ahead { position: absolute; top: 0; height: 1px; left: calc(var(--b, 0) * 100%); width: calc((var(--c, 0) - var(--b, 0)) * 100%); background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 10px); transform-origin: 0 50%; transform: scaleX(var(--k2, 1)); }
@media (hover: hover) and (pointer: fine) {
  .tl:has(.tl__row:hover) .tl__bar { opacity: .3; }
  .tl__row:hover .tl__bar { opacity: 1; color: var(--sun); }
  .tl__row:hover .tl__track { color: var(--sun); }
  .tl__row:hover .tl__name { transform: translateX(12px); }
}

/* the reference: one sentence that lights up as it is read (leo-parpeix webgl-chars-scrub, in the DOM) */
.sv--quote { max-width: 1120px; }
.sv--quote blockquote p { font-family: var(--f-display); font-weight: 360; font-size: clamp(34px, 4.6vw, 80px); line-height: 1; letter-spacing: -.018em; }
.sv--quote blockquote p::before { content: '\201C'; } .sv--quote blockquote p::after { content: '\201D'; }
.sv--quote figcaption { margin-top: 26px; font-size: 14px; color: var(--ink-2); }

.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) var(--gut); }
.skills dt { color: var(--ink-2); margin-bottom: 10px; }
.skills dd { font-size: clamp(17px, 1.3vw, 20px); line-height: 1.45; max-width: 24rem; }

.sv--contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px var(--gut); align-items: end; }
.sv__title { font-family: var(--f-display); font-weight: 360; font-size: clamp(56px, 8vw, 140px); line-height: .88; letter-spacing: -.024em; text-transform: uppercase; }
.contact__mail { margin-top: 18px; font-size: clamp(20px, 1.8vw, 28px); }
.contact__mail a { text-decoration: none; background: linear-gradient(var(--sun), var(--sun)) 0 100%/100% 2px no-repeat; }
.contact__links { display: flex; gap: 26px; margin-top: 20px; }
.contact__links a { display: inline-flex; align-items: center; min-height: 44px; }
.actions--paper .btn--ghost { color: var(--ink); }
/* ---------- the landing: a morning panorama with the name across it ---------- */
.finale { position: relative; z-index: var(--z-paper); color: var(--snow); overflow: hidden; }
.finale__in { position: relative; min-height: 100svh; display: grid; align-content: end; padding: calc(var(--hud) + 72px) var(--gut) var(--hud); }
.finale__links { font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px clamp(18px, 2.4vw, 40px); justify-content: center; margin-bottom: clamp(10px, 2vh, 28px); }
.finale__links a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; position: relative; }
.finale__links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform var(--d-hover) var(--ease-out); }
.finale__links a:hover::after, .finale__links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.finale__name { font-family: var(--f-display); font-weight: 340; font-size: var(--monument); line-height: .875; letter-spacing: -.024em; text-transform: uppercase; text-align: center; white-space: nowrap; }
.finale__line { display: inline-block; }
.finale__credit { text-align: center; margin-top: 6px; font-size: 11px; opacity: .62; }
.finale__copy { text-align: center; margin-top: clamp(14px, 2.4vh, 30px); opacity: .7; }
.finale .still::after { background: linear-gradient(180deg, rgba(11, 17, 27, 0) 40%, rgba(11, 17, 27, .55)); }
.gl .finale { background: none; }

/* ---------- intro card ---------- */
.intro-card { display: none; }
.gl.intro .intro-card { display: grid; position: fixed; inset: 0; z-index: var(--z-intro); place-content: end start; padding: var(--hud); color: var(--snow); pointer-events: none; }
.intro-card__label { font: 500 var(--small)/1.5 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.intro-card__count { font: 500 13px/1 var(--f-mono); letter-spacing: .08em; margin-top: 6px; }
.intro-card__skip { all: unset; position: fixed; right: var(--hud); bottom: var(--hud); cursor: pointer; pointer-events: auto; min-height: 44px; display: inline-flex; align-items: center; font: 500 var(--small)/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.intro-card__skip:focus-visible { outline: 2px solid var(--sun); }
.gl.intro .hud, .gl.intro main { opacity: 0; }
.gl.intro-done .intro-card { opacity: 0; transition: opacity .75s cubic-bezier(.645, .045, .355, 1); }

/* ---------- GL mode: the flight ---------- */
.gl .still { display: none; }
.gl .station__in { position: fixed; inset: 0; height: 100svh; min-height: 0; pointer-events: none; }
.gl .station__in a, .gl .station__in button { pointer-events: auto; }
.gl .station { height: 150svh; }
/* the scroll is the camera: each station's height is the runway to the next place. The match cut needs more room. */
.gl .station--work { height: 120svh; }
.gl .station--projects, .gl .station--person { height: 210svh; }
.station--rest { display: none; }
.gl .station--rest { display: block; }

/* the place marker: a thin ring around the city and its name, small and precise */
.gl 
/* the projects: a horizontal gallery over the dimmed Earth, cards revealed through an arch (ERA's arch masks) */
.gallery__title { margin-bottom: 28px; }
.gallery__track { display: grid; gap: 28px; }
.card__media { display: block; overflow: hidden; border-radius: 4px; }
.card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card__cap { margin-top: 16px; max-width: 30rem; }
.card__title { font-family: var(--f-display); font-weight: 380; font-size: clamp(28px, 2.4vw, 42px); line-height: 1; letter-spacing: -.02em; text-transform: uppercase; margin-bottom: .35em; }
.card__cap p { font-size: 15px; color: var(--mist); }
.card__link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px)/100% 1px no-repeat; transition: background-size var(--d-hover) var(--ease-out); }
.card__link:hover, .card__link:focus-visible { background-size: 0 1px; background-position: 100% calc(100% - 10px); }
.gallery__nav { display: none; }
.gl .gallery { position: fixed; inset: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--hud) + 70px) 0 calc(var(--hud) + 60px); }
.gl .gallery__title { padding: 0 var(--gut); margin-left: 4vw; }
/* the cards are moved by the page scroll (main.js), never scrolled natively: one controller, no snap to fight it */
.gl .gallery__track { user-select: none; -webkit-user-select: none; touch-action: pan-y; display: flex; gap: 2.4vw; padding: 0 calc(var(--gut) + 4vw); pointer-events: auto; cursor: grab; will-change: transform; }
.gallery__track img, .gallery__track a { -webkit-user-drag: none; user-drag: none; }
.gl .gallery__track.is-dragging { cursor: grabbing; }
.gl .card { flex: 0 0 min(40vw, 70vh); }
.gl .card__media { clip-path: inset(100% 0 0 0 round 50% 50% 4px 4px); transition: clip-path 1.2s var(--ease-out); }
.gl .gallery.is-on .card__media { clip-path: inset(0 0 0 0 round 4px); }
.gl .gallery.is-on .card:nth-child(2) .card__media { transition-delay: .1s; }
.gl .gallery.is-on .card:nth-child(3) .card__media { transition-delay: .2s; }
.gl .card__cap p { color: var(--snow); opacity: .84; }
.gl .gallery__nav { display: flex; gap: 22px; padding: 18px calc(var(--gut) + 4vw) 0; }
.gallery__btn { all: unset; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--snow); pointer-events: auto; position: relative; }
.gallery__btn::after { content: ''; position: absolute; left: 0; right: 0; bottom: 12px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform var(--d-hover) var(--ease-out); }
.gallery__btn:hover::after, .gallery__btn:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.gallery__btn:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
.dim { display: none; }
.gl .dim { display: block; position: fixed; inset: 0; z-index: var(--z-veil); pointer-events: none; background: rgba(3, 6, 12, .62); opacity: 0; }

/* the city label: a precise point on the light, a thin leader, the name in Imbue, the coordinate in mono */
.citylabel { display: none; }
.gl .citylabel { display: block; position: fixed; left: 0; top: 0; z-index: var(--z-main); pointer-events: none; color: var(--snow); opacity: 0; will-change: transform; }
.citylabel__dot { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(241, 243, 246, .95), 0 0 0 5px rgba(3, 6, 12, .35); }
.citylabel__line { position: absolute; left: 0; bottom: 6px; width: 1px; height: 96px; background: linear-gradient(rgba(241, 243, 246, .95), rgba(241, 243, 246, .6)); transform-origin: bottom; }
.citylabel__name { position: absolute; left: -2px; bottom: 112px; font-family: var(--f-display); font-weight: 360; font-size: clamp(40px, 4.2vw, 64px); line-height: .9; letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap; text-shadow: 0 0 24px rgba(3, 6, 12, .9), 0 0 6px rgba(3, 6, 12, .8); }
.citylabel__name .char { display: inline-block; }
.citylabel__coord { position: absolute; left: 10px; bottom: 98px; transform: translateY(100%); margin-top: 4px; padding: 3px 6px 2px; background: rgba(3, 6, 12, .84); border-radius: 2px; font-size: 11px; letter-spacing: .08em; white-space: nowrap; opacity: .85; text-shadow: 0 0 10px rgba(3, 6, 12, .95); }
.citylabel::before { content: ''; position: absolute; left: -70px; bottom: 84px; width: 380px; height: 120px; z-index: -1; background: radial-gradient(closest-side, rgba(3, 6, 12, .8), rgba(3, 6, 12, .62) 55%, rgba(3, 6, 12, 0)); }

/* the route captions */
.routecap { display: none; }
.dawn { display: none; }
.gl .dawn { display: block; position: fixed; inset: 0; z-index: var(--z-main); pointer-events: none; }
/* first light: the names of his three places beside their lights, dimming as each light goes out */
.dawn__name { position: absolute; left: 0; top: 0; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #ffe2bf; white-space: nowrap; opacity: 0; text-shadow: 0 0 8px rgba(3, 6, 12, .95), 0 0 2px rgba(3, 6, 12, .9); will-change: transform, opacity; }
.gl .routecap { display: block; position: fixed; left: 0; top: 0; z-index: var(--z-main); margin: 0; pointer-events: none; padding: 3px 6px 2px; background: rgba(3, 6, 12, .84); border-radius: 2px; font-size: 11px; letter-spacing: .08em; color: #ffd9ad; white-space: nowrap; opacity: 0; text-shadow: 0 0 10px rgba(3, 6, 12, .95), 0 0 2px rgba(3, 6, 12, .9); will-change: transform; }

/* the match cut: a city light grows into the warm lamp of his living room */
.cut { display: none; }
.gl .cut { display: block; position: fixed; inset: 0; z-index: var(--z-veil); pointer-events: none; }
.cut__room { position: absolute; inset: 0; background: #0b0c10; opacity: 0; }
.cut__glow, .cut__sat { position: absolute; left: 0; top: 0; width: 200px; height: 200px; border-radius: 50%; opacity: 0; will-change: transform, opacity; transform-origin: 50% 50%;
  /* a defocused point of light: a near flat disc with a slightly brighter rim and a crisp but soft edge (round iris),
     then a faint halo. The disc edge sits at 69 % of the element radius. */
  background: radial-gradient(closest-side, #ffe9ca 0%, #ffdbae 38%, #ffd19e 60%, rgba(255, 238, 210, 1) 66.4%, rgba(255, 216, 168, .92) 68.2%, rgba(255, 196, 138, .2) 69.6%, rgba(255, 190, 130, .07) 80%, rgba(255, 190, 130, 0) 100%); }
.cut__sat { background: radial-gradient(closest-side, rgba(255, 226, 190, .9) 0%, rgba(255, 212, 164, .88) 60%, rgba(255, 236, 206, .95) 66.4%, rgba(255, 210, 160, .6) 68.4%, rgba(255, 190, 130, 0) 70%); }

/* the station index */
.stations { display: none; }
.gl .stations { display: block; position: fixed; right: var(--hud); top: 50%; transform: translateY(-50%); z-index: var(--z-hud); }
.stations__list { display: grid; gap: 0; }
.stations__btn { all: unset; cursor: pointer; display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 30px; font: 500 10px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--snow); opacity: .5; transition: opacity var(--d-hover) var(--ease-out); }
.stations__btn::after { content: ''; width: 14px; height: 1px; background: currentColor; transition: width var(--d-hover) var(--ease-out); }
.stations__btn span { opacity: 0; transform: translateX(6px); transition: opacity var(--d-hover) var(--ease-out), transform var(--d-hover) var(--ease-out); }
.stations__btn[aria-current="step"] { opacity: 1; }
.stations__btn[aria-current="step"]::after { width: 28px; }
.stations__btn[aria-current="step"] span, .stations:hover .stations__btn span, .stations__btn:focus-visible span { opacity: 1; transform: none; }
.stations__btn:hover, .stations__btn:focus-visible { opacity: 1; }
.stations__btn:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
html[data-paper] .stations, html[data-finale] .stations { opacity: 0; pointer-events: none; }

/* text over the Earth: a wide, feathered darkening behind each column, never a box */
.block, .night__text, .gl .card__cap, .gl .person__text { position: relative; isolation: isolate; }
.station .block::before {
  content: ''; position: absolute; inset: -34% -26%; z-index: -1; pointer-events: none;
  background: rgba(3, 6, 12, .8);
  /* feathered on every side: solid behind the column, fading out well beyond it */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent), linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent), linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); mask-composite: intersect;
}
.station .block--intern::before { inset: -40% -30%; }

/* reveal states (only when JS runs the flight): hidden blocks stay in the tab order, focusing one flies there */
.gl [data-show] { opacity: 0; }
.gl [data-show]:not(.is-on), .gl [data-show]:not(.is-on) * { pointer-events: none !important; }
.gl .monument .char, .gl .title .char { display: inline-block; }

.gl .person { display: block; }
.gl .portrait { position: fixed; left: 6vw; top: 12vh; width: min(40vw, 62vh); height: 76vh; aspect-ratio: auto; transform-origin: 17.5% 32.75%; will-change: transform, opacity; z-index: 1; }
.gl .person__text { position: fixed; left: calc(6vw + min(40vw, 62vh) + 5vw); right: 6vw; top: 50%; transform: translateY(-50%); max-width: 32rem; z-index: 2; }
.gl .station--light .monument--end { margin-bottom: 4vh; }
/* GOOD MORNING. sits over the city lights below the horizon: the lights directly under and around each stroke are
   pressed down (a dilated soft darkening, eight offset copies plus a wide falloff), so every stroke holds 3:1. The page
   fades it (--halo) once the dawn ground replaces the lights, where it would only read as an outline */
.station--light .monument--end { text-shadow: 0 0 2px rgb(3 6 12 / calc(.9 * var(--halo, 1))), 5px 0 3px rgb(3 6 12 / calc(.62 * var(--halo, 1))), -5px 0 3px rgb(3 6 12 / calc(.62 * var(--halo, 1))), 0 5px 3px rgb(3 6 12 / calc(.62 * var(--halo, 1))), 0 -5px 3px rgb(3 6 12 / calc(.62 * var(--halo, 1))), 4px 4px 3px rgb(3 6 12 / calc(.62 * var(--halo, 1))), -4px 4px 3px rgb(3 6 12 / calc(.62 * var(--halo, 1))), 4px -4px 3px rgb(3 6 12 / calc(.62 * var(--halo, 1))), -4px -4px 3px rgb(3 6 12 / calc(.62 * var(--halo, 1))), 0 0 12px rgb(3 6 12 / calc(.6 * var(--halo, 1))), 0 0 34px rgb(3 6 12 / calc(.35 * var(--halo, 1))); }

/* ---------- still mode (reduced motion or no WebGL) and no-JS: a designed static page ---------- */
html:not(.gl) .station--night .station__in { min-height: 100svh; }
html:not(.gl) .station--work .station__in { background: linear-gradient(180deg, #1c2a40, #2b3b55); }
html:not(.gl) .station--work .block::before { content: none; }   /* a plain field: nothing to darken */
html:not(.gl) .station--person .station__in { background: linear-gradient(180deg, #0b111b, #141c2c); }
html:not(.gl) .station--light .station__in { min-height: 100svh; }
html:not(.gl) .station--light .still::after { background: linear-gradient(180deg, rgba(11, 17, 27, .2) 30%, rgba(11, 17, 27, .6)); }
html:not(.gl) .block--left, html:not(.gl) .block--right { max-width: 36rem; }
html:not(.gl) .block--right { justify-self: end; }
html:not(.gl) .hud:not(.hud--foot) { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: var(--hud); }
html:not(.gl) .hud--foot { display: none; }
@media (min-width: 768px) {
  html:not(.gl) .gallery__track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html:not(.gl) .person { grid-template-columns: minmax(0, 440px) minmax(0, 32rem); justify-content: center; gap: clamp(32px, 5vw, 88px); }
}

/* ---------- block placement in the flight ---------- */
@media (min-width: 768px) {
  .gl .block--left { justify-self: start; margin-left: 4vw; }
  /* clear of the station index in the right gutter */
  .gl .block--right, .gl .block--intern { justify-self: end; margin-right: clamp(80px, 7.5vw, 136px); }
  /* first light: the text sits over the dark Skagerrak, a darkening would only show as a box on the dawn ground */
  .gl .block--intern::before { content: none; }
}

/* ---------- mobile ---------- */
@media (max-width: 767px) {
  :root { --monument: clamp(64px, 25vw, 132px); }
  .monument { white-space: normal; }
  .monument__line { display: block; }
  .hud__sub, .hud__time { display: none; }
  .gl .hud:not(.hud--foot) { flex-direction: column-reverse; align-items: stretch; gap: 6px; }
  .gl .hud__id > :not(.hud__for) { display: none; }
  .hud__nav { justify-content: space-between; }
  .gl .hud--foot { justify-content: space-between; }
  .hud__nav { gap: 18px; }
  .night__text { margin-bottom: 6vh; max-width: 19rem; }
  .gl .station--night .station__in { align-content: end; }
  .block { max-width: none; }
  .gl .block { align-self: end; margin-bottom: 9vh; }
    .gl .portrait { left: var(--gut); right: var(--gut); top: 9vh; width: auto; height: 40vh; }
  .gl .person__text { left: var(--gut); right: var(--gut); top: auto; bottom: 8vh; transform: none; }
  .gl .portrait { width: min(46vw, 220px); }
  .gl .person__text { font-size: 15px; line-height: 1.5; }
  .gl .person .title { font-size: 34px; }
  .block--intern { justify-self: start; margin-bottom: 4vh; }
  .ask, .skills, .sv--contact { grid-template-columns: 1fr; }
  .tl { --trackw: 100%; }
  .tl__axis { margin-left: 0; }
  .tl__lines, .tl__intern-label { display: none; }
  .tl__row { grid-template-columns: 1fr; padding: 18px 0 22px; }
  .tl__when { padding-top: 0; margin-bottom: 8px; }
  .tl__track { margin-top: 18px; }
  .tl__rows--small .tl__track { margin-top: 12px; }
  /* without the long now line, every track marks now itself */
  .tl__track::after { content: ''; position: absolute; left: calc(var(--now, .72) * 100%); top: -5px; width: 1px; height: 11px; background: var(--sun); }
  .tl__row--small .tl__track { display: none; }
  .finale__name { white-space: normal; }
  .finale__line { display: block; }
  .finale__links { display: grid; grid-template-columns: 1fr 1fr; justify-items: center; }
  .gl .stations { display: none; }
  .gl .card { flex-basis: 78vw; }
  .gl .gallery__title { margin-left: 0; }
  .gl .gallery__track, .gl .gallery__nav { padding-left: var(--gut); padding-right: var(--gut); }
  /* on a narrow screen the text is above the place, so the label hangs below its point */
  .citylabel__line { top: 6px; bottom: auto; height: 52px; transform-origin: top; }
  .citylabel__name { top: 64px; bottom: auto; font-size: 40px; }
  .citylabel__coord { top: 102px; bottom: auto; left: 0; transform: none; margin-top: 0; }
  .citylabel::before { top: 30px; bottom: auto; left: -50px; width: 280px; height: 120px; }
  /* narrow screens: the text spans the width, so the darkening does too */
  .night__text::before { content: ''; position: absolute; z-index: -1; pointer-events: none; }
  .station .block::before, .night__text::before, .station .block--intern::before { inset: -14% calc(-1 * var(--gut) - 2px); background: linear-gradient(180deg, rgba(3, 6, 12, 0), rgba(3, 6, 12, .86) 18%, rgba(3, 6, 12, .86) 82%, rgba(3, 6, 12, 0)); -webkit-mask-image: none; mask-image: none; }
}

/* ---------- reduced motion: nothing moves, nothing waits ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
