/* ============================================================
   SAUGAT RIMAL — Soft Machine
   Cool cobalt monochrome × candy mint × chunky toy UI
   ============================================================ */

:root {
  /* Palette — cool monochrome candy */
  --ink: #0a1547;
  --ink-soft: #1a2d7a;
  --ink-mute: #5b6aaf;

  --paper: #eef2ff;
  --paper-warm: #f7f8ff;
  --paper-deep: #dde4ff;
  --white: #ffffff;

  --cobalt: #2a4dff;
  --cobalt-deep: #1a2db8;
  --sky: #8ab4ff;
  --mint: #6ef0d4;
  --mint-deep: #2dd4b0;
  --violet: #6f6bff;

  --shadow-color: 10 21 71;
  --shadow-sm: 0 2px 0 rgb(var(--shadow-color) / .14);
  --shadow-md: 6px 8px 0 rgb(var(--shadow-color) / 1);
  --shadow-lg: 12px 14px 0 rgb(var(--shadow-color) / 1);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;
  --bw: 2px;

  --f-display: "Bricolage Grotesque", "Hubot Sans", system-ui, sans-serif;
  --f-body:    "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono:    "Geist Mono", ui-monospace, "JetBrains Mono", monospace;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --density: 1;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  cursor: none;
}
@media (max-width: 720px) { body { cursor: auto; } }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--mint); color: var(--ink); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--mint-deep);
  box-shadow: 0 0 0 4px rgb(110 240 212 / .35);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgb(110 240 212 / .35); }
  50%      { box-shadow: 0 0 0 8px rgb(110 240 212 / 0); }
}

.h1, .h2, .h3 { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.02em; line-height: .95; margin: 0; }
.h1 { font-size: clamp(54px, 8.5vw, 132px); }
.h2 { font-size: clamp(40px, 5.5vw, 84px); }
.h3 { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; }
.mono { font-family: var(--f-mono); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section { padding: calc(120px * var(--density)) 0; position: relative; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
  box-shadow: var(--shadow-md);
  transition: transform .25s cubic-bezier(.2,.9,.3,1.2), box-shadow .25s, background .2s;
  will-change: transform;
  cursor: none;
}
.btn:hover { transform: translate(-3px, -4px); box-shadow: 9px 12px 0 var(--ink); }
.btn:active { transform: translate(3px, 4px); box-shadow: 0 0 0 var(--ink); transition-duration: .08s; }
.btn--primary { background: var(--cobalt); color: var(--white); }
.btn--mint    { background: var(--mint); color: var(--ink); }
.btn .arrow { transition: transform .3s cubic-bezier(.2,.9,.3,1.2); }
.btn:hover .arrow { transform: translateX(4px); }

.card {
  background: var(--white);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  position: relative;
}

#cursor, #cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; mix-blend-mode: difference; }
#cursor {
  width: 36px; height: 36px;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .25s cubic-bezier(.2,.9,.3,1.2), height .25s cubic-bezier(.2,.9,.3,1.2), border-radius .2s, background-color .2s, opacity .2s;
}
#cursor.is-hover { width: 64px; height: 64px; background: #fff; }
#cursor.is-text  { width: 6px; height: 36px; border-radius: 4px; background: #fff; }
#cursor-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
@media (max-width: 720px) { #cursor, #cursor-dot { display: none; } }

.nav {
  position: sticky;
  top: 18px;
  z-index: 100;
  padding: 0 var(--gutter);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgb(255 255 255 / .72);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-pill);
  padding: 8px 8px 8px 22px;
  box-shadow: var(--shadow-sm);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.02em;
}
.nav__logo .bug {
  width: 28px; height: 28px;
  background: var(--cobalt);
  border: var(--bw) solid var(--ink);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--white);
  font-family: var(--f-display); font-weight: 900; font-size: 16px;
  transform: rotate(-6deg);
  transition: transform .4s cubic-bezier(.2,.9,.3,1.2);
}
.nav__logo:hover .bug { transform: rotate(360deg); background: var(--mint); color: var(--ink); }

.nav__links { display: flex; gap: 4px; }
.nav__links a {
  padding: 10px 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.nav__links a:hover { background: var(--paper-deep); }
.nav__links a.is-active { background: var(--ink); color: var(--paper); }
.nav__cta {
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s;
}
.nav__cta:hover { background: var(--cobalt); }
.nav__cta .dot { width: 8px; height: 8px; background: var(--mint); border-radius: 50%; animation: pulse 2s infinite; }
@media (max-width: 720px) {
  .nav__links { display: none; }
}

.hero { padding: 60px 0 80px; position: relative; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 60px;
  align-items: end;
}
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; gap: 40px; } }
.hero__title { margin-top: 24px; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1s cubic-bezier(.2,.9,.3,1.05) forwards;
}
.hero__title .line:nth-child(2) > span { animation-delay: .08s; }
.hero__title .line:nth-child(3) > span { animation-delay: .16s; }
.hero__title .ampersand {
  font-style: italic;
  font-family: "Bricolage Grotesque", serif;
  color: var(--cobalt);
  font-weight: 500;
}
.hero__title .underline {
  background-image: linear-gradient(180deg, transparent 65%, var(--mint) 65%, var(--mint) 92%, transparent 92%);
  padding: 0 4px;
}
@keyframes rise { to { transform: translateY(0); } }

.hero__sub {
  max-width: 540px;
  margin: 32px 0 28px;
  font-size: 19px;
  color: var(--ink-soft);
  opacity: 0;
  animation: fade .8s .5s ease forwards;
}
.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade .8s .7s ease forwards;
}
@keyframes fade { to { opacity: 1; } }

