/* ==========================================================================
   svetlosak.com — landing page
   Light + dark themes share one set of tokens. Tiles sit on a "board" with
   thin outlines. The light switch on the portrait (and in the nav) flips themes.
   Type: DM Sans for display + body, DM Mono for labels.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f0ed;
  --board: #fbfaf8;
  --board-line: #e4e1dc;
  --board-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 30px 80px -40px rgba(60, 45, 30, .22);
  --tile: #f4f3f0;
  --tile-hover: #f8f7f5;
  --tile-line: #e2dfda;
  --tile-line-hover: #bdb8b1;
  --lift-shadow: 0 18px 40px -24px rgba(50, 35, 20, .35);
  --line: #e2dfda;
  --text: #2b2826;
  --text-strong: #121110;
  --muted: #6c6864;
  --faint: #c6c1ba;
  --stroke: #bdb7af;
  --accent: #2c8a50;
  --spot: rgba(0, 0, 0, .03);
  --sweep: rgba(255, 255, 255, .7);
  --photo-line: #dcd8d2;
  --nav-bg: rgba(251, 250, 248, .8);
  --btn-bg: #1b1918;
  --btn-fg: #f7f6f3;
  --stack-shadow: 0 -18px 50px -34px rgba(40, 30, 20, .35);
  --ambient-1: rgba(255, 190, 140, .16);
  --ambient-2: rgba(120, 140, 255, .06);
  --grain: .035;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151413;
  --board: #1b1a19;
  --board-line: #2b2927;
  --board-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 40px 90px -40px rgba(0, 0, 0, .7);
  --tile: #201f1e;
  --tile-hover: #252423;
  --tile-line: #302e2c;
  --tile-line-hover: #57534f;
  --lift-shadow: 0 20px 40px -24px rgba(0, 0, 0, .8);
  --line: #2d2b29;
  --text: #e4e1dd;
  --text-strong: #faf8f5;
  --muted: #9a9692;
  --faint: #4f4b48;
  --stroke: #5d5854;
  --accent: #8fd19e;
  --spot: rgba(255, 255, 255, .045);
  --sweep: rgba(255, 255, 255, .06);
  --photo-line: #3a3735;
  --nav-bg: rgba(27, 26, 25, .76);
  --btn-bg: #ece9e5;
  --btn-fg: #151413;
  --stack-shadow: 0 -24px 60px -30px rgba(0, 0, 0, .9);
  --ambient-1: rgba(255, 196, 150, .06);
  --ambient-2: rgba(120, 140, 255, .03);
  --grain: .045;
}

:root {
  /* type */
  --sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --display: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* shape */
  --radius-board: 30px;
  --radius: 22px;
  --radius-btn: 999px;
  --line-w: 1px;

  /* spacing — one scale everywhere */
  --pad: clamp(18px, 1.6vw, 28px);      /* inside every tile */
  --inset: clamp(8px, .7vw, 12px);      /* profile photo inset */
  --gap: clamp(8px, .7vw, 12px);        /* between tiles + board padding */
  --ctl: 34px;                          /* small controls: arrows, pills, switch */
  --gutter: clamp(16px, 5vw, 96px);
  --max: 1576px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --hover: .35s var(--ease-out);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-optical-sizing: auto; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 8px; }

.mono { font-family: var(--mono); font-weight: 400; font-size: 13px; line-height: 1.2; color: var(--muted); }
.muted { color: var(--muted); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 1rem; z-index: 200; background: var(--text); color: var(--bg); padding: .5rem 1rem; border-radius: 8px; }
.skip:focus { left: 1rem; }

/* show the right logo for the theme */
.on-light { display: none; }
[data-theme="light"] .on-dark { display: none; }
[data-theme="light"] .on-light { display: block; }

.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ==========================================================================
   Board + tiles
   ========================================================================== */
.board {
  background: var(--board);
  border: var(--line-w) solid var(--board-line);
  border-radius: var(--radius-board);
  box-shadow: var(--board-shadow);
  padding: var(--gap);
}

.tile {
  --mx: 50%; --my: 50%; --lift: 0px;
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  padding: var(--pad);
  border-radius: var(--radius);
  background: var(--tile);
  border: var(--line-w) solid var(--tile-line);
  isolation: isolate; overflow: hidden;
  transform: translateY(var(--lift));
  transition: transform var(--hover), box-shadow var(--hover), border-color var(--hover), background-color var(--hover);
}
.tile__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(480px circle at var(--mx) var(--my), var(--spot), transparent 45%);
  opacity: 0; transition: opacity var(--hover);
}
/* one-off light sweep after the intro */
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, var(--sweep) 50%, transparent 65%);
  transform: translateX(-120%);
}
@keyframes sweep { to { transform: translateX(120%); } }

/* One hover language, for links only: lift, firmer outline, button fills */
@media (hover: hover) and (pointer: fine) {
  a.tile:hover { --lift: -2px; background: var(--tile-hover); border-color: var(--tile-line-hover); box-shadow: var(--lift-shadow); }
  a.tile:hover .tile__glow { opacity: 1; }
}
a.tile:focus-visible { --lift: -2px; background: var(--tile-hover); border-color: var(--tile-line-hover); outline-offset: 3px; border-radius: var(--radius); }
a.tile:active { --lift: 0px; transition-duration: .1s; }

/* top row: label left, control right — same height on every tile */
.tile__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--ctl); }
.tile__eyebrow { white-space: nowrap; }
.tile__content { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.tile__title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(21px, 1.7vw, 30px); line-height: 1.2; letter-spacing: -.015em;
  color: var(--text-strong); text-wrap: balance;
}
.tile__body { font-size: clamp(15px, 1vw, 17px); line-height: 1.5; color: var(--muted); max-width: 30em; text-wrap: pretty; }

