/* ==========================================================================
   Syed Aun Muhammad — Portfolio
   style.css

   Direction: minimal, premium, one typeface (Geist). Near-black ground,
   soft light instead of decoration, glass header, cursor-lit cards.

   1. Tokens (variables, dark default + light)
   2. Fonts
   3. Base
   4. Layout
   5. Components
   6. Sections
   7. Utilities
   8. Responsive
   9. Reduced motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Colour — dark (default) */
  --bg: #070707;
  --surface: #111112;
  --surface-2: #18181A;
  --text: #F5F5F4;
  --text-2: #A1A1A0;          /* 7.8:1 on --bg */
  --text-3: #8A8A89;          /* 5.8:1 on --bg */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #E9C48A;          /* warm champagne, used in small doses */
  --accent-soft: rgba(233, 196, 138, 0.12);
  --on-accent: #0A0A0A;
  --glow: rgba(233, 196, 138, 0.16);
  --glow-2: rgba(255, 255, 255, 0.05);
  --spot: rgba(255, 255, 255, 0.06);
  --spot-edge: rgba(233, 196, 138, 0.55);
  --glass: rgba(14, 14, 15, 0.62);
  --danger: #F2A08F;
  --success: #8FD19E;
  --shadow-lg: 0 40px 120px -40px rgba(0, 0, 0, 0.8);
  --shadow-book: 0 24px 40px -18px rgba(0, 0, 0, 0.85), 0 2px 6px rgba(0, 0, 0, 0.5);
  --img-filter: grayscale(1) contrast(1.08) brightness(0.92);
  --scrim: rgba(5, 5, 5, 0.82);
  --grain-opacity: 0.045;
  color-scheme: dark;

  /* Type — a single family */
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-hero: clamp(2.6rem, 0.9rem + 5.1vw, 6rem);
  --fs-xl: clamp(2.9rem, 0.8rem + 8vw, 8.5rem);
  --fs-h2: clamp(2.1rem, 1.1rem + 3.4vw, 4.5rem);
  --fs-h3: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem);
  --fs-lead: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.8125rem;

  --track-tight: -0.045em;
  --track-head: -0.035em;

  /* Space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --section: clamp(5.5rem, 3rem + 8vw, 10rem);
  --margin: clamp(1.25rem, 0.5rem + 3.5vw, 4rem);
  --gutter: clamp(0.75rem, 0.4rem + 1vw, 1.25rem);
  --max: 82rem;
  --header-h: 4.75rem;

  /* Shape */
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --r-pill: 999px;
  --hair: 1px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 200ms;
  --t-med: 480ms;
  --t-slow: 900ms;
}

:root[data-theme="light"] {
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --surface-2: #F1F1EF;
  --text: #0A0A0A;
  --text-2: #5C5C5B;
  --text-3: #6B6B69;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);
  --accent: #8C6420;
  --accent-soft: rgba(140, 100, 32, 0.1);
  --on-accent: #FFFFFF;
  --glow: rgba(212, 160, 80, 0.22);
  --glow-2: rgba(0, 0, 0, 0.03);
  --spot: rgba(140, 100, 32, 0.06);
  --spot-edge: rgba(140, 100, 32, 0.45);
  --glass: rgba(250, 250, 249, 0.7);
  --danger: #B3392A;
  --success: #2F7A44;
  --shadow-lg: 0 40px 100px -40px rgba(30, 20, 0, 0.25);
  --shadow-book: 0 22px 34px -18px rgba(40, 30, 10, 0.45), 0 2px 5px rgba(40, 30, 10, 0.2);
  --img-filter: grayscale(1) contrast(1.02);
  --scrim: rgba(250, 250, 249, 0.86);
  --grain-opacity: 0.03;
  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. FONTS (self-hosted, OFL — see assets/fonts/)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   3. 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);
  background: var(--bg);
}
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out);
}

/* Film grain: one static layer over everything, barely there */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
address { font-style: normal; }
::selection { background: var(--accent); color: var(--on-accent); }

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: var(--track-head);
  line-height: 1.05;
  text-wrap: balance;
}
p { text-wrap: pretty; }

/* Headline pattern: muted lead-in, bright payoff */
.section-head__title, .hero__statement, .site-footer__line, .journey__passion, .edu__quote p { color: var(--text-3); }
.section-head__title em, .hero__statement em, .site-footer__line em, .journey__passion em, .edu__quote em {
  font-style: normal;
  color: var(--text);
}

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

.skip-link {
  position: fixed;
  left: var(--margin);
  top: 0.75rem;
  z-index: 1000;
  padding: 0.7rem 1.2rem;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform var(--t-fast) var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--margin) * 2);
  margin-inline: auto;
  padding-inline: var(--margin);
}

.section { position: relative; padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.55); }

.section__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* Section heading: small index + label, then a large two-tone title */
.section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 0.65rem;
  align-items: baseline;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}
.section-head__num {
  grid-column: 1;
  grid-row: 1;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.section-head__label {
  grid-column: 2 / -1;
  grid-row: 1;
  font-size: var(--fs-small);
  color: var(--text-2);
}
.section-head__title {
  grid-column: 1 / 3;
  grid-row: 2;
  margin-top: 1.1rem;
  font-size: var(--fs-h2);
  letter-spacing: var(--track-tight);
  line-height: 1.02;
  max-width: 18ch;
}
.section-head__title--xl { font-size: var(--fs-xl); line-height: 0.95; max-width: 11ch; }
.section-head__intro {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: var(--s-5);
  color: var(--text-2);
  font-size: var(--fs-lead);
  max-width: 50ch;
}
.section-head__aside {
  grid-column: 3;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  max-width: 26ch;
  text-align: right;
  color: var(--text-2);
  font-size: var(--fs-small);
}
.section-head .figure {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: var(--track-tight);
  line-height: 1;
  color: var(--text);
}

/* Sticky heading variant (Journey) */
.section-head--sticky {
  grid-column: 1 / 6;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 2.5rem);
  margin-bottom: 0;
}
.section-head--sticky .section-head__intro { max-width: 34ch; }

/* Inline heading variant (Ventures) */
.section-head--inline .section-head__title { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.75rem); max-width: none; }

/* --------------------------------------------------------------------------
   5. COMPONENTS
   -------------------------------------------------------------------------- */

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--r-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
  will-change: transform;
}
.btn--primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 0 0 1px var(--line-strong), 0 10px 30px -10px var(--glow);
}
/* a soft sheen that sweeps across on hover */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, var(--accent) 50%, transparent 70%);
  opacity: 0.35;
  transform: translateX(-120%);
  transition: transform 900ms var(--ease-out);
}
.btn--primary:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 16px 44px -10px var(--glow); }
.btn--primary:hover::after { transform: translateX(120%); }
.btn--ghost {
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--text-3); }
.btn--small { min-height: 2.375rem; padding: 0.6rem 1.05rem; font-size: 0.875rem; }
.btn--large { min-height: 3.5rem; padding: 1rem 2rem; font-size: 1rem; }

/* Text link with a quiet underline */
.link-line {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  color: var(--text);
  font-size: var(--fs-small);
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: color var(--t-fast) var(--ease-out), background-size var(--t-med) var(--ease-out);
}
.link-line:hover { color: var(--accent); background-size: 0% 1px; background-position: right bottom; }

/* Icon buttons */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 50%;
  color: var(--text-2);
  transition: color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.icon-btn:hover { color: var(--text); background: var(--line); }
.icon-btn--arrow { width: 3rem; height: 3rem; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); }
.icon-btn--arrow:hover { box-shadow: inset 0 0 0 1px var(--text-3); }

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  color: var(--text-2);
}

/* Drawn arrows */
.arrow { position: relative; display: block; width: 14px; height: 1.5px; border-radius: 2px; background: currentColor; }
.arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3.25px;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.arrow--left { transform: rotate(180deg); }
.arrow--up { transform: rotate(-90deg); }
.arrow--ne { width: 10px; transform: rotate(-45deg); transition: transform var(--t-med) var(--ease-out); }
.arrow--ne::after { width: 6px; height: 6px; top: -2.25px; }
.x { position: relative; width: 14px; height: 14px; display: block; }
.x::before, .x::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; border-radius: 2px; background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.x::after { transform: translate(-50%, -50%) rotate(-45deg); }

