/* ==========================================================================
   Benjamin Halimic: CV / portfolio
   Tokens first: light palette on :root, dark palette in two places so the
   system setting and the manual toggle both work.
   ========================================================================== */

/* Fonts are self-hosted in assets/fonts (SIL OFL 1.1, licences alongside), so
   visitors' browsers never contact a third party. Each file is a variable font. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/geist-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  color-scheme: light;

  /* ground & surfaces: cool, faintly violet-biased neutrals */
  --bg: #F4F5FA;
  --bg-dot: rgba(24, 26, 60, 0.08);
  --surface: #FFFFFF;
  --surface-2: #EEF0F7;
  --ink: #0D1020;
  --ink-2: #2B3048;
  --muted: #5A6078;
  --faint: #7D839C;
  --line: #DFE2EC;
  --line-strong: #CACEDD;

  /* signal colors */
  --accent: #5433F0;
  --accent-soft: rgba(84, 51, 240, 0.08);
  --ok: #0A8A75;
  --ok-soft: rgba(10, 138, 117, 0.1);

  /* holographic stops: deeper on light ground so text keeps contrast */
  --h1: #5B3DF5;
  --h2: #1B84D8;
  --h3: #0E9E83;
  --h4: #D8418F;
  --holo: linear-gradient(100deg, var(--h1) 0%, var(--h2) 34%, var(--h3) 62%, var(--h4) 100%);
  --glow: 0.22;

  --shadow: 0 1px 0 rgba(13, 16, 32, 0.03), 0 22px 44px -26px rgba(52, 36, 160, 0.35);
  --show-sun: none;
  --show-moon: block;

  --radius: 18px;
  --gutter: clamp(28px, 5vw, 48px);
  /* block frames: room between the frame and the content inside it. The side
     room follows the gutter, so a frame always sits 14px in from the edge.
     chain.js reads the resolved values off the frame element. */
  --blk-out: clamp(32px, 3.6vw, 44px);
  --blk-side: calc(var(--gutter) - 14px);
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #07080E;
    --bg-dot: rgba(220, 224, 255, 0.075);
    --surface: #0E1019;
    --surface-2: #161927;
    --ink: #ECEEF7;
    --ink-2: #C5C9DC;
    --muted: #9095AE;
    --faint: #6C7290;
    --line: #1D2134;
    --line-strong: #2B3049;
    --accent: #A898FF;
    --accent-soft: rgba(168, 152, 255, 0.1);
    --ok: #4BE3B9;
    --ok-soft: rgba(75, 227, 185, 0.1);
    --h1: #8F7CFF;
    --h2: #4CC6FF;
    --h3: #4BF0C0;
    --h4: #FF8AD8;
    --glow: 0.3;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 28px 60px -30px rgba(0, 0, 0, 0.8);
    --show-sun: block;
    --show-moon: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080E;
  --bg-dot: rgba(220, 224, 255, 0.075);
  --surface: #0E1019;
  --surface-2: #161927;
  --ink: #ECEEF7;
  --ink-2: #C5C9DC;
  --muted: #9095AE;
  --faint: #6C7290;
  --line: #1D2134;
  --line-strong: #2B3049;
  --accent: #A898FF;
  --accent-soft: rgba(168, 152, 255, 0.1);
  --ok: #4BE3B9;
  --ok-soft: rgba(75, 227, 185, 0.1);
  --h1: #8F7CFF;
  --h2: #4CC6FF;
  --h3: #4BF0C0;
  --h4: #FF8AD8;
  --glow: 0.3;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 28px 60px -30px rgba(0, 0, 0, 0.8);
  --show-sun: block;
  --show-moon: none;
}

/* Shuffled accent palette (the dice button in the top bar, main.js). Only the
   accent hues change: every stop is derived from one --hue at the same spacing
   as the default palette, with fixed lightness per theme so text keeps its
   contrast. Neutrals and the green "ok" colour stay put. Screen only. */
