/* =====================================================================
   CodingJist / Aditya Patel - calm, minimal theme
   One solid background colour, one accent colour, quiet motion.
   Fonts: Space Grotesk (headings), Inter (body), JetBrains Mono (labels)
   ===================================================================== */

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --maxw: 1080px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --yt: #d6102b;
}

/* Accent palette: dark >= 7:1, light >= 5.5:1 on every surface. Orange = CodingJist logo dot; default. */
[data-accent="orange"]    { --accent-d: #ff8a3d; --accent-l: #a8380a; }
[data-accent="amber"]     { --accent-d: #f5b83d; --accent-l: #7f4a00; }
[data-accent="rose"]      { --accent-d: #ff6b81; --accent-l: #a8173a; }
[data-accent="violet"]    { --accent-d: #a78bfa; --accent-l: #5b21b6; }
[data-accent="sky"]       { --accent-d: #38bdf8; --accent-l: #075985; }
[data-accent="emerald"]   { --accent-d: #34d399; --accent-l: #065f46; }

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c10;
  --surface: #141419;
  --surface-2: #1c1c23;
  --border: #272730;
  --text: #b8b8c4;
  --heading: #f1f1f4;
  --muted: #80808f;
  --accent: var(--accent-d);
  --on-accent: #121216;
  --warn: #f5b83d;
  --danger: #ff6b81;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-2: #edede8;
  --border: #d4d4cc;
  --text: #2a2a32;
  --heading: #0e0e13;
  --muted: #4f4f5a;
  --accent: var(--accent-l);
  --on-accent: #ffffff;
  --warn: #8a4f00;
  --danger: #b4123a;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.theme-transition, .theme-transition *, .theme-transition *::before, .theme-transition *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease !important;
}

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

h1, h2, h3 { font-family: var(--font-head); color: var(--heading); line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; }
h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.4; }

p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--heading); }
a[data-off-href] { color: inherit; } /* links to hidden pages read as plain text */
img { max-width: 100%; display: block; }
code, kbd { font-family: var(--mono); font-size: .85em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.accent { color: var(--accent); }

.skip-link {
  position: fixed; left: 1rem; top: -60px; z-index: 200;
  padding: .5rem 1rem; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; color: var(--on-accent); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
  view-transition-name: topbar;
}
.is-scrolled .topbar { border-bottom-color: var(--border); }
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: var(--heading);
}
.brand:hover { color: var(--heading); }
.brand img { border-radius: 50%; }

.site-nav { position: relative; display: flex; gap: 2px; margin: 0 auto; }
.site-nav a {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 8px;
  color: var(--muted); font-weight: 500; font-size: .93rem; white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active { color: var(--heading); }
/* pages.json decides which pages show; keep the links invisible until it's applied (no flash of the full list) */
.site-nav a { transition: color .2s, opacity .25s; }
.js .site-nav:not(.is-ready) a[data-page] { opacity: 0; }
.nav-icon { display: inline-flex; }
.nav-glider {
  position: absolute; z-index: 0; top: 0; left: 0; height: 100%;
  border-radius: 8px; background: var(--surface-2);
  opacity: 0;
  transition: transform .35s var(--ease), width .35s var(--ease), opacity .2s;
}

.controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--heading);
  transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--muted); }
.cmdk-btn kbd { font-size: .7rem; color: var(--muted); }