.plus { position: relative; width: 12px; height: 12px; flex: none; }
.plus::before, .plus::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 1.5px; margin-top: -0.75px; border-radius: 2px; background: currentColor;
  transition: transform var(--t-med) var(--ease-out);
}
.plus::after { transform: rotate(90deg); }
[aria-expanded="true"] > .plus::after { transform: rotate(0deg); }

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  justify-self: start;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--active { color: var(--text); }
.pill--active::before { background: var(--success); box-shadow: 0 0 10px var(--success); }
.pill--selective { color: var(--accent); background: var(--accent-soft); box-shadow: none; }
.pill--selective::before { background: var(--accent); }
.pill--completed::before { background: var(--text-3); }
.pill--in-progress::before { background: var(--accent); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--s-4); }
.tags__item {
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-pill);
  background: var(--line);
  font-size: 0.75rem;
  color: var(--text-2);
}

/* Card surface used across sections */
.skill, .hobby, .venture, .post-feature__link, .services__cta, .contact__direct, .edu__col, .hero__stats {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* Cursor-lit card (data-spotlight): a soft light and a lit edge follow the pointer */
[data-spotlight] { position: relative; isolation: isolate; }
[data-spotlight]::before,
[data-spotlight]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
}
[data-spotlight]::before {
  z-index: -1;
  background: radial-gradient(420px circle at var(--x, 50%) var(--y, 50%), var(--spot), transparent 45%);
}
[data-spotlight]::after {
  z-index: 2;
  padding: 1px;
  background: radial-gradient(260px circle at var(--x, 50%) var(--y, 50%), var(--spot-edge), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
[data-spotlight]:hover::before, [data-spotlight]:hover::after { opacity: 1; }

/* Collapse (accordion body). Without JS everything stays open. */
.js .collapse {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
}
.js .collapse.is-open {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows var(--t-med) var(--ease-out), visibility 0s linear 0s;
}
.collapse__inner { min-height: 0; overflow: hidden; }

/* Scroll progress */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  background: linear-gradient(90deg, transparent, var(--accent));
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* Custom cursor (fine pointers only, enabled by JS) */
.cursor { display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [data-cursor] { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }
.cursor__dot, .cursor__ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 300;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--text); transition: opacity var(--t-fast); }
.cursor__ring { width: 34px; height: 34px; margin: -17px 0 0 -17px; display: grid; place-items: center; transition: opacity var(--t-fast); }
.cursor__ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: transform var(--t-med) var(--ease-out), background-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.cursor__label {
  position: relative;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--on-accent);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.cursor--link .cursor__ring::before { transform: scale(1.5); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.cursor--label .cursor__ring::before { transform: scale(2.1); background: var(--accent); box-shadow: none; }
.cursor--label .cursor__label { opacity: 1; transform: scale(1); }
.cursor--label .cursor__dot, .cursor--hidden .cursor__dot, .cursor--hidden .cursor__ring { opacity: 0; }
.cursor--down .cursor__ring::before { transform: scale(0.8); }

/* Preloader */
.preloader { display: none; }
.has-preloader .preloader {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.25rem;
  background: var(--bg);
  cursor: pointer;
  transition: opacity 700ms var(--ease-out), filter 700ms var(--ease-out);
  animation: failsafe-hide 0s linear 4s forwards; /* if JS never runs, get out of the way */
}
.preloader.is-leaving { opacity: 0 !important; filter: blur(12px); pointer-events: none; }
@keyframes failsafe-hide { to { visibility: hidden; pointer-events: none; } }
@keyframes failsafe-show { to { opacity: 1; transform: none; filter: none; clip-path: none; } }
/* If main.js fails to load, reveal everything after a few seconds */
.js:not(.is-ready) .hero [data-intro],
.js:not(.is-ready) .hero__statement.is-active .split-word__inner,
.js:not(.is-ready) [data-reveal] { animation: failsafe-show 0s linear 3.5s forwards; }

.preloader__mark { display: flex; font-size: clamp(2.5rem, 2rem + 3vw, 4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.preloader__letter { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(0.3em); animation: rise 800ms var(--ease-out) forwards; }
.preloader__letter:nth-child(2) { animation-delay: 50ms; }
.preloader__letter:nth-child(3) { animation-delay: 100ms; }
.preloader__letter:nth-child(4) { animation-delay: 150ms; }
.preloader__letter:nth-child(5) { animation-delay: 200ms; }
.preloader__letter:nth-child(6) { animation-delay: 250ms; }
.preloader__rule { width: 6rem; height: 2px; border-radius: 2px; background: var(--line-strong); position: relative; overflow: hidden; }
.preloader__rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: grow 900ms var(--ease-in-out) 120ms forwards;
}
.preloader__skip { font-size: var(--fs-xs); color: var(--text-3); }
@keyframes rise { to { opacity: 1; filter: none; transform: none; } }
@keyframes grow { to { transform: scaleX(1); } }

/* Header: a floating glass bar */
.site-header {
  position: fixed;
  inset: 0.85rem 0 auto 0;
  z-index: 100;
  padding-inline: var(--margin);
  transition: transform var(--t-med) var(--ease-out);
  pointer-events: none;
}
.site-header.is-hidden { transform: translateY(calc(-100% - 1.5rem)); }
.site-header__inner {
  pointer-events: auto;
  max-width: var(--max);
  height: 3.5rem;
  margin-inline: auto;
  padding: 0 0.5rem 0 1.25rem;
  display: flex;
  align-items: center;
  gap: var(--s-5);
  border-radius: var(--r-pill);
  transition: background-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.site-header.is-scrolled .site-header__inner {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--line), 0 20px 50px -30px rgba(0, 0, 0, 0.6);
}
.brand { display: inline-flex; align-items: center; gap: 0.75rem; margin-right: auto; }
.brand__mark { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.04em; }
.brand__name { font-size: var(--fs-small); color: var(--text-2); }

.site-nav__list { display: flex; align-items: center; gap: 0.15rem; }
.site-nav__link {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  color: var(--text-2);
  transition: color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.site-nav__link:hover { color: var(--text); }
.site-nav__link.is-active { color: var(--text); background: var(--line); }
.site-nav__link--ext { color: var(--text-3); }

.site-header__actions { display: flex; align-items: center; gap: 0.25rem; }
.site-header__cta { margin-left: 0.4rem; }

.theme-toggle__glyph {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transition: transform var(--t-slow) var(--ease-out);
}
[data-theme="light"] .theme-toggle__glyph { transform: rotate(180deg); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.7rem;
  height: 2.5rem;
  padding: 0 0.9rem;
  border-radius: var(--r-pill);
  background: var(--line);
  font-size: var(--fs-small);
  font-weight: 500;
}
.menu-toggle__lines { position: relative; width: 16px; height: 7px; }
.menu-toggle__lines::before, .menu-toggle__lines::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 1.5px; border-radius: 2px; background: currentColor;
  transition: transform var(--t-med) var(--ease-out), top var(--t-med) var(--ease-out);
}
.menu-toggle__lines::before { top: 0; }
.menu-toggle__lines::after { top: 5.5px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::before { top: 2.75px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::after { top: 2.75px; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 2.5rem) var(--margin) 2rem;
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 500ms var(--ease-out);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { opacity: 1; }
.mobile-menu__list { display: grid; gap: 0.15rem; }
.mobile-menu__link {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding-block: 0.3rem;
  font-size: clamp(1.75rem, 1.15rem + 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: var(--track-tight);
  line-height: 1.1;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(0.75rem);
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), filter var(--t-med) var(--ease-out), color var(--t-fast);
}
.mobile-menu__link span { flex: none; min-width: 1.4rem; font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0; color: var(--accent); font-variant-numeric: tabular-nums; }
.mobile-menu.is-open .mobile-menu__link { opacity: 1; filter: none; transform: none; }
.mobile-menu.is-open li:nth-child(2) .mobile-menu__link { transition-delay: 40ms; }
.mobile-menu.is-open li:nth-child(3) .mobile-menu__link { transition-delay: 80ms; }
.mobile-menu.is-open li:nth-child(4) .mobile-menu__link { transition-delay: 120ms; }
.mobile-menu.is-open li:nth-child(5) .mobile-menu__link { transition-delay: 160ms; }
.mobile-menu.is-open li:nth-child(6) .mobile-menu__link { transition-delay: 200ms; }
.mobile-menu.is-open li:nth-child(7) .mobile-menu__link { transition-delay: 240ms; }
.mobile-menu.is-open li:nth-child(8) .mobile-menu__link { transition-delay: 280ms; }
.mobile-menu.is-open li:nth-child(9) .mobile-menu__link { transition-delay: 320ms; }
.mobile-menu.is-open li:nth-child(10) .mobile-menu__link { transition-delay: 360ms; }
.mobile-menu__foot { display: flex; align-items: center; gap: var(--s-5); padding-top: var(--s-7); }

/* Reveal on scroll: fade, lift and un-blur */
.js [data-reveal] {
  opacity: 0;
  filter: blur(6px);
  transform: translate3d(0, 20px, 0);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out), filter var(--t-slow) var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; filter: none; transform: none; }

/* Back to top */
.to-top {
  position: fixed;
  right: var(--margin);
  bottom: 1.5rem;
  z-index: 80;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { color: var(--accent); }

/* Dialogs */
dialog { padding: 0; border: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
dialog[open] { animation: dialog-in var(--t-med) var(--ease-out); }
dialog[open]::backdrop { animation: fade-in var(--t-med) var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(0.98); filter: blur(6px); } }
@keyframes fade-in { from { opacity: 0; } }

.lightbox { width: 100vw; height: 100dvh; margin: 0; }
.lightbox__inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(4rem, 3rem + 4vw, 6rem) clamp(1rem, 6vw, 7rem);
  touch-action: pan-y;
}
.lightbox__figure { display: grid; gap: var(--s-4); justify-items: center; max-width: min(1200px, 100%); }
.lightbox__img {
  max-width: 100%;
  max-height: calc(100dvh - 12rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  transition: opacity var(--t-fast) var(--ease-out);
}
.lightbox__img.is-loading { opacity: 0.3; }
.lightbox__caption { display: flex; gap: var(--s-5); align-items: baseline; font-size: var(--fs-small); color: var(--text-2); text-align: center; }
.lightbox__count { font-variant-numeric: tabular-nums; color: var(--text-3); }
.lightbox__close { position: absolute; top: 1.25rem; right: 1.25rem; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); width: 3rem; height: 3rem; }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; transform: translateY(-50%); background: var(--glass); }
.lightbox__prev { left: clamp(0.75rem, 2vw, 2rem); }
.lightbox__next { right: clamp(0.75rem, 2vw, 2rem); }

.book-dialog { margin: auto; width: min(540px, calc(100vw - 2rem)); }
.book-dialog__inner {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: var(--s-6);
  align-items: end;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg);
}
.book-dialog__img { width: 8.5rem; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow-book); }
.book-dialog__fav { font-size: var(--fs-xs); font-weight: 500; color: var(--accent); margin-bottom: var(--s-3); }
.book-dialog__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); letter-spacing: var(--track-tight); margin-bottom: var(--s-2); }
.book-dialog__author { color: var(--text-2); margin-bottom: var(--s-6); }

