/* ---------- Fonts (self-hosted: no request to Google) ---------- */
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

/* ---------- Palette ----------
   Navy carries the page: blue is the colour most consistently tied to competence
   and trust in brand research (Labrecque & Milne 2012). A warm paper white
   alternates with it so the page reads like a printed report, not a dark app.
   The ink blue accent is the colour of a pen signature. */
:root {
  --navy: #0e1a2b;
  --paper: #ede7db;

  /* live theme, animated by main.js from chapter to chapter (starts on navy) */
  --bg: #0e1a2b;
  --fg: #ede7db;
  --muted: #9aa7ba;
  --line: rgba(237, 231, 219, 0.16);
  --accent: #8eaeff;
  --surface: #15243a;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace; /* intro only */
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Without the chapter animation (reduced motion, scripts off), each section carries its own colours. */
html:not(.chapters) [data-chapter="navy"] { --bg: #0e1a2b; --fg: #ede7db; --muted: #9aa7ba; --line: rgba(237, 231, 219, 0.16); --accent: #8eaeff; --surface: #15243a; background: var(--bg); color: var(--fg); }
html:not(.chapters) [data-chapter="paper"] { --bg: #ede7db; --fg: #0e1a2b; --muted: #556072; --line: rgba(14, 26, 43, 0.16); --accent: #2347c9; --surface: #e4dccc; background: var(--bg); color: var(--fg); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol, dl, dd { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 200; padding: 10px 16px; background: var(--accent); color: var(--bg); }
.skip:focus { top: 16px; }

/* ---------- Intro ---------- */
/* A route traced on a dark globe (globe.js), with a traceroute in the corner. */
.intro { display: none; position: fixed; inset: 0; z-index: 100; color: var(--paper); background: radial-gradient(ellipse 70% 60% at 50% 46%, #12213a 0%, var(--navy) 70%); overflow: hidden; }
.js:not(.no-intro) .intro { display: block; }
.intro__globe { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.intro__pins { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; left: 0; top: 0; margin: 8px 0 0 12px; opacity: 0; font-family: var(--mono); font-size: 0.72rem; color: var(--paper); white-space: nowrap; will-change: transform, opacity; }
.pin--up { margin-top: -26px; }
.intro__ui { position: relative; height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 24px; padding: var(--gutter); pointer-events: none; }
.intro__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.intro__line { font-family: var(--mono); font-size: clamp(0.74rem, 1.1vw, 0.9rem); color: #9aa7ba; max-width: 64ch; }
.intro__prompt { color: #8eaeff; }
.intro__typed { color: var(--paper); }
.caret { display: inline-block; width: 0.6em; height: 1.1em; margin-left: 2px; vertical-align: -0.2em; background: #8eaeff; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.intro__hops { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-family: var(--mono); font-size: clamp(0.68rem, 0.92vw, 0.8rem); color: #9aa7ba; }
.intro__hops li { display: grid; grid-template-columns: 2ch 19ch 17ch 5ch auto; gap: 1.5ch; opacity: 0; }
.intro__hops span:nth-child(2) { color: var(--paper); }
.intro__hops span:nth-child(4) { color: #8eaeff; }
.intro__skip { pointer-events: auto; flex: none; min-height: 44px; padding: 0 16px; font-family: var(--mono); font-size: 0.78rem; color: #9aa7ba; border: 1px solid rgba(237, 231, 219, 0.2); transition: color 0.3s, border-color 0.3s; }
.intro__skip:hover { color: var(--paper); border-color: var(--paper); }
.intro__stage { align-self: end; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.intro__word { overflow: hidden; padding-bottom: 0.12em; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(2.4rem, 6.4vw, 6rem); line-height: 1; letter-spacing: -0.02em; color: #8eaeff; }
.intro__word span { display: inline-block; }
.intro__count { font-family: var(--serif); font-weight: 300; font-size: clamp(4rem, 12vw, 11rem); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: lining-nums tabular-nums; margin-bottom: -0.1em; }
/* Odometer: each digit is a column of 0-9 that rolls to its value */
.odo { display: inline-flex; }
.odo__col { display: inline-block; height: 1em; overflow: hidden; }
.odo__stack { display: block; transition: transform 0.7s var(--ease); }
.odo__stack span { display: block; height: 1em; }
.intro__foot { display: grid; gap: 12px; }
.intro__meta { display: flex; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 0.74rem; color: #9aa7ba; }
.intro__status::before { content: "\25CF  "; color: #4cc38a; }
.intro__bar { display: block; height: 1px; background: rgba(237, 231, 219, 0.16); }
.intro__bar i { display: block; height: 100%; background: #8eaeff; transform: scaleX(0); transform-origin: left; }
@media (max-width: 760px) {
  .intro__hops li { grid-template-columns: 2ch minmax(0, 1fr) 5ch; }
  .intro__hops span:nth-child(3), .intro__hops span:nth-child(5) { display: none; }
  .intro__stage { flex-direction: column; align-items: flex-start; gap: 0; }
  .intro__meta span:last-child { display: none; }
  .pin { font-size: 0.66rem; }
}

/* ---------- Cursor (fine pointers only, enabled by JS) ---------- */
.cursor { display: none; }
.has-cursor .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 150; opacity: 0; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); }
.cursor__ring {
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 1px solid var(--muted);
  display: grid; place-items: center;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background-color 0.35s, border-color 0.35s;
}
.cursor__label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--bg); opacity: 0; transition: opacity 0.2s; }
.cursor.is-hover .cursor__ring { width: 60px; height: 60px; margin: -30px 0 0 -30px; border-color: var(--accent); }
.cursor.is-label .cursor__ring { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: var(--fg); border-color: var(--fg); }
.cursor.is-label .cursor__label { opacity: 1; }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter);
  transition: transform 0.5s var(--ease), background-color 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__logo { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--serif); font-size: 1.6rem; line-height: 1; letter-spacing: -0.02em; }
.nav__logo em { color: var(--accent); }
.nav__links { display: flex; gap: clamp(18px, 2.6vw, 40px); font-size: 0.92rem; }
.nav__links a { position: relative; color: var(--muted); transition: color 0.3s; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--fg); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.nav__links a:hover, .nav__links a.is-active { color: var(--fg); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cv { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9rem; font-weight: 500; border-bottom: 1px solid var(--fg); transition: color 0.3s, border-color 0.3s; }
.nav__cv:hover { color: var(--accent); border-color: var(--accent); }
.nav__end { display: flex; align-items: center; gap: clamp(14px, 2vw, 24px); }
.nav__k { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; color: var(--muted); transition: color 0.3s; }
.nav__k[hidden] { display: none; }
.nav__key { padding: 3px 8px; border: 1px solid var(--line); font-family: var(--mono); font-size: 0.74rem; line-height: 1.4; transition: border-color 0.3s; }
.nav__k:hover, .nav__k[aria-expanded="true"] { color: var(--fg); }
.nav__k:hover .nav__key { border-color: var(--fg); }

/* ---------- Command palette (palette.js) ---------- */
.palette { position: fixed; inset: 0; z-index: 140; display: flex; justify-content: center; align-items: flex-start; padding: clamp(16px, 14vh, 140px) 16px 16px; background: rgba(9, 19, 33, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.22s var(--ease); }
.palette[hidden] { display: none; }
.palette.is-open { opacity: 1; }
.palette__panel { width: min(100%, 560px); background: var(--bg); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(9, 19, 33, 0.35); transform: translateY(-8px) scale(0.985); transition: transform 0.3s var(--ease); outline: none; }
.palette.is-open .palette__panel { transform: none; }
.palette__field { display: flex; align-items: center; gap: 12px; padding: 0 8px 0 18px; border-bottom: 1px solid var(--line); }
.palette__input { flex: 1; min-width: 0; min-height: 56px; padding: 0; background: none; border: 0; outline: none; color: inherit; font: inherit; font-size: max(16px, 1.05rem); caret-color: var(--accent); }
.palette__input::placeholder { color: var(--muted); opacity: 1; }
.palette__close { flex: none; min-height: 44px; min-width: 44px; padding: 0 10px; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); transition: color 0.3s; }
.palette__close:hover { color: var(--fg); }
.palette__list { max-height: min(52vh, 420px); overflow-y: auto; overscroll-behavior: contain; padding: 6px 0; }
.palette__opt { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 46px; padding: 8px 18px; cursor: pointer; }
.has-cursor .palette__opt { cursor: none; }
.palette__opt[aria-selected="true"] { background: var(--surface); }
.palette__opt[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--accent); }
.palette__hint { flex: none; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.palette__empty { padding: 16px 18px 20px; color: var(--muted); }
.palette__empty[hidden] { display: none; }
.palette__foot { padding: 10px 18px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.7rem; color: var(--muted); white-space: pre; }
section[tabindex="-1"]:focus { outline: none; } /* the palette moves the focus into a section */

/* ---------- Buttons: square corners, like a printed form ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 26px; border: 1px solid var(--fg);
  font-weight: 500; font-size: 0.95rem; white-space: nowrap;
  transition: color 0.45s var(--ease), border-color 0.45s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.55s var(--ease);
}
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn:hover { border-color: var(--accent); color: var(--bg); }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn span { pointer-events: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: 110px 0 clamp(40px, 7vh, 80px); overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__glow {
  position: absolute; width: 620px; height: 620px; left: -310px; top: -310px; border-radius: 50%;
  background: radial-gradient(circle, rgba(142, 174, 255, 0.16), transparent 65%);
  pointer-events: none; will-change: transform; opacity: 0; transition: opacity 0.6s;
}
.hero:hover .hero__glow { opacity: 1; }
.hero__inner { position: relative; z-index: 2; }
.hero__name {
  display: flex; flex-wrap: wrap; column-gap: 0.22em;
  margin: clamp(16px, 3vh, 28px) 0 0 -0.04em;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.6rem, 13.5vw, 13.5rem); line-height: 0.95; letter-spacing: -0.035em;
}
.hero__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; align-items: end; margin-top: clamp(28px, 5vh, 56px); padding-top: 28px; position: relative; }
.hero__foot::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); transform: scaleX(var(--rule, 1)); transform-origin: left; }
.hero__lead { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.2; letter-spacing: -0.015em; max-width: 26ch; margin-bottom: 14px; }
.hero__pitch { max-width: 46ch; font-size: clamp(1.02rem, 1.3vw, 1.2rem); color: var(--fg); opacity: 0.88; }
.hero__side { display: grid; gap: 18px; justify-items: start; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.avail { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--muted); }
.avail__dot { width: 8px; height: 8px; border-radius: 50%; background: #4cc38a; flex: none; box-shadow: 0 0 0 4px rgba(76, 195, 138, 0.18); }

/* SplitText masks clip at the box: give descenders room */
[data-split] > div { padding-bottom: 0.14em; margin-bottom: -0.14em; }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(96px, 15vh, 170px) 0; }
.section__head { display: grid; gap: 20px; margin-bottom: clamp(48px, 8vh, 88px); }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 5.6vw, 5rem); line-height: 1.02; letter-spacing: -0.03em; max-width: 17ch; }
.section__intro { color: var(--muted); max-width: 52ch; }

/* Key figures: read like a financial statement (figure, what it measures, source) */
.statement { width: 100%; border-collapse: collapse; }
.statement th { text-align: left; font-weight: 500; font-size: 0.9rem; color: var(--muted); padding: 0 24px 14px 0; border-bottom: 1px solid var(--fg); }
.statement td { padding: 26px 24px 26px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.statement__fig { width: 1%; white-space: nowrap; padding-right: clamp(24px, 5vw, 72px) !important; font-family: var(--serif); font-weight: 300; font-size: clamp(2.8rem, 5.4vw, 5rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; }
.statement td:nth-child(2) { font-size: clamp(1.02rem, 1.3vw, 1.2rem); max-width: 36ch; }
.statement__src { color: var(--muted); white-space: nowrap; text-align: right; padding-right: 0 !important; }
.statement th:last-child { text-align: right; padding-right: 0; }

/* Profile */
.profile__text { font-family: var(--serif); font-weight: 300; font-size: clamp(1.8rem, 3.6vw, 3.3rem); line-height: 1.2; letter-spacing: -0.02em; max-width: 30ch; margin-top: 28px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(56px, 9vh, 100px); }
.facts--3 { grid-template-columns: repeat(3, 1fr); }
.facts > div { border-top: 1px solid var(--fg); padding-top: 16px; }
.facts dt { font-size: 0.9rem; color: var(--muted); margin-bottom: 6px; }

/* Track record: 2 + 2 + 1 years bar */
.years { margin-bottom: clamp(56px, 9vh, 100px); }
.years__track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; height: 64px; }
.years__seg { grid-column: var(--from) / var(--to); position: relative; border-left: 1px solid var(--bg); }
.years__fill { position: absolute; inset: 0; transform-origin: left; }
.years__seg:nth-child(1) .years__fill { background: var(--fg); }
.years__seg:nth-child(2) .years__fill { background: var(--accent); }
.years__seg:nth-child(3) .years__fill { background: var(--muted); }
.years__label { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--bg); font-size: 0.9rem; white-space: nowrap; }
.years__label b { font-weight: 600; margin-right: 6px; }
/* Axis marks only the real turning points: Sep 2021, Sep 2023, Sep 2025, today. */
.years__axis { position: relative; height: 1.6em; margin-top: 10px; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.years__axis span { position: absolute; top: 0; left: var(--at); border-left: 1px solid var(--line); padding-left: 8px; white-space: nowrap; }
.years__axis span:last-child { left: auto; right: 0; border-left: 0; border-right: 1px solid var(--line); padding: 0 8px 0 0; }

.ledger { border-top: 1px solid var(--fg); }
.entry { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px 48px; padding: clamp(28px, 4vh, 44px) 0; border-bottom: 1px solid var(--line); }
.entry__dates { font-variant-numeric: tabular-nums; }
.entry__dur { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--accent); margin-top: 4px; }
.entry__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.1; letter-spacing: -0.02em; }
.entry__org { color: var(--muted); margin-top: 6px; }
.entry__list { margin-top: 18px; display: grid; gap: 10px; max-width: 70ch; }
.entry__list li { position: relative; padding-left: 22px; }
.entry__list li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 10px; height: 1px; background: var(--accent); }
.entry__list a { border-bottom: 1px solid var(--accent); transition: color 0.3s; }
.entry__list a:hover, .entry__list a:focus-visible { color: var(--accent); }
.entry--small .entry__title { font-size: clamp(1.3rem, 2vw, 1.7rem); }

/* Capabilities */
.cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px clamp(24px, 3vw, 44px); }
@media (max-width: 1180px) { .cols { grid-template-columns: repeat(2, 1fr); } }
.col { border-top: 1px solid var(--fg); padding-top: 24px; }
.col__title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 3.6vw, 3.2rem); letter-spacing: -0.03em; line-height: 1; }
.col__list { margin-top: 28px; }
.col__list li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.col__proof { margin-top: 18px; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--muted); }
.tools { margin-top: clamp(48px, 8vh, 80px); max-width: 60ch; font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.4; color: var(--muted); }
.tools strong { font-weight: 400; color: var(--fg); }

/* Education */
.degrees { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(16px, 3vw, 40px); }
.degree { background: var(--surface); padding: clamp(28px, 3.4vw, 44px); height: 100%; }
.degree__flag { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--accent); }
.degree h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.1; letter-spacing: -0.02em; margin: 14px 0 12px; }
.degree__meta { font-size: 0.95rem; }
.degree__note { color: var(--muted); margin-top: 6px; font-size: 0.95rem; }
.degrees__plus { font-family: var(--serif); font-weight: 200; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1; color: var(--accent); }
.earlier { margin-top: 32px; display: grid; gap: 8px; color: var(--muted); }
.earlier span { display: inline-block; min-width: 9.5em; color: var(--fg); font-variant-numeric: tabular-nums; }