.hero__visual {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
}
.polaroid {
  position: relative;
  background: var(--white);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-md);
  padding: 14px 14px 60px;
  box-shadow: var(--shadow-lg);
  width: min(360px, 80%);
  transform: rotate(-4deg);
  transition: transform .5s cubic-bezier(.2,.9,.3,1.2);
  will-change: transform;
}
.polaroid:hover { transform: rotate(0deg) scale(1.02); }
.polaroid__img {
  aspect-ratio: 4/5;
  background:
    radial-gradient(circle at 70% 30%, var(--sky), transparent 40%),
    radial-gradient(circle at 20% 80%, var(--mint), transparent 50%),
    linear-gradient(135deg, var(--cobalt), var(--cobalt-deep));
  border-radius: var(--r-sm);
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
  color: rgb(255 255 255 / .35);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .1em;
}
.polaroid__img::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgb(255 255 255 / .12) 1px, transparent 1px);
  background-size: 8px 8px;
}
.polaroid__cap {
  position: absolute;
  bottom: 14px; left: 14px; right: 14px;
  font-family: "Bricolage Grotesque";
  font-weight: 500;
  font-size: 17px;
  font-style: italic;
  color: var(--ink);
}

.sticker {
  position: absolute;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-pill);
  padding: 10px 16px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  background: var(--white);
  white-space: nowrap;
}
.sticker--badge {
  border-radius: 50%;
  width: 110px; height: 110px;
  display: grid; place-items: center;
  text-align: center;
  font-size: 12px;
  line-height: 1.1;
  background: var(--mint);
  animation: spin 14s linear infinite;
  padding: 0;
}
.sticker--badge svg { width: 100%; height: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }

.sticker.s1 { top: 0; left: -8%; background: var(--cobalt); color: var(--white); transform: rotate(-8deg); }
.sticker.s2 { top: 20%; right: -10%; background: var(--mint); transform: rotate(6deg); }
.sticker.s3 { bottom: 8%; left: -6%; background: var(--white); transform: rotate(4deg); }
.sticker.s4 { bottom: -3%; right: -8%; }

.hero__strip {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
}
.hero__strip > div {
  padding: 18px 22px;
  border-right: var(--bw) solid var(--ink);
  display: flex; flex-direction: column; gap: 4px;
}
.hero__strip > div:last-child { border-right: 0; }
.hero__strip .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.hero__strip .v { font-family: var(--f-display); font-weight: 700; font-size: 22px; }
@media (max-width: 720px) {
  .hero__strip { grid-template-columns: 1fr 1fr; }
  .hero__strip > div { padding: 14px 14px; }
  .hero__strip .v { font-size: 15px; word-break: break-word; }
  .hero__strip > div:nth-child(2) { border-right: 0; }
  .hero__strip > div:nth-child(1), .hero__strip > div:nth-child(2) { border-bottom: var(--bw) solid var(--ink); }
}

.marquee {
  background: var(--ink);
  color: var(--paper);
  padding: 28px 0;
  overflow: hidden;
  border-top: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
  position: relative;
}
.marquee__track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 32s linear infinite;
  align-items: center;
}
.marquee__track span {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 88px);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.marquee__track .star {
  width: 36px; height: 36px;
  display: inline-block;
  color: var(--mint);
  flex-shrink: 0;
}
@keyframes marquee { to { transform: translateX(-50%); } }

.logos { padding: 56px 0; border-bottom: var(--bw) solid var(--ink); }
.logos__inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px; flex-wrap: wrap;
}
.logos__label {
  font-family: var(--f-mono); font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute);
}
.logos__row { display: flex; gap: 48px; align-items: center; flex-wrap: wrap; opacity: .85; }
.logos__row .logo {
  font-family: var(--f-display); font-weight: 700; font-size: 22px;
  letter-spacing: -.02em; display: flex; align-items: center; gap: 8px;
  color: var(--ink); transition: color .2s;
}
.logos__row .logo:hover { color: var(--cobalt); }

.stats {
  background: var(--ink); color: var(--paper);
  padding: 100px 0;
  border-bottom: var(--bw) solid var(--ink);
  position: relative; overflow: hidden;
}
.stats::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / .06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.stats__head {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  margin-bottom: 56px; position: relative;
}
.stats__head h2 { color: var(--paper); max-width: 720px; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  position: relative;
}
@media (max-width: 960px) { .stats__grid { grid-template-columns: 1fr 1fr; } }
.stat { border-top: var(--bw) solid var(--paper); padding-top: 24px; }
.stat .num {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(48px, 6vw, 92px);
  line-height: 1; color: var(--mint);
  letter-spacing: -.04em;
  display: flex; align-items: baseline; gap: 4px;
}
.stat .num small { font-size: .45em; color: var(--paper); }
.stat .lbl {
  margin-top: 12px; font-family: var(--f-mono);
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--sky);
}

.features__head { margin-bottom: 48px; max-width: 720px; }
.features__head .h2 { margin-top: 16px; }
.features__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 20px;
}
@media (max-width: 960px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }

.feat {
  border-radius: var(--r-lg);
  border: var(--bw) solid var(--ink);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), box-shadow .3s;
}
.feat:hover { transform: translate(-4px, -4px); box-shadow: 10px 12px 0 var(--ink); }
.feat--wide  { grid-column: span 3; }
.feat--third { grid-column: span 2; }
.feat--half  { grid-column: span 3; }
@media (max-width: 960px) {
  .feat--wide, .feat--third, .feat--half { grid-column: span 2; }
}
.feat .num { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--ink-mute); }
.feat .ttl { font-family: var(--f-display); font-weight: 700; font-size: 28px; line-height: 1.05; letter-spacing: -.02em; margin: 0; }
.feat .desc { font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.feat .icon { width: 56px; height: 56px; border-radius: var(--r-sm); background: var(--ink); color: var(--mint); display: grid; place-items: center; }
.feat--cobalt { background: var(--cobalt); color: var(--white); }
.feat--cobalt .desc { color: rgb(255 255 255 / .8); }
.feat--cobalt .num { color: rgb(255 255 255 / .55); }
.feat--cobalt .icon { background: var(--white); color: var(--cobalt); }
.feat--mint { background: var(--mint); }
.feat--ink { background: var(--ink); color: var(--paper); }
.feat--ink .desc { color: rgb(238 242 255 / .7); }
.feat--ink .num { color: var(--sky); }
.feat--ink .icon { background: var(--mint); color: var(--ink); }
.feat--white { background: var(--white); }
.feat--ice { background: var(--paper-deep); }

/* ─── Tech Stack ────────────────────────────────────────── */
.stack {
  background: var(--paper-warm);
  border-top: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
  position: relative;
  overflow: hidden;
}
.stack::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgb(10 21 71 / .06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.stack__head { position: relative; max-width: 820px; margin-bottom: 56px; }
.stack__head .h2 { margin-top: 14px; }
.stack__head p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 680px;
  line-height: 1.55;
}
.stack__head p strong { color: var(--ink); font-weight: 600; }

.stack__grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  position: relative;
  border-top: var(--bw) solid var(--ink);
}
@media (max-width: 860px) { .stack__grid { grid-template-columns: 1fr; gap: 0; } }