.palette { margin: 14vh auto auto; width: min(560px, calc(100vw - 2rem)); }
.palette__inner {
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-lg);
}
.palette__input {
  width: 100%;
  padding: 1.2rem 1.4rem;
  border: 0;
  border-bottom: var(--hair) solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.palette__input::placeholder { color: var(--text-3); }
.palette__input:focus-visible { outline: none; }
.palette__list { max-height: 50vh; overflow-y: auto; padding: 0.5rem; }
.palette__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  color: var(--text-2);
  cursor: pointer;
}
.palette__item::before { content: attr(data-num); width: 1.5rem; font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.palette__item[aria-selected="true"] { background: var(--line); color: var(--text); }
.palette__item[aria-selected="true"]::before { color: var(--accent); }
.palette__item[hidden] { display: none; }
.palette__hint { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; padding: 0.8rem 1.4rem; border-top: var(--hair) solid var(--line); font-size: var(--fs-xs); color: var(--text-3); }

/* --------------------------------------------------------------------------
   6. SECTIONS
   -------------------------------------------------------------------------- */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(3rem, 1.5rem + 5vw, 7rem));
  padding-bottom: clamp(3rem, 2rem + 3vw, 5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 2rem + 4vw, 5.5rem);
  isolation: isolate;
  overflow: clip;
}
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(520px circle at var(--mx, 72%) var(--my, 38%), var(--glow), transparent 62%),
    radial-gradient(900px 520px at 85% -10%, var(--glow-2), transparent 70%),
    radial-gradient(700px 420px at 0% 0%, var(--glow-2), transparent 70%);
}
.hero__glow::after {
  /* faint dotted field, fading out toward the edges */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 60% at 60% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 60% 40%, #000 0%, transparent 75%);
  opacity: 0.45;
}
.hero__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: center;
}
.hero__copy { grid-column: 1 / 9; }
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: clamp(1.75rem, 1rem + 2vw, 2.75rem);
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: var(--fs-xs);
  color: var(--text-2);
  min-height: 2.1rem;
}
.hero__status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 2.4s var(--ease-out) infinite; }
.hero__status-label { color: var(--text-3); }
.hero__status-text { color: var(--text); font-weight: 500; }
.hero__status-text.is-typing::after { content: ""; display: inline-block; width: 1.5px; height: 1em; margin-left: 2px; vertical-align: -0.15em; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--success); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes blink { 50% { opacity: 0; } }

.hero__title { display: block; letter-spacing: 0; }
.hero__name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.85rem;
  margin-bottom: 1.25rem;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero__role { font-size: var(--fs-small); font-weight: 400; letter-spacing: 0; color: var(--text-3); }
/* Rotating headline: every statement shares one grid cell, so height stays fixed */
.hero__rotator { display: grid; }
.hero__statement {
  grid-area: 1 / 1;
  display: block;
  font-size: var(--fs-hero);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: var(--track-tight);
  max-width: 15ch;
}
.js .hero__statement:not(.is-active) { visibility: hidden; }
.js .hero__statement.is-leaving { visibility: visible; }
/* The payoff words carry a faint warm light */
.hero__statement em .split-word__inner,
.no-js .hero__statement em {
  background: linear-gradient(100deg, var(--text) 45%, var(--accent) 150%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__lede { max-width: 42ch; margin-top: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); font-size: var(--fs-lead); color: var(--text-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

.hero__portrait { grid-column: 9 / -1; position: relative; }
.hero__portrait::before {
  /* warm halo behind the portrait */
  content: "";
  position: absolute;
  inset: 8% -10% -6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  filter: blur(30px);
  pointer-events: none;
}
.hero__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.hero__img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: 50% 15%;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.03);
}
.hero__caption {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.1rem;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}

.hero__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0.5rem; }
.stat { display: flex; flex-direction: column-reverse; gap: 0.35rem; padding: 1.25rem 1.25rem 1.1rem; }
.stat + .stat { box-shadow: -1px 0 0 0 var(--line); }
.stat__value { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.5rem); font-weight: 500; line-height: 1; letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; }
.stat__label { font-size: var(--fs-small); color: var(--text-2); }

/* Credentials row under the stats */
.creds { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--s-4); }
.cred {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem 0.45rem 0.7rem;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-2);
}
.cred::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--accent); }
.js.is-ready .creds { --d: 960ms; }

/* Hero intro choreography (one orchestrated moment) */
.js .hero [data-intro] { opacity: 0; filter: blur(8px); transform: translate3d(0, 16px, 0); }
.js .hero .hero__portrait[data-intro] { filter: blur(14px); transform: scale(0.97); }
.js.is-ready .hero [data-intro] {
  opacity: 1;
  filter: none;
  transform: none;
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out), filter 1.1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js.is-ready .hero__status { --d: 0ms; }
.js.is-ready .hero__name { --d: 80ms; }
.js.is-ready .hero__portrait { --d: 200ms; }
.js.is-ready .hero__lede { --d: 650ms; }
.js.is-ready .hero__actions { --d: 760ms; }
.js.is-ready .hero__stats { --d: 880ms; }