.accent-picker { position: relative; }
.accent-btn .dot, .accent-menu .dot { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.accent-menu button .dot { width: 20px; height: 20px; }
[data-theme="dark"] :is(.accent-menu, .cmdk) [data-accent="orange"] .dot { background: #ff8a3d; }
[data-theme="dark"] :is(.accent-menu, .cmdk) [data-accent="amber"] .dot { background: #f5b83d; }
[data-theme="dark"] :is(.accent-menu, .cmdk) [data-accent="rose"] .dot { background: #ff6b81; }
[data-theme="dark"] :is(.accent-menu, .cmdk) [data-accent="violet"] .dot { background: #a78bfa; }
[data-theme="dark"] :is(.accent-menu, .cmdk) [data-accent="sky"] .dot { background: #38bdf8; }
[data-theme="dark"] :is(.accent-menu, .cmdk) [data-accent="emerald"] .dot { background: #34d399; }
[data-theme="light"] :is(.accent-menu, .cmdk) [data-accent="orange"] .dot { background: #a8380a; }
[data-theme="light"] :is(.accent-menu, .cmdk) [data-accent="amber"] .dot { background: #7f4a00; }
[data-theme="light"] :is(.accent-menu, .cmdk) [data-accent="rose"] .dot { background: #a8173a; }
[data-theme="light"] :is(.accent-menu, .cmdk) [data-accent="violet"] .dot { background: #5b21b6; }
[data-theme="light"] :is(.accent-menu, .cmdk) [data-accent="sky"] .dot { background: #075985; }
[data-theme="light"] :is(.accent-menu, .cmdk) [data-accent="emerald"] .dot { background: #065f46; }
.accent-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 10;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  padding: 8px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .35);
}
.accent-menu[hidden] { display: none; }
.accent-menu button {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 2px solid transparent; border-radius: 50%; background: none; padding: 0;
}
.accent-menu button[aria-pressed="true"] { border-color: var(--heading); }

.theme-toggle { border: 0; background: none; padding: 0; }
.toggle-track {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  width: 58px; height: 32px; padding: 0 8px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted);
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent);
  transition: transform .3s var(--ease);
}
.theme-toggle[aria-checked="true"] .toggle-thumb { transform: translateX(26px); }
.toggle-icon { position: relative; z-index: 1; }

.nav-toggle { display: none; }
.burger { position: relative; width: 16px; height: 10px; }
.burger span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.burger span:first-child { top: 0; }
.burger span:last-child { top: 8px; }
.nav-toggle[aria-expanded="true"] .burger span:first-child { top: 4px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger span:last-child { top: 4px; transform: rotate(-45deg); }

/* ---------- Layout ---------- */
.main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.kicker {
  display: block; min-height: 1.4em; margin-bottom: .6rem;
  font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
}
.section-desc { color: var(--muted); max-width: 60ch; margin-bottom: 1.8rem; }
.page-head { padding: 64px 0 0; }
.page-head h1 { margin-bottom: .7rem; }
.subtitle { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.text-link { font-weight: 600; font-size: .95rem; white-space: nowrap; }
.text-link span { display: inline-block; transition: transform .2s var(--ease); }
.text-link:hover span { transform: translateX(3px); }

/* ---------- Buttons ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 1.6rem; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--heading); font-weight: 600; font-size: .95rem;
  transition: border-color .2s, background-color .2s, color .2s, transform .2s var(--ease);
}
.btn:hover { color: var(--heading); border-color: var(--muted); transform: translateY(-1px); }
.btn-yt { background: var(--yt); border-color: var(--yt); color: #fff; }
.btn-yt:hover { color: #fff; border-color: #b80d24; background: #b80d24; }
.btn.is-disabled { opacity: .45; pointer-events: none; }

/* ---------- Cards ---------- */
.card {
  position: relative; display: block;
  padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text);
  transition: border-color .2s, transform .25s var(--ease);
}
a.card:hover { color: var(--text); border-color: var(--muted); transform: translateY(-2px); }
.card h3 { margin-bottom: .45rem; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.card-label { display: inline-block; margin-bottom: .7rem; font-family: var(--mono); font-size: .74rem; color: var(--accent); }

/* ---------- Icons (Lucide line icons from assets/js/icons.js) ---------- */
.ico { display: inline-block; flex-shrink: 0; vertical-align: -.14em; overflow: visible; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
/* accent tile: one shape and colour for every feature icon */
.ico-tile {
  --tile: 44px;
  width: var(--tile); height: var(--tile); flex-shrink: 0;
  border-radius: calc(var(--tile) * .3); font-size: calc(var(--tile) * .5);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  transition: background-color .25s, border-color .25s, color .25s;
}
.ico-tile.is-text { color: var(--heading); background: var(--surface-2); border-color: transparent; }
.inline-ico { color: var(--accent); }

/* icons draw themselves in when their section reveals */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal [data-icon] .ico > * { stroke-dasharray: 1 1.5; stroke-dashoffset: 1.25; opacity: 0; }
  .js .reveal.is-in [data-icon] .ico > * {
    stroke-dashoffset: 0; opacity: 1;
    transition: stroke-dashoffset 1.1s var(--ease) calc(var(--d, 0s) + var(--dd, .25s)), opacity .15s linear calc(var(--d, 0s) + var(--dd, .25s));
  }
  .js .reveal.is-in [data-icon] .ico > :nth-child(2) { --dd: .4s; }
  .js .reveal.is-in [data-icon] .ico > :nth-child(3) { --dd: .55s; }
  .js .reveal.is-in [data-icon] .ico > :nth-child(n + 4) { --dd: .7s; }

  /* small, icon-specific hover moves */
  :is(.quirk, .post, .twist-opt:not(:disabled), .achievements li, .teasers a, .jist-perks li):hover [data-icon] .ico { animation: ico-nudge .6s var(--ease); }
  :is(.quirk, .post, .teasers a):hover [data-icon="plane"] .ico,
  :is(.quirk, .post, .teasers a):hover [data-icon="rocket"] .ico { animation: ico-fly .9s var(--ease); }
  :is(.quirk, .post):hover [data-icon="sprout"] .ico { animation: ico-grow .8s var(--ease); transform-origin: 50% 100%; }
  :is(.quirk, .achievements li, .teasers a, .post):hover :is([data-icon="party-popper"], [data-icon="trophy"], [data-icon="thumbs-up"]) .ico { animation: ico-party .7s var(--ease); }
  :is(.post, .jist-perks li):hover [data-icon="zap"] .ico { animation: ico-flicker .6s linear; }
  :is(.post, .twist-opt:not(:disabled)):hover [data-icon="database"] .ico,
  :is(.post, .jist-perks li):hover [data-icon="server-cog"] .ico { animation: ico-stack .6s var(--ease); }
}
@keyframes ico-nudge { 40% { scale: 1.14; rotate: -8deg; } 100% { scale: 1; rotate: 0deg; } }
@keyframes ico-fly { 45% { translate: 6px -6px; opacity: 0; } 46% { translate: -6px 6px; opacity: 0; } 100% { translate: 0 0; opacity: 1; } }
@keyframes ico-grow { 0% { scale: 1; } 35% { scale: 1 .75; } 70% { scale: 1 1.12; } 100% { scale: 1; } }
@keyframes ico-party { 25% { rotate: -14deg; scale: 1.12; } 50% { rotate: 12deg; } 75% { rotate: -6deg; } 100% { rotate: 0deg; scale: 1; } }
@keyframes ico-flicker { 20%, 60% { opacity: .25; } 40%, 80%, 100% { opacity: 1; } }
@keyframes ico-stack { 30% { translate: 0 -3px; } 60% { translate: 0 1px; } 100% { translate: 0 0; } }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; translate: 0 16px; }
.js .reveal.is-in {
  opacity: 1; translate: 0 0;
  /* staggered reveal; hover properties keep their own (undelayed) timing */
  transition:
    opacity .7s var(--ease) var(--d, 0s), translate .7s var(--ease) var(--d, 0s),
    scale .7s var(--ease) var(--d, 0s), clip-path .9s var(--ease) var(--d, 0s),
    transform .25s var(--ease), border-color .2s, background-color .2s, color .2s;
}
/* headings wipe up from a mask */
/* (not fully clipped: IntersectionObserver ignores elements with zero visible area) */
.js h1.reveal, .js h2.reveal { clip-path: inset(0 0 75% 0); translate: 0 .45em; }
.js h1.reveal.is-in, .js h2.reveal.is-in { clip-path: inset(-.25em -.25em -.35em -.25em); translate: 0 0; }
/* cards settle in */
.js .card.reveal, .js .playlist-card.reveal, .js .video-placeholder.reveal { scale: .96; }
.js .card.reveal.is-in, .js .playlist-card.reveal.is-in, .js .video-placeholder.reveal.is-in { scale: 1; }
.js .playlist-card.reveal .playlist-thumb img { scale: 1.14; transition: scale 1.4s var(--ease), transform .5s var(--ease); }
.js .playlist-card.reveal.is-in .playlist-thumb img { scale: 1; }

/* ---------- Cursor: glowing border that follows the pointer ---------- */
.card, .social-list-buttons .social, .playlist-card, .board { --mx: -999px; --my: -999px; }
.card::after, .social-list-buttons .social::after, .playlist-card::after, .board::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx) var(--my), var(--accent), transparent 70%);
  -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);
  opacity: 0; transition: opacity .35s;
}
.card:hover::after, .social-list-buttons .social:hover::after, .playlist-card:hover::after, .board:hover::after { opacity: 1; }
.social-list-buttons .social { position: relative; }
.btn { transition: border-color .2s, background-color .2s, color .2s, transform .2s var(--ease), translate .35s var(--ease); }

/* ---------- Cursor: data trail + click ping (canvas) ---------- */
.cursor-trail { position: fixed; inset: 0; z-index: 300; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Scroll: progress line under the top bar ---------- */
.topbar::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
}

/* ---------- Scroll: section rail ---------- */
/* >= 1380px: dots + labels in the left margin. 720-1379px: compact dots in a small left gutter with one
   vertical label under them (current section, or the hovered dot), so it never covers page text. Hidden on phones. */
.rail { display: none; }
@media (min-width: 720px) {
  .rail {
    display: block; position: fixed; z-index: 40; top: 50%; translate: 0 -50%;
    left: max(10px, calc((100vw - var(--maxw)) / 2 - 22px));
  }
}
@media (min-width: 1380px) {
  .rail { left: max(14px, calc((100vw - var(--maxw)) / 2 - 124px)); }
}
@media (max-height: 519px) { .rail { display: none; } }
.rail ol { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--gap, 30px); }
.rail-track, .rail-fill { position: absolute; left: 5px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--border); }
.rail-fill { background: var(--accent); transform-origin: top; transform: scaleY(var(--fill, 0)); }
.rail-packet {
  position: absolute; left: 2px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  top: calc(7px + var(--fill, 0) * (100% - 14px));
  background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 12px var(--accent);
}
.rail a {
  position: relative; display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap;
}
.rail a::before {
  content: ""; flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border);
  transition: background-color .3s, border-color .3s, scale .3s var(--ease);
}
.rail a.is-past::before { border-color: var(--accent); }
.rail a.is-active::before { background: var(--accent); border-color: var(--accent); scale: 1.15; }
.rail a:hover::before, .rail a:focus-visible::before { border-color: var(--accent); scale: 1.3; }
.rail a span { opacity: 0; translate: -6px 0; transition: opacity .25s, translate .3s var(--ease); }
.rail:hover a span, .rail a.is-active span, .rail a:focus-visible span { opacity: 1; translate: 0 0; }
.rail a.is-active, .rail a:hover, .rail a:focus-visible { color: var(--accent); }
.rail-now { display: none; }
@media (min-width: 720px) and (max-width: 1379.98px) {
  /* make room for the rail when the side margin is too small */
  .js .main, .js .topbar-inner { padding-left: max(24px, calc(48px - max(0px, (100vw - var(--maxw)) / 2))); }
  .rail ol { gap: min(var(--gap, 30px), 24px); }
  .rail a { padding: 7px; margin: -7px; } /* bigger hover/tap target, same layout */
  .rail a span { display: none; }
  .rail-now {
    display: block; position: absolute; left: 0; top: calc(100% + 16px); width: 12px;
    writing-mode: vertical-rl; line-height: 12px; white-space: nowrap; pointer-events: none;
    font-family: var(--mono); font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em;
    color: var(--accent);
  }
  .rail-now.is-swap { animation: rail-now-in .45s var(--ease); }
}
@keyframes rail-now-in { from { opacity: 0; translate: 0 -8px; } }

/* ---------- Scroll: gentle parallax on the header diagrams ---------- */
.hero .board, .head-grid .board { transform: translateY(calc(var(--sy, 0) * .06px)); }

/* ---------- Home hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 44px; align-items: center; padding: 64px 0 24px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 1.2rem;
  font-family: var(--mono); font-size: .8rem; color: var(--muted);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yt); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero h1 { margin-bottom: 1.2rem; font-size: clamp(2.1rem, 4vw, 3.1rem); }
.lead { font-size: 1.12rem; max-width: 54ch; }
.lead strong { color: var(--heading); font-weight: 600; }
.hero-side { min-width: 0; }

/* ---------- Animated diagrams (assets/js/boards.js) ---------- */
.board {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
}
html:not(.js) .board:empty { display: none; }
/* reserve the diagram's space before boards.js draws it, so content below doesn't jump */
.js .board[data-board]:empty { aspect-ratio: 1.525; }
.js .board[data-board="rag"]:empty { aspect-ratio: 1.38; }
.js .board[data-board="cicd"]:empty { aspect-ratio: 1.83; }
.js .board[data-board="pubsub"]:empty { aspect-ratio: 1.57; }
.board canvas { display: block; width: 100%; height: auto; touch-action: manipulation; }
.board-ui {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 10px 12px; border-top: 1px solid var(--border);
}
.board-progress {
  position: absolute; left: 0; top: -1px; width: 100%; height: 2px;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}
.board-cap { flex: 1 1 220px; margin: 0; font-family: var(--mono); font-size: .76rem; color: var(--muted); line-height: 1.5; }
.board-chapters { display: flex; flex-wrap: wrap; gap: 4px; }
.board-chapters button {
  padding: 3px 9px; border-radius: 6px; border: 1px solid var(--border); background: none;
  font-family: var(--mono); font-size: .7rem; color: var(--muted);
  transition: color .2s, border-color .2s;
}
.board-chapters button:hover { color: var(--heading); }
.board-chapters button[aria-current="true"] { color: var(--heading); border-color: var(--accent); }
.board-play {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0; flex-shrink: 0;
  border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--heading);
}
.board-play:hover { border-color: var(--muted); }
.board-tip {
  position: absolute; z-index: 2; max-width: 220px; padding: 8px 11px; border-radius: 8px;
  background: var(--heading); color: var(--bg); font-size: .8rem; line-height: 1.45; pointer-events: none;
}
.board-tip[hidden] { display: none; }
.board-tip strong { display: block; font-weight: 600; }

.head-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; }

/* ---------- Feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px;
  border-radius: 10px; background: var(--surface-2); font-size: 1.35rem;
}

/* ---------- Why subscribe: flip-to-reveal "Jist" cards ---------- */
.nowrap { white-space: nowrap; }
.jist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* reserve space while jists.json loads so the page below doesn't jump */
.js .jist-grid:empty { min-height: 476px; }
html:not(.js) .jist-grid:empty { display: none; }
.jist-grid.is-leaving .jist-card { opacity: 0; scale: .94; transition: opacity .25s ease, scale .28s var(--ease); }
.jist-shuffle svg { transition: rotate .6s var(--ease); }
.jist-shuffle.is-spinning svg { rotate: 360deg; }
.jists .section-head { align-items: center; }
.jist-card { perspective: 1400px; }
.jist-inner { display: grid; height: 100%; transform-style: preserve-3d; transition: transform .75s var(--ease); }
.jist-face {
  grid-area: 1 / 1; display: flex; flex-direction: column; gap: 12px; min-height: 230px; padding: 24px 26px;
  -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden;
}
.jist-back { transform: rotateY(180deg); background: var(--surface-2); }
.jist-card.is-open .jist-inner { transform: rotateY(180deg); }
.jist-front { cursor: pointer; }
.jist-front:hover { border-color: var(--muted); }
.jist-tag {
  align-self: flex-start; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--border);
  font-family: var(--mono); font-size: .72rem; color: var(--muted); background: var(--bg);
}
.jist-tag-on { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.jist-q { position: relative; z-index: 1; max-width: 26ch; font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.3; margin: 0; }
.jist-q em { font-style: normal; color: var(--accent); }
.jist-mark {
  position: absolute; right: 22px; top: 62px; z-index: 0; pointer-events: none;
  font-family: var(--font-head); font-weight: 700; font-size: 7rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--border);
  transition: -webkit-text-stroke-color .3s, rotate .5s var(--ease), translate .5s var(--ease);
}
.jist-front:hover .jist-mark { -webkit-text-stroke-color: var(--accent); rotate: 12deg; translate: 0 -6px; }
.jist-flip, .jist-unflip {
  display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none;
  font-weight: 600; font-size: .95rem; color: var(--accent);
}
.jist-flip { position: relative; z-index: 1; }
.jist-flip-ico { font-size: 1.05em; transition: rotate .5s var(--ease); }
.jist-front:hover .jist-flip-ico { rotate: 180deg; }
.jist-back .jist-a { margin: 0; color: var(--text); font-size: 1rem; line-height: 1.6; }
.jist-a strong { color: var(--heading); }
.jist-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.jist-unflip { gap: 6px; color: var(--muted); font-size: .85rem; font-weight: 500; }
.jist-unflip:hover, .jist-flip:hover { color: var(--heading); }