.tile__go {
  flex: none; width: var(--ctl); height: var(--ctl); border-radius: var(--radius-btn);
  display: grid; place-items: center; overflow: hidden;
  border: var(--line-w) solid var(--tile-line-hover); color: var(--text);
  transition: background-color var(--hover), color var(--hover), border-color var(--hover);
}
.tile__go svg { grid-area: 1 / 1; width: 13px; height: 13px; transition: transform .45s var(--ease-out); }
.tile__go svg + svg { transform: translate(-170%, 170%); }
.tile__go--down svg { rotate: 135deg; }
a.tile:hover .tile__go, a.tile:focus-visible .tile__go { background: var(--text); color: var(--tile); border-color: var(--text); }
a.tile:hover .tile__go svg:first-child, a.tile:focus-visible .tile__go svg:first-child { transform: translate(170%, -170%); }
a.tile:hover .tile__go svg + svg, a.tile:focus-visible .tile__go svg + svg { transform: none; }

.tile__soon {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: var(--ctl); padding: 0 14px;
  border: var(--line-w) solid var(--tile-line-hover); border-radius: var(--radius-btn);
  font-family: var(--mono); font-size: 12px; color: var(--text); white-space: nowrap;
}
.soon-dot { width: 7px; height: 7px; border-radius: 50%; background: #d9a441; animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 164, 65, .45); } 70% { box-shadow: 0 0 0 9px rgba(217, 164, 65, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 164, 65, 0); } }

/* ==========================================================================
   Hero bento
   ========================================================================== */
.hero {
  --p: 0; --ax: 50%; --ay: 45%;
  position: relative; isolation: isolate;
  min-height: 100svh; display: grid; place-items: center;
  padding: clamp(16px, 6vh, 112px) var(--gutter);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at var(--ax) var(--ay), var(--ambient-1), transparent 60%),
    radial-gradient(40vmax 30vmax at 15% 85%, var(--ambient-2), transparent 60%);
  transition: opacity 2s var(--ease-out), transform 2.4s var(--ease-out);
}
.intro:not(.is-ready) .hero::before { opacity: 0; transform: scale(.8); }

.board--hero { width: 100%; max-width: var(--max); opacity: calc(1 - var(--p) * .5); }
.bento {
  height: clamp(580px, calc(100svh - 2 * clamp(16px, 6vh, 112px) - 2 * var(--gap)), 840px);
  display: grid; gap: var(--gap);
  grid-template-columns: minmax(270px, 424fr) 544fr 544fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas: "profile a b" "profile c d";
}
.bento > .tile { translate: 0 calc(var(--p) * var(--depth, 1) * -70px); scale: calc(1 - var(--p) * .04); }
.bento > :nth-child(1) { grid-area: profile; }
.bento > :nth-child(2) { grid-area: a; }
.bento > :nth-child(3) { grid-area: b; }
.bento > :nth-child(4) { grid-area: c; }
.bento > :nth-child(5) { grid-area: d; }

/* Profile tile: photo inset by --inset, text lines up with the other tiles at --pad */
.tile--profile { padding: var(--inset); gap: 0; justify-content: flex-start; }
.profile__photo {
  position: relative; flex: 1 1 auto; min-height: 0;
  border-radius: calc(var(--radius) - var(--inset)); overflow: hidden;
  border: var(--line-w) solid var(--photo-line);
  background: var(--board);
}
.profile__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.profile__monogram { position: absolute; inset: 0; display: none; place-items: center; font: 700 clamp(64px, 7vw, 120px)/1 var(--display); color: var(--faint); }
.no-photo .profile__monogram { display: grid; }
.no-photo .profile__photo img { display: none; }

.profile__meta {
  display: flex; flex-direction: column; gap: 18px;
  padding: calc(var(--pad) - 2px) calc(var(--pad) - var(--inset)) calc(var(--pad) - var(--inset) - 2px);
}
.profile__name { font-family: var(--display); font-weight: 700; font-size: clamp(27px, 2vw, 36px); line-height: 1.12; color: var(--text-strong); letter-spacing: -.02em; }
.profile__role { margin-top: 4px; font-family: var(--display); font-weight: 700; font-size: clamp(19px, 1.45vw, 25px); line-height: 1.15; color: var(--muted); }
.profile__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--ctl); }
.profile__scroll { display: inline-flex; align-items: center; gap: 8px; min-height: var(--ctl); transition: color var(--hover); }
.profile__scroll:hover { color: var(--text-strong); }
.profile__arrow { width: 13px; height: 13px; animation: nudge 2s var(--ease-out) infinite; animation-delay: 2.4s; }
@keyframes nudge { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(4px); } }
.profile__cv {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: var(--ctl); padding: 0 14px; white-space: nowrap;
  border: var(--line-w) solid var(--tile-line-hover); border-radius: var(--radius-btn);
  font-family: var(--mono); font-size: 12px; color: var(--text);
  transition: background-color var(--hover), color var(--hover), border-color var(--hover);
}
.profile__cv:hover { background: var(--text); color: var(--tile); border-color: var(--text); }
.profile__cv svg { width: 12px; height: 12px; }

/* Brand row in case tiles */
.tile__brand { display: flex; align-items: center; height: clamp(46px, 3.9vw, 70px); }
.tile__logo--smartsheet { width: auto; height: clamp(22px, 1.8vw, 32px); }
.tile__sticker { width: auto; height: 100%; transform-origin: 30% 60%; transition: transform .6s var(--ease-spring); filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .14)); }
[data-theme="dark"] .tile__sticker { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .45)); }
@media (hover: hover) and (pointer: fine) { a.tile:hover .tile__sticker { transform: rotate(-3deg) scale(1.04); } }

/* ==========================================================================
   Light switch (theme toggle) — a little wall switch in the site's outline style.
   Knob right + sun = lights on (light theme). Knob left + moon = lights off.
   ========================================================================== */