.split-word { display: inline-block; vertical-align: top; }
.split-word__inner { display: inline-block; }
/* hidden state: before load, and for statements that are not showing */
.js .hero__statement .split-word__inner { opacity: 0; filter: blur(12px); transform: translate3d(0, 0.3em, 0); }
.js.is-ready .hero__statement.is-active .split-word__inner {
  opacity: 1;
  filter: none;
  transform: none;
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
  transition-delay: calc(120ms + var(--i) * 55ms);
}
.js.is-ready .hero__statement.is-leaving .split-word__inner {
  opacity: 0;
  filter: blur(10px);
  transform: translate3d(0, -0.25em, 0);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), filter 0.45s var(--ease-out);
  transition-delay: calc(var(--i) * 25ms);
}

/* ---------- Journey ---------- */
.journey__body { grid-column: 7 / -1; }
.timeline-wrap { position: relative; padding-left: 2.25rem; }
.timeline__track { position: absolute; left: 0.3rem; top: 0.6rem; bottom: 0.6rem; width: 1px; background: var(--line-strong); }
.timeline__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--accent), var(--text));
  transform-origin: 50% 0;
  transform: scaleY(var(--progress, 0));
  box-shadow: 0 0 12px var(--glow);
}
.no-js .timeline__fill { transform: none; }
.timeline__item { position: relative; }
.timeline__item + .timeline__item { border-top: var(--hair) solid var(--line); }
.timeline__node {
  position: absolute;
  left: calc(-2.25rem + 0.3rem - 4px);
  top: 1.9rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.timeline__item.is-passed .timeline__node { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline__toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "when plus" "title plus" "place plus";
  align-items: center;
  column-gap: 1.5rem;
  padding: 1.4rem 0;
  text-align: left;
}
.timeline__when { grid-area: when; font-size: var(--fs-xs); font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.timeline__title { grid-area: title; margin-top: 0.3rem; font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.025em; line-height: 1.2; transition: transform var(--t-med) var(--ease-out); }
.timeline__place { grid-area: place; margin-top: 0.15rem; font-size: var(--fs-small); color: var(--text-3); }
.timeline__toggle .plus { grid-area: plus; color: var(--text-2); }
.timeline__toggle:hover .timeline__title { transform: translateX(6px); }
.timeline__text { max-width: 52ch; color: var(--text-2); }
.timeline__detail .collapse__inner { padding-bottom: 0; transition: padding var(--t-med) var(--ease-out); }
.timeline__detail.is-open .collapse__inner, .no-js .timeline__detail .collapse__inner { padding-bottom: 1.6rem; }
.journey__passion {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.4rem);
  font-weight: 500;
  letter-spacing: var(--track-head);
  line-height: 1.15;
  max-width: 24ch;
}

/* ---------- Services ---------- */
.services__list {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: clamp(1.5rem, 1rem + 3vw, 4rem);
}
.service-row__heading { grid-column: 1; font: inherit; letter-spacing: 0; }
.service-row {
  width: 100%;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  grid-template-areas: "num title pill" "num venture pill";
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.15rem;
  padding: 1.3rem 1.25rem;
  border-radius: var(--r-md);
  text-align: left;
  transition: background-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.service-row:hover { background: var(--glow-2); }
.service-row--active, .service-row--active:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.service-row__num { grid-area: num; align-self: start; padding-top: 0.45rem; font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; transition: color var(--t-fast); }
.service-row__title {
  grid-area: title;
  font-size: clamp(1.3rem, 1rem + 1.1vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: var(--track-head);
  color: var(--text-3);
  transition: color var(--t-med) var(--ease-out);
}
.service-row__venture { grid-area: venture; font-size: var(--fs-small); color: var(--text-3); }
.service-row .pill { grid-area: pill; }
.service-row:hover .service-row__title, .service-row--active .service-row__title { color: var(--text); }
.service-row--active .service-row__num { color: var(--accent); }

.service-panel { grid-column: 2; border-radius: var(--r-xl); }
.service-panel__inner { padding: 0.5rem 1.25rem 1.5rem 4.75rem; }
.service-panel__venture { font-size: var(--fs-xs); font-weight: 500; color: var(--accent); margin-bottom: var(--s-4); }
.service-panel__text { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.375rem); line-height: 1.5; letter-spacing: -0.015em; color: var(--text); }
.service-panel .tags { margin-bottom: var(--s-6); }

.services__cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-6);
  align-items: center;
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--r-xl);
  background: radial-gradient(600px 200px at 0% 0%, var(--accent-soft), transparent 70%), var(--surface);
}
.services__why { max-width: 60ch; color: var(--text-2); font-size: var(--fs-lead); }
.services__why-label { color: var(--text); font-weight: 500; }

/* ---------- Ventures ---------- */
.ventures__list { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.venture { grid-column: span 3; }
.venture:nth-child(-n + 2) { grid-column: span 6; }
.venture, .venture__link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 11rem;
  padding: clamp(1.4rem, 1rem + 1vw, 2rem);
}
.venture:nth-child(-n + 2), .venture:nth-child(-n + 2) .venture__link { min-height: 14rem; }
.venture--linked { padding: 0; }
.venture__link { height: 100%; border-radius: inherit; }
.venture__role { font-size: var(--fs-xs); font-weight: 500; color: var(--accent); margin-bottom: auto; padding-bottom: var(--s-5); }
.venture__name { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.875rem); font-weight: 500; letter-spacing: var(--track-head); line-height: 1.1; }
.venture:nth-child(-n + 2) .venture__name { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.5rem); }
.venture__what { font-size: var(--fs-small); color: var(--text-2); }
.venture__host {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-top: var(--s-4);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text);
}
.venture__link:hover .arrow--ne { transform: translate(3px, -3px) rotate(-45deg); }
.ventures__also { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; margin-top: var(--s-6); font-size: var(--fs-small); color: var(--text-2); }
.ventures__also-label { color: var(--text-3); }
.ventures__also-list { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.ventures__also-list .link-line { font-weight: 400; color: var(--text-2); }

/* ---------- Skills ---------- */
.skills__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4) var(--s-6);
  margin-bottom: var(--s-5);
}
.filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.3rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.filters__btn {
  padding: 0.45rem 1rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--t-fast) var(--ease-out), background-color var(--t-med) var(--ease-out);
}
.filters__btn:hover { color: var(--text); }
.filters__btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.skills__count { font-size: var(--fs-small); color: var(--text-3); }

.skills__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.skill { padding: clamp(1.4rem, 1rem + 1vw, 2rem); }
.skill[hidden] { display: none; }
.skill__cat { font-size: var(--fs-xs); font-weight: 500; color: var(--accent); margin-bottom: var(--s-5); }
.skill__title { font-size: 1.1875rem; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: var(--s-2); }
.skill__text { font-size: 0.9375rem; color: var(--text-2); }

