/* ------------------------------------------------------------------
   Divyank Nagpal — portfolio
   Tokens · liquid glass · rail · card mechanics · layout
   ------------------------------------------------------------------ */

:root {
  --ground: #FFFFFF;
  --ink: #0F1A21;
  --muted: #4A5A64;
  --faint: #66757F;
  --accent: #0F1A21;
  --accent-ink: #000000;
  --accent-soft: rgba(15, 26, 33, .07);
  --btn-flat: #F1F3F5;
  --btn-flat-hover: #E7EAEE;
  --apricot: #F0A36B;

  /* brain-dump palette (sticky notes + marker) */
  --sn-yellow: #FBF6B8;
  --sn-blue: #B3CBF8;
  --sn-lilac: #E7C8F6;
  --sn-lime: #C9E45E;
  --marker: #0F1A21;
  --hl: #B3CBF8;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  /* liquid glass */
  --g-tint-a: rgba(255, 255, 255, .72);
  --g-tint-b: rgba(244, 247, 249, .55);
  --g-rim-top: rgba(255, 255, 255, .95);
  --g-rim-side: rgba(255, 255, 255, .55);
  --g-rim-bottom: rgba(255, 255, 255, .30);
  --g-edge: rgba(255, 255, 255, .55);
  --g-edge-dark: rgba(16, 27, 34, .08);
  --g-sheen: rgba(255, 255, 255, .9);
  --g-shadow: 0 1px 2px rgba(16, 27, 34, .04), 0 18px 44px -28px rgba(16, 27, 34, .16);
  --g-inset-tint: rgba(15, 26, 33, .045);
  --g-inset-rim: rgba(255, 255, 255, .5);

  --line: rgba(16, 27, 34, .07);
  --blob-1: #BFE6EC;
  --blob-2: #F8E4D6;
  --blob-3: #E3E0F6;
  --blob-alpha: .55;
  --btn-solid-ink: #ffffff;

  --font-display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --font-body: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 26px;
  --radius-sm: 14px;
  --max: 1080px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.3, 1.4, .4, 1);
  --dur: 640ms;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0D1013;
    --ink: #F2F4F6;
    --muted: #A9B1B8;
    --faint: #7E8891;
    --accent: #F2F5F7;
    --accent-ink: #FFFFFF;
    --accent-soft: rgba(255, 255, 255, .10);
    --btn-flat: rgba(255,255,255,.10);
    --btn-flat-hover: rgba(255,255,255,.16);
    --g-tint-a: rgba(255, 255, 255, .075);
    --g-tint-b: rgba(255, 255, 255, .045);
    --g-rim-top: rgba(255, 255, 255, .14);
    --g-rim-side: rgba(255, 255, 255, .06);
    --g-rim-bottom: rgba(255, 255, 255, .03);
    --g-edge: rgba(255, 255, 255, .12);
    --g-edge-dark: rgba(255, 255, 255, .07);
    --g-sheen: rgba(255, 255, 255, .10);
    --g-shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 20px 40px -26px rgba(0, 0, 0, .7);
    --g-inset-tint: rgba(255, 255, 255, .05);
    --g-inset-rim: rgba(255, 255, 255, .06);
    --line: rgba(255, 255, 255, .09);
    --blob-alpha: .16;
    --btn-solid-ink: #06181c;
    --marker: #E8EEF1;
    --hl: rgba(179,203,248,.38);
    --sn-yellow: #EFE58F;
    --sn-blue: #9DBBF3;
    --sn-lilac: #DBB4F2;
    --sn-lime: #C3DD5A;
    --blob-1: #2E5F73;
    --blob-2: #6A4E3E;
    --blob-3: #4A4570;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .ledger tbody tr:hover { background: rgba(255,255,255,.04); }
  :root:not([data-theme="light"]) .theme .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme .icon-moon { display: block; }
}
:root[data-theme="dark"] {
  --ground: #0D1013;
  --ink: #F2F4F6;
  --muted: #A9B1B8;
  --faint: #7E8891;
  --accent: #F2F5F7;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(255, 255, 255, .10);
  --btn-flat: rgba(255,255,255,.10);
  --btn-flat-hover: rgba(255,255,255,.16);
  --g-tint-a: rgba(255, 255, 255, .075);
  --g-tint-b: rgba(255, 255, 255, .045);
  --g-rim-top: rgba(255, 255, 255, .14);
  --g-rim-side: rgba(255, 255, 255, .06);
  --g-rim-bottom: rgba(255, 255, 255, .03);
  --g-edge: rgba(255, 255, 255, .12);
  --g-edge-dark: rgba(255, 255, 255, .07);
  --g-sheen: rgba(255, 255, 255, .10);
  --g-shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 20px 40px -26px rgba(0, 0, 0, .7);
  --g-inset-tint: rgba(255, 255, 255, .05);
  --g-inset-rim: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --blob-alpha: .16;
  --btn-solid-ink: #06181c;
  --marker: #E8EEF1;
  --hl: rgba(179,203,248,.38);
  --sn-yellow: #EFE58F;
  --sn-blue: #9DBBF3;
  --sn-lilac: #DBB4F2;
  --sn-lime: #C3DD5A;
  --blob-1: #2E5F73;
  --blob-2: #6A4E3E;
  --blob-3: #4A4570;
  color-scheme: dark;
}
:root[data-theme="dark"] .ledger tbody tr:hover { background: rgba(255,255,255,.04); }
:root[data-theme="dark"] .theme .icon-sun { display: none; }
:root[data-theme="dark"] .theme .icon-moon { display: block; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--hl); color: var(--ink); }
h1, h2, h3 { margin: 0; font-weight: 700; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.accent { color: var(--accent); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 8px 14px; border-radius: 999px;
  background: var(--ink); color: var(--ground); font-size: 14px;
}
.skip:focus { top: 16px; }

/* ---------- liquid glass ----------
   Cards: tint + lit rim + specular sheen. No backdrop-filter here (the ground is
   white, so blur has nothing to show and it was the main frame cost).
   The nav pill is the one surface content scrolls under, so it gets real
   refraction via an SVG displacement map where supported. */
.glass {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--g-tint-a), var(--g-tint-b) 65%);
  box-shadow:
    inset 0 1px 0 var(--g-rim-top),
    inset 1px 0 0 var(--g-rim-side),
    inset -1px 0 0 var(--g-rim-side),
    inset 0 -1px 0 var(--g-rim-bottom),
    0 0 0 1px var(--g-edge-dark),
    var(--g-shadow);
  transition: background .45s var(--ease), box-shadow .45s var(--ease), transform .5s var(--spring);
}
:root:not([data-theme="dark"]) .glass { background: linear-gradient(160deg, rgba(255,255,255,.92), rgba(247,249,251,.86) 65%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .glass { background: linear-gradient(160deg, var(--g-tint-a), var(--g-tint-b) 65%); } }
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: linear-gradient(150deg, var(--g-edge), transparent 40%, transparent 70%, var(--g-edge));
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .9;
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px 260px at var(--mx, 18%) var(--my, 0%), var(--g-sheen), transparent 60%);
  opacity: .5;
  transition: opacity .5s var(--ease);
}
.glass:hover::before { opacity: 1; }

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--ground); transition: background-color .45s var(--ease); }
.blob {
  position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  opacity: var(--blob-alpha); will-change: transform;
  background: radial-gradient(circle at 50% 50%, var(--c) 0%, transparent 68%);
  transition: opacity .6s var(--ease);
}
.blob-1 { --c: var(--blob-1); left: -30vmax; top: -34vmax; animation: drift1 70s ease-in-out infinite alternate; }
.blob-2 { --c: var(--blob-2); right: -34vmax; top: 6vmax; width: 56vmax; height: 56vmax; animation: drift2 84s ease-in-out infinite alternate; }
.blob-3 { --c: var(--blob-3); left: 20vmax; bottom: -44vmax; width: 60vmax; height: 60vmax; animation: drift3 96s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate3d(16vmax, 14vmax, 0) scale(1.08); } }
@keyframes drift2 { to { transform: translate3d(-18vmax, 20vmax, 0) scale(.94); } }
@keyframes drift3 { to { transform: translate3d(14vmax, -16vmax, 0) scale(1.06); } }