/* Outlook */
.hire { margin-top: clamp(56px, 9vh, 100px); padding: clamp(28px, 3.4vw, 44px); background: var(--surface); }
.hire__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 3rem); letter-spacing: -0.02em; line-height: 1.1; }
.hire__lead { margin-top: 10px; color: var(--muted); max-width: 52ch; }
.hire__routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px clamp(24px, 4vw, 56px); margin-top: clamp(28px, 4vh, 44px); }
.hire__route { border-top: 1px solid var(--fg); padding-top: 16px; max-width: 52ch; }
.hire__name { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2vw, 1.8rem); line-height: 1.2; letter-spacing: -0.01em; }
.hire__who { margin: 2px 0 10px; font-size: 0.9rem; color: var(--muted); }
.hire__foot { margin-top: clamp(24px, 4vh, 40px); }
.hire__foot a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.roles { border-top: 1px solid var(--fg); }
.role { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: clamp(16px, 2.6vh, 28px) 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.role::before { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform 0.55s var(--ease); }
.role__name { position: relative; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 5.4vw, 4.6rem); letter-spacing: -0.03em; line-height: 1.05; transition: transform 0.55s var(--ease), color 0.4s; }
.role__meta { position: relative; color: var(--muted); font-size: 0.9rem; transition: color 0.4s, transform 0.55s var(--ease); }
@media (hover: hover) {
  .role:hover::before { transform: scaleY(1); }
  .role:hover .role__name { color: var(--bg); transform: translateX(clamp(8px, 2vw, 28px)); }
  .role:hover .role__meta { color: var(--bg); transform: translateX(calc(-1 * clamp(8px, 2vw, 28px))); }
}