.stack__row { display: contents; }

.stack__cat {
  padding: 36px 32px 36px 0;
  border-bottom: var(--bw) solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  transition: padding-left .25s, background .25s;
}
.stack__cat-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sky);
  font-weight: 600;
}
.stack__cat-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(26px, 2.4vw, 32px);
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--ink);
}

.stack__chips {
  padding: 36px 0 36px 36px;
  border-bottom: var(--bw) solid var(--ink);
  border-left: var(--bw) solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  align-content: center;
  transition: padding-right .25s;
}

/* ─── Individual chips ─────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  background: var(--white);
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: .04em;
  line-height: 1;
  transition: transform .2s cubic-bezier(.2,.9,.3,1.2), box-shadow .2s;
}
.chip:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--ink); }

.chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-mute);
  flex-shrink: 0;
}

/* Daily driver — solid cobalt fill, mint solid dot */
.chip[data-level="primary"] {
  background: var(--cobalt);
  color: var(--white);
  border-color: var(--cobalt);
}
.chip[data-level="primary"] .dot {
  background: var(--mint);
}
.chip[data-level="primary"]:hover { box-shadow: 0 4px 0 var(--cobalt-deep); }

/* Actively learning — dashed border, muted text */
.chip[data-level="learning"] {
  background: transparent;
  border-style: dashed;
  color: var(--ink-mute);
}
.chip[data-level="learning"] .dot {
  background: transparent;
  border: 1.5px dashed var(--ink-mute);
}
.chip[data-level="learning"]:hover { box-shadow: 0 4px 0 var(--ink-mute); }

/* Hover the entire row */
.stack__row:hover .stack__cat,
.stack__row:hover .stack__chips {
  background: var(--paper-warm);
}
.stack__row:hover .stack__cat { padding-left: 14px; }
.stack__row:hover .stack__cat-eyebrow { color: var(--cobalt); }

@media (max-width: 860px) {
  .stack__cat {
    padding: 28px 0 12px;
    border-bottom: 0;
  }
  .stack__cat-name { font-size: 26px; }
  .stack__chips {
    padding: 0 0 28px;
    border-left: 0;
  }
  .stack__row:hover .stack__cat { padding-left: 0; }
}

.demo {
  background: var(--paper-deep);
  border-top: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
}
.demo__head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.demo__head .h2 { margin-top: 12px; }
.demo__panel {
  background: var(--white);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 320px;
}
@media (max-width: 860px) { .demo__panel { grid-template-columns: 1fr; } }
.demo__stage {
  padding: 60px 40px;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgb(110 240 212 / .25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgb(42 77 255 / .15), transparent 40%),
    var(--paper-warm);
  position: relative;
  min-height: 360px;
}
.demo__stage--game {
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px 32px 28px;
  gap: 28px;
}

/* ─── Match game ─── */
.game__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  width: 100%;
}
@media (max-width: 540px) { .game__cards { grid-template-columns: 1fr; } }
.game-card {
  position: relative;
  margin: 0;
  border: var(--bw) solid var(--ink);
  border-radius: 0;
  background: var(--white);
  box-shadow: 0 0 0 var(--ink);
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
  font-family: var(--f-display);
  font-weight: 700;
  color: var(--ink);
  transition: border-radius .35s cubic-bezier(.2,.9,.3,1.2),
              box-shadow .35s cubic-bezier(.2,.9,.3,1.2),
              background-color .35s,
              transform .35s cubic-bezier(.2,.9,.3,1.2);
  will-change: transform, border-radius, box-shadow;
}
.game-card__lbl {
  position: absolute; top: 12px; left: 14px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--mint);
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}
.game-card__body { position: relative; z-index: 1; }
.game-card__body .ttl { font-size: clamp(24px, 3vw, 38px); letter-spacing: -.02em; line-height: 1; }
.game-card__body .sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .7;
  margin-top: 8px;
  font-weight: 500;
}
/* Color variants */
.game-card[data-color="cobalt"] { background: var(--cobalt); color: var(--white); }
.game-card[data-color="mint"]   { background: var(--mint);   color: var(--ink); }
.game-card[data-color="ink"]    { background: var(--ink);    color: var(--paper); }
.game-card[data-color="sky"]    { background: var(--sky);    color: var(--ink); }
.game-card[data-color="violet"] { background: var(--violet); color: var(--white); }
.game-card[data-color="cobalt"] .game-card__lbl,
.game-card[data-color="ink"] .game-card__lbl,
.game-card[data-color="violet"] .game-card__lbl { background: var(--white); color: var(--ink); }
/* Pattern overlays */
.game-card[data-pattern="dots"]::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, currentColor 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: .22;
  pointer-events: none;
}
.game-card[data-pattern="stripes"]::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0 8px, currentColor 8px 11px);
  opacity: .14;
  pointer-events: none;
}
/* Size variants */
.game-card[data-size="S"] { transform: scale(.78); }
.game-card[data-size="M"] { transform: scale(.92); }
.game-card[data-size="L"] { transform: scale(1); }
.game-card--target { animation: card-breathe 6s ease-in-out infinite; }
@keyframes card-breathe {
  0%, 100% { transform: translateY(0) var(--scale-tf, scale(1)); }
  50%      { transform: translateY(-2px) var(--scale-tf, scale(1)); }
}

