/* ==========================================================================
   montanis.sk — main stylesheet
   Plain CSS, no build step. Sections:
   1. Fonts   2. Palettes (accent themes)   3. Colour scheme tokens
   4. Base    5. Layout & components        6. Sections   7. Utilities
   ========================================================================== */

/* 1. Fonts — self-hosted (SIL Open Font License), no third-party requests */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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: "Archivo";
  src: url("/assets/fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  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: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   2. Palettes
   Each palette defines an accent + accent-soft for light and dark schemes,
   and a signature detail (the small mark after headlines and before labels).

   >>> TO SWITCH THE SITE-WIDE PALETTE: move the line ":where(:root)," from the
   >>> Spruce block to the top of the block of the palette you want.
   >>> Nothing else needs to change.
   (Preview them side by side on /design-options.html.)
   -------------------------------------------------------------------------- */

/* A · Spruce — pine green, signature: a small mountain peak (montanis = "of the mountains") */
:where(:root),
[data-palette="spruce"] {
  --p-accent-light: #1e6a4c;
  --p-accent-soft-light: #dde9e0;
  --p-accent-dark: #74c99e;
  --p-accent-soft-dark: #1a2f27;
  --sig-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cpath d='M2 17 12 3l10 14' fill='none' stroke='%23000' stroke-width='4.2'/%3E%3C/svg%3E");
  --sig-w: 0.5em;
  --sig-h: 0.38em;
  --sig-gap: 0.12em;
  --sig-anim: none;
  --marker-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cpath d='M0 18 12 0l12 18z'/%3E%3C/svg%3E");
  --marker-w: 0.85em;
  --marker-h: 0.64em;
}

/* B · Cobalt — deep blue, signature: a forward slash, like a path separator */
[data-palette="cobalt"] {
  --p-accent-light: #2b46c4;
  --p-accent-soft-light: #e1e6f8;
  --p-accent-dark: #93a6ff;
  --p-accent-soft-dark: #1d2446;
  --sig-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 24'%3E%3Cpath d='M9 0h5L5 24H0z'/%3E%3C/svg%3E");
  --sig-w: 0.3em;
  --sig-h: 0.72em;
  --sig-gap: 0.14em;
  --sig-anim: none;
  --marker-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 24'%3E%3Cpath d='M8 0h6L6 24H0z'/%3E%3C/svg%3E");
  --marker-w: 0.5em;
  --marker-h: 0.9em;
}

/* C · Copper — burnt orange, signature: a terminal cursor that blinks slowly */
[data-palette="copper"] {
  --p-accent-light: #a3460c;
  --p-accent-soft-light: #f4e3d3;
  --p-accent-dark: #f0a067;
  --p-accent-soft-dark: #3a2516;
  --sig-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 6'%3E%3Cpath d='M0 0h24v6H0z'/%3E%3C/svg%3E");
  --sig-w: 0.46em;
  --sig-h: 0.11em;
  --sig-gap: 0.1em;
  --sig-anim: sig-blink 1.6s steps(1, end) infinite;
  --marker-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 6'%3E%3Cpath d='M0 0h24v6H0z'/%3E%3C/svg%3E");
  --marker-w: 0.9em;
  --marker-h: 0.22em;
}

/* --------------------------------------------------------------------------
   3. Colour scheme tokens — light by default, dark via prefers-color-scheme.
   data-theme="light|dark" on <html> forces a scheme (used by design-options).
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --surface: #fbf9f4;
  --surface-2: #ece8de;
  --text: #17160f;
  --muted: #5b574e;
  --faint: #8a857a; /* decorative only, never body text */
  --line: #d9d3c6;
  --bar: #17160f;          /* header / footer bar */
  --bar-text: #f4f1ea;
  --bar-muted: #b9b3a6;
  --invert-bg: #1c1b16;    /* the one inverted card */
  --invert-text: #f4f1ea;
  --invert-muted: #c4beb1;
  --about-dim: #aaa498;
  --shadow: 0 1px 2px rgb(23 22 15 / 0.05), 0 8px 24px -12px rgb(23 22 15 / 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121210;
    --surface: #1a1a17;
    --surface-2: #23231f;
    --text: #edeae2;
    --muted: #aaa498;
    --faint: #6f6a60;
    --line: #2f2e29;
    --bar: #0a0a09;
    --bar-text: #edeae2;
    --bar-muted: #a39d91;
    --invert-bg: #edeae2;
    --invert-text: #17160f;
    --invert-muted: #4f4b43;
    --about-dim: #4c4943;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121210;
  --surface: #1a1a17;
  --surface-2: #23231f;
  --text: #edeae2;
  --muted: #aaa498;
  --faint: #6f6a60;
  --line: #2f2e29;
  --bar: #0a0a09;
  --bar-text: #edeae2;
  --bar-muted: #a39d91;
  --invert-bg: #edeae2;
  --invert-text: #17160f;
  --invert-muted: #4f4b43;
  --about-dim: #4c4943;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.5);
}

/* Accent mapping. Repeated on [data-palette] so a palette can also be
   applied to a single element (used by design-options.html). */
:root,
[data-palette] {
  --accent: var(--p-accent-light);
  --accent-soft: var(--p-accent-soft-light);
  --accent-on-bar: var(--p-accent-dark);
  --accent-on-invert: var(--p-accent-dark);
  --focus: var(--p-accent-light);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]),
  :root:not([data-theme="light"]) [data-palette] {
    --accent: var(--p-accent-dark);
    --accent-soft: var(--p-accent-soft-dark);
    --accent-on-bar: var(--p-accent-dark);
    --accent-on-invert: var(--p-accent-light);
    --focus: var(--p-accent-dark);
  }
}
:root[data-theme="dark"],
:root[data-theme="dark"] [data-palette] {
  --accent: var(--p-accent-dark);
  --accent-soft: var(--p-accent-soft-dark);
  --accent-on-bar: var(--p-accent-dark);
  --accent-on-invert: var(--p-accent-light);
  --focus: var(--p-accent-dark);
}