.switch {
  position: relative; flex: none; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: var(--radius-btn); -webkit-tap-highlight-color: transparent;
}
.switch__plate {
  position: relative; display: block; width: 58px; height: var(--ctl);
  border-radius: var(--radius-btn);
  background: var(--tile); border: 1px solid var(--tile-line-hover);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
  transition: background-color var(--hover), border-color var(--hover);
}
.switch__knob {
  position: absolute; top: 3px; left: 3px; width: calc(var(--ctl) - 8px); height: calc(var(--ctl) - 8px);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--board); color: var(--muted);
  border: 1px solid var(--tile-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 2px 6px -2px rgba(0, 0, 0, .18);
  transform: translateX(0);
  transition: transform .45s var(--ease-spring), background-color var(--hover), color var(--hover), border-color var(--hover);
}
.switch__icon { grid-area: 1 / 1; width: 13px; height: 13px; transition: opacity .3s ease, transform .45s var(--ease-spring); }
.switch__icon--on { opacity: 0; transform: rotate(-60deg) scale(.6); }
.switch__icon--off { opacity: 1; }
/* lights on */
[data-theme="light"] .switch__knob { transform: translateX(24px); color: #c58a12; }
[data-theme="light"] .switch__icon--on { opacity: 1; transform: none; }
[data-theme="light"] .switch__icon--off { opacity: 0; transform: rotate(40deg) scale(.6); }

@media (hover: hover) and (pointer: fine) {
  .switch:hover .switch__plate { border-color: var(--text); }
  .switch:hover .switch__knob { box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 4px 10px -3px rgba(0, 0, 0, .25); }
}
.switch:active .switch__knob { width: calc(var(--ctl) - 4px); }
[data-theme="light"] .switch:active .switch__knob { transform: translateX(20px); }
.switch:focus-visible { outline-offset: 3px; }

/* on the portrait: frosted plate so it reads over the photo */
.switch--photo { position: absolute; z-index: 3; top: calc(var(--pad) - var(--inset)); left: calc(var(--pad) - var(--inset)); }
.switch--photo .switch__plate {
  background: rgba(20, 18, 17, .32); border-color: rgba(255, 255, 255, .26); box-shadow: none;
  -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
}
@media (hover: hover) and (pointer: fine) { .switch--photo:hover .switch__plate { border-color: rgba(255, 255, 255, .6); } }

/* the portrait switch fades in once the photo has revealed */
.intro:not(.is-ready) .switch--photo { opacity: 0; }
.intro:not(.is-settled) .switch--photo { transition: opacity .6s ease .7s; }

/* theme change: the new theme fades in softly, spreading out from the switch (animated in JS) */
@property --reveal { syntax: "<length>"; inherits: false; initial-value: 0px; }
html.vt-theme::view-transition-old(root) { animation: none; }
html.vt-theme::view-transition-new(root) {
  animation: none; mix-blend-mode: normal;
  -webkit-mask-image: radial-gradient(circle at var(--ox, 0) var(--oy, 0), #000 var(--reveal), transparent calc(var(--reveal) + 40vmax));
          mask-image: radial-gradient(circle at var(--ox, 0) var(--oy, 0), #000 var(--reveal), transparent calc(var(--reveal) + 40vmax));
}
/* fallback when View Transitions aren't available: colours ease briefly */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition-property: background-color, color, border-color, fill, stroke, box-shadow !important;
  transition-duration: .45s !important; transition-timing-function: ease-out !important; transition-delay: 0s !important;
}

/* ==========================================================================
   Intro: a calm entrance — the board fades in, tiles rise softly in sequence
   ========================================================================== */
.intro:not(.is-settled) .board--hero { transition: opacity .7s ease; }
.intro:not(.is-ready) .board--hero { opacity: 0; }
.intro:not(.is-settled) .hero .tile { transition: opacity .8s ease, transform 1s var(--ease-out); transition-delay: calc(var(--i) * 70ms + 120ms); }
.intro:not(.is-ready) .hero .tile { opacity: 0; transform: translateY(14px); }
.intro:not(.is-settled) .profile__photo img { transition: transform 1.6s var(--ease-out) .1s; }
.intro:not(.is-ready) .profile__photo img { transform: scale(1.04); }

/* ==========================================================================
   Nav
   ========================================================================== */
.topbar {
  position: fixed; top: 14px; left: 50%; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  transform: translate(-50%, -160%); opacity: 0;
  transition: transform .7s var(--ease-out), opacity .7s var(--ease-out);
}
.topbar.is-visible { transform: translate(-50%, 0); opacity: 1; }
.topbar__switch, .nav {
  border-radius: var(--radius-btn);
  background: var(--nav-bg); border: var(--line-w) solid var(--board-line);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
}
.topbar__switch { padding: 5px; display: flex; }
.topbar.is-visible .topbar__switch { animation: dock .6s var(--ease-spring) .1s both; }
.nav {
  position: relative;
  display: flex; align-items: center; gap: 4px;
  padding: 5px 5px 5px 8px;
}
.nav::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--text) 40%, var(--text) 60%, transparent); opacity: .45;
  transform: scaleX(var(--sp, 0)); transform-origin: left; pointer-events: none;
}
@keyframes dock { from { scale: .4; rotate: -30deg; opacity: 0; } to { scale: 1; rotate: 0deg; opacity: 1; } }
.nav__brand { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--text-strong); white-space: nowrap; padding: 0 10px 0 8px; }
.nav__links { display: flex; gap: 2px; align-items: center; }
.nav__links a {
  display: inline-flex; align-items: center; height: var(--ctl); padding: 0 12px; white-space: nowrap;
  font-family: var(--mono); font-size: 12.5px; color: var(--muted); border-radius: var(--radius-btn);
  transition: color var(--hover), background-color var(--hover);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text-strong); background: var(--tile); }
.nav__links a.nav__cv { color: var(--btn-fg); background: var(--btn-bg); margin-left: 4px; }
.nav__links a.nav__cv:hover { opacity: .85; }


/* ==========================================================================
   Sections
   ========================================================================== */