/* 30-second challenge clock on each question card */
.jist-card { --left: 1; --jt: var(--muted); }
.jist-card[data-phase="calm"], .jist-card[data-phase="done"] { --jt: var(--accent); }
.jist-card[data-phase="warm"] { --jt: var(--warn); }
.jist-card[data-phase="hot"], .jist-card[data-phase="over"] { --jt: var(--danger); }
.jist-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jist-foot { position: relative; z-index: 1; margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.jist-timer { position: relative; flex-shrink: 0; width: 42px; height: 42px; }
.jist-timer svg { width: 100%; height: 100%; rotate: -90deg; }
.jt-track, .jt-bar { fill: none; stroke-width: 3; }
.jt-track { stroke: var(--border); }
.jt-bar {
  stroke: var(--jt); stroke-linecap: round;
  stroke-dasharray: 100.53; stroke-dashoffset: calc(100.53 * (1 - var(--left)));
  transition: stroke .4s;
}
.jt-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: .82rem; font-weight: 600; color: var(--jt);
  font-variant-numeric: tabular-nums; transition: color .4s;
}
.jist-mood { font-family: var(--mono); font-size: .74rem; color: var(--jt); transition: color .4s; }
.jist-fuse {
  position: absolute; left: 0; bottom: 0; z-index: 2; width: 100%; height: 3px;
  background: var(--jt); transform-origin: 0 50%; transform: scaleX(var(--left));
  opacity: 0; transition: opacity .3s, background-color .4s;
}
.jist-card:not([data-phase="idle"]) .jist-fuse { opacity: 1; }
.jist-card:not([data-phase="idle"]) .jist-mark { -webkit-text-stroke-color: var(--jt); }
.jist-front { transition: border-color .4s, background-color .6s, transform .25s var(--ease); }
.jist-card[data-phase="calm"] .jist-front { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.jist-card[data-phase="warm"] .jist-front { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 6%, var(--surface)); }
.jist-card[data-phase="hot"] .jist-front { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.jist-card[data-phase="over"] .jist-front {
  border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  animation: jist-buzz .5s var(--ease);
}
.jist-card[data-phase="hot"] .jist-timer { animation: jist-tick 1s ease-in-out infinite; }
.jist-card[data-phase="hot"] .jist-mark { animation: jist-wobble 1.2s ease-in-out infinite; }
.jist-card[data-phase="over"] .jist-flip { color: var(--danger); }
.jist-card[data-phase="done"] .jist-mark { -webkit-text-stroke-color: var(--border); }
@keyframes jist-tick { 0%, 100% { scale: 1; } 15% { scale: 1.14; } }
@keyframes jist-wobble { 0%, 100% { rotate: 0deg; } 25% { rotate: 8deg; } 75% { rotate: -8deg; } }
@keyframes jist-buzz { 0%, 100% { translate: 0 0; } 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }
.jist-result {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .74rem; padding: 3px 9px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--border); color: var(--heading);
}
.jist-result [data-icon] { font-size: 1.15em; color: var(--accent); }