@media screen {
  :root[data-palette] {
    --accent: oklch(0.5 0.2 var(--hue));
    --accent-soft: oklch(0.5 0.2 var(--hue) / 0.08);
    --h1: oklch(0.52 0.22 var(--hue));
    --h2: oklch(0.57 0.16 calc(var(--hue) - 30));
    --h3: oklch(0.6 0.13 calc(var(--hue) - 100));
    --h4: oklch(0.58 0.19 calc(var(--hue) + 70));
  }
}
@media screen and (prefers-color-scheme: dark) {
  :root[data-palette]:not([data-theme="light"]) {
    --accent: oklch(0.78 0.13 var(--hue));
    --accent-soft: oklch(0.78 0.13 var(--hue) / 0.1);
    --h1: oklch(0.7 0.17 var(--hue));
    --h2: oklch(0.8 0.13 calc(var(--hue) - 30));
    --h3: oklch(0.85 0.14 calc(var(--hue) - 100));
    --h4: oklch(0.78 0.16 calc(var(--hue) + 70));
  }
}
@media screen {
  :root[data-palette][data-theme="dark"] {
    --accent: oklch(0.78 0.13 var(--hue));
    --accent-soft: oklch(0.78 0.13 var(--hue) / 0.1);
    --h1: oklch(0.7 0.17 var(--hue));
    --h2: oklch(0.8 0.13 calc(var(--hue) - 30));
    --h3: oklch(0.85 0.14 calc(var(--hue) - 100));
    --h4: oklch(0.78 0.16 calc(var(--hue) + 70));
  }
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
strong { font-weight: 600; color: var(--ink); }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s, border-color 0.15s, background-color 0.15s;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ok { color: var(--ok); }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 50;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus { left: 16px; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
}

.brand__mark {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: var(--holo);
  transform: rotate(45deg);
}

.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.nav a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 11px;
  border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 500 13.5px/1 var(--font-body);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.pdf-btn:hover { border-color: var(--accent); color: var(--accent); }

.print-only { display: none; }

.theme-toggle {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.theme-toggle:hover { border-color: var(--line-strong); transform: rotate(-12deg); }
.theme-toggle .icon-sun { display: var(--show-sun); }
/* the dice turns its icon, not the button, so the tooltip below stays level */
.palette-btn { position: relative; }
.palette-btn:hover { transform: none; }
.palette-btn .dice { transition: transform 0.15s; }
.palette-btn:hover .dice { transform: rotate(12deg); }
.palette-btn.is-rolling .dice { animation: dice-roll 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.palette-btn.is-hinting .dice { animation: dice-nudge 0.8s ease-in-out 2; }
@keyframes dice-nudge {
  0%, 100% { transform: none; }
  25% { transform: rotate(-14deg); }
  75% { transform: rotate(14deg); }
}

/* tooltip: on hover and keyboard focus, and once by itself (main.js) */
.tip {
  position: absolute;
  top: calc(100% + 10px);
  right: -6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font: 500 12.5px/1 var(--font-body);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.tip::before {
  content: "";
  position: absolute;
  top: -4px;
  right: 21px;
  width: 8px;
  height: 8px;
  border-radius: 1.5px;
  background: inherit;
  transform: rotate(45deg);
}
.palette-btn:hover .tip,
.palette-btn:focus-visible .tip { opacity: 1; transform: none; }
.palette-btn.is-hinting .tip { opacity: 0; }

/* the first-visit callout: a gradient-bordered bubble under the dice, a
   swoosh arrow that draws itself up into the button, and pulsing rings */
.hint {
  position: absolute;
  top: 100%;
  left: 50%;              /* anchored at the button's bottom centre */
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0s 0.5s;
}
.palette-btn.is-hinting .hint { opacity: 1; visibility: visible; transition: opacity 0.3s; }

.hint__arrow { position: absolute; left: -58px; top: 0; overflow: visible; }
.hint__stop1 { stop-color: var(--h2); }
.hint__stop2 { stop-color: var(--h1); }
.hint__line, .hint__head {
  stroke: url(#hint-grad);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hint__line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.hint__head { opacity: 0; }
.palette-btn.is-hinting .hint__line { animation: hint-draw 0.7s 0.55s cubic-bezier(0.3, 0.7, 0.3, 1) forwards; }
.palette-btn.is-hinting .hint__head { animation: hint-fade 0.25s 1.15s forwards; }

.hint__bubble {
  position: absolute;
  top: 44px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: max-content;
  padding: 11px 15px 12px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface) 94%, transparent)) padding-box,
    var(--holo) border-box;
  box-shadow:
    0 0 0 5px var(--accent-soft),
    0 18px 40px -16px color-mix(in srgb, var(--h1) 70%, transparent);
  text-align: left;
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  transform-origin: top right;
}
.palette-btn.is-hinting .hint__bubble { animation: hint-pop 0.5s 0.15s cubic-bezier(0.2, 0.9, 0.3, 1.25) forwards; }
.hint__kicker {
  width: fit-content;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--holo);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hint__title { font: 600 15px/1.15 var(--font-body); letter-spacing: -0.01em; color: var(--ink); }
.hint__sub { font: 500 11.5px/1.2 var(--font-mono); color: var(--muted); }

/* rings radiating from the dice while the callout shows */
.palette-btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
}
.palette-btn.is-hinting::after { animation: hint-ring 1.6s 0.3s ease-out 3; }

@keyframes hint-draw { to { stroke-dashoffset: 0; } }
@keyframes hint-fade { to { opacity: 1; } }
@keyframes hint-pop { to { opacity: 1; transform: none; } }
@keyframes hint-ring {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}

@media (max-width: 360px) { .hint__sub { display: none; } }
/* reduced motion: the callout simply appears and goes, fully drawn */
@media (prefers-reduced-motion: reduce) {
  .hint__line { stroke-dashoffset: 0; }
  .hint__head, .hint__bubble { opacity: 1; transform: none; }
}
@keyframes dice-roll { from { transform: rotate(-180deg) scale(0.7); } to { transform: none; } }
.theme-toggle .icon-moon { display: var(--show-moon); }

@media (max-width: 900px) {
  .nav { display: none; }
  .topbar__tools { margin-left: auto; }
}
@media (max-width: 420px) {
  .pdf-btn__long { display: none; }
}

/* ---------- hero ---------- */

/* ---------- proof of motion (chain.js) ---------- */

/* The canvas sits behind everything; page content stacks above it. */
.chain {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
main, .footer { position: relative; z-index: 1; }
/* block frames reach the screen edge on phones; never let them add sideways scroll */
main { overflow-x: clip; }

/* the chain replaces the static dot grid while it runs */
.pom-on .hero::before { display: none; }

/* live mining readout, next to the brand in the top bar */
.pom {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font: 500 11.5px/1 var(--font-mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s, transform 0.4s, border-color 0.3s, color 0.3s;
}
.pom.is-live { opacity: 1; transform: none; }
.pom__state { color: var(--ink); min-width: 6ch; }
.pom__hash b { font-weight: 500; color: var(--ok); }
.pom.is-sealed { border-color: var(--ok); }
.pom.is-sealed .pom__state { color: var(--ok); }
.pom.is-mining { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.pom.is-mining .pom__state { color: var(--accent); }

@keyframes pom-spin { to { transform: rotate(405deg); } }

/* the brand mark spins once per sealed block */
.pom-sealed .brand__mark { animation: pom-spin 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }

.pom-foot b { font-weight: 500; color: var(--ok); }

/* the top bar gets tight: drop the hash, then on phones the status word,
   the brand text and the PDF label, and on the smallest the block name */
@media (max-width: 1100px) { .pom__hash { display: none; } }
@media (max-width: 480px) {
  .pom__state, .brand__name { display: none; }
  .pdf-btn { width: 38px; padding: 0; justify-content: center; }
  .pdf-btn > span { display: none; }
}
@media (max-width: 350px) { .pom__name { display: none; } }
@media (max-width: 480px) {
  .pom.is-sealed .pom__height { color: var(--ok); }
  .pom.is-mining .pom__height { color: var(--accent); }
}

/* ---------- the page as a chain (chain.js) ----------
   Every [data-block] becomes a block: a frame that draws as you read it, a
   header on the frame's top edge, a port at the bottom, and a hash pointer
   from the block above that draws as you scroll. */

/* room between blocks, so each hash pointer has a stretch to draw */
.pc-on .section { border-top-color: transparent; padding-block: clamp(66px, 8.5vw, 112px); }
.pc-on .hero { padding-block: clamp(56px, 6.5vw, 78px) clamp(66px, 8.5vw, 112px); }
.pc-on [data-block] + [data-block] { margin-top: clamp(130px, 16vw, 222px); }
.pc-on .role { padding-block: 0; border-top: 0; }
[data-block="veda"] .role { padding-top: 0; border-top: 0; }

.blk {
  position: relative;
  --edge: var(--accent);
}
.blk.is-sealed { --edge: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); }
.blk.is-sealing { --edge: var(--accent); }

.blk__frame {
  position: absolute;
  left: calc(-1 * var(--blk-side));
  top: calc(-1 * var(--blk-out));
  overflow: visible;
  pointer-events: none;
}
.blk__ghost {
  fill: none;
  stroke: color-mix(in srgb, var(--accent) 30%, var(--line-strong));
  stroke-width: 1.75;
  stroke-dasharray: 4 7;
  transition: opacity 0.8s;
}
.blk.is-sealed .blk__ghost { opacity: 0; }
.blk__edge {
  fill: none;
  stroke: var(--edge);
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), stroke 0.8s;
}
.blk.is-sealing .blk__edge { filter: drop-shadow(0 0 5px var(--accent)); }

/* glowing ends of the two sides while the block mines */
.blk__tip {
  position: absolute;
  top: var(--ty, 0);
  left: calc(-1 * var(--blk-side));
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft), 0 0 16px var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, top 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.blk__tip--r { left: calc(100% + var(--blk-side)); }
.blk.is-mining .blk__tip { opacity: 1; }

/* the out-port the next hash pointer leaves from */
.blk__port {
  position: absolute;
  left: 50%;
  top: calc(100% + var(--blk-out));
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 2.5px;
  border: 2px solid var(--line-strong);
  background: var(--bg);
  transform: rotate(45deg);
  pointer-events: none;
  transition: background 0.4s, border-color 0.4s;
}
.blk.is-sealed .blk__port { background: var(--holo); border-color: transparent; }

/* the header sits on the frame's top edge, like a legend */
.blk__head {
  position: absolute;
  z-index: 2;
  top: calc(-1 * var(--blk-out));
  left: calc(22px - var(--blk-side));
  right: calc(22px - var(--blk-side));
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  white-space: nowrap;
  font: 500 11.5px/1 var(--font-mono);
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.blk__id {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
  padding: 0 10px;
  background: var(--bg);
}
.blk__no {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
}
.blk__no::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 1.5px;
  background: var(--holo);
  transform: rotate(45deg);
}
.blk.is-sealing .blk__no::before { animation: pom-spin 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.blk__name { color: var(--ink); text-transform: uppercase; letter-spacing: 0.08em; }
.blk__hash { color: var(--ink-2); }
.blk__state {
  flex: none;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: color 0.3s, border-color 0.3s;
}
.blk.is-mining .blk__state { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.blk.is-sealed .blk__state { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.blk.is-sealed .blk__state::before { content: "✓ "; }

@media (max-width: 1000px) { .blk__size { display: none; } }
@media (max-width: 720px) { .blk__meta, .blk__label-k { display: none; } }
@media (max-width: 420px) { .blk__hash { display: none; } }

/* the hash pointer from the block above, drawn by scroll progress --p */
.blk__link {
  position: absolute;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  pointer-events: none;
  --p: 0;
}
.blk__line {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 6px, transparent 6px 11px);
  transform: scaleY(var(--p));
  transform-origin: top;
  opacity: 0.85;
}
.blk__node {
  position: absolute;
  left: 0;
  top: calc(var(--p) * 100%);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -5px;
  border-radius: 2px;
  background: var(--holo);
  transform: rotate(45deg);
  opacity: calc(var(--p) * 10);
}
.blk__label {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font: 500 11px/1 var(--font-mono);
  color: var(--faint);
  white-space: nowrap;
  opacity: calc(var(--p) * 2.5 - 0.8);
}

/* ---------- scroll reveal (main.js adds .reveal only to content below the fold) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(18px, 2.6vw, 30px) clamp(40px, 6vw, 72px);
}

/* HUD row above the name */
.hud-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
}
.hud-strip__item { white-space: nowrap; }
.hud-strip__soft { color: var(--faint); }

@media (max-width: 720px) {
  .hud-strip { gap: 8px 16px; font-size: 11.5px; }
  .hud-strip__sep, .hud-strip__sep + .hud-strip__soft { display: none; }
}

/* the name: two staggered lines, set big */
.hero__title {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-block: clamp(24px, 3.4vw, 40px) clamp(24px, 3.4vw, 40px);
}

.hero__tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.mine-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  max-width: 88ch;
  margin-top: clamp(30px, 4vw, 48px);
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--faint);
}
.mine-hint[hidden] { display: none; }
.mine-hint__tag {
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
  background: var(--accent-soft);
}
.mine-hint [data-verb] { color: var(--ink-2); }

/* dot grid, faded toward the edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--bg-dot) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 70% 35%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 75% at 70% 35%, #000 25%, transparent 75%);
  pointer-events: none;
}

/* holographic glow */
.hero::after {
  content: "";
  position: absolute;
  width: min(640px, 90vw);
  aspect-ratio: 1;
  right: -12%;
  top: -30%;
  border-radius: 50%;
  background: conic-gradient(from 140deg, var(--h1), var(--h2), var(--h3), var(--h4), var(--h1));
  filter: blur(90px);
  opacity: var(--glow);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px 6px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid color-mix(in srgb, var(--ok) 28%, transparent);
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(2.3rem, 5.2vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
}


.hero__role {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.hero__role a { text-decoration-color: var(--accent); }
.hero__role a:hover { color: var(--accent); }

.hero__lede {
  max-width: 58ch;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.7;
  color: var(--ink-2);
}

.hero__meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink); }

.btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.btn--primary:hover {
  box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--h1) 70%, transparent);
}