/* ---------- Certificates ---------- */
.gallery { position: relative; }
.gallery__rail {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-block: 0.5rem;
  padding-inline: max(var(--margin), calc((100vw - var(--max)) / 2));
  scroll-padding-inline: max(var(--margin), calc((100vw - var(--max)) / 2));
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.gallery__rail::-webkit-scrollbar { display: none; }
.gallery__rail.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.gallery__rail.is-dragging .cert__btn { pointer-events: none; }
.gallery__list {
  --cert-h: clamp(9rem, 6rem + 9vw, 14.5rem);
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, var(--cert-h));
  grid-auto-columns: max-content;
  gap: var(--gutter);
  width: max-content;
}
.cert__btn {
  display: block;
  height: 100%;
  padding: 0.5rem;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.cert__img {
  height: 100%;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  filter: var(--img-filter);
  transition: filter var(--t-slow) var(--ease-out);
  -webkit-user-drag: none;
  user-select: none;
}
.cert__btn:hover, .cert__btn:focus-visible { box-shadow: inset 0 0 0 1px var(--spot-edge); transform: translateY(-3px); }
.cert__btn:hover .cert__img, .cert__btn:focus-visible .cert__img { filter: none; }
.gallery__controls { display: flex; align-items: center; gap: var(--s-6); margin-top: var(--s-6); }
.gallery__progress { position: relative; flex: 1; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.gallery__progress-bar { position: absolute; inset: 0; background: var(--text); transform-origin: 0 50%; transform: scaleX(var(--p, 0.1)); transition: transform 200ms linear; }
.gallery__arrows { display: flex; gap: var(--s-2); }

/* ---------- Books ---------- */
.shelf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(1.25rem, 0.8rem + 1.5vw, 2.25rem) var(--gutter); }
.js .book[data-extra] { display: none; }
.js .shelf.is-expanded .book[data-extra] { display: block; animation: fade-in var(--t-slow) var(--ease-out); }
.book__btn { position: relative; display: block; width: 100%; text-align: left; perspective: 900px; }
.book__cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transform-origin: 50% 100%;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
  box-shadow: var(--shadow-book);
  background: var(--surface);
  border-radius: 4px 8px 8px 4px;
  overflow: hidden;
}
.book__cover.is-tilting { transition: transform 120ms linear; }
.book__img { width: 100%; height: 100%; object-fit: cover; }
.book__cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6%;
  z-index: 1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.2) 60%, transparent);
  pointer-events: none;
}
.book__sheen {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(80% 60% at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, 0.25), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
  pointer-events: none;
}
.book__btn:hover .book__sheen { opacity: 1; }
.book__star {
  position: absolute;
  top: -0.5rem;
  right: -0.45rem;
  z-index: 3;
  width: 1.1rem;
  height: 1.1rem;
  background: var(--accent);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 8px var(--glow));
}
.book__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.6em;
  margin-top: 0.9rem;
  font-size: var(--fs-xs);
  line-height: 1.3;
  color: var(--text-2);
  transition: color var(--t-fast);
}
.book__btn:hover .book__title { color: var(--text); }
.shelf__more { display: flex; justify-content: center; margin-top: var(--s-7); }
.no-js .shelf__more { display: none; }

/* ---------- Hobbies ---------- */
.hobbies__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.hobby { padding: clamp(1.4rem, 1rem + 1vw, 1.9rem); }
.hobby__title { font-size: 1.125rem; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: var(--s-3); }
.hobby__text { font-size: 0.9375rem; color: var(--text-2); transition: color var(--t-med) var(--ease-out); }
.hobby:hover .hobby__text { color: var(--text); }

/* ---------- Education ---------- */
.edu { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); align-items: start; }
.edu__col { padding: clamp(1.25rem, 1rem + 1vw, 2rem); }
.edu__heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding-bottom: var(--s-3);
  font-size: var(--fs-h3);
}
.edu__heading span { font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0; color: var(--text-3); }
.edu-item {
  display: grid;
  grid-template-columns: 7.25rem minmax(0, 1fr) auto;
  gap: 0.25rem 1.1rem;
  align-items: start;
  padding: 1.35rem 0;
  border-top: var(--hair) solid var(--line);
}
.edu-item__when { padding-top: 0.25rem; font-size: var(--fs-xs); font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.edu-item__title { font-size: 1.125rem; letter-spacing: -0.02em; line-height: 1.25; }
.edu-item__place { font-size: var(--fs-small); color: var(--text-3); margin: 0.15rem 0 0.5rem; }
.edu-item__text { font-size: 0.9375rem; color: var(--text-2); max-width: 46ch; }
.edu__quote { margin-top: clamp(4rem, 3rem + 4vw, 7rem); max-width: 60rem; }
.edu__quote p {
  font-size: clamp(1.75rem, 1rem + 2.8vw, 3.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}

/* ---------- Blog ---------- */
.blog__layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: start; }
.post-feature { border-radius: var(--r-xl); }
.post-feature__link {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  min-height: 100%;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--r-xl);
  background: radial-gradient(500px 260px at 100% 0%, var(--accent-soft), transparent 70%), var(--surface);
}
.post-feature__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: var(--fs-xs); color: var(--text-3); }
.post-feature__label { color: var(--accent); font-weight: 500; }
.post-feature__title { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem); letter-spacing: var(--track-tight); line-height: 1.08; }
.post-feature__excerpt { color: var(--text-2); max-width: 44ch; }
.post-feature__link .link-line { align-self: flex-start; margin-top: auto; }
.post-feature__link:hover .link-line { color: var(--accent); }
.post + .post { border-top: var(--hair) solid var(--line); }
.post__link {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr) auto;
  grid-template-areas: "date title read" "date cat read";
  gap: 0.15rem 1.25rem;
  padding: 1.1rem 0.75rem;
  margin-inline: -0.75rem;
  border-radius: var(--r-md);
  align-items: baseline;
  transition: background-color var(--t-med) var(--ease-out);
}
.post__link:hover { background: var(--surface); }
.post__date { grid-area: date; font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.post__title { grid-area: title; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.35; }
.post__cat { grid-area: cat; font-size: var(--fs-xs); color: var(--accent); }
.post__read { grid-area: read; font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.blog__all { margin-top: var(--s-6); text-align: right; }

/* ---------- Contact ---------- */
.contact { overflow: clip; isolation: isolate; }
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(700px 400px at 20% 10%, var(--glow), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.contact__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(1.5rem, 1rem + 4vw, 5rem); align-items: start; }
.form { display: grid; gap: var(--s-5); }
.form__row--half { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.field { display: grid; gap: 0.5rem; position: relative; }
.field__label { font-size: var(--fs-small); font-weight: 500; color: var(--text-2); }
.field__input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.4;
  transition: box-shadow var(--t-fast) var(--ease-out), background-color var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
}
.field__input::placeholder { color: var(--text-3); }
.field__input:hover { box-shadow: inset 0 0 0 1px var(--text-3); }
.field__input--area { resize: vertical; min-height: 9rem; }
.field__input:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.field__input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--danger); }
.field__error { font-size: var(--fs-small); color: var(--danger); }
.field__error:empty { display: none; }
.field--check { grid-template-columns: auto 1fr; align-items: center; column-gap: 0.75rem; }
.field--check .field__error { grid-column: 1 / -1; }
.field__check-label { font-size: var(--fs-small); color: var(--text-2); }
.field__check-label a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.check {
  -webkit-appearance: none;
  appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.check::after { content: ""; width: 0.55rem; height: 0.3rem; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform var(--t-fast) var(--ease-out); }
.check:checked { background: var(--accent); box-shadow: none; }
.check:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--danger); }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); }
.form__note { font-size: var(--fs-small); color: var(--text-3); }
.form__status:empty { display: none; }
.form__status { padding: 1.1rem 1.25rem; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.form__status--success { box-shadow: inset 0 0 0 1px var(--success); }
.form__status--error { box-shadow: inset 0 0 0 1px var(--danger); }
.form__status strong { display: block; font-weight: 500; font-size: 1.0625rem; margin-bottom: 0.2rem; }
.form__status p { color: var(--text-2); font-size: var(--fs-small); }
.form.is-sent .form__row, .form.is-sent .field, .form.is-sent .form__foot { opacity: 0.35; pointer-events: none; }
[data-submit][aria-busy="true"] { opacity: 0.6; pointer-events: none; }

.contact__direct { display: grid; padding: 0.5rem 1.5rem; border-radius: var(--r-xl); }
.contact__item { padding: 1.25rem 0; }
.contact__item + .contact__item { border-top: var(--hair) solid var(--line); }
.contact__label { font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 0.3rem; }
.contact__value { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.4; }
.contact__value .link-line { font-size: inherit; }
.contact__item--cta .btn { margin-top: var(--s-4); }

/* ---------- Footer ---------- */
.site-footer { position: relative; padding-top: clamp(4rem, 3rem + 5vw, 8rem); padding-bottom: 2rem; border-top: var(--hair) solid var(--line); overflow: clip; }
.site-footer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -1px;
  width: min(900px, 90vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}
.site-footer__lead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s-6);
  padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem);
}
.site-footer__line { font-size: clamp(2.25rem, 1.2rem + 4vw, 5rem); font-weight: 500; line-height: 1; letter-spacing: var(--track-tight); max-width: 14ch; }
.site-footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); border-top: var(--hair) solid var(--line); }
.site-footer__title { font-size: var(--fs-xs); color: var(--text-3); margin-bottom: var(--s-4); }
.site-footer__list { display: grid; gap: 0.45rem; }
.site-footer__list a { font-size: 0.9375rem; color: var(--text-2); transition: color var(--t-fast); }
.site-footer__list a:hover { color: var(--text); }
.site-footer__clock { font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.25rem); font-weight: 500; letter-spacing: var(--track-tight); line-height: 1.1; font-variant-numeric: tabular-nums; }
.site-footer__clock span { font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0; color: var(--text-3); }
.site-footer__small { margin-top: var(--s-4); font-size: var(--fs-small); color: var(--text-3); }
.site-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); padding-top: var(--s-5); border-top: var(--hair) solid var(--line); font-size: var(--fs-small); color: var(--text-3); }