/* Contact */
.contact { padding-bottom: 0; }
.contact__title { font-family: var(--serif); font-weight: 300; font-size: clamp(3rem, 8vw, 7.4rem); line-height: 1; letter-spacing: -0.04em; max-width: 14ch; margin-top: 28px; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-top: clamp(40px, 7vh, 72px); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact__email { margin-top: 28px; }
.contact__email a { border-bottom: 1px solid var(--line); transition: border-color 0.3s, color 0.3s; }
.contact__email a:hover { color: var(--accent); border-color: var(--accent); }
.contact__time { margin-top: 8px; color: var(--muted); font-size: 0.92rem; }
.contact__time span { color: var(--fg); font-variant-numeric: tabular-nums; }
.contact__sign { justify-self: end; width: min(100%, 440px); }
.contact__regards { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--muted); }
.signature { width: 100%; height: auto; margin-top: 8px; fill: #2347c9; }

.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: clamp(80px, 12vh, 140px); padding: 24px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.footer a { display: inline-block; padding: 12px 0; margin: -12px 0; border-bottom: 1px solid var(--line); }
.footer a:hover { color: var(--fg); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120;
  padding: 12px 20px; background: var(--fg); color: var(--bg); font-weight: 500; font-size: 0.92rem;
  transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform 0.5s var(--ease), visibility 0s 0.5s;
}
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform 0.5s var(--ease); }