/* "Hot/cold" glow on YOUR card based on match score */
.game-card--yours.is-near {
  outline: 4px solid var(--mint);
  outline-offset: 6px;
}
.game-card--yours.is-warm {
  outline: 3px dashed var(--sky);
  outline-offset: 4px;
}

/* Win celebration */
.game-card.is-win {
  animation: card-win .8s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes card-win {
  0%   { transform: rotate(0); }
  20%  { transform: rotate(-6deg) scale(1.04); }
  50%  { transform: rotate(5deg) scale(1.08); }
  80%  { transform: rotate(-2deg) scale(1.02); }
  100% { transform: rotate(0); }
}

/* Score panel */
.game__score {
  width: 100%;
  display: flex; flex-direction: column; gap: 8px;
}
.game__score-row {
  display: flex; align-items: baseline; justify-content: space-between;
}
.game__score-lbl {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.game__score-num {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: color .25s;
}
.game__score-num.is-good { color: var(--cobalt); }
.game__score-num.is-great { color: var(--mint-deep); }
.game__bar {
  height: 12px;
  background: var(--paper-deep);
  border: var(--bw) solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.game__bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--sky), var(--cobalt) 45%, var(--mint) 100%);
  transition: width .3s cubic-bezier(.2,.9,.3,1.2);
  border-radius: 999px;
}
.game__verdict {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-soft);
  min-height: 18px;
}

.game__actions {
  display: flex; gap: 10px;
  margin-top: 8px;
}
/* override .btn shadow in dark controls panel — use inset */
.demo__controls .btn { box-shadow: 0 3px 0 var(--mint); border-color: var(--mint); background: var(--white); color: var(--ink); }
.demo__controls .btn:hover { box-shadow: 4px 6px 0 var(--mint); transform: translate(-2px, -3px); }
.demo__controls .btn--mint { background: var(--mint); }

/* Confetti */
.game__confetti {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.game__confetti span {
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 14px;
  background: var(--cobalt);
  border-radius: 2px;
  opacity: 0;
  transform-origin: center;
}
.game__confetti.is-firing span {
  animation: confetti-fly 1.4s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes confetti-fly {
  0%   { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(.6); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--cx, 0)), calc(-50% + var(--cy, 0))) rotate(var(--cr, 720deg)) scale(1); }
}
.demo__controls {
  background: var(--ink); color: var(--paper);
  padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.demo__controls .label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sky); margin-bottom: 8px; display: block; }
.demo__controls .row { display: flex; flex-direction: column; gap: 6px; }
.demo__controls input[type=range] {
  appearance: none; -webkit-appearance: none;
  height: 4px; background: rgb(255 255 255 / .15); border-radius: 999px;
}
.demo__controls input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--mint); border: 2px solid var(--ink);
  cursor: none;
}
.demo__controls input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--mint); border: 2px solid var(--ink);
}
.demo__controls .swatches { display: flex; gap: 8px; }
.demo__controls .sw {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 2px solid var(--paper);
  cursor: none;
  position: relative;
}
.demo__controls .sw.is-active::after {
  content: ""; position: absolute; inset: -5px;
  border: 2px solid var(--mint); border-radius: 12px;
}
.demo__controls .seg {
  display: flex; gap: 0; background: rgb(255 255 255 / .08); border-radius: 10px; padding: 3px;
}
.demo__controls .seg button {
  flex: 1; padding: 8px; border: 0; background: transparent; color: rgb(255 255 255 / .6);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 7px;
}
.demo__controls .seg button.is-active { background: var(--mint); color: var(--ink); font-weight: 700; }

.demo-card {
  background: var(--cobalt);
  color: var(--white);
  padding: 36px;
  font-family: var(--f-display);
  font-weight: 700;
  text-align: center;
  transition: border-radius .25s cubic-bezier(.2,.9,.3,1.2), background .25s, transform .25s, box-shadow .25s, padding .25s, font-size .25s;
  border: var(--bw) solid var(--ink);
  min-width: 240px;
  position: relative;
}
.demo-card .ttl { font-size: 28px; letter-spacing: -.02em; line-height: 1; }
.demo-card .sub { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; margin-top: 8px; font-weight: 500; }

.demo__code {
  grid-column: 1 / -1;
  background: var(--paper);
  border-top: var(--bw) solid var(--ink);
  padding: 18px 28px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 14px;
  overflow-x: auto;
}
.demo__code .tag { background: var(--ink); color: var(--mint); padding: 4px 10px; border-radius: 999px; font-size: 11px; }
.demo__code .k { color: var(--cobalt); font-weight: 700; }
.demo__code .v { color: var(--ink); font-weight: 700; }

.work__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.work__head .h2 { max-width: 600px; }
.work__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .work__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .work__grid { grid-template-columns: 1fr; } }