/* Image fallbacks: if a remote image fails, show a designed placeholder instead of a broken icon */
.cert__btn, .book__cover { position: relative; }
.cert__fallback, .book__fallback { display: none; }
.is-missing > img { visibility: hidden; }
.is-missing > .cert__fallback, .is-missing > .book__fallback {
  position: absolute;
  inset: 0.5rem;
  display: flex;
  align-items: flex-end;
  padding: 0.9rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text-2);
  background: radial-gradient(160px 120px at 80% 10%, var(--accent-soft), transparent 70%), var(--surface-2);
}
.is-missing > .book__fallback { inset: 0; border-radius: 0; color: var(--text); }
.hero__frame.is-missing::before {
  content: "Dinoth";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(3rem, 2rem + 4vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--line-strong);
  background: radial-gradient(400px circle at 50% 30%, var(--accent-soft), transparent 70%);
}

/* --------------------------------------------------------------------------
   7. UTILITIES
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.is-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   8. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  /* Services: the preview panel lives in the right column */
  .js .service-panel {
    grid-row: 1 / span 6;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    grid-template-rows: 1fr;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
    opacity: 0;
    filter: blur(6px);
    transform: translateY(8px);
    transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), filter var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
  }
  .js .service-panel.is-open {
    opacity: 1;
    filter: none;
    transform: none;
    transition: opacity var(--t-med) var(--ease-out) 60ms, transform var(--t-med) var(--ease-out) 60ms, filter var(--t-med) var(--ease-out) 60ms, visibility 0s linear 0s;
  }
  .js .service-panel__inner { padding: clamp(1.5rem, 1rem + 1.5vw, 2.5rem); }
}

.brand, .site-nav__link, .site-nav__list a { white-space: nowrap; }
@media (max-width: 1400px) {
  .brand__name { display: none; }
}

@media (max-width: 1240px) {
  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .brand__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (max-width: 1023px) {
  .services__list { grid-template-columns: minmax(0, 1fr); }
  .service-panel { grid-column: 1; }
  .journey__body { grid-column: 1 / -1; margin-top: var(--s-7); }
  .section-head--sticky { grid-column: 1 / -1; position: static; }
  .skills__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hobbies__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edu, .blog__layout, .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .ventures__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .venture, .venture:nth-child(-n + 2) { grid-column: span 1; }
  .hero__copy { grid-column: 1 / 8; }
  .hero__portrait { grid-column: 8 / -1; }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { box-shadow: none; }
  .stat:nth-child(n + 3) { border-top: var(--hair) solid var(--line); }
}

@media (max-width: 767px) {
  :root { --header-h: 4.5rem; }
  .site-header__cta, .icon-btn--palette { display: none; }
  .site-header__inner { padding-left: 1rem; background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); box-shadow: inset 0 0 0 1px var(--line); }
  .section-head { grid-template-columns: auto minmax(0, 1fr); }
  .section-head__title, .section-head__title--xl { grid-column: 1 / -1; max-width: 18ch; }
  .section-head__aside { grid-column: 1 / -1; grid-row: 3; justify-self: start; text-align: left; max-width: none; margin-top: var(--s-4); }
  .section-head .figure { display: inline; font-size: 1.25rem; margin-right: 0.35rem; }
  .hero__inner { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-7); }
  .hero__portrait { width: min(100%, 26rem); }
  .services__cta { grid-template-columns: minmax(0, 1fr); }
  .service-row { grid-template-columns: 1.75rem minmax(0, 1fr); grid-template-areas: "num title" "num venture" "num pill"; padding: 1.1rem 0.9rem; }
  .service-row .pill { margin-top: 0.55rem; }
  .service-panel__inner { padding-left: 3.6rem; padding-right: 0.9rem; }
  .ventures__list { grid-template-columns: minmax(0, 1fr); }
  .venture, .venture:nth-child(-n + 2) { grid-column: 1 / -1; }
  .venture, .venture__link, .venture:nth-child(-n + 2), .venture:nth-child(-n + 2) .venture__link { min-height: 0; }
  .skills__grid { grid-template-columns: minmax(0, 1fr); }
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hobbies__grid { grid-template-columns: minmax(0, 1fr); }
  .edu-item { grid-template-columns: minmax(0, 1fr); }
  .edu-item .pill { justify-self: start; margin-top: 0.5rem; }
  .post__link { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date read" "title title" "cat cat"; }
  .form__row--half { grid-template-columns: minmax(0, 1fr); }
  .site-footer__cols { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .gallery__list { --cert-h: 8.5rem; }
  .book-dialog__inner { grid-template-columns: 6rem 1fr; gap: var(--s-5); }
  .book-dialog__img { width: 6rem; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 1.25rem; transform: none; }
  .timeline-wrap { padding-left: 1.75rem; }
  .timeline__node { left: calc(-1.75rem + 0.3rem - 4px); }
  .to-top { bottom: 1rem; }
}

@media (min-width: 1920px) {
  :root { --fs-body: 1.0625rem; --max: 90rem; }
}

/* --------------------------------------------------------------------------
   9. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal], .js .hero [data-intro], .js .hero__statement.is-active .split-word__inner { opacity: 1; filter: none; transform: none; }
  .hero__img { transform: scale(1.03); }
  .book__cover { transform: none !important; }
}

/* --------------------------------------------------------------------------
   10. WORDPRESS: inner pages, articles, menus, comments
   -------------------------------------------------------------------------- */
.admin-bar .site-header { top: calc(0.85rem + 32px); }
@media (max-width: 782px) { .admin-bar .site-header { top: calc(0.85rem + 46px); } }

/* WordPress menus get the same look as the built-in section links */
.site-nav__list a { display: inline-block; padding: 0.45rem 0.8rem; border-radius: var(--r-pill); font-size: var(--fs-small); color: var(--text-2); transition: color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out); }
.site-nav__list a:hover { color: var(--text); }
.site-nav__list a.is-active, .site-nav__list .current-menu-item > a { color: var(--text); background: var(--line); }

