/* Golden hour (spec/visual-golden-hour.md). Fonts are self-hosted, OFL, from the pinned
   Fontsource packages (fraunces, geist, geist-mono at 5.3.0); licences sit next to the files. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces-latin-opsz-normal.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: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces-latin-opsz-italic.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: 100 900;
  font-display: swap;
  src: url('../fonts/geist-latin-wght-normal.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: 100 900;
  font-display: swap;
  src: url('../fonts/geist-mono-latin-wght-normal.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;
}
/* Navy and brass (14 Nov 2026): Newsreader and Hanken Grotesk, OFL, Fontsource 5.3.0.
   Fraunces and Geist stay for the ID card, which keeps the golden hour look. */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-latin-opsz-normal.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: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-latin-opsz-italic.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: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/hanken-grotesk-latin-wght-normal.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;
}

:root {
  /* Golden hour palette (visual brief section 2) */
  --paper: #ffffff;
  --card: #f6f7f9;
  --ink: #0a1a33;
  --ink-2: #36445c;
  --mute: #74809a;
  --faint: #b3bbcb;
  --line: rgba(10, 26, 51, .12);
  --soft: #eef0f4;
  --dark: #081428;
  --dark-2: #10213d;
  --on-dark: #f4f1ea;
  --on-dark-2: rgba(244, 241, 234, .76);
  --line-dark: rgba(244, 241, 234, .14);
  --accent: #c9a45c;
  --accent-ink: #081428;
  --accent-2: #9a7426;
  --shadow: 0 30px 60px -32px rgba(8, 20, 40, .45);
  /* Contrast-safe companions (WCAG AA at small sizes), same hues as the brief */
  --mute-text: #5a667f;            /* secondary text on light grounds, 4.6:1 on --soft and up */
  --accent-2-ink: #86631c;         /* terracotta for small text: tags, card kicker */
  --mute-dark: rgba(244, 241, 234, .66);   /* secondary text on dark grounds */
  --faint-dark: rgba(244, 241, 234, .32);  /* hairline accents on dark grounds */
  --clip: #aab1bf;                 /* lanyard clip */
  --white: #fff;
  /* Skills family hues (on dark) */
  --fam-ai: #e0a43a;
  --fam-sw: #c8553d;
  --fam-infra: #8fb39a;
  --fam-ep: #8fb8de;
  --fam-net: #d9c7a3;
  --fam-itsm: #d98f8f;
  /* Ground-dependent roles: light values here, dark sections override below */
  --em: var(--accent-2);           /* italic accent word in headings */
  --tag: var(--accent-2-ink);      /* mono section tags */
  --focus: var(--ink);
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --chip-bg: var(--soft);
  --chip-fg: var(--ink);
  --chip-on-bg: var(--ink);
  --chip-on-fg: var(--paper);
  --chip-line: transparent;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(18px, 4vw, 64px);
  /* S0, from plan section 6 prose */
  --content: 1320px;
  --radius: 26px;
  --radius-sm: 14px;
  --hair: inset 0 0 0 1px var(--line);
  --font-sans: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-serif: var(--font-display);
  --font-mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', monospace;
  --fs-h2: clamp(2.5rem, 5.6vw, 5.5rem);
  --fs-lead: clamp(1.05rem, 1.25vw, 1.25rem);
  --fs-tag: .75rem;
  --sec-pad: clamp(88px, 12vw, 176px);
  --dur: .8s;
}

/* Section grounds: Skills, Demos, Achievements and Contact sit on forest.
   The light tokens are re-pointed locally so every component below reads the same
   names and lands on the dark palette. */
#skills, #demos, #achievements, #contact {
  --paper: var(--dark);
  --card: var(--dark-2);
  --ink: var(--on-dark);
  --ink-2: var(--on-dark-2);
  --mute: var(--mute-dark);
  --mute-text: var(--mute-dark);
  --faint: var(--faint-dark);
  --line: var(--line-dark);
  --soft: var(--dark-2);
  --hair: inset 0 0 0 1px var(--line-dark);
  --em: var(--accent);
  --tag: var(--accent);
  --focus: var(--accent);
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  --chip-bg: var(--dark-2);
  --chip-fg: var(--on-dark-2);
  --chip-on-bg: var(--accent);
  --chip-on-fg: var(--accent-ink);
  --chip-line: var(--line-dark);
  background: var(--dark);
  color: var(--on-dark);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol[class], ul[class] { list-style: none; padding: 0; }