section:not(.hero) { padding: clamp(88px, 11vw, 168px) var(--gutter); }
section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(24px, 3vw, 40px); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--faint); order: 1; }
.eyebrow__num { color: var(--text-strong); }
.section-head { display: grid; margin-bottom: clamp(44px, 5.5vw, 88px); }
.section-head .eyebrow { margin-bottom: 20px; }
.section-title { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 3.8vw, 62px); line-height: 1.05; letter-spacing: -.03em; color: var(--text-strong); text-wrap: balance; }
.section-title--xl { font-size: clamp(52px, 7.2vw, 124px); line-height: .96; letter-spacing: -.05em; }
.sub { margin-bottom: clamp(24px, 2.6vw, 40px); }
.sub--spaced { margin-top: clamp(88px, 9vw, 152px); }
.sub--row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cv-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; white-space: nowrap;
  border-radius: var(--radius-btn); border: 1px solid var(--tile-line-hover); color: var(--text-strong);
  font-weight: 700; font-size: 14.5px;
  transition: background-color var(--hover), color var(--hover), border-color var(--hover);
}
.cv-btn svg { width: 14px; height: 14px; transition: transform .4s var(--ease-spring); }
.cv-btn__meta { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--muted); padding: 2px 6px; border-radius: 6px; background: var(--tile); transition: color var(--hover), background-color var(--hover); }
.cv-btn:hover { background: var(--text-strong); color: var(--bg); border-color: var(--text-strong); }
.cv-btn:hover svg { transform: translateY(2px); }
.cv-btn:hover .cv-btn__meta { background: rgba(255, 255, 255, .14); color: inherit; }
.sub__title { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; font-size: clamp(24px, 2.1vw, 34px); line-height: 1.1; color: var(--text-strong); }

/* scroll reveal: transform + opacity only */
.js:not(.reduced) [data-reveal] {
  opacity: 0; transform: translate3d(0, 28px, 0);
  transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 80ms);
}
.js:not(.reduced) [data-reveal].in-view { opacity: 1; transform: none; }
.js:not(.reduced) .tile[data-reveal].in-view { transform: translateY(var(--lift)); transition: opacity .9s var(--ease-out), transform var(--hover), box-shadow var(--hover), border-color var(--hover), background-color var(--hover); }

/* ---------- 01 About me ---------- */
.statement {
  font-family: var(--display); font-weight: 500; font-size: clamp(26px, 3.3vw, 56px); line-height: 1.15; letter-spacing: -.025em;
  color: var(--text); max-width: 28ch; text-wrap: pretty;
  margin-left: max(0px, calc((100% - var(--max)) / 2)); margin-right: auto;
}
.statement .w { color: var(--faint); transition: color .5s ease; }
.statement .w.lit { color: var(--text-strong); }
.reduced .statement .w { color: var(--text-strong); }

.about__grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 120px);
  margin-top: clamp(56px, 7vw, 112px); padding-top: clamp(28px, 3vw, 44px); border-top: 1px solid var(--line);
}
.about__lede { font-size: clamp(19px, 1.55vw, 26px); line-height: 1.45; color: var(--text-strong); text-wrap: pretty; max-width: 34em; letter-spacing: -.01em; }
.about__now { margin-top: 22px; font-size: clamp(16px, 1.2vw, 20px); line-height: 1.5; color: var(--muted); max-width: 34em; }
.facts { display: grid; align-content: start; }
.fact { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.fact:first-child { padding-top: 4px; }
.fact dt { font-size: 12.5px; }
.fact dd { font-size: clamp(15px, 1.1vw, 18px); line-height: 1.45; color: var(--text-strong); }

/* ---------- Generative pattern band (original, in the spirit of bookofshapes.com) ---------- */
.pattern {
  --cell: clamp(36px, 3.4vw, 56px);
  position: relative; height: calc(var(--cell) * 4); overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--stroke);
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.pattern__svg { display: block; width: 100%; height: 100%; }
.pattern__svg .cell { transform-box: fill-box; transform-origin: center; transition: transform .9s var(--ease-spring); }
.pattern__svg path, .pattern__svg circle { fill: none; stroke: currentColor; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.pattern__svg .dot { fill: var(--text); stroke: none; }
.pattern__svg .cell.is-hot path { stroke: var(--text); }
.pattern__svg .cell path { transition: stroke .6s ease; }

/* ---------- 02 How I work (stacking cards) ---------- */
.about { padding-bottom: clamp(48px, 6vw, 96px) !important; }
.how { padding-top: clamp(48px, 6vw, 96px) !important; }
.how__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); gap: clamp(40px, 6vw, 120px); align-items: start; }
.how__intro { position: sticky; top: 18vh; }
.how__lede { margin-top: 20px; font-size: clamp(16px, 1.3vw, 21px); line-height: 1.5; color: var(--muted); max-width: 24ch; }
.how__ticks { list-style: none; padding: 0; margin: 36px 0 0; display: flex; gap: 6px; }
.how__ticks li { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-btn); transition: color .4s, border-color .4s, background-color .4s; }
.how__ticks li.is-on { color: var(--btn-fg); border-color: var(--btn-bg); background: var(--btn-bg); }

.stack { list-style: none; padding: 0 0 8vh; margin: 0; display: grid; gap: clamp(28px, 7vh, 72px); }
.stack__card {
  --stack-top: 18vh;
  position: sticky; top: calc(var(--stack-top) + var(--n) * 22px);
  min-height: clamp(300px, 44vh, 420px); padding: clamp(26px, 2.8vw, 44px);
  gap: 40px; box-shadow: var(--stack-shadow);
  transform-origin: 50% 0; scale: var(--s, 1);
}
.stack__num { font: 700 clamp(60px, 5.6vw, 104px)/1 var(--display); color: transparent; -webkit-text-stroke: 1px var(--stroke); align-self: flex-start; }
.stack__text h3 { font-family: var(--display); font-weight: 700; font-size: clamp(27px, 2.5vw, 44px); line-height: 1.08; letter-spacing: -.03em; color: var(--text-strong); text-wrap: balance; }
.stack__text p { margin-top: 14px; font-size: clamp(17px, 1.35vw, 22px); line-height: 1.5; color: var(--muted); max-width: 32ch; text-wrap: pretty; }
.stack__shade { position: absolute; inset: 0; border-radius: inherit; background: var(--bg); opacity: var(--shade, 0); pointer-events: none; z-index: 3; }