.container--narrow { max-width: calc(46rem + var(--margin) * 2); }
main.page { padding-top: calc(var(--header-h) + clamp(3rem, 2rem + 4vw, 6rem)); padding-bottom: var(--section); min-height: 70vh; }
.page-head { margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.page-head .section-head__label { margin-bottom: var(--s-4); }
.page-head__back { color: var(--text-2); transition: color var(--t-fast); }
.page-head__back::before { content: "← "; color: var(--accent); }
.page-head__back:hover { color: var(--text); }
.page-head__title { font-size: var(--fs-h2); letter-spacing: var(--track-tight); line-height: 1.04; max-width: 20ch; }
.page-head__title em { font-style: normal; color: var(--text-3); }
.page-head__intro { margin-top: var(--s-5); max-width: 52ch; font-size: var(--fs-lead); color: var(--text-2); }
.page-head--article .page-head__title { font-size: clamp(2rem, 1.2rem + 3vw, 3.75rem); }
.article__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.7rem; margin-top: var(--s-5); font-size: var(--fs-small); color: var(--text-3); }
.article__meta span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 0.7rem; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.article__meta > * { white-space: nowrap; }
.article__hero { margin: 0 0 var(--s-7); border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.article__hero img { width: 100%; }

.prose { font-size: 1.0625rem; line-height: 1.75; color: var(--text-2); }
.prose > * + * { margin-top: 1.25em; }
.prose p, .prose li { max-width: 68ch; }
.prose strong, .prose b { color: var(--text); font-weight: 600; }
.prose em { color: var(--text); }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--accent); }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: var(--text); letter-spacing: var(--track-head); line-height: 1.15; }
.prose h3 { margin-top: 1.8em; font-size: 1.3rem; color: var(--text); letter-spacing: -0.02em; }
.prose h4 { margin-top: 1.6em; font-size: 1.1rem; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { padding: 0.25em 0 0.25em 1.25em; border-left: 2px solid var(--accent); color: var(--text); font-size: 1.15rem; }
.prose hr { height: 1px; border: 0; background: var(--line); margin: 2.5em 0; }
.prose img, .prose figure img { border-radius: var(--r-md); }
.prose figure { margin-inline: 0; }
.prose figcaption, .prose .wp-caption-text, .prose .wp-element-caption { margin-top: 0.6em; font-size: var(--fs-small); color: var(--text-3); text-align: center; }
.prose code { padding: 0.15em 0.4em; border-radius: 6px; background: var(--surface-2); font-size: 0.9em; color: var(--text); }
.prose pre { overflow-x: auto; padding: 1.25rem; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 0.9rem; line-height: 1.6; }
.prose pre code { padding: 0; background: none; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { color: var(--text); font-weight: 600; }
.prose .wp-block-separator { opacity: 1; }
.prose .wp-block-button__link { display: inline-flex; padding: 0.85rem 1.5rem; border-radius: var(--r-pill); background: var(--text); color: var(--bg); text-decoration: none; font-weight: 500; }
.prose .alignwide { margin-inline: calc(-1 * min(8vw, 8rem)); max-width: none; }
.prose .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.prose .alignfull img, .prose .alignwide img { width: 100%; }
.aligncenter { margin-inline: auto; text-align: center; }
.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.screen-reader-text:focus { clip: auto; clip-path: none; width: auto; height: auto; margin: 0; padding: 0.7rem 1.2rem; z-index: 1000; background: var(--text); color: var(--bg); }

.article__cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5); align-items: center; margin-top: var(--s-8); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); border-radius: var(--r-xl); background: radial-gradient(500px 200px at 0% 0%, var(--accent-soft), transparent 70%), var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.article__cta p { color: var(--text-2); }
.article__cta strong { display: block; color: var(--text); font-weight: 500; font-size: 1.125rem; margin-bottom: 0.2rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin-top: var(--s-7); }
.post-nav__link { display: grid; gap: 0.3rem; padding: 1.25rem 1.4rem; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; transition: box-shadow var(--t-med) var(--ease-out); }
.post-nav__link span { font-size: var(--fs-xs); font-weight: 400; color: var(--text-3); }
.post-nav__link:hover { box-shadow: inset 0 0 0 1px var(--spot-edge); }
.post-nav__link--next { text-align: right; grid-column: 2; }

.posts--archive { border-top: var(--hair) solid var(--line); }
.posts--archive .post { border-bottom: var(--hair) solid var(--line); }
.posts--archive .post + .post { border-top: 0; }
.pagination { margin-top: var(--s-7); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 2.5rem; height: 2.5rem; padding: 0 0.9rem; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-small); color: var(--text-2); }
.pagination .page-numbers.current { background: var(--text); color: var(--bg); box-shadow: none; }
.pagination a.page-numbers:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--text-3); }

.search-form { display: flex; gap: var(--s-2); max-width: 32rem; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; padding: 0.85rem 1rem; border: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); font: inherit; }
.search-form .search-field:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.search-form .search-submit { padding: 0 1.4rem; border: 0; border-radius: var(--r-pill); background: var(--text); color: var(--bg); font: inherit; font-weight: 500; cursor: pointer; }
.page-404__actions { margin-top: var(--s-6); }

.comments { margin-top: var(--s-8); padding-top: var(--s-6); border-top: var(--hair) solid var(--line); }
.comments__title { font-size: 1.5rem; margin-bottom: var(--s-5); }
.comments__list { display: grid; gap: var(--s-5); margin-bottom: var(--s-7); }
.comments__list .children { margin: var(--s-4) 0 0 var(--s-6); display: grid; gap: var(--s-4); }
.comment-body { padding: 1.25rem; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.comment-author { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 500; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: var(--fs-xs); color: var(--text-3); margin: 0.2rem 0 0.75rem; }
.comment-reply-link { font-size: var(--fs-small); color: var(--accent); }
.comment-form { display: grid; gap: var(--s-4); }
.comment-form label { display: block; margin-bottom: 0.4rem; font-size: var(--fs-small); font-weight: 500; color: var(--text-2); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 0.9rem 1rem; border: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); font: inherit; }
.comment-form textarea { min-height: 8rem; resize: vertical; }
.comment-form input:focus-visible, .comment-form textarea:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.comment-form .comment-notes, .comment-form .logged-in-as { font-size: var(--fs-small); color: var(--text-3); }
.comment-form-cookies-consent { display: flex; gap: 0.6rem; align-items: center; font-size: var(--fs-small); }
.comment-form-cookies-consent label { margin: 0; }

@media (max-width: 767px) {
  .article__cta { grid-template-columns: minmax(0, 1fr); }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav__link--next { grid-column: auto; text-align: left; }
  .prose .alignwide { margin-inline: 0; }
}

/* --------------------------------------------------------------------------
   11. MOBILE POLISH: shorter page, fewer full-width stacks, clearer rhythm
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  :root { --section: 4.25rem; --gutter: 0.75rem; }

  /* Hero: headline uses the full width so every statement wraps the same way */
  .hero { gap: var(--s-7); }
  .hero__statement { max-width: none; font-size: clamp(2.1rem, 10vw, 3rem); }
  .hero__lede { margin-top: var(--s-5); font-size: 1.0625rem; }
  .hero__actions { margin-top: var(--s-5); }
  .hero__actions .btn { flex: 1 1 0; justify-content: center; }
  .hero__portrait { width: 100%; }
  .hero__frame { aspect-ratio: 5 / 4; border-radius: var(--r-lg); }
  .hero__img { object-position: 50% 18%; }
  .creds { gap: 0.4rem; }
  .cred { padding: 0.35rem 0.7rem; font-size: 0.75rem; }

  /* Journey */
  .journey__passion { margin-top: var(--s-7); }

  /* Services: status sits beside the company line, not on its own row */
  .service-row {
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    grid-template-areas: "num title title" "num venture pill";
    padding: 0.95rem 0.85rem;
  }
  .service-row .pill { margin-top: 0; justify-self: end; }
  .service-panel__venture { display: none; }
  .service-panel__inner { padding: 0.25rem 0.85rem 1.25rem 3.45rem; }
  .service-panel__text { font-size: 1.0625rem; }

  /* Ventures: two flagship cards, then a tight two-column grid */
  .ventures__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .venture:nth-child(-n + 2) { grid-column: 1 / -1; }
  .venture:nth-child(n + 3) { grid-column: span 1; padding: 1rem; }
  .venture:nth-child(n + 3).venture--linked { padding: 0; }
  .venture:nth-child(n + 3) .venture__link { padding: 1rem; }
  .venture:nth-child(n + 3) .venture__role { margin-bottom: 0; padding-bottom: var(--s-3); font-size: 0.6875rem; }
  .venture:nth-child(n + 3) .venture__name { font-size: 1.0625rem; line-height: 1.2; }
  .venture:nth-child(n + 3) .venture__what { font-size: 0.8125rem; line-height: 1.4; margin-top: 0.3rem; }
  .venture:nth-child(n + 3) .venture__host { display: none; }
  .venture:nth-child(-n + 2) .venture__name { font-size: 1.75rem; }

  /* Skills: one-line filter bar, compact cards */
  .skills__bar { margin-bottom: var(--s-4); }
  .skills__bar { flex-direction: column; align-items: stretch; gap: var(--s-3); }
  .filters { display: flex; flex-wrap: nowrap; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters__btn { flex: 1 0 auto; padding: 0.45rem 0.55rem; font-size: 0.8125rem; }
  .skills__grid { gap: 0.6rem; }
  .skill { padding: 1.1rem 1.15rem; }
  .skill__cat { margin-bottom: 0.5rem; }
  .skill__title { font-size: 1.0625rem; margin-bottom: 0.3rem; }
  .skill__text { font-size: 0.875rem; line-height: 1.55; }

  /* Hobbies: swipeable row with the next card peeking in */
  .hobbies__grid {
    display: flex;
    gap: 0.75rem;
    margin-inline: calc(var(--margin) * -1);
    padding-inline: var(--margin);
    scroll-padding-inline: var(--margin);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .hobbies__grid::-webkit-scrollbar { display: none; }
  .hobby { flex: 0 0 80%; scroll-snap-align: start; padding: 1.25rem; }

  /* Education: date and status share a line */
  .edu__col { padding: 1.1rem 1.15rem; }
  .edu-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "when pill" "body body"; gap: 0.35rem 0.75rem; align-items: center; padding: 1.1rem 0; }
  .edu-item__when { grid-area: when; padding-top: 0; }
  .edu-item__body { grid-area: body; }
  .edu-item .pill { grid-area: pill; margin-top: 0; justify-self: end; }
  .edu-item__place { margin-bottom: 0.35rem; }
  .edu-item__text { font-size: 0.875rem; }
  .edu__quote { margin-top: var(--s-8); }

  /* Blog: latest feature plus four, the rest live on the blog page */
  .posts > .post:nth-child(n + 5) { display: none; }
  .post__link { padding-block: 0.95rem; }

  /* Footer: two columns, no keyboard hints on touch screens */
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); }
  .site-footer__cols > :last-child { grid-column: 1 / -1; }
  .site-footer__small { display: none; }

  /* "Show all" toggles added by main.js for long lists */
  .is-clamped > [data-more-extra] { display: none !important; }
  .more-toggle { display: flex; justify-content: center; margin-top: var(--s-5); }
}
.more-toggle { display: none; }
@media (max-width: 767px) { .more-toggle:not([hidden]) { display: flex; } }