img, canvas { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Body */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -.02em;
  line-height: .98;
}

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  padding: .75em 1.25em;
  background: var(--paper);
  color: var(--ink);
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Section frame */
main > section:not(.hero) { padding: var(--sec-pad) var(--gutter); }
.sec-head { max-width: var(--content); margin: 0 auto clamp(40px, 6vw, 80px); }

.tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-tag);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tag);
}
.h-sec {
  font-weight: 500;
  font-size: var(--fs-h2);
  letter-spacing: -.02em;
  line-height: .98;
}
.h-sec em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--em);
}
.sec-head .tag + .h-sec { margin-top: 14px; }
.sec-head .h-sec + .lead { margin-top: 24px; }
.lead {
  font-size: var(--fs-lead);
  color: var(--ink-2);
  max-width: 60ch;
}

/* Shared controls */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .85em 1.5em;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .3s var(--ease), background-color .2s;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
}
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn--glass {
  background: color-mix(in srgb, var(--on-dark) 12%, transparent);
  color: var(--on-dark);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-dark) 38%, transparent);
}
.btn--ink { background: var(--btn-bg); color: var(--btn-fg); }
@media (hover: hover) and (pointer: fine) {
  .btn--solid:hover { background-color: color-mix(in srgb, var(--accent) 94%, var(--white)); }
  .btn--ink:hover { background-color: color-mix(in srgb, var(--btn-bg) 94%, var(--white)); }
  .btn--glass:hover { background-color: color-mix(in srgb, var(--on-dark) 20%, transparent); }
}
.link { text-decoration: underline; text-underline-offset: .25em; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: .4em .9em;
  border: 0;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-fg);
  box-shadow: inset 0 0 0 1px var(--chip-line);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .8rem;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); box-shadow: none; }

/* Reveal on scroll */
/* A revealing block is never a scroll anchor: WebKit follows its transform while it settles, which pulled a nav jump
   (About) 24px short of the section top. */
html.js .rv {
  overflow-anchor: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
html.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .rv, html.js .rv.in { opacity: 1; transform: none; transition: none; }
}

/* Footer */
.foot {
  --focus: var(--accent);
  background: var(--dark-2);
  color: var(--on-dark);
  border-top: 1px solid var(--line-dark);
  padding: 48px var(--gutter);
}
.foot > * { max-width: var(--content); margin-left: auto; margin-right: auto; }
.foot__mark { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; font-size: 1.5rem; line-height: 1; }
.foot__nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1rem; font-size: .9rem; }
.foot__nav a { color: var(--on-dark-2); text-decoration: none; transition: color .2s; }
.foot__nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .25em; }
.foot__legal { margin-top: 2rem; font-family: var(--font-mono); font-size: 12px; color: var(--mute-dark); }

/* The ID card keeps the golden hour palette and faces (owner, 14 Nov 2026): the HTML card,
   its strap and clip read these; the 3D card's face images were drawn with them. */
.badge__swing, .badge__strap, .badge__clip {
  --paper: #f6efe3; --card: #fffaf2; --ink: #14231d; --ink-2: #3d4a43; --mute: #7c766a; --faint: #b3ab9c;
  --line: rgba(20, 35, 29, .12); --soft: #ece3d3; --dark: #0f2a22; --dark-2: #173a2f;
  --on-dark: #f6efe3; --on-dark-2: rgba(246, 239, 227, .74); --line-dark: rgba(246, 239, 227, .14);
  --accent: #e0a43a; --accent-ink: #0f2a22; --accent-2: #c8553d; --accent-2-ink: #b3472f;
  --mute-text: #6a6458; --mute-dark: rgba(246, 239, 227, .66); --faint-dark: rgba(246, 239, 227, .32);
  --clip: #b9b2a5; --shadow: 0 30px 60px -32px rgba(15, 42, 34, .45);
  --font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}