.work-card {
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-lg);
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .4s cubic-bezier(.2,.9,.3,1.2), box-shadow .4s;
  cursor: none;
}
.work-card:hover { transform: translate(-4px, -6px); box-shadow: 12px 16px 0 var(--ink); }
.work-card__cover {
  aspect-ratio: 16/10;
  position: relative; overflow: hidden;
  border-bottom: var(--bw) solid var(--ink);
  display: grid; place-items: center;
  color: rgb(255 255 255 / .5);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em;
}
.work-card__cover.c1 { background: linear-gradient(135deg, var(--cobalt), var(--cobalt-deep) 70%, var(--ink)); }
.work-card__cover.c2 { background: linear-gradient(135deg, var(--mint), var(--sky)); color: var(--ink); }
.work-card__cover.c3 { background: linear-gradient(135deg, var(--ink), var(--cobalt)); }
.work-card__cover.c4 { background: linear-gradient(135deg, var(--paper-deep), var(--sky)); color: var(--ink); }
.work-card__cover::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / .12) 1px, transparent 1px);
  background-size: 14px 14px;
}
.work-card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.work-card__meta { display: flex; gap: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.work-card__meta .dot { color: var(--cobalt); }
.work-card__ttl { font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.work-card__sub { color: var(--ink-soft); font-size: 15px; }
.work-card__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.work-card__tags span { font-family: var(--f-mono); font-size: 11px; padding: 4px 10px; border: 1px solid var(--ink); border-radius: 999px; }

.test {
  background: var(--cobalt); color: var(--white);
  position: relative; overflow: hidden;
  border-top: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
}
.test::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / .08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.test__head { position: relative; margin-bottom: 56px; max-width: 800px; }
.test__head .h2 { color: var(--white); }
.test__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
@media (max-width: 960px) { .test__grid { grid-template-columns: 1fr; } }
.test-card {
  background: var(--paper); color: var(--ink);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow-md);
  transform: rotate(var(--rot, 0deg));
  transition: transform .4s cubic-bezier(.2,.9,.3,1.2);
}
.test-card:hover { transform: rotate(0deg) translateY(-6px); }
.test-card .quote { font-family: var(--f-display); font-weight: 500; font-size: 19px; line-height: 1.35; letter-spacing: -.01em; }
.test-card .quote::before { content: "\201C"; font-size: 48px; line-height: 0; vertical-align: -20px; color: var(--cobalt); margin-right: 4px; }
.test-card .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.test-card .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 700;
  background: var(--mint);
}
.test-card .who .n { font-weight: 600; font-size: 14px; }
.test-card .who .r { font-family: var(--f-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: .08em; text-transform: uppercase; }

.blog__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .blog__grid { grid-template-columns: 1fr; } }
.post-card {
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-lg);
  padding: 28px;
  background: var(--white);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), box-shadow .3s, background .3s;
  position: relative; overflow: hidden;
}
.post-card:hover { transform: translate(-3px, -4px); box-shadow: var(--shadow-md); background: var(--mint); }
.post-card .date { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.post-card .ttl { font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 1.1; letter-spacing: -.02em; }
.post-card .sub { color: var(--ink-soft); font-size: 15px; }
.post-card .read { margin-top: auto; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; display: inline-flex; align-items: center; gap: 8px; }

.banner {
  background: var(--mint);
  border-top: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
  padding: 100px 0;
  position: relative; overflow: hidden;
}
.banner__inner {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: center;
}
@media (max-width: 760px) { .banner__inner { grid-template-columns: 1fr; } }
.banner .h2 { color: var(--ink); }
.banner .scribble {
  font-family: "Bricolage Grotesque", serif;
  font-style: italic; font-weight: 500;
  color: var(--cobalt);
}

.footer {
  background: var(--ink); color: var(--paper);
  padding: 80px 0 32px;
  position: relative; overflow: hidden;
}
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); margin: 0 0 18px; font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { transition: color .2s; }
.footer a:hover { color: var(--mint); }
.footer__brand h3 { font-family: var(--f-display); font-weight: 800; font-size: 40px; letter-spacing: -.02em; line-height: 1; margin: 0 0 18px; }
.footer__brand p { color: rgb(238 242 255 / .7); max-width: 320px; font-size: 15px; }
.footer__bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid rgb(238 242 255 / .15);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 12px; color: rgb(238 242 255 / .55);
}
.footer__bottom .live { color: var(--mint); }
.footer__giant {
  --chars: 7;
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(60px, calc(125vw / var(--chars)), 360px);
  line-height: .85; letter-spacing: -.04em;
  color: var(--cobalt-deep);
  margin-top: 80px;
  user-select: none; white-space: nowrap;
  text-align: center;
  overflow: visible;
  text-wrap: nowrap;
}

.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2,.9,.3,1.05), transform .9s cubic-bezier(.2,.9,.3,1.05); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(30px); transition: opacity .8s cubic-bezier(.2,.9,.3,1.05), transform .8s cubic-bezier(.2,.9,.3,1.05); }
.reveal-stagger.is-in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: .40s; }

.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.spread { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.sub-hero { padding: 80px 0 60px; }
.sub-hero .h1 { font-size: clamp(64px, 10vw, 168px); }
.sub-hero__lede { max-width: 640px; font-size: 19px; color: var(--ink-soft); margin-top: 24px; }
.sub-hero__meta { display: flex; gap: 18px; margin-top: 24px; flex-wrap: wrap; }
.sub-hero__meta .pill {
  padding: 8px 14px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  background: var(--white);
}

.proj-row {
  display: grid;
  grid-template-columns: 80px 1.4fr 1fr 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-top: var(--bw) solid var(--ink);
  transition: padding .3s, background .3s;
  position: relative;
}
.proj-row:last-child { border-bottom: var(--bw) solid var(--ink); }
.proj-row:hover { padding-left: 14px; padding-right: 14px; background: var(--mint); }
.proj-row .num { font-family: var(--f-mono); font-size: 13px; color: var(--ink-mute); }
.proj-row .ttl { font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -.02em; line-height: 1; }
.proj-row .cat { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.proj-row .yr { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; color: var(--ink-soft); }
.proj-row .go {
  width: 48px; height: 48px;
  border: var(--bw) solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  display: grid; place-items: center;
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), background .3s, color .3s;
}
.proj-row:hover .go { background: var(--ink); color: var(--mint); transform: rotate(-45deg); }
@media (max-width: 860px) {
  .proj-row { grid-template-columns: 50px 1fr auto; }
  .proj-row .cat, .proj-row .yr { display: none; }
}

.write-grid { display: grid; grid-template-columns: 240px 1fr; gap: 60px; }
@media (max-width: 860px) { .write-grid { grid-template-columns: 1fr; gap: 24px; } }
.write-side { position: sticky; top: 100px; align-self: start; }
@media (max-width: 860px) {
  .write-side { position: static; top: auto; }
}
.write-side h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 16px; }
.write-side .filt { display: flex; flex-direction: column; gap: 6px; }
.write-side .filt button {
  appearance: none; border: 0; background: transparent;
  text-align: left; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; color: var(--ink); font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .2s;
}
.write-side .filt button .c { font-family: var(--f-mono); font-size: 11px; color: var(--ink-mute); }
.write-side .filt button.is-active { background: var(--ink); color: var(--paper); }
.write-side .filt button.is-active .c { color: var(--mint); }
.write-side .filt button:hover:not(.is-active) { background: var(--paper-deep); }