/* ---------- 03 Outcomes ---------- */
.outcomes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.outcome { grid-column: span 2; min-height: clamp(290px, 23vw, 370px); justify-content: flex-start; gap: 16px; }
.outcome--journey { grid-column: span 4; }
.outcome__src { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; min-height: 16px; }
.outcome__value {
  margin-top: 6px; font-family: var(--display); font-weight: 700;
  font-size: clamp(46px, 4.2vw, 80px); line-height: 1; letter-spacing: -.045em; color: var(--text-strong);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.outcome__value > span[aria-hidden] { display: inline-flex; align-items: baseline; }
.outcome__unit { font-size: .5em; margin-left: .04em; color: var(--text); }
.outcome__unit--word { font-family: var(--sans); font-size: .28em; letter-spacing: 0; margin-left: .4em; color: var(--muted); font-weight: 500; }
.outcome__to { color: var(--faint); margin: 0 .14em; font-weight: 500; }
.outcome__label { margin-top: auto; font-size: clamp(14.5px, 1vw, 17px); line-height: 1.5; color: var(--muted); max-width: 34em; text-wrap: pretty; }

.outcome__lede { font-size: clamp(15px, 1.05vw, 17px); line-height: 1.4; color: var(--text-strong); font-weight: 500; margin-top: -4px; }
.mini { margin-top: auto; display: grid; }
.mini__row { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.mini__row dt { font-size: 11px; }
.mini__row dd { margin: 0; font-weight: 700; font-size: clamp(18px, 1.5vw, 24px); letter-spacing: -.03em; color: var(--text-strong); white-space: nowrap; }
.mini__row .outcome__to { margin: 0 .2em; }
.pill { display: inline-flex; align-items: center; gap: 6px; width: fit-content; height: 30px; padding: 0 12px; font-family: var(--mono); font-size: 12px; color: var(--text); border: 1px solid var(--tile-line-hover); border-radius: var(--radius-btn); background: var(--board); }
.pill__arrow { color: var(--accent); }

.cohorts { list-style: none; padding: 0; margin: 2px 0 0; display: flex; gap: 10px; }
.cohorts li { width: 14px; height: 14px; border-radius: 50%; background: var(--text); }
.js:not(.reduced) .cohorts li { background: transparent; border: 1px solid var(--muted); transform: scale(.6); transition: background-color .4s, border-color .4s, transform .6s var(--ease-spring); }
.js:not(.reduced) .cohorts li:nth-child(2) { transition-delay: .25s; }
.js:not(.reduced) .cohorts li:nth-child(3) { transition-delay: .5s; }
.js:not(.reduced) .in-view .cohorts li { background: var(--text); border-color: var(--text); transform: none; }

.journey { list-style: none; padding: 0; margin: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3.4vw, 56px); }
.journey__step { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.journey__step .outcome__value { margin-top: 6px; }
.journey__connector { align-self: center; position: relative; width: clamp(40px, 5vw, 88px); height: 1px; background: var(--line); }
.journey__connector span { position: absolute; inset: 0; background: var(--text); transform-origin: left; }
.journey__connector::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 1px solid var(--text); border-right: 1px solid var(--text); transform: rotate(45deg); }
.milestones { list-style: none; margin: 2px 0 4px; padding: 20px 0 0; position: relative; display: flex; justify-content: space-between; gap: 8px; }
.milestones::before, .milestones::after { content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 1px; background: var(--tile-line-hover); }
.milestones::after { background: var(--text); transform-origin: left; }
.milestones li { position: relative; font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.milestones li:nth-child(2) { text-align: center; }
.milestones li:last-child { text-align: right; }
.milestones li::before { content: ""; position: absolute; top: -20px; width: 9px; height: 9px; border-radius: 50%; background: var(--text); border: 1px solid var(--text); }
.milestones li:first-child::before { left: 0; }
.milestones li:nth-child(2)::before { left: calc(50% - 4.5px); }
.milestones li:last-child::before { right: 0; }

.js:not(.reduced) .outcome--journey .milestones::after { transform: scaleX(0); transition: transform 1.4s var(--ease-out) .35s; }
.js:not(.reduced) .outcome--journey .milestones li::before { background: var(--tile); border-color: var(--muted); transition: background-color .4s, border-color .4s; }
.js:not(.reduced) .outcome--journey .milestones li:nth-child(1)::before { transition-delay: .35s; }
.js:not(.reduced) .outcome--journey .milestones li:nth-child(2)::before { transition-delay: .95s; }
.js:not(.reduced) .outcome--journey .milestones li:nth-child(3)::before { transition-delay: 1.55s; }
.js:not(.reduced) .outcome--journey .journey__connector span { transform: scaleX(0); transition: transform .8s var(--ease-out) 1.7s; }
.js:not(.reduced) .outcome--journey .journey__connector::after { opacity: 0; transition: opacity .3s ease 2.3s; }
.js:not(.reduced) .outcome--journey .journey__step:last-child > * { opacity: 0; transform: translateX(-12px); transition: opacity .7s var(--ease-out), transform .9s var(--ease-out); }
.js:not(.reduced) .outcome--journey .journey__step:last-child > :nth-child(1) { transition-delay: 1.5s; }
.js:not(.reduced) .outcome--journey .journey__step:last-child > :nth-child(2) { transition-delay: 1.65s; }
.js:not(.reduced) .outcome--journey .journey__step:last-child > :nth-child(3) { transition-delay: 1.8s; }
.js:not(.reduced) .outcome--journey.in-view .milestones::after { transform: none; }
.js:not(.reduced) .outcome--journey.in-view .milestones li::before { background: var(--text); border-color: var(--text); }
.js:not(.reduced) .outcome--journey.in-view .journey__connector span { transform: none; }
.js:not(.reduced) .outcome--journey.in-view .journey__connector::after { opacity: 1; }
.js:not(.reduced) .outcome--journey.in-view .journey__step:last-child > * { opacity: 1; transform: none; }

/* ---------- Experience ---------- */
.timeline { position: relative; display: grid; gap: clamp(48px, 5vw, 80px); padding-left: clamp(28px, 4vw, 64px); }
.timeline__line { position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.timeline__line span { position: absolute; inset: 0; background: var(--text); transform-origin: top; transform: scaleY(var(--tp, 0)); }
.reduced .timeline__line span { transform: none; }
.role { display: grid; grid-template-columns: minmax(200px, 360px) 1fr; gap: clamp(20px, 4vw, 80px); position: relative; }
.role::before { content: ""; position: absolute; left: calc(-1 * clamp(28px, 4vw, 64px) - 5px); top: 14px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--muted); transition: background-color .5s, border-color .5s; }
.role.is-passed::before, .reduced .role::before { background: var(--text); border-color: var(--text); }
.role__company { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 2.7vw, 46px); line-height: 1.05; letter-spacing: -.035em; color: var(--text-strong); }
.role__when { margin-top: 10px; font-size: 12.5px; }
.role__title { font-weight: 700; font-size: clamp(18px, 1.4vw, 22px); line-height: 1.25; color: var(--text-strong); margin-bottom: 16px; padding-top: .5em; letter-spacing: -.01em; }
.role__body ul { list-style: none; padding: 0; display: grid; gap: 10px; max-width: 46em; }
.role__body li { position: relative; padding-left: 24px; font-size: clamp(15px, 1.05vw, 17px); line-height: 1.55; color: var(--muted); }
.role__body li::before { content: "→"; position: absolute; left: 0; color: var(--faint); font-family: var(--mono); }

.extras { margin: clamp(64px, 7vw, 112px) auto 0; padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); }
.extra dt { font-size: 12.5px; margin-bottom: 12px; }
.extra dd { margin: 0 0 6px; font-size: clamp(15px, 1.02vw, 17px); line-height: 1.5; color: var(--text-strong); }