.jist-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  margin-top: 18px; padding: 24px 26px;
}
.jist-progress { flex: 1 1 340px; min-width: 0; }
.jist-cta .jist-status { margin: 0 0 10px; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--heading); }
.jist-status strong { color: var(--accent); }
.jist-meter { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; max-width: 320px; margin-bottom: 14px; }
.jist-meter span { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; position: relative; }
.jist-meter span::after {
  content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
  transition: transform .5s var(--ease);
}
.jist-meter span.is-on::after { transform: scaleX(1); }
.jist-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: .9rem; }
.jist-perks li { display: inline-flex; align-items: center; gap: 8px; }
.perk-ico { color: var(--accent); font-size: 1.1rem; }
.jist-status .inline-ico { font-size: 1.05em; vertical-align: -.1em; }
.btn-lg { padding: 14px 22px; font-size: 1.02rem; }
.bell { transform-origin: 50% 10%; }
.bell.is-ringing { animation: bell-ring .9s var(--ease); }
@keyframes bell-ring {
  10%, 50% { rotate: 16deg; } 30%, 70% { rotate: -14deg; } 85% { rotate: 6deg; } 100% { rotate: 0deg; }
}
.btn-yt.is-ready { animation: cta-pulse 1.8s ease-in-out 2; }
@keyframes cta-pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--yt) 22%, transparent); } }

/* without JS the quiz can't load: keep the Subscribe card and perks only */
html:not(.js) .jist-status, html:not(.js) .jist-meter { display: none; }