/* Global sizing tokens */
:root {
  --font-display: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius: 4px;
  --header-h: 4rem;
}

/* --------------------------------------------------------------------------
   4. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.site-header :focus-visible,
.site-footer :focus-visible,
.card-invert :focus-visible { outline-color: var(--accent-on-bar); }

::selection { background: var(--accent); color: var(--bg); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: 0.6rem 1rem;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; color: var(--bg); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   5. Layout & shared components
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section + .section { border-top: 1px solid var(--line); }

/* Signature detail — the small accent mark after headlines */
.sig {
  display: inline-block;
  width: var(--sig-w);
  height: var(--sig-h);
  margin-left: var(--sig-gap);
  background: var(--accent);
  -webkit-mask: var(--sig-mask) no-repeat center / 100% 100%;
  mask: var(--sig-mask) no-repeat center / 100% 100%;
  vertical-align: baseline;
}
.hero-name .sig { animation: var(--sig-anim); } /* only the big name may animate */
@keyframes sig-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .sig { animation: none !important; }
}

/* Small uppercase section label with a marker in front */
.label {
  display: flex;
  align-items: center;
  gap: 0.65em;
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-stretch: 120%;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.label::before {
  content: "";
  flex: none;
  width: var(--marker-w);
  height: var(--marker-h);
  background: var(--accent);
  -webkit-mask: var(--marker-mask) no-repeat center / 100% 100%;
  mask: var(--marker-mask) no-repeat center / 100% 100%;
}

.section-title {
  font-size: clamp(2rem, 5.2vw, 3.75rem);
  font-stretch: 118%;
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 20ch;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-intro {
  max-width: 46rem;
  color: var(--muted);
  margin: calc(-1 * clamp(1rem, 3vw, 2rem)) 0 clamp(2rem, 5vw, 3rem);
}

/* Buttons */
.btn {
  --btn-bg: var(--text);
  --btn-fg: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--btn-bg);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { --btn-bg: var(--accent); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--text); }
.btn--ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn .arrow { width: 1em; height: 1em; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Arrow icon (drawn, so it doesn't depend on font glyphs) */
.arrow { flex: none; width: 1.1em; height: 1.1em; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; }
.tags li {
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
}

/* --------------------------------------------------------------------------
   Header (dark bar)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bar);
  color: var(--bar-text);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--bar-text);
}
.brand:hover { color: var(--bar-text); }
.brand .sig { background: var(--accent-on-bar); }

.nav { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); }
.nav-list { display: flex; gap: clamp(0.75rem, 2vw, 1.75rem); list-style: none; }
.nav-list a,
.lang a,
.lang span {
  color: var(--bar-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-list a:hover,
.lang a:hover { color: var(--bar-text); }
.nav-list a[aria-current="true"] { color: var(--bar-text); }

.lang {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.15rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 999px;
  font-family: var(--font-display);
  font-stretch: 115%;
}
.lang a,
.lang span {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.lang [aria-current="page"],
.lang .is-current { background: var(--bar-text); color: var(--bar); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: var(--radius);
  color: var(--bar-text);
  font: 600 0.9rem/1 var(--font-body);
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 1rem;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s;
}
.nav-toggle-icon { position: relative; }
.nav-toggle-icon::before,
.nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle-icon::before { top: -5px; }
.nav-toggle-icon::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 52rem) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bar);
    border-top: 1px solid rgb(255 255 255 / 0.1);
    display: none;
  }
  .js .nav.is-open { display: flex; }
  .js .nav-list { flex-direction: column; gap: 0; }
  .js .nav-list a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
  }
  .js .nav .lang { align-self: flex-start; margin-top: 1rem; }
  /* Without JS: let the nav wrap under the name */
  .site-header .wrap { flex-wrap: wrap; }
  .no-js .nav { width: 100%; flex-wrap: wrap; padding-bottom: 0.75rem; }
  .no-js .nav-list { flex-wrap: wrap; }
}

/* --------------------------------------------------------------------------
   6. Sections
   -------------------------------------------------------------------------- */

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section-y); }
.eyebrow {
  margin: 0 0 clamp(1rem, 2.5vw, 1.75rem);
  font-family: var(--font-display);
  font-stretch: 118%;
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot { color: var(--accent); padding-inline: 0.35em; }

.hero-name {
  /* sized so "Kamendy" + signature always fits the column on one line */
  font-size: min(calc((100vw - 2 * var(--gutter)) / 6.4), 12rem);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem) -0.05em;
}
.hero-name > span { display: block; white-space: nowrap; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 4vw, 3rem);
}
.hero-headline {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
.hero-intro { max-width: 38rem; color: var(--muted); font-size: 1.125rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.portrait {
  margin: 0;
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--surface-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait::after { /* thin accent rule under the photo */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--accent);
}
.portrait--placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, rgb(127 127 127 / 0.08) 12px 13px),
    var(--surface-2);
}