/* ---------- Case studies list ---------- */
.work__list { list-style: none; padding: 0; margin: 0 auto; border-top: 1px solid var(--line); }
.work__list li { border-bottom: 1px solid var(--line); }
.work__row { position: relative; display: grid; grid-template-columns: 52px 1fr auto var(--ctl); align-items: center; gap: clamp(12px, 2vw, 32px); padding: clamp(22px, 2.8vw, 40px) 0; }
.work__row::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease-out); }
a.work__row:hover::after, a.work__row:focus-visible::after { transform: scaleX(1); }
.work__title { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.5vw, 42px); line-height: 1.12; letter-spacing: -.025em; color: var(--text-strong); transition: transform .6s var(--ease-out); text-wrap: balance; }
a.work__row:hover .work__title, a.work__row:focus-visible .work__title { transform: translateX(10px); }
.work__tag { text-align: right; white-space: nowrap; }
.work__arrow { width: var(--ctl); height: var(--ctl); display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--tile-line-hover); font-size: 15px; color: var(--text); justify-self: end; transition: transform .6s var(--ease-out), background-color var(--hover), color var(--hover), border-color var(--hover); }
a.work__row:hover .work__arrow, a.work__row:focus-visible .work__arrow { transform: rotate(-45deg); background: var(--text); color: var(--bg); border-color: var(--text); }
.work__row.is-soon .work__arrow { border-color: transparent; }

/* ---------- Contact ---------- */
.contact__title { font-family: var(--display); font-weight: 700; font-size: clamp(48px, 8vw, 144px); line-height: .98; letter-spacing: -.045em; color: var(--text-strong); margin-bottom: clamp(40px, 5vw, 72px); }
.love { position: relative; display: inline-block; isolation: isolate; }
.love__heart {
  position: absolute; z-index: -1; left: 50%; top: 50%; width: 1.95em; height: 1.7em;
  translate: -50% -44%; rotate: -6deg; overflow: visible; pointer-events: none;
}
.love__heart path { fill: none; stroke: #e10f1f; stroke-width: 6; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .love__heart path { stroke: #ff2d3a; }
.js:not(.reduced) .love__heart path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.6, .05, .3, 1) .6s; }
.js:not(.reduced) .in-view .love__heart path { stroke-dashoffset: 0; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-left: max(0px, calc((100% - var(--max)) / 2)); margin-right: auto; }
.btn-magnetic { display: inline-flex; border-radius: var(--radius-btn); background: var(--btn-bg); color: var(--btn-fg); transition: opacity var(--hover), transform .6s var(--ease-out), box-shadow var(--hover); transform: translate(var(--bx, 0), var(--by, 0)); }
.btn-magnetic:hover { opacity: .9; }
.btn-magnetic__inner { display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 28px; font-weight: 700; font-size: 16.5px; transform: translate(calc(var(--bx, 0) * .35), calc(var(--by, 0) * .35)); transition: transform .6s var(--ease-out); }
.btn-magnetic svg { width: 18px; height: 18px; }
.btn-ghost { background: transparent; color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--tile-line-hover); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--text); opacity: 1; }

.footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 32px var(--gutter) 40px; border-top: 1px solid var(--line); }
.footer a:hover { color: var(--text); }