/* ---------- Videos ---------- */
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.video-grid iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--radius); background: #000; }
.playlist-card, .video-placeholder {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  color: var(--heading);
  transition: border-color .2s, transform .25s var(--ease);
}
.playlist-card:hover, .video-placeholder:hover { color: var(--heading); border-color: var(--muted); transform: translateY(-2px); }
.playlist-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.playlist-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.playlist-card:hover .playlist-thumb img { transform: scale(1.04); }
.play-btn {
  position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff;
  transition: background-color .2s;
}
.playlist-card:hover .play-btn { background: var(--yt); }
.playlist-badge {
  position: absolute; left: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff;
  font-family: var(--mono); font-size: .7rem;
}
.playlist-title { padding: 14px 16px 18px; font-weight: 600; line-height: 1.45; font-size: .97rem; }
.video-placeholder { align-items: center; justify-content: center; gap: 10px; aspect-ratio: 16 / 9; color: var(--muted); border-style: dashed; }

/* ---------- Community ---------- */
.join-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: stretch; }
.qr-card { display: flex; align-items: center; gap: 20px; }
.qr-frame { flex-shrink: 0; padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.qr-frame img { width: 130px; height: 130px; }
.qr-text { display: flex; flex-direction: column; gap: 4px; }
.qr-text strong { font-family: var(--font-head); color: var(--heading); font-size: 1.1rem; }
.qr-text span { color: var(--muted); font-size: .95rem; }

/* ---------- Social ---------- */
.social-list { display: flex; flex-wrap: wrap; gap: 10px; }
.social { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); }
.social .icon { display: inline-flex; }
.social.is-placeholder { opacity: .45; cursor: not-allowed; }
.social-list-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.social-list-buttons .social {
  padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .2s, transform .25s var(--ease);
}
.social-list-buttons a.social:hover { border-color: var(--muted); transform: translateY(-2px); }
.social-list-buttons .social .icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  background: var(--surface-2); color: var(--brand, var(--accent));
}
.social-list-buttons .social .icon svg { width: 22px; height: 22px; }
.social-text { display: flex; flex-direction: column; line-height: 1.35; }
.social-name { font-weight: 600; }
.social-sub { font-size: .8rem; color: var(--muted); }
.follow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.social[data-brand="youtube"] { --brand: #e5162e; }
.social[data-brand="instagram"] { --brand: #d62976; }
.social[data-brand="whatsapp"] { --brand: #1fa855; }
.social[data-brand="linkedin"] { --brand: #0a66c2; }
.social[data-brand="badge"] { --brand: #e8650a; }
.social[data-brand="github"] { --brand: var(--heading); }

/* ---------- About ---------- */
.about-hero { padding: 64px 0 0; }
.about-hero .lead { margin-bottom: 1.5rem; }
.wave { display: inline-flex; vertical-align: -.04em; margin-left: .08em; font-size: .82em; color: var(--accent); transform-origin: 70% 80%; }
.wave .ico { stroke-width: 2; }
.js h1.reveal.is-in .wave { animation: wave 1.4s ease-in-out .6s; }
.wave.is-waving { animation: wave-again 1.4s ease-in-out; }
@keyframes wave { 10%, 30% { rotate: 14deg; } 20% { rotate: -8deg; } 40% { rotate: -4deg; } 50% { rotate: 10deg; } 60%, 100% { rotate: 0deg; } }
@keyframes wave-again { 10%, 30% { rotate: 14deg; } 20% { rotate: -8deg; } 40% { rotate: -4deg; } 50% { rotate: 10deg; } 60%, 100% { rotate: 0deg; } }

/* "Coming up" teasers */
.teasers { display: flex; flex-direction: column; max-width: 470px; }
.teasers-label { margin-bottom: 6px; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.teasers a {
  display: flex; align-items: center; gap: 12px; padding: 9px 4px;
  border-bottom: 1px dashed var(--border); color: var(--heading); font-weight: 500; font-size: .98rem;
}
.teasers a:first-of-type { border-top: 1px dashed var(--border); }
.teasers a:hover { color: var(--accent); }
.teaser-ico { width: 1.5em; font-size: 1.1rem; color: var(--accent); transition: scale .3s var(--ease); }
.teaser-arrow { margin-left: auto; color: var(--accent); transition: translate .25s var(--ease); }
.teasers a:hover .teaser-ico { scale: 1.2; }
.teasers a:hover .teaser-arrow { translate: 2px 2px; }

/* Plot twist: one guess */
.twist { padding: 22px; }
.twist-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.twist-opt {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); text-align: left;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; line-height: 1.35; color: var(--heading);
  transition: border-color .2s, background-color .2s, opacity .35s, transform .25s var(--ease);
}
.twist-ico { --tile: 42px; }
.twist .twist-opt.is-correct .ico-tile { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.twist .twist-opt.is-wrong .ico-tile { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.twist-opt:not(:disabled):hover { border-color: var(--accent); transform: translateY(-3px); }
.twist-opt:disabled { cursor: default; }
.twist.is-answered .twist-opt { opacity: .45; }
.twist .twist-opt.is-wrong { opacity: .8; border-color: var(--danger); animation: shake .45s; }
.twist .twist-opt.is-correct {
  opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  animation: pop .55s var(--ease);
}
.twist-opt.is-correct::after, .twist-opt.is-wrong::after {
  position: absolute; top: 12px; right: 12px; padding: 1px 8px; border-radius: 999px;
  font-family: var(--mono); font-size: .68rem; font-weight: 600;
}
.twist-opt.is-correct::after { content: "\2713  Answer"; background: var(--accent); color: var(--on-accent); }
.twist-opt.is-correct.is-picked::after { content: "\2713  Your guess"; }
.twist-opt.is-wrong::after { content: "Your guess"; border: 1px solid var(--danger); background: var(--surface); color: var(--danger); }
.twist-skip {
  margin-top: 14px; padding: 0; border: 0; background: none; color: var(--muted); font-size: .9rem;
  text-decoration: underline; text-underline-offset: 3px;
}
.twist-skip:hover { color: var(--heading); }
.twist-answer { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); outline: none; animation: rise .5s var(--ease); }
.twist-verdict-ico { margin-right: 10px; font-size: 1.1em; color: var(--accent); vertical-align: -.12em; }
.twist .twist-verdict { margin: 0 0 .4rem; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--heading); }
.twist .twist-text { max-width: 68ch; margin: 0 0 .8rem; font-size: 1rem; color: var(--text); }
.twist-text strong { color: var(--heading); }
html:not(.js) .twist-answer[hidden] { display: block !important; }
html:not(.js) .twist-skip { display: none; }
@keyframes pop { 0% { scale: 1; } 40% { scale: 1.04; } 100% { scale: 1; } }
@keyframes shake { 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }
@keyframes rise { from { opacity: 0; translate: 0 10px; } }

/* Journey: one stop at a time */
.journey { --i: 0; }
.journey-scroll { margin: 0 -4px 14px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.journey-scroll::-webkit-scrollbar { display: none; }
.journey-track { position: relative; min-width: calc(var(--n) * 42px); }
.journey-stops { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.journey-line {
  position: absolute; top: 15px; height: 2px; border-radius: 2px; background: var(--border);
  left: calc(50% / var(--n)); right: calc(50% / var(--n));
}
.journey-fill {
  position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform-origin: 0 50%;
  transform: scaleX(calc(var(--i) / var(--last))); transition: transform .7s var(--ease);
}
.journey-packet {
  position: absolute; z-index: 2; top: 16px; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  left: calc(50% / var(--n) + var(--i) / var(--last) * (100% - 100% / var(--n)));
  background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 14px var(--accent);
  pointer-events: none; transition: left .7s var(--ease);
}
.journey.is-playing .journey-packet { animation: packet 1.4s ease-in-out infinite; }
@keyframes packet { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 12%, transparent), 0 0 18px var(--accent); } }
.journey-stop {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 4px; border: 0; background: none;
  font-family: var(--mono); font-size: .76rem; color: var(--muted); transition: color .2s;
}
.journey-dot {
  width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg);
  transition: border-color .3s, background-color .3s, scale .3s var(--ease);
}
.journey-stop:hover { color: var(--heading); }
.journey-stop:hover .journey-dot { border-color: var(--accent); }
.journey-stop.is-past .journey-dot { border-color: var(--accent); background: var(--accent); scale: .7; }
.journey-stop[aria-selected="true"] { color: var(--heading); font-weight: 700; }
.journey-stop[aria-selected="true"] .journey-dot { border-color: var(--accent); scale: 1.45; }
.journey-panel { padding: 26px 26px 20px; overflow: hidden; }
.journey-slides { display: grid; }
.journey-slide {
  grid-area: 1 / 1; display: grid; grid-template-columns: 7.6rem minmax(0, 1fr); gap: 8px 24px; align-items: start;
  opacity: 0; visibility: hidden; transition: opacity .14s, visibility 0s .14s;
}
/* the old slide fades out first, then the new one slides in (no overlapping text) */
.journey-slide.is-active { opacity: 1; visibility: visible; transition: none; animation: slide-in .5s var(--ease) .14s backwards; }
@keyframes slide-in { from { opacity: 0; translate: calc(var(--dir, 1) * 18px) 0; } }
.journey-year {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(2.2rem, 4.5vw, 2.9rem); line-height: 1;
  letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.journey-count { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.journey-panel .journey-text { margin: 0; font-size: 1.08rem; line-height: 1.6; color: var(--text); }
.journey-ctrl { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.journey-nav, .journey-play {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2);
  font-weight: 600; font-size: .85rem; color: var(--heading); transition: border-color .2s, opacity .2s;
}
.journey-nav { width: 38px; padding: 0; }
.journey-play { min-width: 96px; font-family: var(--mono); font-size: .76rem; }
.journey-nav [data-icon] { font-size: 17px; }
.journey-play [data-icon] { font-size: 13px; }
.journey-nav:hover, .journey-play:hover { border-color: var(--accent); }
.journey-nav[aria-disabled="true"] { opacity: .4; cursor: default; border-color: var(--border); }
.journey-timer {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 3px;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}
.journey-timer.is-running { animation: journey-timer var(--step, 4.5s) linear forwards; }
.journey.is-offscreen .journey-timer { animation-play-state: paused; }
@keyframes journey-timer { to { transform: scaleX(1); } }

/* Impact: guess, then tap */
.impact-all { padding: 0; border: 0; background: none; color: var(--accent); }
.impact-all:hover { color: var(--heading); }
.impact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.impact { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 190px; }
.impact.is-sealed { cursor: pointer; }
.impact.is-sealed:hover { border-color: var(--muted); }
.card .impact-q { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 1.08rem; line-height: 1.45; color: var(--heading); }
.impact-tap { align-self: flex-start; display: inline-flex; align-items: center; gap: 14px; padding: 0; border: 0; background: none; }
.impact-mask {
  padding: 6px 14px; border-radius: 10px; border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent);
  font-family: var(--font-head); font-weight: 700; font-size: 2rem; line-height: 1; letter-spacing: .06em; color: var(--muted);
  transition: border-color .2s, color .2s;
}
.impact-hint { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.impact.is-sealed:hover .impact-mask { border-color: var(--accent); color: var(--heading); animation: shake .45s; }
.card .impact-a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; outline: none; transform-origin: 0 100%; }
.impact.is-revealed .impact-a { animation: reveal-pop .6s var(--ease); }
@keyframes reveal-pop { from { opacity: 0; scale: .7; } 60% { opacity: 1; scale: 1.05; } }
.impact-value {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(2.2rem, 4vw, 2.8rem); line-height: 1;
  color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.impact-unit { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.impact.is-revealed { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }

/* Experience */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.post {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: start;
  padding: 20px 0; border-bottom: 1px solid var(--border);
}
.post-icon { --tile: 44px; }
.post-icon.is-text { font-size: 1.3rem; }
.post-body h3 { margin-bottom: 2px; }
.post-date { display: block; font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-bottom: .4rem; }
.post-body p { margin: 0; color: var(--text); font-size: .96rem; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 190px; }
.post-tags span, .tag, .chip {
  padding: 2px 9px; border-radius: 6px; background: var(--surface-2);
  font-family: var(--mono); font-size: .72rem; color: var(--text); white-space: nowrap;
}

/* Selected work: accordion */
.cases { border-top: 1px solid var(--border); }
.case { border-bottom: 1px solid var(--border); interpolate-size: allow-keywords; }
.case summary {
  display: grid; grid-template-columns: 3ch minmax(0, 1fr) auto 30px; align-items: center; gap: 16px;
  padding: 18px 8px; border-radius: 10px; list-style: none; cursor: pointer; transition: background-color .2s;
}
.case summary::-webkit-details-marker { display: none; }
.case summary:hover { background: var(--surface); }
.case-num { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.case-title { font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; color: var(--heading); }
.case-win {
  padding: 3px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  font-family: var(--mono); font-size: .76rem; color: var(--accent); white-space: nowrap;
}
.case-toggle {
  position: relative; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  transition: border-color .2s, background-color .25s;
}
.case-toggle::before, .case-toggle::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; margin: -.8px 0 0 -5.5px;
  border-radius: 2px; background: var(--heading); transition: rotate .35s var(--ease), background-color .25s;
}
.case-toggle::after { rotate: 90deg; }
.case summary:hover .case-toggle { border-color: var(--accent); }
.case[open] .case-toggle { border-color: var(--accent); background: var(--accent); }
.case[open] .case-toggle::before, .case[open] .case-toggle::after { background: var(--on-accent); }
.case[open] .case-toggle::after { rotate: 0deg; }
.case-body { padding: 2px 8px 22px calc(3ch + 24px); }
.case-body p { max-width: 66ch; margin: 0 0 .6rem; }
.case-tech { font-family: var(--mono); font-size: .76rem; color: var(--accent); }
.case[open] .case-body { animation: rise .45s var(--ease); }
.case::details-content { block-size: 0; overflow: hidden; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete; }
.case[open]::details-content { block-size: auto; }

/* Skills: a layered stack that builds from the bottom up */
.stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.layer {
  display: grid; grid-template-columns: 3ch 12.5rem minmax(0, 1fr); align-items: center; gap: 18px;
  padding: 18px 22px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  transition: border-color .25s, translate .3s var(--ease);
}
.layer:nth-child(1) { margin: 0 9%; }
.layer:nth-child(2) { margin: 0 6%; }
.layer:nth-child(3) { margin: 0 3%; }
.layer:hover { border-color: var(--accent); translate: 0 -2px; }
.layer h3 { margin: 0; font-size: 1.02rem; }
.layer-id { font-family: var(--mono); font-size: .78rem; font-weight: 600; color: var(--accent); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .78rem; padding: 4px 10px; }
.js .stack.reveal { opacity: 1; translate: none; }
.js .stack.reveal:not(.is-in) .layer { opacity: 0; }
.js .stack.reveal.is-in .layer { animation: layer-in .6s var(--ease) backwards; }
.js .stack.reveal.is-in .layer:nth-child(3) { animation-delay: .12s; }
.js .stack.reveal.is-in .layer:nth-child(2) { animation-delay: .24s; }
.js .stack.reveal.is-in .layer:nth-child(1) { animation-delay: .36s; }
@keyframes layer-in { from { opacity: 0; translate: 0 26px; } }

/* Off the clock */
.quirks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quirk { padding: 4px 28px; border-left: 1px solid var(--border); }
.quirk:first-child { padding-left: 0; border-left: 0; }
.quirk-ico { --tile: 56px; margin-bottom: 16px; }
.quirk h3 { margin-bottom: .35rem; }
.quirk p { margin: 0; color: var(--muted); font-size: .96rem; }

/* End of page: surprises found */
.outro { margin-top: 88px; padding: 40px 32px; text-align: center; }
.outro-ico { --tile: 56px; margin-bottom: 14px; border-radius: 50%; }
.outro.is-complete .outro-ico { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.outro h2 { margin-bottom: .7rem; }
.card .outro-score { margin: 0 0 14px; font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.outro-score strong { font-size: 1rem; color: var(--accent); }
.outro-goals { list-style: none; margin: 0 auto 20px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.outro-goals a {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--border); font-size: .88rem; color: var(--text);
  transition: border-color .25s, color .25s;
}
.outro-goals a:hover { border-color: var(--muted); color: var(--heading); }
.outro-goals a::before {
  content: ""; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px dashed var(--muted); font-size: .62rem; font-weight: 700; line-height: 1;
}
.outro-goals .is-done a { border-color: var(--accent); color: var(--heading); }
.outro-goals .is-done a::before { content: "\2713"; border: 0; background: var(--accent); color: var(--on-accent); }
.outro .outro-msg { max-width: 52ch; margin: 0 auto; font-size: 1rem; color: var(--text); }
.outro .cta-row { justify-content: center; margin-top: 1.4rem; }
.outro.is-complete { border-color: var(--accent); }
.outro.is-complete .outro-ico .ico { animation: ico-party .8s var(--ease) 2; }
html:not(.js) .outro-track { display: none; }

/* Toast ("Surprise found") */
.toast {
  position: fixed; left: 20px; bottom: 20px; z-index: 160; max-width: calc(100% - 100px);
  padding: 10px 16px; border-radius: 10px; background: var(--heading); color: var(--bg);
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: .92rem; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
  opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity .3s, translate .4s var(--ease);
}
.toast.is-shown { opacity: 1; translate: 0 0; }
.toast-ico { font-size: 1.1rem; }

/* ---------- Certifications ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 30px 22px 26px; }
.badge img { width: 120px; height: 120px; margin-bottom: 16px; }
.badge .card-label { margin: 2px 0 0; }
.badge-date { font-size: .85rem; color: var(--muted); }

.achievements { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.achievements li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  font-weight: 600; color: var(--heading);
}
.achievements [data-icon] { font-size: 1.25rem; color: var(--accent); }

/* ---------- Projects (list) ---------- */
.project-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.project-item {
  display: grid; grid-template-columns: 3ch minmax(0, 1fr) auto; gap: 18px; align-items: baseline;
  padding: 20px 4px; border-bottom: 1px solid var(--border);
  transition: background-color .2s;
}
.project-item:hover { background: var(--surface); }
.project-num { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.project-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.project-name { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--heading); }
.project-name .icon { color: var(--muted); }
a.project-name:hover { color: var(--accent); }
.project-arrow { color: var(--accent); transition: transform .2s var(--ease); }
a.project-name:hover .project-arrow { transform: translate(2px, -2px); }
.project-soon { font-family: var(--mono); font-size: .72rem; font-weight: 400; color: var(--muted); white-space: nowrap; }
.project-name { flex-wrap: wrap; row-gap: 2px; }
@media (hover: none), (max-width: 600px) { .project-search kbd { display: none; } }
.project-item.is-placeholder .project-title { color: var(--muted); }
.project-desc { color: var(--muted); font-size: .95rem; }
.project-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.project-empty { padding: 20px 4px; color: var(--muted); }
.project-item[hidden], .project-empty[hidden] { display: none; }
.project-item.filter-in { animation: row-in .4s var(--ease); }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }
.project-title mark { background: color-mix(in srgb, var(--accent) 26%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
button.tag {
  border: 1px solid transparent; cursor: pointer; line-height: 1.6;
  transition: border-color .2s, background-color .2s, color .2s;
}
button.tag:hover { border-color: var(--accent); color: var(--heading); }
button.tag.is-match { background: var(--accent); color: var(--on-accent); }
.project-clear { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; }
.project-clear:hover { color: var(--heading); }

/* Project search */
.project-search {
  display: flex; align-items: center; gap: 10px; max-width: 540px; height: 48px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.project-search[hidden] { display: none; }
.project-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.project-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; color: var(--heading); }
.project-search input::placeholder { color: var(--muted); opacity: 1; }
.project-search input::-webkit-search-cancel-button { cursor: pointer; }
.project-search kbd { padding: 1px 7px; border: 1px solid var(--border); border-radius: 6px; font-size: .72rem; color: var(--muted); }
.project-search:focus-within kbd { display: none; }
.project-count { min-height: 1.4em; margin: 12px 0 10px; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Prose ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.25rem; margin: 2.2rem 0 .7rem; }
.prose h2:first-child { margin-top: 0; }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 96px; padding: 28px 0 36px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: .9rem;
}
.footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--heading); }
.consent-link { border: 0; background: none; padding: 0; color: var(--muted); font-size: .9rem; }
.consent-link:hover { color: var(--heading); }

/* ---------- Consent banner ---------- */
.consent {
  position: fixed; left: 50%; bottom: 20px; z-index: 150; transform: translateX(-50%);
  width: min(540px, calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px 12px 20px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: 0 12px 40px -16px rgba(0, 0, 0, .4);
}
.consent[hidden] { display: none; }
.consent p { margin: 0; font-size: .93rem; }
.consent-actions { display: flex; gap: 8px; }
.consent .pill { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 600; font-size: .9rem; }
.consent .pill-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Quick menu ---------- */
.cmdk { position: fixed; inset: 0; z-index: 250; display: grid; place-items: start center; padding-top: 14vh; background: rgba(0, 0, 0, .45); }
.cmdk[hidden] { display: none; }
.cmdk-panel {
  width: min(560px, calc(100% - 32px)); overflow: hidden; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .5);
}
.cmdk-search { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--muted); }
.cmdk-input { flex: 1; border: 0; background: none; outline: none; font: inherit; color: var(--heading); }
.cmdk-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.cmdk-group { padding: 10px 12px 4px; font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--heading); cursor: pointer; }
.cmdk-item .cmdk-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--surface-2); font-size: 15px; color: var(--muted); transition: color .15s, background-color .15s; }
.cmdk-item[aria-selected="true"] .cmdk-ico:not([data-accent]) { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.cmdk-ico .dot { display: block; width: 12px; height: 12px; border-radius: 50%; }
.cmdk-item .cmdk-meta { margin-left: auto; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.cmdk-item[aria-selected="true"] { background: var(--surface-2); }
.cmdk-empty { padding: 22px; text-align: center; color: var(--muted); }
.cmdk-hint { display: flex; gap: 14px; padding: 9px 18px; border-top: 1px solid var(--border); font-size: .75rem; color: var(--muted); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 42px; height: 42px; border-radius: 10px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--heading);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.to-top.is-shown { opacity: 1; pointer-events: auto; }
.to-top:hover { border-color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cmdk-btn kbd { display: none; }
  .site-nav .nav-icon { display: none; }
}

@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; }
  .controls { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
  .site-nav { order: 3; width: 100%; flex-direction: column; margin: 0; display: none; padding: 6px 0 4px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 12px; font-size: 1rem; }
  .site-nav a.active { background: var(--surface-2); }
  .site-nav .nav-icon { display: inline-flex; }
  .nav-glider { display: none; }

  .hero, .head-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding-top: 48px; }
  .feature-grid, .video-grid, .badge-grid { grid-template-columns: 1fr 1fr; }
  .jist-grid { grid-template-columns: 1fr; }
  .js .jist-grid:empty { min-height: 968px; }
  .join-grid { grid-template-columns: 1fr; }
  .twist-options { grid-template-columns: 1fr; }
  .twist-opt { flex-direction: row; align-items: center; padding: 14px 16px; }
  .twist-opt.is-correct::after, .twist-opt.is-wrong::after { top: -10px; right: 12px; }
  .layer { grid-template-columns: 3ch minmax(0, 1fr); gap: 10px 14px; }
  .layer .chips { grid-column: 1 / -1; }
  .layer:nth-child(n) { margin: 0; }
  .quirks { grid-template-columns: 1fr; gap: 22px; }
  .quirk, .quirk:first-child { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 18px; padding: 0; border: 0; }
  .quirk-ico { --tile: 52px; grid-row: span 2; margin: 0; }
  .post { grid-template-columns: 40px minmax(0, 1fr); }
  .post-icon { --tile: 40px; }
  .post-tags { grid-column: 2; justify-content: flex-start; max-width: none; }
  .project-item { grid-template-columns: 3ch minmax(0, 1fr); }
  .project-tags { grid-column: 2; justify-content: flex-start; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .topbar-inner { padding: 12px 18px; }
  .cmdk-btn { display: none; }
  .main { padding: 0 18px; }
  .section { padding-top: 56px; }
  .feature-grid, .video-grid, .badge-grid, .follow-grid, .impact-grid { grid-template-columns: 1fr; }
  .impact { min-height: 0; }
  .journey-slide { grid-template-columns: 1fr; }
  .journey-panel { padding: 22px 20px 18px; }
  .case summary { grid-template-columns: 3ch minmax(0, 1fr) 30px; row-gap: 6px; padding: 16px 4px; }
  .case-win { grid-column: 2; grid-row: 2; justify-self: start; }
  .case-toggle { grid-column: 3; grid-row: 1 / span 2; }
  .case-body { padding: 2px 4px 20px calc(3ch + 20px); }
  .outro { padding: 32px 20px; }
  .toast { left: 16px; bottom: 16px; }
  .qr-card { flex-direction: column; text-align: center; }
  .jist-mark { font-size: 5rem; top: 74px; right: 16px; opacity: .7; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .js .reveal, .js h1.reveal, .js h2.reveal { opacity: 1; translate: none; scale: none; clip-path: none; }
  .js .stack.reveal:not(.is-in) .layer { opacity: 1; }
  .js .playlist-card.reveal .playlist-thumb img { scale: none; }
  .hero .board, .head-grid .board { transform: none; }
  .jist-inner { transition: none; }
  .jist-card.is-open .jist-front { visibility: hidden; }
}