/* ---------- nav + rail ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 16px 0; display: flex; justify-content: center; pointer-events: none;
}
.nav {
  pointer-events: auto;
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 18px;
  padding: 8px 8px 8px 18px; border-radius: 999px; max-width: 100%;
}
.nav-glass {
  position: absolute; inset: 0; border-radius: inherit; z-index: -2;
  background: linear-gradient(160deg, rgba(255,255,255,.56), rgba(255,255,255,.34));
  -webkit-backdrop-filter: blur(18px) saturate(1.7);
  backdrop-filter: blur(18px) saturate(1.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 1px 0 0 rgba(255,255,255,.5),
    inset -1px 0 0 rgba(255,255,255,.5),
    inset 0 -1px 0 rgba(255,255,255,.3),
    0 0 0 1px rgba(16,27,34,.09),
    0 1px 2px rgba(16,27,34,.06), 0 18px 40px -22px rgba(16,27,34,.4);
}
/* refraction lives on an inset layer so the ripple never touches the crisp outer edge */
.nav-refract {
  position: absolute; inset: 4px; border-radius: 999px; z-index: -1; pointer-events: none;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0;
}
@supports (filter: url(#lg-refract)) { .nav-refract { filter: url(#lg-refract); opacity: 1; } }
@media (hover: none), (max-width: 900px) { .nav-refract { display: none; } }
@supports (-webkit-touch-callout: none) { .nav-refract { display: none; } }
:root[data-theme="dark"] .nav-glass { background: linear-gradient(160deg, rgba(58,64,72,.5), rgba(22,26,30,.4)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 1px 0 0 rgba(255,255,255,.06), inset -1px 0 0 rgba(255,255,255,.06), 0 0 0 1px rgba(255,255,255,.12), 0 18px 40px -22px rgba(0,0,0,.8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-glass { background: linear-gradient(160deg, rgba(58,64,72,.5), rgba(22,26,30,.4)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 1px 0 0 rgba(255,255,255,.06), inset -1px 0 0 rgba(255,255,255,.06), 0 0 0 1px rgba(255,255,255,.12), 0 18px 40px -22px rgba(0,0,0,.8); } }
.nav-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; transition: opacity .2s; }
.nav-name:hover { opacity: .7; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  display: block; padding: 7px 13px; border-radius: 999px;
  font-size: 14px; color: var(--muted);
  transition: color .25s, background-color .25s, box-shadow .25s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--ink); font-weight: 600; }
.menu {
  display: none; width: 36px; height: 36px; border-radius: 50%; color: var(--ink);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu span { display: block; width: 16px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav.is-open .menu span:first-child { transform: translateY(3.3px) rotate(45deg); }
.nav.is-open .menu span:last-child { transform: translateY(-3.3px) rotate(-45deg); }
.theme {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); transition: color .25s, background-color .25s, transform .5s var(--spring);
}
.theme:hover { color: var(--ink); background: var(--accent-soft); transform: rotate(15deg); }
.theme .icon-moon { display: none; }

/* milestone rail: a stroke that draws around the pill as you scroll */
.rail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
.rail-stroke {
  fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset .18s linear;
}

/* ---------- layout ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0 16px; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 12px; font-weight: 500; }
.h2 { font-family: var(--font-display); font-size: clamp(30px, 3.8vw, 44px); line-height: 1.05; letter-spacing: -.028em; }
.h3 { font-family: var(--font-display); font-size: 22px; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 12px; }
.section-note { color: var(--muted); margin-top: 14px; max-width: 560px; font-size: 16.5px; line-height: 1.6; }

/* ---------- hero ---------- */
.hero {
  min-height: min(calc(100svh - 70px), 780px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 72px 0 40px;
}
.intro { margin-bottom: 26px; font-size: 15.5px; color: var(--muted); letter-spacing: -.005em; }
.intro-name { color: var(--ink); font-weight: 600; }
.avatar {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px var(--g-rim-top), 0 0 0 4px var(--g-edge-dark), 0 14px 30px -14px rgba(16,27,34,.4);
}
.chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; border-radius: 999px;
  font-size: 12.5px; color: var(--muted);
}
.chip > * { position: relative; z-index: 1; }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: #18A05E; box-shadow: 0 0 0 3px rgba(24, 160, 94, .18); }
.display {
  font-family: var(--font-display);
  font-size: clamp(38px, 6.6vw, 82px);
  line-height: .96; letter-spacing: -.038em;
  max-width: 17ch; text-wrap: balance;
}
.lede { margin-top: 30px; max-width: 560px; font-size: 18px; line-height: 1.6; color: var(--muted); }
.hero-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 34px; }

/* buttons: flat pills */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; line-height: 1.2;
  transition: transform .5s var(--spring), background-color .2s, color .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--accent); color: var(--btn-solid-ink); }
.btn-solid:hover { background: var(--accent-ink); }
.btn-glass { background: var(--btn-flat); color: var(--ink); }
.btn-glass:hover { background: var(--btn-flat-hover); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { padding: 30px 30px 28px; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); }
.card p { color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.card p + p { margin-top: 10px; }
.card .eyebrow { color: var(--faint); }
.card > * { position: relative; z-index: 1; }

.metrics { display: flex; flex-wrap: wrap; gap: 10px 30px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.metrics div { display: flex; flex-direction: column; gap: 3px; }
.metrics dt { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.metrics dd { margin: 0; font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: -.02em; }

/* ---------- mechanics (play once when .is-in) ---------- */
.mech {
  margin-top: 24px; padding: 20px 18px; min-height: 84px;
  display: flex; flex-direction: column; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--g-inset-tint);
  box-shadow: inset 0 1px 2px rgba(16, 27, 34, .10), inset 0 -1px 0 var(--g-inset-rim);
}

/* 1 · Q: the real cart milestone pill from the Reorder design */
.mech-q { background: #F2F8FA; box-shadow: inset 0 1px 2px rgba(16,27,34,.08), inset 0 -1px 0 rgba(255,255,255,.6); }
:root[data-theme="dark"] .mech-q { background: #151C21; box-shadow: inset 0 1px 2px rgba(0,0,0,.5), inset 0 -1px 0 rgba(255,255,255,.05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mech-q { background: #151C21; box-shadow: inset 0 1px 2px rgba(0,0,0,.5), inset 0 -1px 0 rgba(255,255,255,.05); } }
.mech-qbar { align-items: center; gap: 12px; padding: 22px 18px 18px; }
.qbar { width: 100%; max-width: 352px; border-radius: 27px; height: auto; display: block; transform: translateY(18px); opacity: 0; filter: drop-shadow(0 10px 18px rgba(16,27,34,.18)); }
.is-in .qbar { animation: riseup .7s var(--spring) .3s forwards; }
@keyframes riseup { to { transform: none; opacity: 1; } }
@keyframes pop { to { opacity: 1; transform: translateY(0); } }
.qbar-toast {
  font-size: 12.5px; font-weight: 500; color: #0B4F5A; background: #D9F2EC; padding: 6px 12px; border-radius: 999px;
  opacity: 0; transform: translateY(6px);
}
.is-in .qbar-toast { animation: pop .5s var(--spring) 1.4s forwards; }

/* 2 · Q: the real bottom navbar, Reorder tab called out */
.mech-qnav { align-items: center; padding: 20px 18px 18px; }
.qnav-wrap { position: relative; width: 100%; max-width: 365px; }
.qnav { width: 100%; height: auto; display: block; border-radius: 32px; filter: drop-shadow(0 10px 18px rgba(16,27,34,.16)); }
.qnav-ring {
  position: absolute; left: 22.5%; top: 6%; width: 21%; aspect-ratio: 1; border-radius: 50%;
  box-shadow: 0 0 0 2.5px #0F1A21, 0 0 0 7px rgba(15,26,33,.12);
  opacity: 0; transform: scale(.6);
}
.is-in .qnav-ring { animation: ringin .6s var(--spring) .9s forwards; }
@keyframes ringin { to { opacity: 1; transform: scale(1); } }
.qnav-label {
  position: absolute; left: 33%; top: -26px; transform: translate(-50%, 6px);
  font-family: var(--font-hand); font-size: 22px; font-weight: 600; color: var(--marker); white-space: nowrap;
  opacity: 0;
}
.is-in .qnav-label { animation: pop .5s var(--spring) 1.3s forwards; }
:root[data-theme="dark"] .qnav-ring { box-shadow: 0 0 0 2.5px #F2F4F6, 0 0 0 7px rgba(255,255,255,.14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qnav-ring { box-shadow: 0 0 0 2.5px #F2F4F6, 0 0 0 7px rgba(255,255,255,.14); } }

/* 3 · barq: the real cashback wheel + Weekly Mystery Box lockup */
.mech-barq { background: #FBF4EC; box-shadow: inset 0 1px 2px rgba(16,27,34,.08), inset 0 -1px 0 rgba(255,255,255,.6); }
:root[data-theme="dark"] .mech-barq { background: #1A1F24; box-shadow: inset 0 1px 2px rgba(0,0,0,.5), inset 0 -1px 0 rgba(255,255,255,.05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mech-barq { background: #1A1F24; box-shadow: inset 0 1px 2px rgba(0,0,0,.5), inset 0 -1px 0 rgba(255,255,255,.05); } }
.mech-spin { flex-direction: row; align-items: center; gap: 22px; padding: 18px 20px; }
.spin-wrap {
  position: relative; width: 116px; height: 116px; flex: none; border-radius: 50%;
  background: #fff;                                   /* the static white plate from the design */
  box-shadow: 0 1px 2px rgba(16,27,34,.08), 0 10px 20px -10px rgba(16,27,34,.35), inset 0 0 0 1px rgba(16,27,34,.06);
}
.spin-wrap::after { /* the little cyan studs on the plate */
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: radial-gradient(circle, #6FD3E8 1.6px, transparent 2px) 0 0 / 100% 100%;
  background-image:
    radial-gradient(circle at 50% 3%, #6FD3E8 1.8px, transparent 2.4px),
    radial-gradient(circle at 50% 97%, #6FD3E8 1.8px, transparent 2.4px),
    radial-gradient(circle at 3% 50%, #6FD3E8 1.8px, transparent 2.4px),
    radial-gradient(circle at 97% 50%, #6FD3E8 1.8px, transparent 2.4px),
    radial-gradient(circle at 17% 17%, #6FD3E8 1.8px, transparent 2.4px),
    radial-gradient(circle at 83% 17%, #6FD3E8 1.8px, transparent 2.4px),
    radial-gradient(circle at 17% 83%, #6FD3E8 1.8px, transparent 2.4px),
    radial-gradient(circle at 83% 83%, #6FD3E8 1.8px, transparent 2.4px);
  pointer-events: none; z-index: 0;
}
.spin-wheel { position: absolute; left: 9px; top: 9px; width: calc(100% - 18px); height: calc(100% - 18px); display: block; border-radius: 50%; transform: rotate(0deg); z-index: 1; }
.is-in .spin-wheel { animation: spin 3s cubic-bezier(.1, .85, .1, 1) .3s forwards; }
@keyframes spin { to { transform: rotate(1092deg); } }
.spin-pin {
  position: absolute; left: 50%; top: -4px; z-index: 2; width: 0; height: 0; margin-left: -9px;
  border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 14px solid #F5A623; z-index: 3;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}
.spin-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mbox { width: 150px; height: auto; display: block; opacity: 0; transform: translateY(6px); border-radius: 8px; box-shadow: 0 1px 2px rgba(16,27,34,.08), 0 8px 18px -10px rgba(16,27,34,.35); }
.is-in .mbox { animation: pop .5s var(--spring) 3.6s forwards; }
.spin-result { font-size: 12px; color: #0F1A21; background: #FFF3B0; padding: 5px 10px; border-radius: 999px; align-self: flex-start; opacity: 0; transform: translateY(5px); }
.is-in .spin-result { animation: pop .5s var(--spring) 3.3s forwards; }

/* 4 · barq: the real Invite & Earn tile */
.mech-invite { flex-direction: row; align-items: center; gap: 16px; padding: 14px 16px; position: relative; overflow: hidden; }
.invite-illo { width: 92px; height: auto; flex: none; border-radius: 12px; transform: translateX(-12px); opacity: 0; }
.is-in .invite-illo { animation: slidein .6s var(--spring) .2s forwards; }
@keyframes slidein { to { transform: none; opacity: 1; } }
.invite-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.invite-title { font-weight: 600; font-size: 15px; color: #0F1A21; }
.invite-sub { font-size: 12.5px; color: #4A5A64; line-height: 1.35; }
.invite-count { font-size: 12px; color: #0F1A21; margin-top: 4px; }
.invite-count b { font-weight: 600; }
:root[data-theme="dark"] .invite-title, :root[data-theme="dark"] .invite-count { color: #F2F4F6; }
:root[data-theme="dark"] .invite-sub { color: #A9B1B8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .invite-title, :root:not([data-theme="light"]) .invite-count { color: #F2F4F6; } :root:not([data-theme="light"]) .invite-sub { color: #A9B1B8; } }
.invite-bag { position: absolute; right: 16px; bottom: 6px; width: 46px; height: auto; transform: translateY(24px) rotate(-8deg); opacity: 0; }
.is-in .invite-bag { animation: bagup .6s var(--spring) 1.9s forwards; }
@keyframes bagup { to { transform: none; opacity: 1; } }

/* ---------- also shipped: sticky notes ---------- */
.ledger-wrap { margin-top: 64px; }
.stickies {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 18px;
  margin-top: 28px; padding: 6px 4px;
}
.sticky {
  position: relative; min-height: 168px; padding: 18px 16px 16px;
  background: var(--sn-yellow); color: #16211C;
  border-radius: 3px 3px 4px 3px;
  box-shadow: 0 1px 1px rgba(16,27,34,.05), 0 12px 24px -14px rgba(16,27,34,.3);
  transform: rotate(var(--r, 0deg));
  transition: transform .5s var(--spring), box-shadow .3s;
  display: flex; flex-direction: column; gap: 8px;
}
.sticky::before { /* tape */
  content: ""; position: absolute; top: -9px; left: 50%; width: 48px; height: 16px; margin-left: -24px;
  background: rgba(255,255,255,.55); border: 1px solid rgba(16,27,34,.08);
  transform: rotate(-2deg); border-radius: 2px;
}
.sticky:hover { transform: rotate(0deg) translateY(-4px) scale(1.03); box-shadow: 0 2px 2px rgba(16,27,34,.06), 0 18px 30px -14px rgba(16,27,34,.4); z-index: 2; }
.sticky:nth-child(5n+1) { --r: -2.2deg; background: var(--sn-yellow); }
.sticky:nth-child(5n+2) { --r: 1.6deg;  background: var(--sn-blue); }
.sticky:nth-child(5n+3) { --r: -1.2deg; background: var(--sn-lilac); }
.sticky:nth-child(5n+4) { --r: 2.4deg;  background: var(--sn-lime); }
.sticky:nth-child(5n+5) { --r: -1.8deg; background: var(--sn-yellow); }
.sticky:nth-child(10n+7) { background: var(--sn-lilac); }
.sticky:nth-child(10n+8) { background: var(--sn-blue); }
.sticky-where { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; opacity: .75; display: inline-flex; align-items: center; gap: 6px; }
.sticky-where img { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; display: block; }
.sticky p { font-size: 13.5px; line-height: 1.4; color: #16211C; flex: 1; }
.sticky-result { font-size: 21px; line-height: 1.05; color: #0F1A21; }
:root[data-theme="dark"] .sticky, :root[data-theme="dark"] .sticky p, :root[data-theme="dark"] .sticky-result { color: #0F1A21; }

/* ---------- timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 14px; position: relative; padding-left: 40px; }
.timeline::before {
  content: ""; position: absolute; left: 13px; top: 30px; bottom: 34px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--line));
  border-radius: 2px;
}
.tl-item { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 24px 28px; overflow: visible; }
.tl-item .tl-dot {
  position: absolute; left: -46px; top: 22px; width: 40px; height: 40px; border-radius: 12px;
  background: #fff; box-shadow: 0 0 0 4px var(--ground), 0 0 0 5px var(--line), 0 6px 14px -8px rgba(16,27,34,.4);
  display: grid; place-items: center; overflow: hidden; z-index: 2;
}
.tl-item .tl-dot img { width: 40px; height: 40px; object-fit: cover; display: block; }
.tl-inline-logo { display: inline-block; vertical-align: -3px; border-radius: 5px; margin-left: 4px; }
.tl-item > *:not(.tl-dot) { position: relative; z-index: 1; }
.tl-when { font-size: 12.5px; color: var(--faint); padding-top: 6px; }
.tl-body .h3 { font-size: 19px; margin-bottom: 4px; }
.tl-sub { font-size: 13px; color: var(--faint); margin-bottom: 10px; }
.tl-body p:not(.tl-sub) { color: var(--muted); font-size: 15px; }
.tools { margin-top: 30px; font-size: 12.5px; color: var(--muted); padding-left: 40px; }
.tools-label { color: var(--faint); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; margin-right: 14px; }

/* ---------- writing ---------- */
.posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.post {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title arrow" "sub arrow";
  gap: 4px 16px; padding: 22px 24px; height: 100%;
  grid-template-areas: "title arrow" "sub arrow" "meta arrow";
}
.post-meta { grid-area: meta; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 8px; }
.post > * { position: relative; z-index: 1; }
.post:hover { transform: translateY(-3px); }
.post-title { grid-area: title; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.015em; }
.post-sub { grid-area: sub; color: var(--muted); font-size: 14px; }
.post-arrow {
  grid-area: arrow; align-self: center; color: var(--faint); font-size: 18px;
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: var(--g-inset-tint);
  transition: transform .5s var(--spring), color .3s, background-color .3s;
}
.post:hover .post-arrow { transform: translateX(3px); color: var(--btn-solid-ink); background: var(--accent); }

/* ---------- contact ---------- */
.contact { padding-bottom: 40px; }
.contact-card { padding: 48px 44px; }
.contact-card > * { position: relative; z-index: 1; }
.contact-card .hero-links { margin-top: 28px; }
.foot {
  max-width: var(--max); margin: 0 auto; padding: 20px 24px 40px;
  display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--faint);
  border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px;
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(16px) scale(.985);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.is-in { opacity: 1; transform: none; }
.glass.reveal.is-in { transition: opacity var(--dur) var(--ease), transform .5s var(--spring), background .45s var(--ease), box-shadow .45s var(--ease); }
.card.reveal.is-in:hover, .post.reveal.is-in:hover { transform: translateY(-3px); }


/* ---------- brain-dump layer: marker, handwriting, doodles ---------- */
.hand {
  font-family: var(--font-hand); font-weight: 600; font-size: 26px; line-height: 1;
  color: var(--marker); letter-spacing: 0;
}
.doodle { color: var(--marker); display: inline-block; vertical-align: middle; overflow: visible; }
.hl {
  color: var(--ink);
  background: linear-gradient(104deg, transparent .6%, var(--hl) 2%, var(--hl) 97%, transparent 99%);
  border-radius: .35em .15em .5em .2em;
  padding: 0 .12em; margin: 0 -.12em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero { position: relative; }
.hero-hand { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; transform: rotate(-4deg) translateY(-6px); }
.hero-hand .doodle { transform: translateY(-8px) scaleX(-1) rotate(20deg); }
/* hero cluster: taped polaroid of me, with two notes and a sticker on its corners */
.hero-cluster { position: absolute; right: -20px; top: 50%; width: 420px; height: 480px; transform: translateY(-64%); }
.polaroid-me {
  position: absolute; left: 110px; top: 30px; width: 290px; margin: 0; padding: 12px 12px 14px;
  background: #fff; border-radius: 10px; transform: rotate(-3deg);
  box-shadow: 0 1px 2px rgba(16,27,34,.08), 0 30px 50px -28px rgba(16,27,34,.5), 0 0 0 1px rgba(16,27,34,.06);
  transition: transform .5s var(--spring);
}
.polaroid-me::before { /* tape */
  content: ""; position: absolute; top: -13px; left: 50%; width: 84px; height: 24px; margin-left: -42px;
  background: rgba(255,255,255,.62); border: 1px solid rgba(16,27,34,.10); border-radius: 2px; transform: rotate(2deg);
}
.polaroid-me img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.polaroid-me figcaption { font-size: 26px; line-height: 1; padding: 12px 6px 0; color: #0F1A21; text-align: right; }
.hero-cluster:hover .polaroid-me { transform: rotate(-1deg) translateY(-4px); }
:root[data-theme="dark"] .polaroid-me { background: #1B2025; box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 30px 50px -28px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08); }
:root[data-theme="dark"] .polaroid-me figcaption { color: #F2F4F6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .polaroid-me { background: #1B2025; box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 30px 50px -28px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08); }
  :root:not([data-theme="light"]) .polaroid-me figcaption { color: #F2F4F6; }
}
.c-note { position: absolute; min-height: 0; padding: 12px 14px 12px; gap: 5px; width: 190px; z-index: 2; }
.c-note .hand { font-size: 22px; line-height: 1.02; color: #0F1A21; }
.hero-cluster .c-1 { left: 10px; top: 250px; --r: -6deg; background: var(--sn-yellow); animation: bob 9s ease-in-out infinite; }
.hero-cluster .c-2 { left: 40px; top: 388px; --r: 3deg; background: var(--sn-blue); width: 210px; animation: bob 11s ease-in-out infinite reverse; }
.c-face { position: absolute; left: 372px; top: 6px; transform: rotate(12deg); z-index: 3; }
@keyframes bob { 50% { translate: 0 -4px; } }
.doodle-spark { position: absolute; left: -64px; top: 24%; transform: rotate(-20deg); }
.section-head { position: relative; }
.note-work { position: absolute; left: 105%; top: 38px; white-space: nowrap; transform: rotate(-3deg); display: inline-flex; align-items: center; gap: 6px; }
.doodle-down { transform: translateY(6px) rotate(62deg); }
.note-work .doodle { transform: translateY(8px) rotate(62deg); }
.doodle-scribble { position: absolute; right: -40%; top: -20px; transform: rotate(-6deg); opacity: .9; }
.note-writing { position: absolute; left: 104%; top: 44px; white-space: nowrap; transform: rotate(-5deg); }
.doodle-bubble { position: absolute; right: -10px; top: -30px; transform: rotate(8deg); }
.contact-card { overflow: visible; }
.sticker {
  position: absolute; top: -16px; right: -12px; z-index: 3;
  transform: rotate(var(--sr, 8deg));
  color: var(--marker);
  filter: drop-shadow(0 4px 6px rgba(16,27,34,.18));
  transition: transform .5s var(--spring);
}
.card:hover .sticker { transform: rotate(calc(var(--sr, 8deg) - 14deg)) scale(1.08); }
.card:nth-child(2) .sticker { --sr: -8deg; }
.card:nth-child(3) .sticker { --sr: 12deg; }
.card:nth-child(4) .sticker { --sr: -5deg; }
.card { overflow: visible; }
.cards { padding-top: 10px; }

/* ---------- barq screens: taped polaroids ---------- */
.shots-wrap { margin-top: 64px; }
.shots-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.shots-head .eyebrow { margin-bottom: 0; }
.note-shots { display: inline-flex; align-items: center; gap: 6px; transform: rotate(-3deg) translateY(-2px); font-size: 24px; }
.note-shots .doodle { transform: translateY(8px) rotate(58deg); }
.shots {
  display: flex; gap: 26px; margin-top: 26px; padding: 26px 8px 22px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.shots::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 auto; width: 236px; scroll-snap-align: start; transform: rotate(var(--r, 0deg)); transition: transform .5s var(--spring); }
.shot:hover { transform: rotate(0deg) translateY(-6px); z-index: 2; }
.shot figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.phone, .polaroid {
  position: relative; background: #fff; padding: 10px; border-radius: 30px;
  box-shadow: 0 1px 2px rgba(16,27,34,.08), 0 22px 40px -22px rgba(16,27,34,.45), 0 0 0 1px rgba(16,27,34,.06);
}
.polaroid { border-radius: 14px; padding: 10px 10px 12px; }
.phone-screen { overflow: hidden; border-radius: 22px; aspect-ratio: 430 / 932; }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); }
.polaroid img { display: block; width: 100%; height: auto; border-radius: 8px; }
.phone::before, .polaroid::before { /* tape */
  content: ""; position: absolute; top: -12px; left: 50%; width: 64px; height: 20px; margin-left: -32px;
  background: rgba(255,255,255,.6); border: 1px solid rgba(16,27,34,.10);
  transform: rotate(var(--t, -3deg)); border-radius: 2px; z-index: 2;
}
.shot:nth-child(even) .phone::before { --t: 3deg; }
.shot figcaption { font-size: 21px; line-height: 1.05; padding: 0 6px; }
.shot-card { align-self: center; width: 250px; }
.shot-wide { width: 420px; }
:root[data-theme="dark"] .phone, :root[data-theme="dark"] .polaroid { background: #1B252B; box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 22px 40px -22px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phone, :root:not([data-theme="light"]) .polaroid { background: #1B252B; box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 22px 40px -22px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08); } }

/* lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .hero-cluster { display: none; } }
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .stickies { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .note-work, .note-writing, .hero-cluster, .doodle-scribble, .doodle-spark { display: none; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
  .tl-when { padding-top: 0; }
}
@media (max-width: 600px) {
  main { padding: 0 16px; }
  .top { padding: 10px 10px 0; }
  .top { padding: 10px 12px 0; }
  .nav { gap: 4px; padding: 7px 7px 7px 16px; width: 100%; }
  .nav-name { flex: 1; font-size: 14.5px; }
  .menu { display: flex; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px);
    display: flex; flex-direction: column; gap: 2px; padding: 8px;
    border-radius: 22px; background: var(--ground);
    box-shadow: 0 0 0 1px var(--line), 0 18px 40px -22px rgba(16,27,34,.4);
    opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
    transition: opacity .25s var(--ease), transform .35s var(--spring);
  }
  .nav.is-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 11px 14px; font-size: 15px; border-radius: 14px; }
  .nav-links a.is-active { background: var(--accent-soft); }
  .section { padding: 76px 0 12px; }
  .hero { padding: 44px 0 32px; }
  .display { font-size: clamp(30px, 8.6vw, 44px); max-width: none; }
  .lede { font-size: 16.5px; }
  .card { padding: 24px 22px 22px; }
  .posts { grid-template-columns: 1fr; }
  .contact-card { padding: 34px 26px; }
  .foot { flex-direction: column; gap: 6px; }
  .metrics { gap: 8px 22px; }
  .metrics dd { font-size: 19px; }
  .timeline { padding-left: 0; }
  .timeline::before { display: none; }
  .tl-item .tl-dot { position: static; margin-bottom: 10px; box-shadow: 0 0 0 1px var(--line); }
  .tools { padding-left: 0; }
  .stickies { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .shot { width: 200px; }
  .shots { gap: 18px; margin-left: -16px; margin-right: -16px; padding-left: 20px; padding-right: 20px; }
  .note-shots { display: none; }
  .sticky { min-height: 150px; padding: 16px 14px 14px; }
  .sticky-result { font-size: 19px; }
  .sticker { width: 46px; height: 46px; top: -12px; right: -6px; }
  .doodle-bubble { width: 60px; height: 54px; right: 4px; top: -22px; }
  .hero-hand { display: none; }
}
@media (hover: none) { .glass::before { opacity: .45; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob { animation: none !important; }
  .c-note { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .is-in .qbar, .is-in .qbar-toast, .is-in .qnav-ring, .is-in .qnav-label, .is-in .spin-wheel,
  .is-in .mbox, .is-in .spin-result, .is-in .invite-illo, .is-in .invite-bag { animation: none !important; }
  .is-in .qbar, .is-in .qbar-toast, .is-in .qnav-ring, .is-in .qnav-label,
  .is-in .mbox, .is-in .spin-result, .is-in .invite-illo, .is-in .invite-bag { opacity: 1; transform: none; }
  .is-in .spin-wheel { transform: rotate(1092deg); }
  .rail-stroke, .btn, .card, .post, .post-arrow, .glass, .theme, .sticky, .sticker, .shot { transition: none; }
}