.write-list { display: flex; flex-direction: column; }
.write-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-top: var(--bw) solid var(--ink);
  transition: padding .3s, background .3s;
}
.write-item:last-child { border-bottom: var(--bw) solid var(--ink); }
.write-item:hover { padding-left: 12px; padding-right: 12px; background: var(--paper-deep); }
.write-item .date { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--ink-mute); padding-top: 8px; }
.write-item .body .ttl { font-family: var(--f-display); font-weight: 700; font-size: clamp(24px, 2.8vw, 36px); letter-spacing: -.02em; line-height: 1.05; }
.write-item .body .sub { color: var(--ink-soft); margin-top: 8px; font-size: 15px; max-width: 560px; }
.write-item .body .tags { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.write-item .body .tags span { font-family: var(--f-mono); font-size: 11px; padding: 4px 10px; border: 1px solid var(--ink); border-radius: 999px; }
.write-item .read { font-family: var(--f-mono); font-size: 12px; color: var(--ink-mute); padding-top: 8px; white-space: nowrap; }
@media (max-width: 860px) {
  .write-item { grid-template-columns: 1fr; gap: 8px; }
  .write-item .read { display: none; }
}

body[data-density="airy"]  { --density: 1.25; }
body[data-density="tight"] { --density: .75; }
body[data-motion="chill"] .marquee__track { animation-duration: 60s; }
body[data-motion="chill"] .sticker--badge { animation-duration: 30s; }
body[data-motion="off"] .marquee__track,
body[data-motion="off"] .sticker--badge,
body[data-motion="off"] .eyebrow .dot { animation: none !important; }
body[data-motion="off"] .reveal { opacity: 1; transform: none; }
body[data-motion="off"] .hero__title .line > span { transform: none; animation: none; }
body[data-motion="off"] .hero__sub, body[data-motion="off"] .hero__cta { opacity: 1; animation: none; }

/* Palette variants */
body[data-palette="midnight"] {
  --paper: #0a0c1f;
  --paper-warm: #11142e;
  --paper-deep: #1b1f3f;
  --white: #1b1f3f;
  --ink: #f1f3ff;
  --ink-soft: #c8cdf2;
  --ink-mute: #7a82b8;
  --cobalt: #7a8bff;
  --cobalt-deep: #4d62ff;
  --sky: #b9c5ff;
  --mint: #6ef0d4;
  --shadow-color: 0 0 0;
}
body[data-palette="ice"] {
  --paper: #f7fbff;
  --paper-warm: #ffffff;
  --paper-deep: #e6f0ff;
  --cobalt: #1e63ff;
  --mint: #5ee5d1;
  --ink: #02153f;
}
/* ─── Accessibility: skip link, focus-visible, motion ─── */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 2147483647;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--mint);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: top .25s cubic-bezier(.2,.9,.3,1.2);
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 18px;
  outline: 3px solid var(--mint);
  outline-offset: 2px;
}

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible,
.nav__cta:focus-visible {
  outline-color: var(--mint);
  outline-offset: 4px;
}
a:focus-visible {
  outline-color: var(--cobalt);
  outline-offset: 2px;
  border-radius: 2px;
}
main:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee__track,
  .sticker--badge,
  .eyebrow .dot { animation: none !important; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .hero__title .line > span,
  .hero__sub, .hero__cta { transform: none !important; opacity: 1 !important; animation: none !important; }
  #cursor, #cursor-dot { display: none !important; }
  body { cursor: auto !important; }
}