@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 20rem; }
}

/* Focus — numbered list + one inverted card */
.focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.numbered { list-style: none; border-top: 1px solid var(--line); counter-reset: n; }
.numbered > li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: clamp(1.4rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.numbered .num {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  padding-top: 0.35rem;
}
.numbered h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  margin-bottom: 0.5rem;
}
.numbered p { color: var(--muted); max-width: 36rem; }

.card-invert {
  background: var(--invert-bg);
  color: var(--invert-text);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}
.card-invert .num {
  display: block;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  color: var(--accent-on-invert);
  margin-bottom: 1.25rem;
}
.card-invert .statement {
  color: var(--invert-text);
  font-family: var(--font-display);
  font-stretch: 112%;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}
.card-invert .statement .sig { background: var(--accent-on-invert); }
.card-invert p { color: var(--invert-muted); }

@media (max-width: 52rem) {
  .focus-grid { grid-template-columns: 1fr; }
  .card-invert { position: static; }
}
@media (max-width: 30rem) {
  .numbered > li { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* About — darkens from grey to black as you scroll */
.about-lead {
  font-family: var(--font-display);
  font-stretch: 108%;
  font-size: clamp(1.45rem, 3.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  max-width: 34ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.about-lead .w { transition: color 0.35s ease; }
.js .about-lead.is-scrubbing .w { color: var(--about-dim); }
.js .about-lead.is-scrubbing .w.is-lit { color: var(--text); }
.about-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 62rem;
  color: var(--muted);
}
@media (max-width: 40rem) { .about-cols { grid-template-columns: 1fr; } }

/* Experience cards */
.jobs { display: grid; gap: 1.25rem; }
.job {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
}
.job-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.job-dates {
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.job-org { font-weight: 600; color: var(--text); }
.job h3 { font-size: clamp(1.2rem, 2.2vw, 1.55rem); margin-bottom: 0.35rem; }
.job-prev { font-size: 0.92rem; color: var(--muted); margin-bottom: 0; }

.outcome {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.outcome .arrow { color: var(--accent); margin-top: 0.22em; }
.outcome p { margin: 0; font-weight: 500; }
.outcome .visually-hidden + p { margin: 0; }

.job details { margin-top: 1rem; border-top: 1px dashed var(--line); padding-top: 0.75rem; }
.job summary,
.earlier summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  padding: 0.3rem 0;
}
.job summary::-webkit-details-marker,
.earlier summary::-webkit-details-marker { display: none; }
.job summary::before,
.earlier summary::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.2s;
}
.job details[open] > summary::before,
.earlier[open] > summary::before { transform: rotate(45deg); }
.job summary:hover,
.earlier summary:hover { color: var(--accent); }
.job-story { color: var(--muted); margin: 0.5rem 0 0; max-width: 48rem; }

.earlier {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.earlier summary { font-size: 1rem; }
.earlier-list { list-style: none; margin-top: 1rem; }
.earlier-list li {
  display: grid;
  grid-template-columns: 8rem minmax(0, 14rem) minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.earlier-list .job-dates { padding-top: 0.2rem; }
.earlier-list .org { font-weight: 600; }
.earlier-list .role { color: var(--muted); }
@media (max-width: 44rem) {
  .earlier-list li { grid-template-columns: 1fr; }
}

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.project {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.project-shot {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgb(127 127 127 / 0.09) 14px 15px),
    var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.project-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.project h3 { font-size: 1.35rem; }
.project p { color: var(--muted); margin: 0; }
.project .project-lede { color: var(--text); font-weight: 500; }
.project .tags { margin-top: 0.25rem; }

/* Project illustrations: abstract inline SVGs coloured by the active palette */
.project-shot .ill { width: 100%; height: 100%; }
.ill-card { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.ill-soft { fill: var(--accent-soft); }
.ill-mid { fill: var(--accent); opacity: 0.55; }
.ill-accent { fill: var(--accent); }
.ill-stroke { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.ill-thick { stroke-width: 8; }
.ill-line { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; }
.ill-accent-line { stroke: var(--accent); stroke-width: 3; }
.ill-dash { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 5; }
.project .link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}
.project .link:hover { text-decoration: underline; }
@media (max-width: 44rem) { .projects { grid-template-columns: 1fr; } }

.todo { /* obvious placeholder marker */
  background: var(--accent-soft);
  color: var(--text);
  outline: 1px dashed var(--accent);
  outline-offset: -1px;
  padding: 0.05em 0.35em;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Credentials — four columns */
.creds {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.creds > div {
  padding: 1.75rem 1.5rem 0 0;
}
.creds > div + div { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.creds h3 {
  font-size: 0.78rem;
  font-stretch: 120%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.creds ul { list-style: none; display: grid; gap: 0.85rem; }
.creds li { font-size: 0.98rem; line-height: 1.45; }
.creds li small { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.15rem; }
@media (max-width: 60rem) {
  .creds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creds > div { padding: 1.75rem 1.5rem 1.75rem 0; border-bottom: 1px solid var(--line); }
  .creds > div + div { border-left: 0; padding-left: 0; }
  .creds > div:nth-child(even) { padding-left: 1.5rem; border-left: 1px solid var(--line); }
}
@media (max-width: 36rem) {
  .creds { grid-template-columns: 1fr; }
  .creds > div:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* Recommendations — 2×2 quote cards with initials */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.quote blockquote { margin: 0; font-size: 1.08rem; line-height: 1.55; }
.quote blockquote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 0.6;
  height: 1.6rem;
  color: var(--accent);
}
.quote figcaption { display: flex; align-items: center; gap: 0.85rem; margin-top: auto; }
.initials {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-stretch: 120%;
  font-weight: 800;
  font-size: 0.9rem;
}
.quote .who { display: block; font-weight: 600; }
.quote .role { display: block; font-size: 0.88rem; color: var(--muted); }
@media (max-width: 44rem) { .quotes { grid-template-columns: 1fr; } }

/* Notes list */
.notes-list { list-style: none; border-top: 1px solid var(--line); }
.notes-list li { border-bottom: 1px solid var(--line); }
.notes-list a {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) auto;
  gap: 0.35rem 1.5rem;
  align-items: baseline;
  padding-block: 1.35rem;
  text-decoration: none;
}
.notes-list time {
  font-family: var(--font-display);
  font-stretch: 115%;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.notes-list .t {
  font-family: var(--font-display);
  font-stretch: 110%;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  letter-spacing: -0.01em;
}
.notes-list .d { grid-column: 2; color: var(--muted); font-size: 0.98rem; }
.notes-list .badge { font-size: 0.72rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.5rem; margin-left: 0.5rem; vertical-align: middle; font-family: var(--font-body); letter-spacing: 0; }
.notes-list .arrow { grid-column: 3; grid-row: 1; color: var(--accent); transition: transform 0.2s; }
.notes-list a:hover .t { color: var(--accent); }
.notes-list a:hover .arrow { transform: translateX(4px); }
.notes-more { margin-top: 1.5rem; }
.notes-empty { color: var(--muted); padding-block: 1.25rem; }
@media (max-width: 40rem) {
  .notes-list a { grid-template-columns: minmax(0, 1fr) auto; }
  .notes-list time { grid-column: 1; }
  .notes-list .t, .notes-list .d { grid-column: 1; }
  .notes-list .arrow { grid-column: 2; grid-row: 2; }
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 6vw, 5rem);
}
.contact-aside p { color: var(--muted); }
.contact-aside .section-title { font-size: clamp(1.9rem, 3.8vw, 3rem); margin-bottom: 0; }
.contact-links { list-style: none; display: grid; gap: 0.75rem; margin: 1.75rem 0; }
.contact-links a,
.contact-links span.val { font-weight: 600; }
.contact-links .k {
  display: block;
  font-family: var(--font-display);
  font-stretch: 115%;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-note { font-size: 0.95rem; }

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  min-height: 3rem;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.8rem) 55%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline-offset: 0; border-color: var(--focus); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #b3261e; }
.form-privacy { font-size: 0.88rem; color: var(--muted); margin: 0; }
.form-status { margin: 0; font-weight: 600; min-height: 1.5em; }
.form-status.is-ok { color: var(--accent); }
.form-status.is-error { color: #b3261e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-status.is-error { color: #ff8a80; }
}
:root[data-theme="dark"] .form-status.is-error { color: #ff8a80; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 52rem) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 30rem) { .field-row { grid-template-columns: 1fr; } }

/* Footer (dark bar) */
.site-footer {
  background: var(--bar);
  color: var(--bar-muted);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
  font-size: 0.92rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
}
.footer-name {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: -0.03em;
  color: var(--bar-text);
  margin: 0 0 0.25rem;
  line-height: 1.1;
}
.footer-name .sig { background: var(--accent-on-bar); }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; }
.site-footer a { color: var(--bar-muted); text-decoration: none; }
.site-footer a:hover { color: var(--bar-text); text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.5rem;
}
.footer-bottom p { margin: 0; }

/* Simple content pages (privacy, notes, 404) */
.page { padding-block: clamp(3rem, 8vw, 6rem) var(--section-y); }
.page-title {
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-stretch: 122%;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-bottom: 1.5rem;
  max-width: 18ch;
}
.prose { max-width: 42rem; }
.prose h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2.5rem 0 0.85rem; }
.prose h3 { font-size: 1.2rem; margin: 2rem 0 0.6rem; }
.prose p,
.prose li { color: var(--text); }
.prose ul,
.prose ol { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 4px solid var(--accent);
  color: var(--muted);
}
.prose a { color: var(--accent); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 2rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.back-link .arrow { transform: rotate(180deg); }
.draft-banner {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.page-sub {
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.notes-list--page { margin-top: 3rem; }
.big-404 {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(6rem, 30vw, 18rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  margin: 0 0 1.5rem -0.04em;
}

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

@media print {
  .site-header, .site-footer, .hero-actions, .form, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .job, .quote, .project { box-shadow: none; break-inside: avoid; }
}