/* ---------- Track record dial (wide screens, built by main.js) ----------
   The wheel turns with the scroll (or a drag); the chapter at the pointer is shown on the right.
   Arcs use the same colours as the 2 + 2 + 1 bar above. */
.dial { display: none; }
.stage.is-dial { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: center; height: 100vh; height: 100svh; }
.stage.is-dial .dial { display: block; position: relative; height: 100%; }
.dial__svg { position: absolute; top: 50%; right: 0; height: min(118vh, 1150px); width: auto; max-width: none; aspect-ratio: 1; transform: translateY(-50%); overflow: visible; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dial__svg.is-dragging { cursor: grabbing; }
.has-cursor .dial__svg { cursor: none; }
.dial__ring { fill: none; stroke: var(--line); stroke-width: 1.5; }
.dial__tick { stroke: var(--line); stroke-width: 2; }
.dial__tick--year { stroke: var(--muted); }
.dial__year { fill: var(--muted); font-family: var(--sans); font-size: 19px; }
.dial__arc { fill: none; stroke-width: 12; }
.dial__arc--0 { stroke: var(--fg); }
.dial__arc--1 { stroke: var(--accent); }
.dial__arc--2 { stroke: var(--muted); }
.dial__label { cursor: pointer; }
.dial__name { fill: var(--fg); font-family: var(--serif); font-size: 50px; letter-spacing: -0.02em; }
.dial__dates { fill: var(--muted); font-family: var(--sans); font-size: 19px; }
.dial__pointer { fill: var(--accent); }
.stage.is-dial .ledger { display: grid; border-top: 0; }
.stage.is-dial .entry { grid-area: 1 / 1; grid-template-columns: 1fr; gap: 12px; padding: 0; border-bottom: 0; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity 0.18s, transform 0.3s; }
.stage.is-dial .entry.is-active { opacity: 1; transform: none; pointer-events: auto; transition: opacity 0.45s 0.16s var(--ease), transform 0.7s 0.16s var(--ease); } /* the old one leaves first */
.stage.is-dial .entry__when { display: flex; align-items: baseline; gap: 14px; }
.stage.is-dial .entry__dur { margin-top: 0; }
.ledger--after { border-top: 0; }
.stage.is-dial + .ledger--after { border-top: 1px solid var(--fg); }

/* ---------- Terminal (terminal.js) ---------- */
.term { max-width: 980px; border: 1px solid var(--line); background: #091321; color: #ede7db; font-family: var(--mono); font-size: 0.9rem; line-height: 1.65; }
.term:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.term__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid rgba(237, 231, 219, 0.12); color: #9aa7ba; font-size: 0.76rem; }
.term__tools { display: flex; align-items: center; gap: 18px; }
/* Keyboard sound toggle (hands.js): off by default, a speaker with waves when on */
.term__sound { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -12px 0; padding: 0 4px; font-family: var(--mono); font-size: 0.76rem; color: #9aa7ba; transition: color 0.3s; }
.term__sound[hidden] { display: none; }
.term__sound svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.term__sound:hover { color: #ede7db; }
.term__sound[aria-pressed="true"] { color: #8eaeff; }
.term__waves, .term__sound[aria-pressed="true"] .term__mute { display: none; }
.term__sound[aria-pressed="true"] .term__waves { display: inline; }
.term__out { height: clamp(280px, 46vh, 460px); overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 4px; }
.term__out p { white-space: pre-wrap; overflow-wrap: anywhere; }
.term__out p + .term__cmd { margin-top: 14px; }
.term__cmd { color: #9aa7ba; }
.term__cmd b { font-weight: 400; color: #ede7db; }
.term__muted { color: #9aa7ba; }
.term__accent { color: #8eaeff; }
.term__ok { color: #4cc38a; }
.term__out a { color: #8eaeff; border-bottom: 1px solid rgba(142, 174, 255, 0.4); }
.term__out a:hover { border-color: #8eaeff; }
.term__row { display: grid; grid-template-columns: 15ch minmax(0, 1fr); gap: 0 2ch; }
.term__form { display: flex; align-items: center; gap: 1ch; padding: 0 16px 8px; }
.term__prompt { flex: none; color: #4cc38a; }
.term__input { flex: 1; min-width: 0; min-height: 44px; padding: 0; background: none; border: 0; outline: none; color: inherit; font: inherit; font-size: max(16px, 0.9rem); caret-color: #8eaeff; }
.term__hands { display: block; width: 100%; border-top: 1px solid rgba(237, 231, 219, 0.12); }
.term__hands[hidden] { display: none; }
.term.has-hands .term__out { height: clamp(220px, 34vh, 360px); }
.term__chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 980px; margin-top: 16px; }
.term__chips button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); font-family: var(--mono); font-size: 0.82rem; color: var(--muted); transition: color 0.3s, border-color 0.3s; }
.term__chips button:hover { color: var(--fg); border-color: var(--fg); }
/* aim: the hidden aim trainer (terminal.js) */
.aim { position: relative; margin-top: 10px; border: 1px dashed rgba(237, 231, 219, 0.18); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.has-cursor .aim { cursor: none; }
.aim__hud { position: absolute; top: 6px; left: 10px; color: #9aa7ba; font-size: 0.76rem; white-space: pre; pointer-events: none; }
.aim__target { position: absolute; width: 36px; height: 36px; border: 2px solid #8eaeff; border-radius: 50%; background: radial-gradient(circle, #ede7db 0 3px, rgba(142, 174, 255, 0.18) 4px 9px, transparent 10px); }
.aim__target[hidden] { display: none; }
.aim__target:hover { border-color: #ede7db; }
.aim__target:focus-visible { outline: 2px solid #4cc38a; outline-offset: 3px; border-radius: 50%; }
.aim__target.is-new { animation: aim-pop 0.16s var(--ease); }
@keyframes aim-pop { from { transform: scale(0.5); opacity: 0; } }
@media (pointer: coarse) { .aim__target { width: 48px; height: 48px; } }
@media (max-width: 560px) {
  .term { font-size: 0.82rem; }
  .term__row { grid-template-columns: 1fr; }
  .term__row > :first-child { color: #8eaeff; }
}

/* ---------- Initial states while JS animates (removed if scripts fail) ---------- */
.js [data-hero] { opacity: 0; }
.js [data-split] { visibility: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .hero__foot { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav__links { display: none; }
  .entry { grid-template-columns: 1fr; gap: 12px; }
  .entry__when { display: flex; align-items: baseline; gap: 14px; }
  .entry__dur { margin-top: 0; font-size: 1.2rem; }
  .cols { grid-template-columns: 1fr; gap: 48px; }
  .degrees { grid-template-columns: 1fr; }
  .degrees__plus { justify-self: center; }
  .facts--3 { grid-template-columns: 1fr; }
  .hire__routes { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .contact__sign { justify-self: start; width: min(100%, 320px); }
  .role { flex-direction: column; gap: 2px; }
  .years__label { font-size: 0.78rem; left: 8px; right: 6px; white-space: normal; line-height: 1.2; }
  .years__label b { display: block; margin: 0; }
  .years__track { height: 84px; }
}
@media (max-width: 560px) {
  .statement thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .statement tr { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); }
  .statement td { display: block; padding: 0 !important; border: 0; text-align: left !important; white-space: normal; width: auto; }
  .facts { grid-template-columns: 1fr; }
  .hero__cta .btn, .contact__actions .btn { flex: 1 1 auto; }
  .years__axis span:nth-child(3) { visibility: hidden; }
  .earlier span { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Print: the page becomes a CV on white (three A4 pages) ----------
   Interactive and decorative parts are dropped. GSAP leaves inline states behind
   (opacity 0, transforms, the pinned dial, the chapter colours on <html>): the
   !important rules below override them so nothing prints hidden or off the page.
   The paper is about 680 px wide, so the tablet rules above apply: reset here. */
@page { size: A4; margin: 14mm 15mm 15mm; }
@media print {
  html, [data-chapter] { --bg: #fff !important; --fg: #0e1a2b !important; --muted: #4f5a6b !important; --line: rgba(14, 26, 43, 0.18) !important; --accent: #2347c9 !important; --surface: #f4f1ea !important; }
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; }
  body { color: var(--fg); font-size: 9pt; line-height: 1.4; }
  [data-chapter] { background: none !important; color: var(--fg) !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }

  .skip, .intro, .cursor, .progress, .nav, .hero__canvas, .hero__glow, .avail__dot, .console, .palette, .toast,
  .dial, .degrees__plus, .contact__actions, .contact__time, .contact__sign, .footer, canvas { display: none !important; }

  /* Everything GSAP hides or moves before it scrolls into view */
  .hero__inner, .hero__name *, [data-hero], [data-words] *, .years__fill, .btn, .entry { opacity: 1 !important; transform: none !important; }
  [data-split] { visibility: visible !important; }
  .hero__name * { font-weight: 400 !important; }
  .years__label { opacity: 1 !important; transform: translateY(-50%) !important; }
  .hero__foot::before { transform: none !important; }
  .pin-spacer, [data-dial] { display: block !important; position: static !important; inset: auto !important; width: auto !important; max-width: none !important; height: auto !important; max-height: none !important; padding: 0 !important; margin: 0 !important; overflow: visible !important; transform: none !important; }

  /* Links in clear */
  a[href^="http"]:not([data-print])::after { content: " (" attr(href) ")"; color: var(--muted); font-size: 0.9em; }
  [data-print] > span { display: none; }
  [data-print]::after { content: attr(data-print); }

  .wrap { max-width: none; padding: 0; }
  .section { padding: 0; margin-top: 12pt; }
  .section__head { gap: 2pt; margin-bottom: 6pt; }
  .h2, #profile-title { font-family: var(--serif); font-weight: 400; font-size: 13pt; line-height: 1.2; letter-spacing: -0.01em; max-width: none; padding-bottom: 2pt; border-bottom: 1px solid var(--fg); }
  #profile-title { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin-bottom: 6pt; }
  .section__intro { font-size: 8.5pt; max-width: none; }
  h2, h3, .section__head { break-after: avoid; }

  /* Cover: name, pitch, contact line */
  .hero { display: block; min-height: 0; padding: 0; overflow: visible; }
  .hero__name { margin: 0; font-size: 28pt; line-height: 1; letter-spacing: -0.02em; }
  .hero__foot { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; gap: 0 9mm; margin-top: 8pt; padding-top: 8pt; }
  .hero__lead { max-width: none; margin-bottom: 3pt; font-size: 12pt; }
  .hero__pitch { max-width: none; font-size: 9pt; opacity: 1; }
  .hero__side { gap: 6pt; }
  .hero__cta { display: grid; gap: 2pt; }
  .hero__cta .btn { display: block; padding: 0; border: 0; background: none; color: var(--fg); font-size: 9pt; white-space: normal; }
  .btn::before { display: none; }
  .avail { display: block; font-size: 8.5pt; }

  /* Figures */
  .statement th { padding: 0 8pt 3pt 0; font-size: 8pt; }
  .statement td { padding: 2.5pt 8pt 2.5pt 0; }
  .statement tr { break-inside: avoid; }
  .statement__fig { font-size: 15pt; padding-right: 12pt !important; }
  .statement td:nth-child(2) { font-size: 9pt; }

  /* Profile */
  .profile__text { max-width: none; margin-top: 0; font-size: 10.5pt; line-height: 1.35; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4pt 9mm; margin-top: 6pt; }
  .facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts > div { padding-top: 3pt; border-top-color: var(--line); break-inside: avoid; }
  .facts dt { margin-bottom: 1pt; font-size: 8pt; }

  /* Track record: the bar, then every chapter as a plain list (no dial) */
  .years { margin-bottom: 6pt; break-inside: avoid; }
  .years__track { height: 22pt; }
  .years__fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .years__label { left: 6pt; right: auto; font-size: 8pt; white-space: nowrap; line-height: 1.2; }
  .years__label b { display: inline; margin-right: 4pt; }
  .years__axis { margin-top: 3pt; font-size: 7.5pt; }
  .stage, .stage.is-dial { display: block; height: auto; }
  .ledger, .stage.is-dial .ledger { display: block; border-top: 1px solid var(--fg); }
  .ledger--after { border-top: 0; }
  /* Plain blocks, not a grid: browsers split blocks across pages more reliably */
  .entry, .stage.is-dial .entry { display: block; position: relative; grid-area: auto; padding: 5pt 0 5pt 33mm; border-bottom: 1px solid var(--line); pointer-events: auto; }
  .entry__list li { break-inside: avoid; } /* a long job may continue on the next page, between two lines */
  .entry__title, .entry__org { break-after: avoid; }
  .entry__when, .stage.is-dial .entry__when { display: block; position: absolute; left: 0; top: 5pt; width: 27mm; }
  .entry__dates { font-size: 8.5pt; }
  .entry__dur, .stage.is-dial .entry__dur { margin-top: 1pt; font-size: 10pt; }
  .entry__title, .entry--small .entry__title { font-size: 11.5pt; }
  .entry__org { margin-top: 1pt; font-size: 8.5pt; }
  .entry__list { display: block; max-width: none; margin-top: 3pt; }
  .entry__list li + li { margin-top: 1.5pt; }
  .entry__list li { padding-left: 12pt; }
  .entry__list li::before { width: 6pt; top: 0.75em; }

  /* Capabilities */
  .cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 6mm; }
  .col { padding-top: 0; border-top: 0; break-inside: avoid; }
  .col__title { font-size: 11.5pt; }
  .col__list { margin-top: 4pt; }
  .col__list li { padding: 1pt 0; border-bottom: 0; font-size: 8.5pt; line-height: 1.3; }
  .col__proof { margin-top: 4pt; font-size: 8.5pt; }
  .tools { max-width: none; margin-top: 8pt; font-family: var(--sans); font-size: 9pt; }

  /* Education */
  .degrees { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 0 9mm; }
  .degree { padding: 0; background: none; break-inside: avoid; }
  .degree__flag { font-size: 9pt; }
  .degree h3 { margin: 1pt 0 2pt; font-size: 12pt; }
  .degree__meta, .degree__note { font-size: 8.5pt; }
  .earlier { margin-top: 6pt; gap: 1pt; font-size: 8.5pt; }

  /* Outlook */
  .roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 9mm; border-top: 0; }
  .role { flex-flow: row wrap; gap: 0 8pt; padding: 2.5pt 0; break-inside: avoid; }
  .role::before { display: none; }
  .role__name { font-size: 10.5pt; white-space: nowrap; }
  .role__meta { font-size: 8.5pt; }
  .hire { margin-top: 6pt; padding: 6pt 8pt; break-inside: avoid; }
  .hire__title { font-size: 10.5pt; letter-spacing: 0; }
  .hire__lead, .hire__who { margin: 1pt 0 0; font-size: 8.5pt; }
  .hire__routes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3pt 9mm; margin-top: 4pt; }
  .hire__route { padding-top: 3pt; border-top-color: var(--line); max-width: none; }
  .hire__name { font-size: 9.5pt; }
  .hire__foot { display: none; }

  /* Contact: the last line of the CV */
  .contact { break-inside: avoid; }
  .contact__title { max-width: none; margin-top: 0; font-size: 14pt; letter-spacing: -0.01em; }
  .contact__grid { display: block; margin-top: 3pt; }
  .contact__email { margin-top: 0; }
  .contact__email a { border: 0; }
}