/* ---------- Page transitions to case studies ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .45s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in .7s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(.97); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1240px) {
  .bento { grid-template-columns: minmax(250px, 380fr) 544fr 544fr; }
  .tile__title { font-size: clamp(20px, 1.85vw, 26px); }
}
@media (max-width: 1100px) {
  .hero { min-height: 0; place-items: start center; padding-top: 24px; padding-bottom: 48px; }
  .bento { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: auto; grid-template-areas: "profile profile" "a b" "c d"; }
  .tile--profile { flex-direction: row; gap: var(--inset); }
  .profile__photo { flex: 0 0 44%; aspect-ratio: 1 / 1.08; }
  .profile__meta { flex: 1; justify-content: flex-end; padding: var(--pad) calc(var(--pad) - var(--inset)) calc(var(--pad) - var(--inset)); }
  .bento > .tile:not(.tile--profile) { min-height: 280px; }
  .tile__title { font-size: clamp(21px, 2.6vw, 27px); }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outcome { grid-column: span 1; }
  .outcome--journey { grid-column: span 2; }
}
@media (max-width: 900px) {
  .how__grid { grid-template-columns: 1fr; }
  .how__intro { position: static; }
  .how__ticks { display: none; }
  .stack__card { --stack-top: 80px; min-height: 0; gap: 28px; }
  .stack__num { font-size: 54px; }
  .about__grid { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; gap: 10px; }
  .role__title { padding-top: 0; }
  .extras { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  :root { --radius-board: 24px; --radius: 18px; --pad: 20px; --inset: 8px; --gap: 8px; --ctl: 34px; }
  .hero { padding: 12px 12px 32px; }
  .bento { grid-template-columns: 1fr; grid-template-areas: "profile" "a" "b" "c" "d"; }
  .tile--profile { flex-direction: column; }
  .profile__photo { flex: none; aspect-ratio: 1 / 1; }
  .profile__meta { justify-content: flex-start; padding: calc(var(--pad) - 2px) calc(var(--pad) - var(--inset)) calc(var(--pad) - var(--inset)); }
  .bento > .tile:not(.tile--profile) { min-height: 230px; }
  .tile__title { font-size: 23px; }
  .hero .bento > .tile { --fx: 0; --fy: 40px; --clip-from: 0 0 100% 0; }

  .fact { grid-template-columns: 92px 1fr; }
  .pattern { --cell: 34px; height: calc(var(--cell) * 3); }
  .outcomes { grid-template-columns: 1fr; }
  .outcome, .outcome--journey { grid-column: auto; min-height: 0; }
  .outcome__label { margin-top: 10px; }
  .journey { grid-template-columns: 1fr; gap: 26px; }
  .journey__connector { width: 1px; height: 36px; justify-self: start; margin-left: 4px; }
  .journey__connector span { transform-origin: top; }
  .journey__connector::after { right: auto; left: -4px; top: auto; bottom: 0; transform: rotate(135deg); }
  .js:not(.reduced) .outcome--journey .journey__connector span { transform: scaleY(0); }
  .js:not(.reduced) .outcome--journey .journey__step:last-child > * { transform: translateY(-10px); }
  .js:not(.reduced) .outcome--journey.in-view .journey__connector span { transform: none; }

  .extras { grid-template-columns: 1fr; }
  .work__row { grid-template-columns: 30px 1fr var(--ctl); }
  .work__tag { display: none; }
  .topbar { top: 10px; gap: 6px; max-width: calc(100vw - 16px); }
  .topbar__switch { padding: 4px; }
  .nav { padding: 4px; gap: 2px; }
  .nav__brand { display: none; }
  .nav__links a { padding: 0 9px; font-size: 12px; }
  .nav__links a.nav__cv { margin-left: 2px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .btn-magnetic__inner { height: 56px; padding: 0 22px; font-size: 16px; }
}
@media (max-width: 380px) {
  :root { --pad: 18px; }
  .nav__links a { padding: 0 7px; font-size: 11.5px; }
  .tile__title { font-size: 21px; }
}

/* Reduced motion: everything visible, nothing moves */
.reduced *, .reduced *::before, .reduced *::after { animation: none !important; transition: none !important; }
.reduced .bento > .tile { translate: none; scale: none; }
.reduced .board--hero { opacity: 1; }
.reduced .stack__card { scale: none; }
.reduced .stack__shade { opacity: 0; }

/* in the top bar the switch rests as a single knob and opens up on hover/focus */
.topbar .switch__plate { width: var(--ctl); transition: width .4s var(--ease-out), background-color var(--hover), border-color var(--hover); }
.topbar .switch .switch__knob, [data-theme="light"] .topbar .switch .switch__knob { transform: translateX(0); }
.topbar .switch:hover .switch__plate, .topbar .switch:focus-visible .switch__plate { width: 58px; }
[data-theme="light"] .topbar .switch:hover .switch__knob, [data-theme="light"] .topbar .switch:focus-visible .switch__knob { transform: translateX(24px); }