/* Print styles */
@media print {
  body { background: #fff; color: #000; cursor: auto !important; }
  #cursor, #cursor-dot, .nav, .marquee, .banner, .footer__giant,
  .twk, .twk__toggle, .read-progress, .hero__cta, .work-card__cover { display: none !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  .h1, .h2, .h3 { color: #000 !important; page-break-after: avoid; }
  a { color: #000 !important; text-decoration: underline; }
  section { padding: 20px 0 !important; page-break-inside: avoid; }
  .footer { background: #fff !important; color: #000 !important; border-top: 1px solid #000; }
  .footer h4 { color: #000 !important; }
  .stats, .test { background: #fff !important; color: #000 !important; }
  .stats__head h2, .test__head .h2 { color: #000 !important; }
}

body[data-palette="electric"] {
  --paper: #e9ecff;
  --cobalt: #3b1eff;
  --cobalt-deep: #2a13c9;
  --mint: #a8ff5e;
  --mint-deep: #7ee03c;
  --ink: #0e0a40;
}

/* ─── About page ────────────────────────────────────────── */
.about-intro {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: start;
  padding: 20px 0 80px;
}
@media (max-width: 860px) { .about-intro { grid-template-columns: 1fr; gap: 32px; } }
.about-intro__copy p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 18px;
  max-width: 600px;
}
.about-intro__copy p strong { color: var(--ink); font-weight: 600; }
.about-intro__copy p:first-of-type::first-letter {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 64px;
  line-height: .9;
  float: left;
  color: var(--cobalt);
  padding: 4px 12px 0 0;
  margin-top: 4px;
}
.about-intro__sidecard {
  background: var(--ink);
  color: var(--paper);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
}
.about-intro__sidecard h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); margin: 0 0 14px; font-weight: 600; }
.about-intro__sidecard dl { margin: 0; display: grid; grid-template-columns: 100px 1fr; gap: 10px 16px; font-size: 14px; }
.about-intro__sidecard dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgb(238 242 255 / .55); }
.about-intro__sidecard dd { margin: 0; color: var(--paper); }
.about-intro__sidecard dd a { color: var(--mint); }
.about-intro__sidecard dd a:hover { text-decoration: underline; }

.timeline { position: relative; }
.timeline__head { margin-bottom: 56px; max-width: 720px; }
.timeline__head .h2 { margin-top: 14px; }
.timeline__list { display: flex; flex-direction: column; }
.tl-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 32px;
  padding: 36px 0;
  border-top: var(--bw) solid var(--ink);
  position: relative;
  transition: padding .3s, background .3s;
}
.tl-row:last-child { border-bottom: var(--bw) solid var(--ink); }
.tl-row:hover { padding-left: 14px; padding-right: 14px; background: var(--paper-deep); }
.tl-row .when {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex; flex-direction: column; gap: 4px;
  padding-top: 6px;
}
.tl-row .when .badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--mint);
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .12em;
  align-self: flex-start;
}
.tl-row .when .badge .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: pulse 2s infinite;
}
.tl-row .body {
  display: flex; flex-direction: column; gap: 8px;
}
.tl-row .role { font-family: var(--f-display); font-weight: 700; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.02em; line-height: 1.1; }
.tl-row .org { font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em; color: var(--cobalt); font-weight: 600; }
.tl-row .desc { color: var(--ink-soft); font-size: 15px; line-height: 1.55; max-width: 640px; margin-top: 6px; }
.tl-row .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tl-row .tags span { font-family: var(--f-mono); font-size: 11px; padding: 4px 10px; border: 1px solid var(--ink); border-radius: 999px; background: var(--white); }
.tl-row .marker {
  width: 56px; height: 56px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-md);
  background: var(--white);
  display: grid; place-items: center;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  transform: rotate(-4deg);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
}
.tl-row:hover .marker { transform: rotate(0deg) scale(1.05); background: var(--cobalt); color: var(--white); }
.tl-row[data-kind="edu"] .marker { background: var(--mint); }
.tl-row[data-kind="edu"] .org { color: var(--ink); }
@media (max-width: 860px) {
  .tl-row { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
  .tl-row .marker { display: none; }
}

/* Bento facts grid */
.facts {
  background: var(--paper-warm);
  border-top: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
}
.facts__head { max-width: 720px; margin-bottom: 48px; }
.facts__head .h2 { margin-top: 14px; }
.facts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 20px;
}
@media (max-width: 860px) { .facts__grid { grid-template-columns: 1fr 1fr; } }
.fact {
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 12px;
  position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), box-shadow .3s;
}
.fact:hover { transform: translate(-3px, -3px); box-shadow: 9px 12px 0 var(--ink); }
.fact--cobalt { background: var(--cobalt); color: var(--white); grid-column: span 2; grid-row: span 1; }
.fact--mint   { background: var(--mint); }
.fact--ink    { background: var(--ink); color: var(--paper); }
.fact--white  { background: var(--white); }
.fact--ice    { background: var(--paper-deep); }
.fact--wide   { grid-column: span 2; }
.fact .lbl { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.fact .val { font-family: var(--f-display); font-weight: 800; font-size: clamp(28px, 3vw, 44px); letter-spacing: -.02em; line-height: 1; }
.fact .desc { font-size: 14px; line-height: 1.5; opacity: .85; }
.fact--cobalt .lbl, .fact--ink .lbl { color: var(--mint); opacity: 1; }
@media (max-width: 860px) {
  .fact--cobalt, .fact--wide { grid-column: span 2; }
}

/* Skills chip wall */
.skill-wall {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 12px;
}
.skill-wall .chip { padding: 10px 16px; font-size: 13px; }

/* ─── Blog post / article ───────────────────────────────── */
.read-progress {
  position: fixed; top: 0; left: 0;
  height: 4px;
  background: var(--cobalt);
  z-index: 1000;
  width: 0%;
  transition: width .08s linear;
  border-bottom-right-radius: 4px;
}

.post-hero {
  padding: 60px 0 30px;
  position: relative;
}
.post-hero .crumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink-mute);
  margin-bottom: 24px;
}
.post-hero .crumb a { color: var(--cobalt); }
.post-hero .crumb a:hover { text-decoration: underline; }
.post-hero h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: -.02em;
  line-height: 1;
  margin: 0;
  max-width: 880px;
  text-wrap: balance;
}
.post-hero .deck {
  margin-top: 24px;
  max-width: 720px;
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
}
.post-hero .meta {
  margin-top: 36px;
  padding-top: 24px;
  border-top: var(--bw) solid var(--ink);
  display: flex; flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}
.post-hero .meta .by {
  display: flex; align-items: center; gap: 12px;
}
.post-hero .meta .by .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--cobalt);
  color: var(--white);
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 16px;
}
.post-hero .meta .by .n { font-weight: 600; font-size: 14px; }
.post-hero .meta .by .r { font-family: var(--f-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: .08em; text-transform: uppercase; }
.post-hero .meta .pill {
  padding: 8px 14px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .04em;
  background: var(--white);
}

.post-cover {
  margin: 40px 0 0;
  height: clamp(260px, 36vw, 460px);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-xl);
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg);
}
.post-cover::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / .14) 1px, transparent 1px);
  background-size: 16px 16px;
}
.post-cover.c-html  { background: linear-gradient(135deg, var(--mint), var(--sky)); color: var(--ink); }
.post-cover.c-css   { background: linear-gradient(135deg, var(--cobalt), var(--violet)); color: var(--white); }
.post-cover.c-bp    { background: linear-gradient(135deg, var(--sky), var(--cobalt)); color: var(--white); }
.post-cover.c-port  { background: linear-gradient(135deg, var(--cobalt), var(--cobalt-deep) 60%, var(--ink)); color: var(--white); }
.post-cover.c-cube  { background: linear-gradient(135deg, var(--mint), var(--cobalt)); color: var(--white); }
.post-cover.c-wp    { background: linear-gradient(135deg, var(--cobalt-deep), var(--ink)); color: var(--mint); }
.post-cover.c-head  { background: linear-gradient(135deg, var(--ink), var(--cobalt)); color: var(--mint); }
.post-cover.c-ship  { background: linear-gradient(135deg, var(--paper-deep), var(--sky)); color: var(--ink); }
.post-cover .glyph {
  position: relative;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(120px, 18vw, 240px);
  letter-spacing: -.04em;
  line-height: .85;
  transform: rotate(-4deg);
  text-shadow: 4px 4px 0 rgb(10 21 71 / .15);
}