/* ---------- identity card ---------- */

.idcard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.idcard__head {
  display: flex;
  align-items: center;
  gap: 16px;
}


.avatar {
  flex: none;
  width: 92px;
  height: 92px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from var(--spin), var(--h1), var(--h2), var(--h3), var(--h4), var(--h1));
  animation: spin 9s linear infinite;
}
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
}

@keyframes spin { to { --spin: 360deg; } }

.idcard__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.idcard__handle { font-weight: 600; font-size: 1.35rem; letter-spacing: -0.02em; }
.idcard__sub { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

.idcard__note {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* key/value rows, styled like a transaction receipt */
.kv {
  margin: 0;
  display: grid;
  border-top: 1px dashed var(--line-strong);
}

.kv__row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding-block: 10px;
  border-bottom: 1px dashed var(--line-strong);
}

.kv dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

.kv dd {
  margin: 0;
  min-width: 0;
  font-size: 14px;
  color: var(--ink-2);
}
.kv dd .copy { margin-left: 8px; vertical-align: 1px; }

.kv__code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.kv dd .kv__code { display: block; margin-bottom: 2px; }
.idcard__note .kv__code { font-size: 0.95em; }
.kv dd a { color: var(--ink); }

.addr {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink);
}

.copy {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.copy:hover { color: var(--ink); border-color: var(--ink); }
.copy[data-state="done"] { color: var(--ok); border-color: var(--ok); }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .idcard { max-width: 520px; }
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.section--tight { padding-block: clamp(40px, 6vw, 64px) clamp(56px, 8vw, 88px); }

.section__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 780px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.section h2 {
  font-weight: 600;
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section__intro {
  max-width: 66ch;
  font-size: 1.0625rem;
  color: var(--ink-2);
}

/* ---------- invariants ---------- */

.invariants {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.inv {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 22px 26px;
  border-left: 1px solid var(--line);
}
.inv:first-child { border-left: 0; }

.inv__code {
  font-family: var(--font-mono);
  font-size: clamp(11px, 2.8vw, 12.5px);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.inv__code .fn { color: var(--accent); }

.inv__value {
  font-weight: 600;
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.inv__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

@media (max-width: 880px) {
  .invariants { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv { border-left: 0; border-top: 1px solid var(--line); padding: 20px 18px 22px; }
  .inv:nth-child(-n + 2) { border-top: 0; }
  .inv:nth-child(even) { border-left: 1px solid var(--line); }
}

/* ---------- experience ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.role {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: clamp(16px, 4vw, 48px);
  padding-block: 36px;
  border-top: 1px solid var(--line);
}
.role:first-child { padding-top: 0; border-top: 0; }
.role:last-child { padding-bottom: 0; }

.role__when {
  padding-top: 7px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
}
.now::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2.4s ease-out infinite;
}

.role__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}

.role__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  letter-spacing: -0.03em;
}
.role__title a { text-decoration: none; }
.role__title a:hover { color: var(--accent); }

.role__pos {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.role__about {
  max-width: 68ch;
  font-size: 15px;
  color: var(--muted);
}

.powers {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  font-size: 13px;
}
.powers span:not(.powers__label) {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
}
.powers__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

.private-note {
  display: flex;
  gap: 10px;
  align-items: baseline;
  max-width: 68ch;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  font-size: 14px;
  color: var(--muted);
}
.private-note__icon { flex: none; align-self: center; color: var(--faint); }

.group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bullets li {
  position: relative;
  max-width: 70ch;
  padding-left: 22px;
  color: var(--ink-2);
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 1.5px;
  background: var(--holo);
  transform: rotate(45deg);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-link {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
}
.chip-link:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 720px) {
  .role { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-block: 30px; }
  .role__when { padding-top: 0; }
}

/* ---------- security ---------- */

.auditors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.auditor {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  background: var(--surface);
}
.auditor__name { font-weight: 600; font-size: 15.5px; transition: color 0.15s; }
.auditor__what { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* a linked tile fills its cell; an unlinked one (Certora) keeps the same padding */
.auditor__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: -18px -20px;
  padding: 18px 20px;
  text-decoration: none;
}
.auditor__link:hover .auditor__name { color: var(--accent); }
.auditor__link:focus-visible { outline-offset: -3px; }

.sec-row {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  margin-top: clamp(20px, 3vw, 32px);
  align-items: start;
}

.attest {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.attest__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

.attest blockquote {
  margin: 0;
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  color: var(--ink);
}

.attest figcaption { font-size: 14px; color: var(--muted); }
.attest figcaption b { font-weight: 600; color: var(--ink); }

/* recommendations: the lead quote across the top, the other three below it */
.recs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
}
.rec--lead { grid-column: 1 / -1; }
.rec--lead blockquote { max-width: 72ch; }
.rec:not(.rec--lead) blockquote { font-size: 1rem; }
.rec figcaption { margin-top: auto; }
.recs__more { margin-top: clamp(16px, 2.4vw, 22px); }

@media (max-width: 960px) {
  .recs { grid-template-columns: minmax(0, 1fr); }
}

/* config-file panel: personal opsec, and the Veda case study in the AI section */
.opsec {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  margin-top: clamp(20px, 3vw, 32px);
  padding: clamp(22px, 3.5vw, 36px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(var(--bg-dot) 1px, transparent 1.3px) 0 0 / 18px 18px,
    var(--surface);
}

.opsec__copy { display: flex; flex-direction: column; gap: 8px; }
.opsec__copy .list-title { margin-bottom: 0; }

.opsec__title {
  font-weight: 600;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.opsec__text { font-size: 15px; color: var(--ink-2); max-width: 44ch; }

.config {
  margin: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 13px;
  overflow: hidden;
}

.config__row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
}
.config__row:first-child { border-top: 0; }

.config dt { color: var(--accent); }

.config dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.config__val { color: var(--ok); }
.config__val::before { content: "= "; color: var(--faint); }

.config__note {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--muted);
}
.config__note::before { content: "// "; font-family: var(--font-mono); color: var(--faint); }

@media (max-width: 880px) {
  .sec-row { grid-template-columns: minmax(0, 1fr); }
  .opsec { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .config__row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .auditors { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- AI & agents ---------- */

.caps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--holo) border-box;
  border-color: transparent;
  overflow: hidden;
}

.cap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px 28px;
  border-left: 1px solid var(--line);
}
.cap:first-child { border-left: 0; }

.cap__code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.cap__code .fn { color: var(--accent); }

.cap__title {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.cap__desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

@media (max-width: 1000px) {
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap { border-left: 0; border-top: 1px solid var(--line); }
  .cap:nth-child(-n + 2) { border-top: 0; }
  .cap:nth-child(even) { border-left: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .caps { grid-template-columns: minmax(0, 1fr); }
  .cap:nth-child(even) { border-left: 0; }
  .cap:nth-child(-n + 2) { border-top: 1px solid var(--line); }
  .cap:first-child { border-top: 0; }
}

/* ---------- lists: reports ---------- */

.list-title {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.row { border-bottom: 1px solid var(--line); }

.row a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 16px;
  padding: 14px 4px;
  text-decoration: none;
}

.row__name {
  min-width: 0;
  font-weight: 600;
  font-size: 15px;
  overflow-wrap: anywhere;
  transition: color 0.15s;
}
.row__name.mono { font-weight: 500; font-size: 14px; }

.row__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  padding-top: 2px;
}

.row__desc {
  grid-column: 1 / -1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.row a:hover .row__name { color: var(--accent); }

/* ---------- stack ---------- */

.stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 36px;
}
@media (max-width: 880px) { .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stack { grid-template-columns: minmax(0, 1fr); } }

.stack__group h3 {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

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

.tag {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--ink-2);
}

/* ---------- contact ---------- */

.contact {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(26px, 5vw, 56px);
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.contact::before {
  content: "";
  position: absolute;
  width: 520px;
  aspect-ratio: 1;
  left: -200px;
  bottom: -320px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--h1), var(--h2), var(--h3), var(--h4), var(--h1));
  filter: blur(90px);
  opacity: calc(var(--glow) * 0.8);
  pointer-events: none;
}

.contact > * { position: relative; }

.contact__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.contact__text {
  max-width: 52ch;
  font-size: 1.0625rem;
  color: var(--ink-2);
}

.kv--terms { align-self: stretch; align-content: center; }
.kv--terms .kv__row { grid-template-columns: 96px minmax(0, 1fr); }

@media (max-width: 820px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- footer ---------- */

.footer {
  padding-block: 28px 44px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ---------- print / Export to PDF (A4, always light) ----------
   A separate, minimalist CV layout: monochrome, plain section headings,
   everything set as text rather than cards. Web-only chrome (the chain, photo
   card, contact card, link chips) is left out. */

@media print {
  :root,
  :root:not([data-theme="light"]),
  :root[data-theme="dark"] {
    color-scheme: light;
    --bg: #FFFFFF;
    --bg-dot: transparent;
    --surface: #FFFFFF;
    --surface-2: #FFFFFF;
    --ink: #111318;
    --ink-2: #2A2D36;
    --muted: #555A66;
    --faint: #7A7F8B;
    --line: #D9DCE3;
    --line-strong: #D9DCE3;
    --accent: #2A2D36;
    --ok: #2A2D36;
    --glow: 0;
    --shadow: none;
  }

  @page { size: A4; margin: 13mm 15mm 14mm; }

  html { font-size: 12px; scroll-padding-top: 0; }
  body { font-size: 9pt; line-height: 1.42; background: #FFFFFF; color: var(--ink-2); }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* web-only parts */
  .topbar, .skip, .actions, .copy, .footer, .chain, .pom, .mine-hint,
  .hero::before, .hero::after, .contact::before,
  .blk__head, .blk__link, .blk__frame, .blk__tip, .blk__port,
  .hero__tag, .hero__meta, .idcard, .eyebrow, .section h2,
  .links, .reports, .inv__code, .cap__code, .auditor__what, .attest__meta,
  .private-note__icon, #contact, #recommendations { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }

  a { color: inherit; text-decoration: none; }
  strong { color: var(--ink); }
  .wrap { max-width: none; padding-inline: 0; }

  .section, .section--tight, .pc-on .section { padding-block: 9pt 0; border-top: 0; }
  .pc-on [data-block] + [data-block] { margin-top: 8pt; }

  /* plain section headings with a hairline rule */
  .section__head { display: block; max-width: none; margin-bottom: 6pt; }
  .section__head::before {
    display: block;
    padding-bottom: 3pt;
    border-bottom: 0.75pt solid var(--line);
    font: 600 7.8pt/1 var(--font-body);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink);
  }
  [aria-labelledby="inv-title"] .section__head::before { content: "Highlights"; }
  #work .section__head::before { content: "Experience"; }
  #security .section__head::before { content: "Security"; }
  #agents .section__head::before { content: "AI & agents"; }
  #stack .section__head::before { content: "Skills"; }
  .section__intro { max-width: none; margin-top: 6pt; font-size: 9pt; color: var(--ink-2); }

  /* header: name, one line of facts, contacts */
  .hero, .pc-on .hero { padding-block: 0; overflow: visible; }
  [data-block="genesis"] { display: flex; flex-direction: column; }
  .hero__title { order: -1; display: block; margin: 0 0 3pt; }
  .hero__name { font-size: 21pt; line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); }
  .hud-strip { order: 0; gap: 0; padding: 0; border: 0; font: 8.3pt/1.4 var(--font-body); color: var(--muted); }
  .hud-strip > p + p::before { content: "·"; margin: 0 6pt; }
  .hud-strip__soft, .hud-strip__sep { color: inherit; }
  .status { gap: 0; padding: 0; border: 0; border-radius: 0; background: none; font: inherit; color: var(--ink-2); }
  .status__dot { display: none; }
  .hero__grid { display: block; margin-top: 7pt; }
  .hero__copy { gap: 5pt; }
  .hero__role { font-size: 10pt; font-weight: 500; color: var(--ink); }
  .hero__role a { text-decoration: none; }
  .hero__lede { max-width: none; font-size: 9pt; line-height: 1.45; color: var(--ink-2); }
  .print-only.print-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1pt 12pt;
    font: 8.3pt/1.4 var(--font-body);
    color: var(--ink);
  }
  .print-only.print-proof { display: block; font-size: 8.3pt; color: var(--muted); }
  /* portrait in the top-right corner, level with the name */
  .print-only.print-avatar {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 56pt;
    height: 56pt;
    border-radius: 50%;
    object-fit: cover;
  }
  .hero__title, .hud-strip, .hero__role { padding-right: 70pt; }

  /* highlights: four figures in a row */
  .invariants { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14pt; border: 0; border-radius: 0; background: none; overflow: visible; }
  .inv, .inv:nth-child(even) { gap: 1pt; padding: 0; border: 0; }
  .inv__value { font-size: 13pt; letter-spacing: -0.02em; color: var(--ink); }
  .inv__desc { font-size: 8pt; line-height: 1.35; color: var(--muted); }

  /* experience: title left, dates right */
  .role, .pc-on .role, .pc-on .role[data-block] { position: relative; display: block; margin-top: 0; padding: 0; border: 0; }
  .pc-on .role[data-block] { margin-top: 9pt; }
  .role__when { position: absolute; top: 1pt; right: 0; padding: 0; font: 8.3pt/1.2 var(--font-body); color: var(--muted); }
  .role__body { gap: 3pt; max-width: none; }
  .role__title { gap: 0 6pt; padding-right: 110pt; font-size: 10.5pt; letter-spacing: -0.01em; }
  .role__pos { font-size: 9.5pt; color: var(--ink-2); }
  .role__about { max-width: none; font-size: 8.5pt; line-height: 1.4; color: var(--muted); }
  .powers { display: block; font-size: 8.5pt; color: var(--muted); }
  .powers__label { font: inherit; color: inherit; }
  .powers span:not(.powers__label) { padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink-2); }
  .powers span:not(.powers__label):not(:last-child)::after { content: ","; }
  .group { gap: 2pt; margin-top: 2pt; }
  .group__label { font: 600 7.5pt/1 var(--font-body); letter-spacing: 0.12em; color: var(--muted); }
  .bullets { gap: 1.5pt; }
  .bullets li { max-width: none; padding-left: 10pt; font-size: 9pt; line-height: 1.4; }
  .bullets li::before { left: 2pt; top: 0.62em; width: 3pt; height: 3pt; border-radius: 50%; background: var(--faint); transform: none; }
  .private-note { display: block; max-width: none; padding: 0; border: 0; font-size: 8pt; font-style: italic; color: var(--muted); }

  /* security: auditors as one line, the quote, opsec as one line */
  .auditors { display: block; border: 0; border-radius: 0; background: none; overflow: visible; font-size: 9pt; }
  .auditors::before { content: "Audits with "; color: var(--muted); }
  .auditor { display: inline; padding: 0; background: none; }
  .auditor + .auditor::before { content: " · "; color: var(--faint); }
  .auditor__link { display: inline; margin: 0; padding: 0; }
  .auditor__name { font-size: inherit; font-weight: 500; color: var(--ink); }
  .sec-row, .pc-on .sec-row { display: block; }
  .attest { display: block; padding: 0 0 0 9pt; border: 0; border-left: 1.5pt solid var(--line); border-radius: 0; background: none; }
  .attest blockquote { font-size: 8.8pt; line-height: 1.45; font-style: italic; color: var(--ink-2); }
  .attest figcaption { margin-top: 2pt; font-size: 8pt; color: var(--muted); }

  .opsec { display: block; padding: 0; border: 0; border-radius: 0; background: none; }
  .opsec__copy { display: block; }
  .opsec__copy .list-title { display: none; }
  .opsec__title { display: inline; font-size: 9pt; font-weight: 600; letter-spacing: 0; color: var(--ink); }
  .opsec__title::after { content: ": "; }
  .opsec__text { display: inline; max-width: none; font-size: 9pt; color: var(--ink-2); }
  /* personal opsec: the rules as one line; the case study: its paragraph */
  [data-block="opsec"] .opsec__text { display: none; }
  [data-block="opsec"] .opsec__copy { display: inline; }
  [data-block="case study"] .config { display: none; }
  .config { display: inline; margin: 0; border: 0; border-radius: 0; background: none; font: 9pt/1.42 var(--font-body); }
  .config__row { display: inline; padding: 0; border: 0; }
  .config__row + .config__row::before { content: " · "; color: var(--faint); }
  .config dt, .config__val { display: none; }
  .config dd { display: inline; }
  .config__note { font-size: inherit; color: var(--ink-2); }
  .config__note::before { content: none; }

  /* AI: the four capabilities as a 2×2 list */
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5pt 16pt; border: 0; border-radius: 0; background: none; overflow: visible; }
  .cap, .cap:nth-child(even), .cap:nth-child(-n + 2), .cap:first-child { gap: 1pt; padding: 0; border: 0; }
  .cap__title { font-size: 9pt; letter-spacing: 0; }
  .cap__desc { font-size: 8.5pt; line-height: 1.4; color: var(--ink-2); }

  /* skills: one line per group */
  .stack { display: block; }
  .stack__group { margin-bottom: 2.5pt; font-size: 9pt; line-height: 1.4; }
  .stack__group h3 { display: inline; margin: 0; font: 600 9pt/1.4 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--ink); }
  .stack__group h3::after { content: ": "; }
  .tags { display: inline; }
  .tag { display: inline; padding: 0; border: 0; border-radius: 0; background: none; font-size: 9pt; color: var(--ink-2); }
  .tag + .tag::before { content: ", "; }

  /* keep small things whole; let big blocks flow across pages */
  .bullets li, .inv, .cap, .stack__group, .attest, .role__about, .private-note { break-inside: avoid; }
  .section__head, .role__title, .group__label { break-after: avoid; }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