/* a warm glow on the plate when the lights are on */
[data-theme="light"] .switch__plate { background: #fbf3df; border-color: #e3cf9f; }
[data-theme="light"] .switch--photo .switch__plate { background: rgba(255, 214, 120, .2); border-color: rgba(255, 224, 160, .55); }


/* ==========================================================================
   TYPE SYSTEM — the only text styles on the page.
   Display · H2 · H3 · Body · Label (mono). Two weights: 400 body, 700 headings.
   ========================================================================== */
:root {
  --t-display: clamp(44px, 5.6vw, 92px);
  --t-h2: clamp(28px, 2.9vw, 46px);
  --t-h3: clamp(19px, 1.45vw, 24px);
  --t-body: clamp(15.5px, 1.05vw, 17px);
  --t-label: 12.5px;
}
body { font-size: var(--t-body); }

/* Display: the few big moments */
.section-title--xl, .contact__title, .outcome__value, .stack__num {
  font-family: var(--display); font-size: var(--t-display); font-weight: 700;
  line-height: 1; letter-spacing: -.045em;
}

/* H2: section titles, the bio, list titles */
.section-title, .statement, .stack__text h3, .work__title {
  font-family: var(--display); font-size: var(--t-h2); font-weight: 700;
  line-height: 1.12; letter-spacing: -.03em;
}
.statement { max-width: 30ch; }

/* H3: card titles, names, sub-headings */
.tile__title, .profile__name, .profile__role, .sub__title, .role__company, .mini__row dd {
  font-family: var(--display); font-size: var(--t-h3); font-weight: 700;
  line-height: 1.22; letter-spacing: -.02em;
}
.profile__role { color: var(--muted); margin-top: 2px; }

/* Body: everything you read */
.tile__body, .how__lede, .stack__text p, .outcome__lede, .outcome__label,
.role__title, .role__body li, .extra dd, .btn-magnetic__inner, .cv-btn, .nav__brand {
  font-family: var(--sans); font-size: var(--t-body); line-height: 1.55; letter-spacing: -.005em;
}
.tile__body, .how__lede, .stack__text p, .outcome__label, .role__body li { font-weight: 400; color: var(--muted); }
.outcome__lede, .extra dd { font-weight: 400; color: var(--text-strong); }
.role__title, .btn-magnetic__inner, .cv-btn, .nav__brand { font-weight: 700; color: var(--text-strong); line-height: 1.3; }
.btn-magnetic__inner { color: inherit; }
.stack__text p { margin-top: 12px; max-width: 34ch; }

/* Label: every small mono line */
.mono, .eyebrow, .tile__eyebrow, .tile__soon, .profile__cv, .profile__scroll, .nav__links a, .how__ticks li,
.outcome__src, .milestones li, .mini__row dt, .pill, .role__when, .extra dt, .work__idx, .work__tag, .cv-btn__meta, .footer {
  font-family: var(--mono); font-size: var(--t-label); font-weight: 400; letter-spacing: 0; text-transform: none;
}
.outcome__unit--word { font-family: var(--display); font-weight: 700; }

/* ==========================================================================
   No board: tiles sit straight on the page, all corners consistently rounded
   ========================================================================== */
.board, .board--hero, .board--outcomes { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
.intro:not(.is-settled) .hero .tile { clip-path: none; }
a.tile:focus-visible { border-radius: inherit; }

/* ==========================================================================
   Portrait per theme · footer links · floating scrollbar
   ========================================================================== */
.profile__photo .photo--dark { display: none; }
[data-theme="dark"] .profile__photo .photo--dark { display: block; }
[data-theme="dark"] .profile__photo .photo--light { display: none; }

.footer__me { display: flex; align-items: center; gap: clamp(14px, 2vw, 24px); flex-wrap: wrap; }
.footer__me a { color: var(--text); }
.footer a { transition: color var(--hover); }

/* native bar hidden only when the JS replacement is running */
html.overlay-scroll { scrollbar-width: none; }
html.overlay-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.oscroll { position: fixed; top: 0; right: 0; bottom: 0; width: 14px; z-index: 300; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
.oscroll.is-on { opacity: 1; }
.oscroll.is-none { display: none; }
.oscroll__thumb {
  position: absolute; top: 0; right: 3px; width: 6px; border-radius: 6px;
  background: color-mix(in srgb, var(--text) 38%, transparent);
  pointer-events: auto; cursor: grab; transition: width .2s ease, background-color .2s ease;
}
.oscroll.is-on .oscroll__thumb:hover, .oscroll.is-drag .oscroll__thumb { width: 8px; background: color-mix(in srgb, var(--text) 60%, transparent); }
.oscroll.is-drag .oscroll__thumb { cursor: grabbing; }
.oscroll:not(.is-on) .oscroll__thumb { pointer-events: none; }

/* ==========================================================================
   Hero sink (assets/js/hero-sink.js): on scroll the bento stays pinned while
   About slides up in front; the tiles sink back into depth and frost over.
   Only active on wide screens where the bento fits (html.is-sinking).
   ========================================================================== */
:root, [data-theme="light"] { --frost: #fbfaf8; --frost-edge: rgba(255, 255, 255, .38); }
[data-theme="dark"] { --frost: #1f1e1d; --frost-edge: rgba(21, 20, 19, .5); }

.sink-layer, .hero__frost { display: none; }
.is-sinking .hero { position: sticky; top: 0; }
.is-sinking .hero-pin ~ * { position: relative; z-index: 1; }       /* everything after the hero passes in front of it */
.is-sinking .hero-pin + * { margin-top: calc(-1 * var(--sink-len, 100vh)); }
.is-sinking .bento { position: relative; }
.is-sinking .bento > .tile { translate: none; scale: none; will-change: translate, scale; }
.is-sinking .board--hero { opacity: 1; }
.is-sinking .bento > .tile.is-sunk { opacity: 0 !important; transition: none !important; }

.is-sinking .sink-layer { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sink-g { position: absolute; isolation: isolate; transform-origin: 50% 50%; will-change: transform; }
.sink-g > .tile {
  position: absolute; inset: 0; margin: 0;
  translate: none !important; scale: none !important; transform: none !important;
  transition: none !important; animation: none !important;
  opacity: 0; will-change: opacity; backface-visibility: hidden;
}
.sink-g > .tile::after { content: none; }
.sink-plus .sink-g > .tile { mix-blend-mode: plus-lighter; }   /* exact cross-fade between levels */
.sink-frost { position: absolute; inset: 0; z-index: 3; border-radius: inherit; background: var(--frost); pointer-events: none; }
.sink-lv1 { filter: blur(3px) saturate(.88); }  .sink-lv1 .sink-frost { opacity: .28; }
.sink-lv2 { filter: blur(8px) saturate(.74); }  .sink-lv2 .sink-frost { opacity: .55; }
.sink-lv3 { filter: blur(16px) saturate(.6); }  .sink-lv3 .sink-frost { opacity: .78; }

/* a pane of glass in front: a soft sheen that builds as the tiles sink */
.is-sinking .hero__frost {
  display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; will-change: opacity;
  background: radial-gradient(120% 90% at 50% 40%, transparent, var(--frost-edge));
}