@media (hover: none) and (pointer: coarse) {
  .site-footer__small { display: none; }
}

/* --------------------------------------------------------------------------
   12. CASE STUDIES AND TESTIMONIALS (v1.1)
   -------------------------------------------------------------------------- */
.work__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.work__grid--single { grid-template-columns: minmax(0, 1fr); }
.case-card {
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.case-card__link { display: flex; flex-direction: column; height: 100%; }
.case-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.case-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.case-card__link:hover .case-card__media img { transform: scale(1.03); }
.case-card__body { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; padding: clamp(1.4rem, 1rem + 1.2vw, 2.25rem); }
.case-card__meta { font-size: var(--fs-xs); font-weight: 500; color: var(--accent); }
.case-card__title { font-size: var(--fs-h3); letter-spacing: var(--track-head); line-height: 1.15; }
.case-card__result { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; color: var(--text); }
.case-card__excerpt { font-size: 0.9375rem; color: var(--text-2); max-width: 52ch; }
.case-card .tags { margin-top: var(--s-2); }
.case-card__more { align-self: flex-start; margin-top: auto; padding-top: var(--s-5); }
.case-card__link:hover .case-card__more { color: var(--accent); }
.work__grid--single .case-card__link { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.work__grid--single .case-card__media { aspect-ratio: auto; min-height: 22rem; }

/* Single case study */
.case__head { max-width: 62rem; }
.case__title { max-width: 22ch; }
.case__result { margin-top: var(--s-5); max-width: 32ch; font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.25; color: var(--accent); }
.case__facts { display: flex; flex-wrap: wrap; gap: var(--s-4) clamp(1.5rem, 1rem + 2vw, 3.5rem); margin-top: var(--s-7); padding-top: var(--s-5); border-top: var(--hair) solid var(--line); }
.case__facts dt { font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 0.2rem; }
.case__facts dd { font-size: var(--fs-small); color: var(--text); }
.case__hero { margin: 0 0 var(--s-7); border-radius: var(--r-xl); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg); background: var(--surface); }
.case__hero img { width: 100%; }
.case__metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin-bottom: var(--s-8); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.case__metric { display: flex; flex-direction: column-reverse; gap: 0.35rem; padding: clamp(1.25rem, 1rem + 1vw, 2rem); box-shadow: 1px 0 0 var(--line); }
.case__metric dd { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); font-weight: 500; letter-spacing: var(--track-tight); line-height: 1; color: var(--text); }
.case__metric dt { font-size: var(--fs-small); color: var(--text-2); }
.case__body { margin-inline: auto; padding: 0; }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: var(--gutter); }
.quote-card { padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.quote-card figure { display: flex; flex-direction: column; gap: var(--s-6); height: 100%; margin: 0; }
.quote-card__text { margin: 0; flex: 1; }
.quote-card__text p { font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem); line-height: 1.55; letter-spacing: -0.012em; color: var(--text); }
.quote-card__text p::before { content: "“"; color: var(--accent); }
.quote-card__text p::after { content: "”"; color: var(--accent); }
.quote-card__by { display: flex; align-items: center; gap: 0.85rem; }
.quote-card__img, .quote-card__initial { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; box-shadow: inset 0 0 0 1px var(--line); }
.quote-card__initial { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.quote-card__who { display: flex; flex-direction: column; line-height: 1.35; }
.quote-card__name { font-size: var(--fs-small); font-weight: 500; color: var(--text); }
a.quote-card__name:hover { color: var(--accent); }
.quote-card__role { font-size: var(--fs-xs); color: var(--text-3); }

@media (max-width: 1023px) {
  .work__grid--single .case-card__link { display: flex; }
  .work__grid--single .case-card__media { aspect-ratio: 16 / 10; min-height: 0; }
}
@media (max-width: 767px) {
  .work__grid { grid-template-columns: minmax(0, 1fr); }
  .case__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case__metric { box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
  .case__metric:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .quotes {
    display: flex;
    gap: 0.75rem;
    margin-inline: calc(var(--margin) * -1);
    padding-inline: var(--margin);
    scroll-padding-inline: var(--margin);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .quotes::-webkit-scrollbar { display: none; }
  .quote-card { flex: 0 0 85%; scroll-snap-align: start; }
  .quotes > .quote-card:only-child { flex-basis: 100%; }
}

/* --------------------------------------------------------------------------
   13. LEADS: project questions and the WhatsApp button (v1.1)
   -------------------------------------------------------------------------- */
.form__row--thirds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.field__optional { margin-left: 0.25rem; font-weight: 400; color: var(--text-3); }
.field__select { position: relative; }
.field__select::after {
  content: "";
  position: absolute;
  right: 1.05rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid var(--text-2);
  border-bottom: 1.5px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.field__select select { -webkit-appearance: none; appearance: none; padding-right: 2.5rem; cursor: pointer; text-overflow: ellipsis; }
.field__select select:invalid, .field__select select:has(option[value=""]:checked), .field__select select option[value=""] { color: var(--text-3); }
.field__select select option { color: var(--text); background: var(--surface); }

.wa-float {
  position: fixed;
  left: var(--margin);
  bottom: 1rem;
  z-index: 80;
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.65rem 1.1rem 0.65rem 0.9rem;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg);
  font-size: var(--fs-small);
  font-weight: 500;
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.6);
  transition: transform var(--t-med) var(--ease-out), opacity var(--t-med) var(--ease-out);
}
.wa-float svg { width: 1.25rem; height: 1.25rem; flex: none; }
.wa-float:active { transform: scale(0.97); }
.menu-open .wa-float, .wa-float.is-tucked { opacity: 0; transform: translateY(0.75rem); pointer-events: none; }

@media (max-width: 1023px) {
  .form__row--thirds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__row--thirds > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .wa-float { display: inline-flex; }
}
@media (max-width: 420px) {
  .form__row--thirds { grid-template-columns: minmax(0, 1fr); }
}