/* Article body */
.post-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px) 220px;
  gap: 60px;
  justify-content: center;
  padding: 60px 0 80px;
}
@media (max-width: 1024px) {
  .post-body { grid-template-columns: 1fr; gap: 24px; }
  .post-toc, .post-aside { display: none; }
}
.post-toc {
  position: sticky;
  top: 100px;
  align-self: start;
}
.post-toc h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 14px;
}
.post-toc ol {
  list-style: none;
  padding: 0; margin: 0;
  counter-reset: toc;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px;
}
.post-toc ol li { counter-increment: toc; }
.post-toc ol li a {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  line-height: 1.35;
  transition: background .2s, color .2s;
}
.post-toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--ink-mute);
}
.post-toc ol li a:hover { background: var(--paper-deep); color: var(--ink); }

.post-aside {
  position: sticky;
  top: 100px;
  align-self: start;
  display: flex; flex-direction: column; gap: 20px;
}
.post-aside__card {
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-md);
  padding: 18px;
  background: var(--paper-deep);
  font-size: 13px;
  line-height: 1.5;
}
.post-aside__card h5 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 10px;
}
.post-aside__card .row-links { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.post-aside__card .row-links a {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 12px;
  color: var(--cobalt); font-weight: 600;
}
.post-aside__card .row-links a:hover { text-decoration: underline; }
.post-aside__share { display: flex; gap: 8px; }
.post-aside__share a {
  width: 38px; height: 38px;
  border: var(--bw) solid var(--ink);
  border-radius: 10px;
  background: var(--white);
  display: grid; place-items: center;
  transition: transform .25s, background .25s, color .25s;
}
.post-aside__share a:hover { transform: translate(-2px, -2px); background: var(--cobalt); color: var(--white); box-shadow: 4px 5px 0 var(--ink); }

.prose {
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
}
.prose > * + * { margin-top: 1.2em; }
.prose > h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 2em 0 .6em;
  scroll-margin-top: 90px;
}
.prose > h2:first-child { margin-top: 0; }
.prose > h2 .num {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--cobalt);
  margin-right: 12px;
  font-weight: 600;
}
.prose > h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -.01em;
  line-height: 1.2;
  margin: 1.6em 0 .4em;
}
.prose p { margin: 0; color: var(--ink); }
.prose p strong { font-weight: 600; }
.prose p em { font-style: italic; color: var(--ink-soft); }
.prose a:not(.btn) { color: var(--cobalt); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; transition: background .15s; }
.prose a:not(.btn):hover { background: var(--mint); }
.prose .lede {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -.01em;
}
.prose .lede::first-letter {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 88px;
  line-height: .9;
  float: left;
  padding: 8px 14px 0 0;
  margin-top: 4px;
  color: var(--cobalt);
}
.prose ul, .prose ol { padding-left: 0; margin: 0; }
.prose ul li, .prose ol li {
  list-style: none;
  position: relative;
  padding-left: 28px;
  margin: .4em 0;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 8px; top: .65em;
  width: 8px; height: 8px;
  background: var(--cobalt);
  border-radius: 2px;
  transform: rotate(45deg);
}
.prose ol { counter-reset: pol; }
.prose ol li { counter-increment: pol; }
.prose ol li::before {
  content: counter(pol, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--cobalt);
  font-weight: 700;
  line-height: 1.9;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 24px 28px;
  border: var(--bw) solid var(--ink);
  border-left-width: 8px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--paper-deep);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  letter-spacing: -.01em;
  color: var(--ink);
}
.prose blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.prose .callout {
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-md);
  padding: 20px 24px;
  background: var(--mint);
  font-size: 16px;
  line-height: 1.55;
  position: relative;
}
.prose .callout::before {
  content: "✱";
  position: absolute;
  top: -14px; left: 24px;
  width: 32px; height: 32px;
  background: var(--ink); color: var(--mint);
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800;
}
.prose .callout.callout--note { background: var(--paper-deep); }
.prose .callout.callout--note::before { background: var(--cobalt); color: var(--white); content: "i"; font-style: italic; }
.prose .callout.callout--warn { background: #ffe7c7; }
.prose .callout.callout--warn::before { background: #c87b00; color: #fff; content: "!"; }
.prose code {
  font-family: var(--f-mono);
  font-size: .9em;
  background: var(--paper-deep);
  border: 1px solid rgb(10 21 71 / .12);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--cobalt-deep);
  word-break: break-word;
}
.prose pre {
  margin: 1.6em 0;
  background: var(--ink);
  color: var(--paper);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-md);
  padding: 20px 24px;
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  box-shadow: var(--shadow-md);
  position: relative;
}
.prose pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 10px; right: 14px;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--sky);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--paper);
  font-size: inherit;
}
.prose pre .k { color: var(--mint); }       /* keyword */
.prose pre .s { color: var(--sky); }        /* string */
.prose pre .c { color: #6c7396; font-style: italic; } /* comment */
.prose pre .t { color: #ffd166; }           /* tag */
.prose pre .a { color: #6ef0d4; }           /* attribute */
.prose pre .v { color: #ffb4c8; }           /* value */
.prose pre .p { color: #b8c0f7; }           /* punct */

.prose figure {
  margin: 1.8em 0;
}
.prose figure img,
.prose figure .placeholder {
  width: 100%;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-md);
  display: block;
  box-shadow: var(--shadow-md);
}
.prose figure .placeholder {
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--paper-deep), var(--sky));
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.prose figcaption {
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-mute);
  text-align: center;
}

/* End-of-post footer */
.post-end {
  margin-top: 60px;
  padding-top: 32px;
  border-top: var(--bw) solid var(--ink);
}
.post-end .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-end .tags span {
  font-family: var(--f-mono);
  font-size: 12px;
  padding: 6px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
}
.post-end .share-row {
  margin-top: 24px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}

/* Related posts */
.related {
  background: var(--paper-deep);
  border-top: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
}
.related__head { margin-bottom: 32px; }
.related__head .h2 { font-size: clamp(28px, 3vw, 44px); margin-top: 12px; }
.related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .related__grid { grid-template-columns: 1fr; } }
