/* ─────────────────────────────────────────────
   Portfolio v2 — Framer-inspired
   dark / vibrant accent / rounded surfaces / motion-rich
   ───────────────────────────────────────────── */

:root {
  /* defaults; JS overrides accent + theme */
  --bg: #0A0A0F;
  --bg-2: #0E0E15;
  --surface: #14141C;
  --surface-2: #1A1A24;
  --surface-3: #20202C;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #FFFFFF;
  --text-dim: #B5B3C4;
  --text-muted: #6E6B82;

  /* accent system — coral/sunset */
  --accent: #FF6B4A;
  --accent-2: #FF3D7F;
  --accent-3: #FFB259;
  --accent-grad: linear-gradient(120deg, #FFB259 0%, #FF6B4A 35%, #FF3D7F 75%, #B25CFF 100%);
  --accent-grad-soft: linear-gradient(120deg, rgba(255,178,89,.18) 0%, rgba(255,107,74,.18) 35%, rgba(255,61,127,.18) 75%, rgba(178,92,255,.18) 100%);
  --glow: 0 0 80px -20px var(--accent);

  --font-sans: "Geist", -apple-system, system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);

  --pad: clamp(16px, 3vw, 32px);
  --max-w: 1320px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 36px;
}

[data-theme="paper"] {
  --bg: #F2EFEA;
  --bg-2: #EBE7E0;
  --surface: #FFFFFF;
  --surface-2: #F8F5EF;
  --surface-3: #ECE7DD;
  --border: rgba(20, 18, 14, 0.08);
  --border-strong: rgba(20, 18, 14, 0.18);
  --text: #14120E;
  --text-dim: #4D4A42;
  --text-muted: #8A8478;
  --glow: 0 0 80px -20px rgba(255, 107, 74, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
a { color: inherit; text-decoration: none; }
/* `all: unset` resets box-sizing to its content-box initial, which breaks
   any width: 100% button (e.g. the mobile hero CTAs would overflow by 2*padding).
   Force border-box back. */
button { all: unset; box-sizing: border-box; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

/* ---------- type unification ----------
   em is reserved for ONE signature moment (the hero tagline / rotator).
   Everywhere else, em is just a subtle color/weight shift in the same family.
   ----------------------------------------- */
em {
  font-family: inherit !important;
  font-style: normal !important;
  font-weight: inherit !important;
  color: var(--text-dim) !important;
}
.rotator-track > span,
.hero-headline .rotator-track > span {
  font-family: var(--font-serif) !important;
  font-style: italic !important;
  color: transparent !important;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ---------- grid + reveal pass-through ----------
   Reveal wraps each card with a div that breaks the grid stretch.
   Make the Reveal flex through so its child (the card) inherits full height. */
.projects-grid > .reveal,
.write-grid > .reveal,
.now-wrap > .reveal {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.projects-grid > .reveal > .proj-card,
.write-grid > .reveal > .write-card,
.now-wrap > .reveal > .card,
.now-wrap > .reveal > .now-mockup {
  flex: 1;
  width: 100%;
}

/* page-wide grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────── chrome (top nav) ───────── */
.chrome {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 18px;
  max-width: calc(100vw - 24px);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 10px 40px -10px rgba(0,0,0,.4);
  flex-wrap: nowrap;
  white-space: nowrap;
}
.chrome-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
  padding-right: 14px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.chrome-logo .mark {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.chrome-nav {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.chrome-nav button {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.chrome-nav button:hover { color: var(--text); }
.chrome-nav button[data-active="true"] {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
}
.chrome-nav .num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  opacity: 0.9;
}
.chrome-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 13px;
  padding: 9px 16px 9px 18px;
  border-radius: 999px;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.3s;
  margin-left: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
.chrome-cta:hover { transform: scale(1.03); box-shadow: 0 8px 24px -8px rgba(255,255,255,.4); }
.chrome-cta .arr {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.chrome-cta .arr svg { width: 11px; height: 11px; }

/* ── header controls: theme toggle + palette picker ── */
.chrome-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 4px;
  margin-right: 4px;
  border-right: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  flex-shrink: 0;
}
.chrome-icon-btn {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.25s var(--ease-out), color 0.25s, border-color 0.25s, transform 0.25s var(--ease-out);
  position: relative;
}
.chrome-icon-btn:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 12%, transparent);
}
.chrome-theme-icon {
  display: grid; place-items: center;
  width: 18px; height: 18px;
  animation: theme-icon-in 0.5s var(--ease-out);
}
@keyframes theme-icon-in {
  0%   { opacity: 0; transform: rotate(-90deg) scale(0.6); }
  100% { opacity: 1; transform: rotate(0) scale(1); }
}

/* palette button — shows current as a 2x2 swatch */
.chrome-swatch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 16px; height: 16px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent) inset;
}
.chrome-swatch > span { display: block; }

.chrome-palette { position: relative; }

/* expanded palette menu — slides down from button */
.chrome-palette-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow:
    0 20px 50px -15px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.04);
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
  z-index: 200;
}
[data-theme="paper"] .chrome-palette-menu {
  box-shadow: 0 16px 40px -10px rgba(20, 18, 14, 0.2);
}
.chrome-palette-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.chrome-palette-opt {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  display: grid; place-items: center;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
}
.chrome-palette-opt:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  transform: translateY(-1px);
}
.chrome-palette-opt.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.chrome-palette-opt .chrome-swatch {
  width: 20px; height: 20px;
}

/* compact controls on narrow widths */
@media (max-width: 1100px) {
  .chrome-controls { padding: 0 6px 0 2px; gap: 2px; }
  .chrome-icon-btn { width: 28px; height: 28px; border-radius: 8px; }
  .chrome-swatch { width: 14px; height: 14px; }
}
@media (max-width: 820px) {
  .chrome-controls { border-right: none; padding: 0 4px 0 0; margin-right: 0; }
}
/* theme toggle stays visible on all widths — the 28px button fits fine */

/* hide section numbers at medium widths to save space */
@media (max-width: 1100px) {
  .chrome-nav .num { display: none; }
  .chrome-nav button { padding: 8px 12px; }
}

/* hide nav at narrow widths */
@media (max-width: 820px) {
  .chrome-nav { display: none; }
  .chrome { padding: 6px 6px 6px 12px; gap: 4px; }
  .chrome-logo { padding-right: 10px; margin-right: 0; }
}

/* shrink CTA label on very narrow */
@media (max-width: 460px) {
  .chrome-cta .label-long { display: none; }
}

/* scroll progress */
.progress {
  position: fixed; top: 0; left: 0;
  height: 2px;
  background: var(--accent-grad);
  width: var(--p, 0%);
  z-index: 99;
  transition: width 80ms linear;
}

/* ───────── floating sticky CTA ───────── */
.sticky-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 14px 14px 22px;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
  transform: translateY(120px);
  opacity: 0;
  transition: transform 0.6s var(--ease-spring), opacity 0.3s, box-shadow 0.3s;
}
.sticky-cta.show { transform: translateY(0); opacity: 1; }
.sticky-cta:hover { box-shadow: 0 24px 60px -10px rgba(0,0,0,.6), 0 0 40px -10px var(--accent); }
.sticky-cta .arr {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: grid; place-items: center;
  color: #fff;
  transition: transform 0.4s var(--ease-out);
}
.sticky-cta:hover .arr { transform: rotate(-45deg); }
.sticky-cta .arr svg { width: 13px; height: 13px; }
@media (max-width: 720px) {
  .sticky-cta { right: 16px; bottom: 16px; padding: 12px 12px 12px 18px; font-size: 13px; }
}

/* ───────── shell ───────── */
.shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

section {
  position: relative;
  padding: clamp(60px, 9vh, 100px) 0;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.eyebrow .num {
  color: var(--accent);
  font-weight: 500;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.display {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(56px, 10vw, 152px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}
.display em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
}
.display .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h2 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(38px, 5.5vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.line-keep {
  display: inline-block;
  white-space: nowrap;
}
.h2 .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 56ch;
  letter-spacing: -0.005em;
}

/* big rounded button */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 14px 14px 22px;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}
.btn:hover { transform: scale(1.04); box-shadow: 0 12px 40px -10px rgba(255,255,255,.3); }
.btn .arr {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: grid; place-items: center;
  color: #fff;
  transition: transform 0.4s var(--ease-out);
}
.btn:hover .arr { transform: rotate(-45deg); }
.btn .arr svg { width: 13px; height: 13px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  transition: border-color 0.3s, transform 0.3s var(--ease-spring), background 0.3s;
}
.btn-ghost:hover { border-color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); transform: scale(1.03); }

/* ───────── reveal animations ───────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.split { display: inline; }
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  margin-right: 0.24em;
  padding-bottom: 0.08em; /* prevent descender clipping */
}
.split .w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out);
  transition-delay: calc(var(--delay, 0ms) + var(--i, 0) * 70ms);
}
.split.in .w > span { transform: translateY(0); }

.mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
}
.mask > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.mask.in > span { transform: translateY(0); }

/* ───────── hero ───────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: clamp(120px, 16vh, 180px);
  padding-bottom: clamp(50px, 8vh, 90px);
  position: relative;
  overflow: hidden;
}

/* hero background orbs */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orb-drift 24s var(--ease-smooth) infinite;
}
.orb-1 {
  width: 540px; height: 540px;
  top: -10%; left: -8%;
  background: var(--accent);
}
.orb-2 {
  width: 460px; height: 460px;
  top: 12%; right: -10%;
  background: var(--accent-2);
  animation-delay: -8s;
}
.orb-3 {
  width: 380px; height: 380px;
  bottom: -10%; left: 35%;
  background: #B25CFF;
  animation-delay: -16s;
  opacity: 0.3;
}
@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.05); }
  66% { transform: translate(-40px, 30px) scale(0.95); }
}
[data-theme="paper"] .orb { opacity: 0.18; }

/* grid overlay */
.hero-grid {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
  opacity: 0.6;
}

.hero-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
  align-self: center;
}
@media (max-width: 1024px) {
  .hero-main {
    grid-template-columns: 1fr;
    gap: clamp(32px, 4vw, 48px);
  }
  .hero-illustration { display: none; }
}

.hero-text {
  display: grid;
  gap: clamp(24px, 3vw, 40px);
}

.hero-headline {
  font-size: clamp(48px, 7vw, 40px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  font-weight: 500;
  max-width: 14ch;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 16px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
  width: fit-content;
}
.hero-badge .pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-grad);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.hero-headline em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text-dim);
}

/* rotating word */
.rotator {
  display: inline-flex;
  height: 1.2em;
  overflow: hidden;
  vertical-align: top;
  position: relative;
  align-items: flex-start;
}
.rotator-track {
  display: flex;
  flex-direction: column;
  animation: rot 9s var(--ease-smooth) infinite;
}
.rotator-track > span {
  display: block;
  height: 1.2em;
  line-height: 1.2;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  padding-right: 0.05em;
  box-sizing: border-box;
}
@keyframes rot {
  0%,   20% { transform: translateY(0); }
  25%,  45% { transform: translateY(-1.2em); }
  50%,  70% { transform: translateY(-2.4em); }
  75%,  95% { transform: translateY(-3.6em); }
  100%      { transform: translateY(0); }
}

.hero-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

.hero-meta {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .k { color: var(--text-dim); }
.hero-meta .live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #61D095;
  box-shadow: 0 0 0 3px rgba(97, 208, 149, 0.18);
}

/* ───────── marquee strip ───────── */
.strip {
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 3;
}
.strip-frame {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  overflow: hidden;
  position: relative;
}
.strip-frame::before, .strip-frame::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.strip-frame::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.strip-frame::after { right: 0; background: linear-gradient(to left, var(--bg), transparent); }

.strip-track {
  display: flex;
  width: max-content;
  animation: strip 38s linear infinite;
  gap: 56px;
  align-items: center;
}
@keyframes strip {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.strip-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-dim);
  white-space: nowrap;
}
.strip-item em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text);
}
.strip-item .sparkle {
  color: var(--accent);
  font-size: 18px;
}

/* ───────── now (current work) ───────── */
.now-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 900px) { .now-wrap { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(28px, 3vw, 40px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s var(--ease-out), transform 0.5s var(--ease-out);
}
.card:hover { border-color: var(--border-strong); }

.card-feature {
  background:
    radial-gradient(ellipse 110% 80% at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 50%),
    radial-gradient(ellipse 90% 70% at 100% 100%, color-mix(in srgb, var(--accent-2) 18%, transparent) 0%, transparent 50%),
    var(--surface);
  display: flex; flex-direction: column; gap: 24px;
  position: relative;
}
.card-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  padding: 1px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 60%, transparent), transparent 40%, color-mix(in srgb, var(--accent-2) 50%, transparent));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

.now-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
.now-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.now-status .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.2s ease-out infinite;
}

.now-title {
  font-size: clamp(36px, 4.2vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.now-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text-dim);
}

.now-blurb {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 52ch;
}

.now-stack {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: auto;
}
.now-stack span {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
}

.now-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.now-meta .k { color: var(--text-dim); margin-right: 6px; }

/* "this week" aside as a list */
.aside-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(28px, 3vw, 40px);
  display: flex; flex-direction: column;
}
.aside-card h4 {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.aside-card h4::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.aside-list { display: flex; flex-direction: column; gap: 0; flex: 1; }
.aside-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s var(--ease-out);
}
.aside-item:last-child { border-bottom: 0; }
.aside-item:hover { padding-left: 8px; }
.aside-item:hover .aside-ix { color: var(--accent); }
.aside-ix {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.3s;
}
.aside-label { font-size: 15px; color: var(--text); font-weight: 500; }
.aside-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
}

/* ───────── section heading group ───────── */
.sec-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: clamp(40px, 6vh, 72px);
}
.sec-head-title { max-width: 36ch; }
.sec-head-meta {
  display: flex; flex-direction: column; gap: 8px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.sec-head-meta .num {
  font-size: 14px;
  color: var(--accent);
}
#writing .sec-head {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 18px;
}
#writing .sec-head-title {
  max-width: none;
}
#writing .sec-head-meta {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
}
@media (max-width: 720px) {
  .sec-head { grid-template-columns: 1fr; gap: 16px; }
  .sec-head-meta { text-align: left; flex-direction: row; gap: 16px; }
}

/* ───────── work (past) — pinned stack of cards ───────── */
.work-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(28px, 3.5vw, 48px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.5s var(--ease-out), background 0.5s var(--ease-out);
}
.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 100% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
  pointer-events: none;
}
.work-card:hover { border-color: var(--border-strong); }
.work-card:hover::before { opacity: 1; }

.work-grid {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
  position: relative;
}
@media (max-width: 760px) {
  .work-grid { grid-template-columns: 1fr; gap: 16px; }
}

.work-year {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  padding-top: 6px;
  display: flex; flex-direction: column; gap: 6px;
}
.work-year .badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.work-body { display: flex; flex-direction: column; gap: 16px; }
.work-co {
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.work-co em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text-dim);
  font-size: 0.5em;
}
.work-role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.work-desc {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 60ch;
}
.work-meta {
  display: flex; flex-wrap: wrap;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.work-meta .k { color: var(--text-dim); margin-right: 6px; }

.work-arr {
  width: 44px; height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-dim);
  transition: transform 0.4s var(--ease-out), border-color 0.3s, color 0.3s, background 0.3s;
  flex-shrink: 0;
}
.work-card:hover .work-arr {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
  transform: rotate(-45deg);
}

/* ───────── projects (visual showcase) ───────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 980px) { .projects-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .projects-grid { grid-template-columns: 1fr; } }

.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  height: 100%;
  transition: border-color 0.5s var(--ease-out), background 0.5s var(--ease-out);
}
.proj-card:hover { border-color: var(--border-strong); }
.proj-card:hover .proj-preview { transform: scale(1.03); }
.proj-card:hover .proj-arr { background: var(--accent-grad); color: #fff; border-color: transparent; transform: rotate(-45deg); }

.proj-preview-wrap {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.proj-preview {
  position: absolute; inset: 0;
  transition: transform 0.7s var(--ease-out);
}

/* preview: telegram bot */
.preview-bot {
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 50%),
    radial-gradient(circle at 70% 70%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 50%),
    var(--bg-2);
  display: grid;
  place-items: center;
  padding: 20px;
}
.preview-bot .bubbles {
  display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 220px;
}

/* preview: ui library — full sign-in window */
.preview-ui {
  background:
    radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--accent-3) 25%, transparent), transparent 50%),
    var(--bg-2);
  display: grid;
  place-items: center;
  padding: 18px;
}
.preview-ui .ui-window {
  width: 100%; max-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0 12px 12px;
  display: flex; flex-direction: column; gap: 7px;
  box-shadow: 0 14px 40px -10px rgba(0,0,0,.4);
  position: relative;
  overflow: hidden;
}

/* window chrome */
.preview-ui .ui-window-bar {
  display: flex; align-items: center;
  height: 26px;
  margin: 0 -12px 4px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  gap: 8px;
}
.preview-ui .ui-window-dots { display: flex; gap: 4px; }
.preview-ui .ui-window-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--surface-3);
}
.preview-ui .ui-window-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.preview-ui .ui-window-x {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1;
  padding: 0 2px;
  cursor: default;
}

/* tabs / segmented */
.preview-ui .ui-tabs {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  height: 24px;
  align-items: center;
}
.preview-ui .ui-tab {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  z-index: 2;
  transition: color 0.3s;
}
.preview-ui .ui-tab.active { color: var(--text); }
.preview-ui .ui-tab-pill {
  position: absolute;
  top: 2px; bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  background: var(--surface);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 1;
  animation: ui-tab-slide 9s ease-in-out infinite;
}
@keyframes ui-tab-slide {
  0%, 65%, 100% { transform: translateX(0); }
  70%, 80%      { transform: translateX(100%); }
}

/* avatar row */
.preview-ui .ui-row {
  display: flex; align-items: center; gap: 8px;
}
.preview-ui .ui-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-grad);
  flex-shrink: 0;
  position: relative;
}
.preview-ui .ui-circle::after {
  content: "";
  position: absolute;
  right: -1px; bottom: -1px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #61D095;
  border: 2px solid var(--surface);
}
.preview-ui .ui-bars { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.preview-ui .ui-bar { height: 5px; background: var(--surface-3); border-radius: 4px; }
.preview-ui .ui-bar.long { width: 100%; }
.preview-ui .ui-bar.short { width: 60%; }

/* toggle */
.preview-ui .ui-toggle {
  width: 22px; height: 13px;
  border-radius: 7px;
  background: var(--surface-3);
  position: relative;
  flex-shrink: 0;
  animation: ui-toggle-bg 9s ease-in-out infinite;
}
.preview-ui .ui-toggle-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  animation: ui-toggle-knob 9s ease-in-out infinite;
}
@keyframes ui-toggle-bg {
  0%, 38%, 100% { background: var(--surface-3); }
  42%, 95%      { background: var(--accent); }
}
@keyframes ui-toggle-knob {
  0%, 38%, 100% { transform: translateX(0); }
  42%, 95%      { transform: translateX(9px); }
}

/* inputs */
.preview-ui .ui-input {
  height: 26px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center;
  padding: 0 8px;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.preview-ui .ui-input-icon {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}
.preview-ui .ui-input-text {
  display: inline-block;
  flex: 1;
  width: 0;
  height: 14px;
  overflow: hidden;
  white-space: nowrap;
  color: var(--text);
}
.preview-ui .ui-input-text::before { content: "you@example.com"; }
.preview-ui .ui-input-caret {
  display: inline-block;
  width: 1px;
  height: 11px;
  background: var(--accent);
  opacity: 0;
  flex-shrink: 0;
}

/* password */
.preview-ui .ui-pwd-dots {
  flex: 1;
  display: flex;
  gap: 3px;
  align-items: center;
  height: 14px;
}
.preview-ui .ui-pwd-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0;
}
.preview-ui .ui-input-eye {
  font-size: 6px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* checkbox row */
.preview-ui .ui-check-row {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-dim);
}
.preview-ui .ui-checkbox {
  width: 13px; height: 13px;
  border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-2);
  display: grid; place-items: center;
  flex-shrink: 0;
  position: relative;
  transition: background 0.25s, border-color 0.25s;
  animation: ui-check-box 9s ease-in-out infinite;
}
.preview-ui .ui-check-mark {
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  animation: ui-check-tick 9s ease-out infinite;
}
@keyframes ui-check-box {
  0%, 58%, 100% { background: var(--bg-2); border-color: var(--border-strong); }
  62%, 95%      { background: var(--accent); border-color: var(--accent); }
}
@keyframes ui-check-tick {
  0%, 60%, 100% { opacity: 0; transform: scale(0.4); }
  64%           { opacity: 1; transform: scale(1.3); }
  68%, 95%      { opacity: 1; transform: scale(1); }
}
.preview-ui .ui-check-label { flex: 1; }
.preview-ui .ui-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 30%, transparent);
  text-underline-offset: 2px;
}

/* button */
.preview-ui .ui-btn {
  height: 28px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}

/* preview: messenger pwa */
.preview-msg {
  background:
    radial-gradient(circle at 30% 70%, color-mix(in srgb, #B25CFF 25%, transparent), transparent 50%),
    radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 50%),
    var(--bg-2);
  padding: 18px;
  display: flex; flex-direction: column; gap: 6px;
  align-items: center; justify-content: center;
}
.preview-msg .conv {
  width: 100%; max-width: 220px;
  display: flex; flex-direction: column; gap: 6px;
}
.preview-msg .msg {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 7px 11px;
  border-radius: 14px;
  max-width: 75%;
  display: flex; align-items: center; gap: 6px;
}
.preview-msg .msg.in {
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.preview-msg .msg.out {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.preview-msg .msg .check { font-size: 9px; opacity: 0.8; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.proj-body {
  padding: 24px 24px 28px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.proj-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.proj-tag .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.proj-name {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
}
.proj-name h3 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.proj-name h3 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text-dim);
}
.proj-arr {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-dim);
  transform: rotate(0deg);
  transition: transform 0.65s var(--ease-out), background 0.35s var(--ease-out), color 0.35s, border-color 0.35s;
  will-change: transform;
}
.proj-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
  flex: 1;
}
.proj-stack {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: 8px;
}
.proj-stack span:not(:last-child)::after {
  content: "·"; margin: 0 6px; color: var(--border-strong);
}

/* ───────── writing ───────── */
.write-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 760px) { .write-grid { grid-template-columns: 1fr; } }

.write-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(28px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.5s var(--ease-out), background 0.5s var(--ease-out);
  min-height: 280px;
}
.write-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 50%);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
  pointer-events: none;
}
.write-card:hover { border-color: var(--border-strong); }
.write-card:hover::before { opacity: 1; }
.write-card:hover .write-arr { background: var(--accent-grad); color: #fff; border-color: transparent; transform: rotate(-45deg); }

.write-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
}
.write-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.write-arr {
  width: 40px; height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-dim);
  transition: transform 0.4s var(--ease-out), background 0.3s, color 0.3s, border-color 0.3s;
  flex-shrink: 0;
}

.write-title {
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  flex: 1;
}
.write-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text-dim);
}

.write-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.write-foot .views {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-dim);
}
.write-foot .views .dot {
  width: 5px; height: 5px; border-radius: 50%; background: #61D095;
}

/* ───────── contact CTA banner ───────── */
.cta-banner {
  margin: 0 var(--pad);
  padding: clamp(60px, 10vw, 140px) clamp(32px, 6vw, 96px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 50%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 50%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, #B25CFF 20%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
}
[data-theme="paper"] .cta-banner::before {
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px);
}

.cta-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 28px;
  position: relative; z-index: 2;
}
.cta-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.cta-title {
  font-size: clamp(48px, 8vw, 128px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.04em;
  position: relative; z-index: 2;
  margin-bottom: 36px;
}
.cta-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.cta-actions {
  display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  position: relative; z-index: 2;
}

.cta-directory {
  margin-top: clamp(60px, 8vh, 100px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  position: relative; z-index: 2;
}
@media (max-width: 720px) { .cta-directory { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .cta-directory { grid-template-columns: 1fr; } }

.dir-row {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 0;
  border-right: 1px solid var(--border);
  padding-left: 20px;
  padding-right: 20px;
  transition: background 0.3s;
}
.dir-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.dir-row:hover .dir-v { color: var(--accent); }
.dir-row:last-child { border-right: 0; }
.dir-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dir-v {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  transition: color 0.3s;
  display: inline-flex; align-items: center; gap: 8px;
}
.obf-text {
  display: inline-block;
  flex: 0 1 auto;
  max-width: 100%;
  height: 1.35em;
  color: inherit;
  vertical-align: -0.2em;
}

/* ───────── footer ───────── */
.foot-wrap {
  padding: 80px var(--pad) 24px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.foot-mark-wrap {
  overflow: hidden;
  width: 100%;
  margin-bottom: 40px;
  user-select: none;
  pointer-events: none;
  position: relative;
}
.foot-mark-wrap::before,
.foot-mark-wrap::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.foot-mark-wrap::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.foot-mark-wrap::after { right: 0; background: linear-gradient(to left, var(--bg), transparent); }

.foot-mark-track {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  width: max-content;
  animation: footmark 28s linear infinite;
  will-change: transform;
}
@keyframes footmark {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.foot-mark {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(56px, 13vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  opacity: 0.95;
}
.foot-mark-sep {
  font-size: clamp(28px, 6vw, 80px);
  color: var(--accent);
  opacity: 0.45;
  line-height: 1;
}
.foot-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.foot-bar .center { text-align: center; }
.foot-bar .right { text-align: right; }
@media (max-width: 720px) {
  .foot-bar { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .foot-bar .right, .foot-bar .center { text-align: center; }
}

/* ───────── illustration cluster ─────────
   Layered UI-mockup cards with depth + auto-float + mouse parallax.
   Built from CSS primitives — abstract, original, not copying any product.
   ──────────────────────────────────────── */

.hero-illustration {
  position: relative;
  height: clamp(420px, 56vw, 560px);
  width: 100%;
  perspective: 1400px;
  transform-style: preserve-3d;
}

.illu-stack {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* generic illu card */
.illu-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backface-visibility: hidden;
}
[data-theme="paper"] .illu-card {
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(20, 18, 14, 0.04);
}

/* ── 1. BROWSER MOCKUP (main, center, large) ── */
.illu-browser {
  top: 10%;
  left: 12%;
  width: 72%;
  aspect-ratio: 4 / 3.1;
  transform: translateZ(0) rotateZ(-1.5deg);
  z-index: 2;
}
.illu-browser-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.illu-browser-dots {
  display: flex; gap: 5px;
}
.illu-browser-dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface-3);
}
.illu-browser-url {
  flex: 1;
  height: 22px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  gap: 6px;
}
.illu-browser-url::before {
  content: "";
  width: 8px; height: 8px;
  background: #61D095;
  border-radius: 50%;
  flex-shrink: 0;
}

.illu-browser-body {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 14px;
  height: calc(100% - 42px);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 50%),
    var(--surface);
}
.illu-doc {
  display: flex; flex-direction: column; gap: 8px;
}
.illu-doc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.illu-doc-line {
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
}
.illu-doc-line.w-95 { width: 95%; }
.illu-doc-line.w-80 { width: 80%; }
.illu-doc-line.w-70 { width: 70%; }
.illu-doc-line.w-60 { width: 60%; }
.illu-doc-line.w-50 { width: 50%; }
.illu-doc-line.highlight {
  background: var(--accent-grad);
  position: relative;
}
.illu-doc-line.highlight::after {
  content: "";
  position: absolute;
  right: -8px; top: 50%;
  width: 2px; height: 16px;
  background: var(--accent);
  transform: translateY(-50%);
  animation: blink 1s steps(2) infinite;
}
.illu-doc-comment {
  margin-top: 4px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--accent);
  display: flex; align-items: center; gap: 6px;
}
.illu-doc-comment::before {
  content: "";
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-grad);
  flex-shrink: 0;
}
.illu-doc-sidebar {
  display: flex; flex-direction: column; gap: 5px;
}
.illu-doc-sidebar .sb {
  height: 18px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.illu-doc-sidebar .sb.active {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* ── 2. CHART CARD (top right, behind) ── */
.illu-chart {
  top: -2%;
  right: -4%;
  width: 46%;
  aspect-ratio: 1.3 / 1;
  transform: translateZ(-30px) rotateZ(4deg);
  background: var(--surface);
}
.illu-chart-body {
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  height: 100%;
}
.illu-chart-head {
  display: flex; justify-content: space-between; align-items: center;
}
.illu-chart-head .label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.illu-chart-head .value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.illu-chart-bars {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  align-items: end;
  padding: 6px 0;
}
.illu-chart-bars .b {
  background: var(--surface-3);
  border-radius: 3px 3px 0 0;
  position: relative;
}
.illu-chart-bars .b.tall {
  background: var(--accent-grad);
}
.illu-chart-bars .b.tall::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px 3px 0 0;
  background: var(--accent-grad);
  filter: blur(8px);
  opacity: 0.5;
  z-index: -1;
}
.illu-chart-foot {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-muted);
}

/* ── 3. CHAT CARD (bottom left, front) ── */
.illu-chat {
  bottom: 4%;
  left: -4%;
  width: 42%;
  aspect-ratio: 1 / 0.9;
  transform: translateZ(70px) rotateZ(3deg);
}
.illu-chat-body {
  padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.illu-chat-msg {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 7px 11px;
  border-radius: 12px;
  max-width: 80%;
}
.illu-chat-msg.in {
  background: var(--surface-2);
  color: var(--text);
  align-self: flex-start;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.illu-chat-msg.out {
  background: var(--accent-grad);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.illu-chat-typing {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  display: flex; gap: 3px;
}
.illu-chat-typing .d {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: typing 1.4s var(--ease-smooth) infinite;
}
.illu-chat-typing .d:nth-child(2) { animation-delay: 0.15s; }
.illu-chat-typing .d:nth-child(3) { animation-delay: 0.3s; }

/* ── 4. FLOATING METRIC PILL (top-left, accent) ── */
.illu-pill {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow:
    0 20px 50px -15px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  z-index: 4;
}
[data-theme="paper"] .illu-pill {
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.18);
}
.illu-pill-1 {
  top: 2%;
  left: 4%;
  transform: translateZ(60px) rotateZ(-4deg);
  z-index: 4;
}
.illu-pill-2 {
  bottom: 14%;
  right: 4%;
  transform: translateZ(80px) rotateZ(4deg);
}
.illu-pill-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.illu-pill-text {
  display: flex; flex-direction: column; gap: 1px;
  line-height: 1.15;
}
.illu-pill-value {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.illu-pill-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* float keyframes removed — illu cards are static now;
   the parent .illu-stack handles all motion via mouse-parallax */

/* ───────── now / dashboard mockup ───────── */
.now-mockup {
  background:
    radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 50%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.now-mockup-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.now-mockup-bar .dots {
  display: flex; gap: 5px;
}
.now-mockup-bar .dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface-3);
}
.now-mockup-bar .tab {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg-2);
  border-radius: 6px;
  margin-left: 8px;
}

.now-mockup-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}
.now-mockup-head {
  display: flex; justify-content: space-between; align-items: flex-end;
}
.now-mockup-num {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.now-mockup-num-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.now-mockup-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #61D095;
  background: color-mix(in srgb, #61D095 15%, transparent);
  padding: 4px 8px;
  border-radius: 999px;
}

.now-mockup-chart {
  flex: 1;
  min-height: 110px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  align-items: end;
}
.now-mockup-chart .b {
  background: var(--surface-3);
  border-radius: 3px 3px 0 0;
}
.now-mockup-chart .b.hi {
  background: var(--accent-grad);
}

.now-mockup-rows {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.now-mockup-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}
.now-mockup-row .av {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface-3);
}
.now-mockup-row .av.acc { background: var(--accent-grad); }
.now-mockup-row .av.acc2 { background: linear-gradient(135deg, var(--accent-2), #B25CFF); }
.now-mockup-row .lbl {
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
}
.now-mockup-row .pill {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  padding: 3px 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* now section overrides: 3-col when mockup present */
.now-with-mockup {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 1024px) {
  .now-with-mockup { grid-template-columns: 1fr; }
}

/* ───────── shipped highlights (SalaryGuide) ───────── */
.shipped-grid {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vw, 28px);
}
.shipped-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.shipped-head h4 {
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.shipped-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.shipped-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.shipped-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 clamp(16px, 2vw, 28px);
  border-right: 1px solid var(--border);
}
.shipped-item:first-child { padding-left: 0; }
.shipped-item:last-child { padding-right: 0; border-right: 0; }
.shipped-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.shipped-k {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.shipped-v {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.shipped-d {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
}

@media (max-width: 980px) {
  .shipped-list { grid-template-columns: 1fr 1fr; gap: 24px; }
  .shipped-item { border-right: 0; padding: 0; }
  .shipped-item:nth-child(odd) {
    padding-right: clamp(12px, 2vw, 24px);
    border-right: 1px solid var(--border);
  }
}
@media (max-width: 580px) {
  .shipped-list { grid-template-columns: 1fr; gap: 20px; }
  .shipped-item:nth-child(odd) { padding-right: 0; border-right: 0; }
  .shipped-item { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
  .shipped-item:last-child { border-bottom: 0; padding-bottom: 0; }
}

/* ───────── work — illustrated edge ───────── */
.work-card {
  position: relative;
}
.work-illu {
  position: absolute;
  top: 50%;
  right: clamp(24px, 3vw, 40px);
  transform: translateY(-50%);
  width: clamp(140px, 13vw, 180px);
  aspect-ratio: 1 / 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  transition: border-color 0.5s var(--ease-out);
}
.work-card:hover .work-illu {
  border-color: var(--border-strong);
}
@media (max-width: 920px) {
  .work-illu { display: none; }
}

.work-illu-juro {
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    var(--bg-2);
  padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.work-illu-juro .ln {
  height: 5px;
  background: var(--surface-3);
  border-radius: 3px;
}
.work-illu-juro .ln.t { width: 60%; height: 8px; background: var(--surface-2); margin-bottom: 4px; }
.work-illu-juro .ln.h { background: var(--accent-grad); width: 80%; }
.work-illu-juro .ln.w-90 { width: 90%; }
.work-illu-juro .ln.w-70 { width: 70%; }
.work-illu-juro .ln.w-50 { width: 50%; }
.work-illu-juro .comment {
  margin-top: auto;
  padding: 4px 0 0;
  border-top: 1px dashed color-mix(in srgb, var(--accent) 30%, transparent);
  font-family: var(--font-mono);
  font-size: 9px;
  color: color-mix(in srgb, var(--accent) 85%, var(--text));
  display: flex; align-items: center; gap: 5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.work-illu-juro .comment::before {
  content: "";
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 1px;
  animation: blink 1s steps(2) infinite;
}

.work-illu-ancor {
  background:
    radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 60%),
    var(--bg-2);
  padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.work-illu-ancor .row {
  display: grid;
  grid-template-columns: 16px 1fr 24px;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.work-illu-ancor .row:last-child { border-bottom: 0; }
.work-illu-ancor .row .av {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--surface-3);
}
.work-illu-ancor .row .av.a { background: var(--accent-grad); }
.work-illu-ancor .row .av.b { background: linear-gradient(135deg, var(--accent-2), #B25CFF); }
.work-illu-ancor .row .lbl {
  height: 5px;
  background: var(--surface-3);
  border-radius: 3px;
}
.work-illu-ancor .row .lbl.w-80 { width: 80%; }
.work-illu-ancor .row .lbl.w-60 { width: 60%; }
.work-illu-ancor .row .tag {
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 2px 5px;
  border-radius: 4px;
  text-align: center;
}

/* hide illustrations at narrow widths — placed AFTER .work-illu-juro/-ancor
   rules so it actually wins the cascade (same specificity, later source wins) */
@media (max-width: 920px) {
  .work-illu,
  .work-illu-juro,
  .work-illu-ancor { display: none; }
}

/* shift work content left to make room for illustration on desktop */
@media (min-width: 921px) {
  .work-grid {
    grid-template-columns: 140px 1fr;
    padding-right: clamp(200px, 17vw, 260px);
  }
  .work-grid > .work-arr { display: none; }
}


/* ─────────────────────────────────────────────
   MOBILE IMPROVEMENTS
   Tight, scannable, comfortable on small screens.
   ───────────────────────────────────────────── */

/* tighter section padding on small screens */
@media (max-width: 720px) {
  section { padding: clamp(48px, 7vh, 64px) 0; }
  .shell { padding: 0 18px; }
}
@media (max-width: 480px) {
  section { padding: 44px 0; }
  .shell { padding: 0 16px; }
}

/* CHROME — softer on narrow */
@media (max-width: 480px) {
  .chrome { top: 12px; padding: 5px 5px 5px 12px; }
  .chrome-logo { font-size: 13px; padding-right: 8px; gap: 8px; }
  .chrome-logo .mark { width: 22px; height: 22px; font-size: 14px; }
  .chrome-cta { font-size: 12px; padding: 7px 12px 7px 14px; gap: 5px; }
  .chrome-cta .arr { width: 16px; height: 16px; }
}

/* HERO — natural height + better type scale on mobile */
@media (max-width: 1024px) {
  .hero {
    min-height: auto;
    padding-top: clamp(110px, 18vh, 160px);
    padding-bottom: clamp(48px, 8vh, 80px);
  }
}
@media (max-width: 720px) {
  .hero { padding-top: 96px; padding-bottom: 40px; }
  .hero-headline {
    font-size: clamp(42px, 11.5vw, 68px);
    line-height: 0.96;
    max-width: 100%;
  }
  .hero-text { gap: 20px; min-width: 0; }
  .lead { font-size: 16px; max-width: 100%; }

  /* CTAs stack and span the column once two side-by-side buttons
     would no longer comfortably fit (was previously 480px which left
     a gap where buttons overflowed horizontally on phones ~481-720px). */
  .hero-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
  }
  .hero-row .btn,
  .hero-row .btn-ghost {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 14px 18px;
  }
  /* let the label inside .btn shrink instead of forcing intrinsic width */
  .hero-row .btn > span:first-child { min-width: 0; }
}

/* STRIP — smaller type, tighter gaps */
@media (max-width: 720px) {
  .strip-frame { padding: 18px 0; }
  .strip-item { font-size: 18px; padding: 0 24px; gap: 28px; }
  .strip-track { gap: 28px; }
  .strip-frame::before, .strip-frame::after { width: 60px; }
}

/* SECTION HEADS — stack neatly */
@media (max-width: 720px) {
  .sec-head { margin-bottom: 32px; }
  .sec-head-title .h2 { font-size: clamp(30px, 8.5vw, 44px); }
  .sec-head-meta { font-size: 11px; gap: 12px; }
}
@media (max-width: 520px) {
  #writing .line-keep { white-space: normal; }
}

/* NOW SECTION */
@media (max-width: 1024px) {
  .now-wrap { gap: 16px; }
}
@media (max-width: 720px) {
  .card-feature { padding: 24px; gap: 18px; }
  .now-title { font-size: clamp(26px, 7vw, 36px); }
  .now-blurb { font-size: 15px; }
  .now-mockup-bar { padding: 10px 14px; }
  .now-mockup-bar .tab { font-size: 9px; padding: 3px 8px; }
  .now-mockup-body { padding: 18px; gap: 14px; }
  .now-mockup-num { font-size: 26px; }
  .now-mockup-row .pill { font-size: 9px; }
  .now-meta {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* SHIPPED highlights */
@media (max-width: 720px) {
  .shipped-grid { padding: 24px 20px; gap: 18px; }
  .shipped-head { padding-bottom: 14px; }
  .shipped-head h4 { font-size: 18px; }
  .shipped-sub { font-size: 10px; }
  .shipped-k { font-size: 15px; }
  .shipped-d { font-size: 13px; line-height: 1.5; }
}

/* WORK CARDS */
@media (max-width: 760px) {
  .work-card { padding: 24px 22px; }
  .work-grid { gap: 12px; }
  .work-co { font-size: clamp(26px, 8vw, 38px); }
  .work-year { padding-top: 0; font-size: 12px; flex-direction: row; gap: 8px; align-items: center; }
  .work-meta { gap: 14px; padding-top: 10px; }
}

/* PROJECT CARDS */
@media (max-width: 680px) {
  .proj-preview-wrap { height: 190px; }
  .proj-body { padding: 20px 20px 22px; gap: 8px; }
  .proj-name h3 { font-size: 20px; }
  .proj-desc { font-size: 13.5px; }
}
@media (max-width: 480px) {
  .proj-preview-wrap { height: 170px; }
}

/* WRITING CARDS */
@media (max-width: 760px) {
  .write-card { min-height: auto; padding: 24px; gap: 16px; }
  .write-title { font-size: clamp(22px, 5.5vw, 28px); }
}

/* CTA BANNER */
@media (max-width: 720px) {
  .cta-banner {
    padding: 56px 24px 48px;
    margin: 0 4px;
    border-radius: 24px;
  }
  .cta-eyebrow { font-size: 10px; margin-bottom: 20px; }
  .cta-title {
    font-size: clamp(38px, 11vw, 56px);
    margin-bottom: 28px;
  }
  .cta-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  .cta-actions > * {
    width: 100%;
    justify-content: center;
  }
  .cta-actions .btn span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* DIRECTORY rows */
@media (max-width: 720px) {
  .cta-directory { margin-top: 48px; }
  .dir-row { padding: 16px 14px; }
}
@media (max-width: 480px) {
  .cta-directory { grid-template-columns: 1fr; }
  .dir-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    text-align: left;
  }
  .dir-k { text-align: right; }
  .dir-v {
    justify-content: flex-start;
    min-width: 0;
  }
  .dir-v .obf-text { max-width: calc(100% - 20px); }
  .dir-row:last-child { border-bottom: 0; }
  .dir-row:hover { padding-left: 0; }
}

/* FOOTER */
@media (max-width: 720px) {
  .foot-wrap { padding: 60px 16px 24px; margin-top: 60px; }
  .foot-mark-wrap { margin-bottom: 28px; }
  .foot-bar {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 8px;
    font-size: 10.5px;
    padding-top: 20px;
  }
  .foot-bar .right, .foot-bar .center { text-align: center; }
}

/* STICKY CTA */
@media (max-width: 480px) {
  .sticky-cta {
    right: 14px;
    bottom: 14px;
    padding: 10px 10px 10px 16px;
    font-size: 12px;
    gap: 8px;
  }
  .sticky-cta .arr { width: 22px; height: 22px; }
  .sticky-cta .arr svg { width: 11px; height: 11px; }
}

/* prevent any horizontal overflow at narrow widths */
@media (max-width: 720px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .cta-banner { max-width: calc(100% - 8px); }
}

/* ──────────────────────────────────────────────
   ILLUSTRATIONS · ENTRANCE + AMBIENT DRIFT
   – entrance: staggered fade + lift, ~900ms (browser → term → pill)
   – then a slow coordinated drift: each card breathes ±3-4px on a
     long cycle (10-13s) in opposing phases so the composition stays
     balanced instead of chaotic.
   – the two animations are layered on the same element via comma
     syntax, with the drift delayed until after the entrance ends.
   ────────────────────────────────────────────── */

.illu-browser {
  animation:
    illu-enter-browser 900ms cubic-bezier(.22,.61,.36,1) 120ms both,
    illu-drift-browser 13s ease-in-out 1100ms infinite;
}
.illu-term {
  animation:
    illu-enter-term 900ms cubic-bezier(.22,.61,.36,1) 280ms both,
    illu-drift-term 11s ease-in-out 1300ms infinite;
}
.illu-pill-1 {
  animation:
    illu-enter-pill 900ms cubic-bezier(.22,.61,.36,1) 460ms both,
    illu-drift-pill 9s ease-in-out 1500ms infinite;
}

/* entrance: fade in from 14px below, land in the resting transform */
@keyframes illu-enter-browser {
  from { opacity: 0; transform: translateZ(0)    translateY(14px) rotateZ(-1.5deg); }
  to   { opacity: 1; transform: translateZ(0)    translateY(0)    rotateZ(-1.5deg); }
}
@keyframes illu-enter-term {
  from { opacity: 0; transform: translateZ(30px) translateY(14px) rotateZ(2deg); }
  to   { opacity: 1; transform: translateZ(30px) translateY(0)    rotateZ(2deg); }
}
@keyframes illu-enter-pill {
  from { opacity: 0; transform: translateZ(60px) translateY(14px) rotateZ(-4deg); }
  to   { opacity: 1; transform: translateZ(60px) translateY(0)    rotateZ(-4deg); }
}

/* drift: small, slow, opposing phases. browser sinks while pill/term rise. */
@keyframes illu-drift-browser {
  0%, 100% { transform: translateZ(0)    translateY(0)    rotateZ(-1.5deg); }
  50%      { transform: translateZ(0)    translateY(4px)  rotateZ(-1.7deg); }
}
@keyframes illu-drift-term {
  0%, 100% { transform: translateZ(30px) translateY(0)    rotateZ(2deg); }
  50%      { transform: translateZ(30px) translateY(-4px) rotateZ(2.3deg); }
}
@keyframes illu-drift-pill {
  0%, 100% { transform: translateZ(60px) translateY(0)    rotateZ(-4deg); }
  50%      { transform: translateZ(60px) translateY(-3px) rotateZ(-4.4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .illu-browser, .illu-term, .illu-pill-1 { animation: none; }
}

/* ── terminal card: overlaps browser's bottom-right corner, fully in frame ── */
.illu-term {
  bottom: 4%;
  right: 4%;
  width: 44%;
  aspect-ratio: 1.7 / 1;
  transform: translateZ(30px) rotateZ(2deg);
  background: var(--surface);
  z-index: 3;
}
.illu-term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.illu-term-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.illu-term-body {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  color: var(--text);
  height: calc(100% - 30px);
  background:
    radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%),
    var(--surface);
}
.illu-term-body .tl {
  opacity: 0;
  transform: translateX(-4px);
  animation: term-line 6s ease-out infinite;
}
.illu-term-body .tl:nth-child(1) { animation-delay: 0s; }
.illu-term-body .tl:nth-child(2) { animation-delay: 0.5s; }
.illu-term-body .tl:nth-child(3) { animation-delay: 1.1s; }
.illu-term-body .tl:nth-child(4) { animation-delay: 1.7s; }
.illu-term-body .tl:nth-child(5) { animation-delay: 2.3s; }
@keyframes term-line {
  0%   { opacity: 0; transform: translateX(-4px); }
  8%   { opacity: 1; transform: translateX(0); }
  85%  { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(0); }
}
.illu-term-body .prompt { color: var(--accent); margin-right: 6px; }
.illu-term-body .hl { color: var(--accent-2); }
.illu-term-body .muted { color: var(--text-muted); }
.illu-term-body .ok { color: #61D095; margin: 0 2px; }
.illu-term-body .caret {
  display: inline-block;
  width: 6px; height: 11px;
  background: var(--accent);
  vertical-align: -1px;
  animation: blink 0.9s steps(2) infinite;
}

/* ── new: deploy toast (top, slides in/out periodically) ── */
.illu-toast {
  position: absolute;
  top: 4%;
  right: 18%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  z-index: 6;
  transform: translateZ(90px) rotateZ(-3deg);
  animation: toast-cycle 7s ease-in-out infinite;
}
[data-theme="paper"] .illu-toast {
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.18);
}
@keyframes toast-cycle {
  0%   { opacity: 0; transform: translateZ(90px) translate(12px, -6px) rotateZ(-3deg); }
  10%  { opacity: 1; transform: translateZ(90px) translate(0, 0) rotateZ(-3deg); }
  85%  { opacity: 1; transform: translateZ(90px) translate(0, -3px) rotateZ(-3.4deg); }
  95%  { opacity: 0; transform: translateZ(90px) translate(-6px, -10px) rotateZ(-3deg); }
  100% { opacity: 0; transform: translateZ(90px) translate(12px, -6px) rotateZ(-3deg); }
}
.illu-toast-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #61D095, #4DB87C);
  color: #fff;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.illu-toast-text {
  display: flex; flex-direction: column; gap: 1px;
  line-height: 1.2;
}
.illu-toast-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.illu-toast-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.illu-toast-prog {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #61D095, #4DB87C);
  transform-origin: left center;
  border-radius: 0 0 var(--r-md) var(--r-md);
  animation: toast-prog 7s ease-in-out infinite;
}
@keyframes toast-prog {
  0%   { transform: scaleX(0); }
  10%  { transform: scaleX(0); }
  85%  { transform: scaleX(1); }
  100% { transform: scaleX(1); opacity: 0; }
}

/* ── new: sparkles ── */
.illu-spark {
  position: absolute;
  color: var(--accent);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent);
  animation: spark-twinkle 4.5s ease-in-out infinite;
}
.illu-spark-1 { top: 22%;  left: 2%;   font-size: 10px; animation-delay: 0s; }
.illu-spark-2 { top: 8%;   left: 48%;  font-size: 16px; animation-delay: 1.2s; color: var(--accent-2); }
.illu-spark-3 { bottom: 30%; right: 38%; font-size: 12px; animation-delay: 2.4s; color: var(--accent-3); }
.illu-spark-4 { bottom: 6%; left: 36%; font-size: 11px; animation-delay: 3.3s; }
@keyframes spark-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  40%      { opacity: 1; transform: scale(1) rotate(60deg); }
  60%      { opacity: 1; transform: scale(1.05) rotate(120deg); }
  80%      { opacity: 0; transform: scale(0.5) rotate(180deg); }
}

/* ── new: cursor drift ── */
.illu-cursor {
  position: absolute;
  top: 0; left: 0;
  z-index: 7;
  color: var(--accent);
  filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--accent) 40%, transparent));
  animation: cursor-drift 14s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  pointer-events: none;
}
.illu-cursor-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--accent-grad);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 4px 12px -2px color-mix(in srgb, var(--accent) 50%, transparent);
}
@keyframes cursor-drift {
  0%   { transform: translate(28%, 38%); opacity: 0; }
  6%   { opacity: 1; }
  22%  { transform: translate(52%, 30%); opacity: 1; }
  40%  { transform: translate(38%, 58%); opacity: 1; }
  58%  { transform: translate(64%, 64%); opacity: 1; }
  76%  { transform: translate(18%, 50%); opacity: 1; }
  92%  { transform: translate(28%, 38%); opacity: 0; }
  100% { transform: translate(28%, 38%); opacity: 0; }
}

/* ── chart bars: subtle glow shimmer on tall bars ── */
.illu-chart-bars .b {
  transform-origin: bottom center;
  animation: bar-rise 1.4s var(--ease-out) backwards;
}
.illu-chart-bars .b:nth-child(1) { animation-delay: 0.2s; }
.illu-chart-bars .b:nth-child(2) { animation-delay: 0.3s; }
.illu-chart-bars .b:nth-child(3) { animation-delay: 0.4s; }
.illu-chart-bars .b:nth-child(4) { animation-delay: 0.5s; }
.illu-chart-bars .b:nth-child(5) { animation-delay: 0.6s; }
.illu-chart-bars .b:nth-child(6) { animation-delay: 0.7s; }
.illu-chart-bars .b:nth-child(7) { animation-delay: 0.8s; }
.illu-chart-bars .b.tall {
  animation: bar-rise 1.4s var(--ease-out) backwards, bar-glow 3s ease-in-out infinite 1.5s;
}
@keyframes bar-rise {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
@keyframes bar-glow {
  0%, 100% { filter: brightness(1) saturate(1); }
  50%      { filter: brightness(1.15) saturate(1.25); }
}

/* ── now-mockup bars: same staggered rise + glow ── */
.now-mockup-chart .b {
  transform-origin: bottom center;
  animation: bar-rise 1.6s var(--ease-out) backwards;
}
.now-mockup-chart .b:nth-child(1)  { animation-delay: 0.15s; }
.now-mockup-chart .b:nth-child(2)  { animation-delay: 0.22s; }
.now-mockup-chart .b:nth-child(3)  { animation-delay: 0.29s; }
.now-mockup-chart .b:nth-child(4)  { animation-delay: 0.36s; }
.now-mockup-chart .b:nth-child(5)  { animation-delay: 0.43s; }
.now-mockup-chart .b:nth-child(6)  { animation-delay: 0.50s; }
.now-mockup-chart .b:nth-child(7)  { animation-delay: 0.57s; }
.now-mockup-chart .b:nth-child(8)  { animation-delay: 0.64s; }
.now-mockup-chart .b:nth-child(9)  { animation-delay: 0.71s; }
.now-mockup-chart .b:nth-child(10) { animation-delay: 0.78s; }
.now-mockup-chart .b:nth-child(11) { animation-delay: 0.85s; }
.now-mockup-chart .b:nth-child(12) { animation-delay: 0.92s; }
.now-mockup-chart .b.hi {
  animation: bar-rise 1.6s var(--ease-out) backwards, bar-glow 3.5s ease-in-out infinite 2s;
}

/* ── doc lines: shimmer once on enter ── */
.illu-doc-line {
  background-size: 200% 100%;
  animation: line-shimmer 4s ease-in-out infinite;
}
.illu-doc-line:nth-child(2) { animation-delay: 0.2s; }
.illu-doc-line:nth-child(3) { animation-delay: 0.4s; }
.illu-doc-line:nth-child(4) { animation-delay: 0.6s; }
.illu-doc-line:nth-child(5) { animation-delay: 0.8s; }
.illu-doc-line:nth-child(6) { animation-delay: 1.0s; }
@keyframes line-shimmer {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
.illu-doc-line.highlight {
  animation: highlight-pulse 3.4s ease-in-out infinite;
}
@keyframes highlight-pulse {
  0%, 100% { filter: brightness(1) saturate(1); }
  50%      { filter: brightness(1.18) saturate(1.3); }
}

/* ──────────────────────────────────────────────
   NOW · DASHBOARD ENHANCEMENTS
   ────────────────────────────────────────────── */
.now-mockup-bar { gap: 8px; }

/* headline */
.now-mockup-headline { display: flex; flex-direction: column; gap: 4px; }
.now-mockup-num-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}
.now-mockup-currency {
  font-size: 22px;
  font-weight: 500;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.now-mockup-num {
  display: inline-block;
  font-size: 32px;
  font-weight: 500;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  animation: nm-num-flicker 5s ease-in-out infinite;
}
@keyframes nm-num-flicker {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.18) saturate(1.2); }
}
.now-mockup-cursor {
  display: inline-block;
  width: 2px;
  height: 22px;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
  align-self: center;
  border-radius: 1px;
}

/* delta — clean pill */
.now-mockup-delta {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px;
  background: color-mix(in srgb, #61D095 14%, transparent);
  border: 1px solid color-mix(in srgb, #61D095 35%, transparent);
  border-radius: 8px;
  color: #61D095;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  height: fit-content;
  align-self: flex-start;
}
.now-mockup-delta-arrow { font-size: 12px; line-height: 1; }
.now-mockup-delta-num { font-variant-numeric: tabular-nums; }

/* KPI grid */
.now-mockup-kpi {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.now-mockup-kpi-cell {
  display: flex; flex-direction: column; gap: 4px;
}
.now-mockup-kpi-cell .k {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.now-mockup-kpi-cell .v {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.now-mockup-kpi-cell .bar {
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}
.now-mockup-kpi-cell .fill {
  display: block;
  height: 100%;
  background: var(--accent-grad);
  width: 0;
  animation: nm-kpi-fill 3s ease-out infinite alternate;
}
.now-mockup-kpi-cell .fill.f1 { animation-name: nm-kpi-94; }
.now-mockup-kpi-cell .fill.f2 { animation-name: nm-kpi-72; animation-delay: 0.2s; }
.now-mockup-kpi-cell .fill.f3 { animation-name: nm-kpi-58; animation-delay: 0.4s; }
@keyframes nm-kpi-94 { 0% { width: 0; } 100% { width: 94%; } }
@keyframes nm-kpi-72 { 0% { width: 0; } 100% { width: 72%; } }
@keyframes nm-kpi-58 { 0% { width: 0; } 100% { width: 58%; } }

/* row animations: subtle hover-like glow sweeping through */
.now-mockup-row {
  position: relative;
  overflow: hidden;
}
.now-mockup-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 12%, transparent), transparent);
  transform: translateX(-100%);
  animation: row-sweep 6s ease-in-out infinite;
  pointer-events: none;
}
.now-mockup-row.r2::before { animation-delay: 2s; }
.now-mockup-row.r3::before { animation-delay: 4s; }
@keyframes row-sweep {
  0%, 70%, 100% { transform: translateX(-100%); }
  85%           { transform: translateX(100%); }
}
/* ──────────────────────────────────────────────
   WRITING CARDS · TOPIC ILLUSTRATIONS
   ────────────────────────────────────────────── */
.write-illu {
  position: relative;
  margin: 14px 0 18px;
  padding: 14px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

/* ── tech stack: row of framework chips, all interchangeable ── */
.write-illu-stack {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  padding: 16px 14px;
}
.ws-shelf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  height: 38px;
}
.ws-card {
  flex: 1;
  max-width: 64px;
  padding: 8px 4px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transform-origin: bottom center;
  animation: ws-wave 5s ease-in-out infinite;
}
.ws-card.ws-c1 { color: #61DAFB; animation-delay: 0s;   }
.ws-card.ws-c2 { color: #4FC08D; animation-delay: 0.2s; }
.ws-card.ws-c3 { color: #FF3E00; animation-delay: 0.4s; }
.ws-card.ws-c4 { color: #66E6FF; animation-delay: 0.6s; }
.ws-card.ws-c5 { color: #DD0031; animation-delay: 0.8s; }

@keyframes ws-wave {
  0%, 30%, 100% { transform: translateY(0) rotate(0deg); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
  10%           { transform: translateY(-8px) rotate(-3deg); box-shadow: 0 8px 16px rgba(0,0,0,0.3); }
  20%           { transform: translateY(0) rotate(0deg); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
}

.ws-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.ws-equals {
  font-size: 18px;
  font-weight: 300;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-style: italic;
  animation: ws-equals-pulse 3s ease-in-out infinite;
}
@keyframes ws-equals-pulse {
  0%, 100% { color: var(--text-muted); }
  50%      { color: var(--accent); }
}
.ws-result-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
}
.ws-result-arrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  animation: ws-arrow-bob 2s ease-in-out infinite;
}
@keyframes ws-arrow-bob {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}
.ws-spark { display: none; }

/* ── 10x: bar chart where the 10x's bar is SHORTEST ── */
.write-illu-tenx {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.wt-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.wt-label {
  width: 28px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.wt-label.is-10x {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 13px;
}
.wt-bar {
  position: relative;
  height: 8px;
  flex: 1;
  background: var(--surface-3);
  border-radius: 4px;
  overflow: visible;
}
.wt-bar-fill {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 0;
  animation: wt-fill 3s ease-out infinite alternate;
}
.wt-b1 .wt-bar-fill { animation-delay: 0s; --w: 78%; }
.wt-b2 .wt-bar-fill { animation-delay: 0.15s; --w: 88%; }
.wt-b3 .wt-bar-fill { animation-delay: 0.3s; --w: 70%; }
.wt-b4 .wt-bar-fill.is-10x {
  background: var(--accent-grad);
  border: none;
  --w: 22%;
  animation-delay: 0.8s;
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent);
}
@keyframes wt-fill {
  from { width: 0; }
  to   { width: var(--w); }
}
.wt-strike {
  position: absolute;
  top: 50%; left: 0;
  height: 1.5px;
  width: 0;
  background: var(--text-muted);
  transform-origin: left center;
  transform: translateY(-50%);
  animation: wt-strike 3s ease-in-out infinite;
}
.wt-b1 .wt-strike { animation-delay: 1.2s; }
.wt-b2 .wt-strike { animation-delay: 1.4s; }
.wt-b3 .wt-strike { animation-delay: 1.6s; }
@keyframes wt-strike {
  0%, 30% { width: 0; opacity: 0; }
  45%, 95% { width: 100%; opacity: 0.7; }
  100%    { width: 100%; opacity: 0; }
}
.wt-hero { margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--border); }
.wt-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  animation: wt-note-fade 3s ease-out infinite alternate;
  animation-delay: 1.6s;
}
@keyframes wt-note-fade {
  0%, 25% { opacity: 0; transform: translateX(-4px); }
  40%, 100% { opacity: 1; transform: translateX(0); }
}

/* ──────────────────────────────────────────────
   CONTACT · SIGNAL RINGS
   ────────────────────────────────────────────── */
.cta-banner { position: relative; }
.cta-signal {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 80px;
  height: 80px;
  pointer-events: none;
  z-index: 1;
}
.cta-signal-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 70%, transparent);
}
.cta-signal-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  animation: signal-ring 3.2s ease-out infinite;
}
.cta-signal-ring.r1 { animation-delay: 0s; }
.cta-signal-ring.r2 { animation-delay: 1.05s; }
.cta-signal-ring.r3 { animation-delay: 2.1s; }
@keyframes signal-ring {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.8; border-color: var(--accent); }
  60%  { opacity: 0.25; border-color: var(--accent-2); }
  100% { transform: translate(-50%, -50%) scale(4.5); opacity: 0; border-color: var(--accent-3); }
}
@media (max-width: 720px) {
  .cta-signal { width: 56px; height: 56px; top: 14px; right: 14px; }
}

/* ──────────────────────────────────────────────
   WORK ILLUSTRATIONS · IDLE ANIMATIONS
   ────────────────────────────────────────────── */
.work-illu-juro .ln.h {
  background-size: 200% 100%;
  animation: juro-cursor 3.8s ease-in-out infinite;
}
@keyframes juro-cursor {
  0%, 100% { filter: brightness(1) saturate(1); }
  50%      { filter: brightness(1.15) saturate(1.3); }
}
.work-illu-juro .comment {
  animation: juro-comment 5s ease-in-out infinite;
}
@keyframes juro-comment {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}
.work-illu-ancor .row .av.a,
.work-illu-ancor .row .av.b {
  animation: ancor-pulse 4s ease-in-out infinite;
}
.work-illu-ancor .row:nth-child(2) .av { animation-delay: 0.6s; }
.work-illu-ancor .row:nth-child(3) .av { animation-delay: 1.2s; }
.work-illu-ancor .row:nth-child(4) .av { animation-delay: 1.8s; }
@keyframes ancor-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
  50%      { transform: scale(1.12); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
}

/* ──────────────────────────────────────────────
   PROJECT PREVIEW · DIALOG FLOW ANIMATIONS
   ────────────────────────────────────────────── */

/* shared: typing bubble (used by both bot + msg previews) */
.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 7px 10px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.typing-bubble.out {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 4px;
}
.typing-bubble .d {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-dot 1.3s ease-in-out infinite;
}
.typing-bubble.out .d { background: rgba(255,255,255,0.95); }
.typing-bubble .d:nth-child(2) { animation-delay: 0.15s; }
.typing-bubble .d:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot {
  0%, 70%, 100% { transform: translateY(0); opacity: 0.45; }
  35%           { transform: translateY(-3px); opacity: 1; }
}

/* ── grid-stack rows: typing + msg occupy same cell, row sizes to largest ── */
.preview-msg .conv { gap: 6px; }
.preview-msg .seq-row,
.preview-bot .bubbles > .seq-row {
  display: grid;
  grid-template-areas: "stack";
  width: 100%;
}
.preview-msg .seq-row > *,
.preview-bot .bubbles > .seq-row > * {
  grid-area: stack;
  justify-self: start;
  opacity: 0;
  transform: translateY(4px) scale(0.9);
  transform-origin: bottom left;
}
.preview-msg .seq-row.out > *,
.preview-bot .bubbles > .seq-row.user > * {
  justify-self: end;
  transform-origin: bottom right;
}

/* 12s cycle for the conversation */
.preview-msg .m1 .typing-bubble { animation: msg-typ-1 12s ease-in-out infinite; }
.preview-msg .m1 .msg           { animation: msg-show-1 12s ease-in-out infinite; }
.preview-msg .m2 .typing-bubble { animation: msg-typ-2 12s ease-in-out infinite; }
.preview-msg .m2 .msg           { animation: msg-show-2 12s ease-in-out infinite; }
.preview-msg .m3 .typing-bubble { animation: msg-typ-3 12s ease-in-out infinite; }
.preview-msg .m3 .msg           { animation: msg-show-3 12s ease-in-out infinite; }
.preview-msg .m4 .typing-bubble { animation: msg-typ-4 12s ease-in-out infinite; }

@keyframes msg-typ-1 {
  0%, 100% { opacity: 0; transform: translateY(4px) scale(0.85); }
  3%       { opacity: 1; transform: translateY(0) scale(1); }
  9%       { opacity: 1; transform: translateY(0) scale(1); }
  12%, 99% { opacity: 0; transform: translateY(-2px) scale(0.9); }
}
@keyframes msg-show-1 {
  0%, 11%, 100% { opacity: 0; transform: translateY(4px) scale(0.92); }
  13%, 97%      { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes msg-typ-2 {
  0%, 22%, 100% { opacity: 0; transform: translateY(4px) scale(0.85); }
  25%           { opacity: 1; transform: translateY(0) scale(1); }
  31%           { opacity: 1; transform: translateY(0) scale(1); }
  34%, 99%      { opacity: 0; transform: translateY(-2px) scale(0.9); }
}
@keyframes msg-show-2 {
  0%, 33%, 100% { opacity: 0; transform: translateY(4px) scale(0.92); }
  35%, 97%      { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes msg-typ-3 {
  0%, 44%, 100% { opacity: 0; transform: translateY(4px) scale(0.85); }
  47%           { opacity: 1; transform: translateY(0) scale(1); }
  53%           { opacity: 1; transform: translateY(0) scale(1); }
  56%, 99%      { opacity: 0; transform: translateY(-2px) scale(0.9); }
}
@keyframes msg-show-3 {
  0%, 55%, 100% { opacity: 0; transform: translateY(4px) scale(0.92); }
  57%, 97%      { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes msg-typ-4 {
  0%, 66%, 100% { opacity: 0; transform: translateY(4px) scale(0.85); }
  68%, 97%      { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── bot: user msg → bot thinking → sticker pack reveal ── */
.preview-bot .bubble {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 14px;
  max-width: 80%;
}
.preview-bot .bubble.user {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.preview-bot .bubble.bot {
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

/* stickers row: only one child, stretch full width */
.preview-bot .seq-row.stickers-row > .stickers { justify-self: stretch; }

/* 10s cycle */
.preview-bot .b1 .typing-bubble { animation: bot-typ-1 10s ease-in-out infinite; }
.preview-bot .b1 .bubble        { animation: bot-show-1 10s ease-in-out infinite; }
.preview-bot .b2 .typing-bubble { animation: bot-typ-2 10s ease-in-out infinite; }
.preview-bot .b2 .bubble        { animation: bot-show-2 10s ease-in-out infinite; }
.preview-bot .b3 .stickers      { animation: bot-stickers 10s ease-in-out infinite; }

@keyframes bot-typ-1 {
  0%, 100% { opacity: 0; transform: translateY(4px) scale(0.85); }
  3%, 8%   { opacity: 1; transform: translateY(0) scale(1); }
  11%, 99% { opacity: 0; transform: translateY(-2px) scale(0.9); }
}
@keyframes bot-show-1 {
  0%, 11%, 100% { opacity: 0; transform: translateY(4px) scale(0.92); }
  13%, 97%      { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bot-typ-2 {
  0%, 20%, 100% { opacity: 0; transform: translateY(4px) scale(0.85); }
  23%, 30%      { opacity: 1; transform: translateY(0) scale(1); }
  33%, 99%      { opacity: 0; transform: translateY(-2px) scale(0.9); }
}
@keyframes bot-show-2 {
  0%, 33%, 100% { opacity: 0; transform: translateY(4px) scale(0.92); }
  35%, 97%      { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bot-stickers {
  0%, 48%, 100% { opacity: 0; transform: translateY(6px) scale(0.92); }
  52%, 97%      { opacity: 1; transform: translateY(0) scale(1); }
}

/* bot thinking dots after "Cooking up your pack" */
.preview-bot .dots-trail {
  display: inline-flex; gap: 2px; margin-left: 4px;
}
.preview-bot .dots-trail span {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-dot 1.3s ease-in-out infinite;
}
.preview-bot .dots-trail span:nth-child(2) { animation-delay: 0.15s; }
.preview-bot .dots-trail span:nth-child(3) { animation-delay: 0.3s; }

/* sticker grid */
.preview-bot .stickers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 14px;
}
.preview-bot .sticker {
  aspect-ratio: 1;
  border-radius: 8px;
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.6) rotate(-12deg);
}
.preview-bot .b3 .sticker { animation: sticker-pop-in 10s ease-out infinite; }
.preview-bot .b3 .sticker.s1 { animation-name: sticker-pop-in-1; }
.preview-bot .b3 .sticker.s2 { animation-name: sticker-pop-in-2; }
.preview-bot .b3 .sticker.s3 { animation-name: sticker-pop-in-3; }
.preview-bot .b3 .sticker.s4 { animation-name: sticker-pop-in-4; }

.preview-bot .sticker.s1 { background: linear-gradient(135deg, #FF9A56, #FF6B4A); }
.preview-bot .sticker.s2 { background: linear-gradient(135deg, var(--accent-3), var(--accent)); }
.preview-bot .sticker.s3 { background: linear-gradient(135deg, #5C9CFF, #B25CFF); }
.preview-bot .sticker.s4 { background: linear-gradient(135deg, #B25CFF, var(--accent)); }

/* fox face on first sticker */
.preview-bot .sticker .face {
  position: relative;
  width: 70%; height: 70%;
}
.preview-bot .sticker .eye {
  position: absolute;
  top: 35%; left: 22%;
  width: 14%; height: 14%;
  background: #1a1410;
  border-radius: 50%;
}
.preview-bot .sticker .eye.r { left: auto; right: 22%; }
.preview-bot .sticker .mouth {
  position: absolute;
  bottom: 22%; left: 50%;
  width: 30%; height: 6%;
  background: #1a1410;
  border-radius: 0 0 100px 100px;
  transform: translateX(-50%);
}
.preview-bot .sticker .spark {
  font-size: 22px;
  color: #fff;
  text-shadow: 0 0 12px rgba(255,255,255,0.6);
  animation: sticker-spark-spin 4s linear infinite;
}
.preview-bot .sticker .spark.s { font-size: 18px; animation-duration: 5s; animation-direction: reverse; }
.preview-bot .sticker .planet {
  width: 50%; height: 50%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, transparent 40%), var(--accent-2);
  position: relative;
}
.preview-bot .sticker .planet::after {
  content: "";
  position: absolute;
  top: 50%; left: -25%;
  width: 150%; height: 8px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  transform: translateY(-50%) rotate(-18deg);
}

@keyframes sticker-pop-in-1 {
  0%, 55%, 100% { opacity: 0; transform: scale(0.4) rotate(-20deg); }
  60%           { opacity: 1; transform: scale(1.15) rotate(4deg); }
  65%, 95%      { opacity: 1; transform: scale(1) rotate(0deg); }
  97%           { opacity: 0; transform: scale(0.8) rotate(-8deg); }
}
@keyframes sticker-pop-in-2 {
  0%, 60%, 100% { opacity: 0; transform: scale(0.4) rotate(15deg); }
  65%           { opacity: 1; transform: scale(1.15) rotate(-3deg); }
  70%, 95%      { opacity: 1; transform: scale(1) rotate(0deg); }
  97%           { opacity: 0; transform: scale(0.8) rotate(6deg); }
}
@keyframes sticker-pop-in-3 {
  0%, 65%, 100% { opacity: 0; transform: scale(0.4) rotate(-15deg); }
  70%           { opacity: 1; transform: scale(1.15) rotate(4deg); }
  75%, 95%      { opacity: 1; transform: scale(1) rotate(0deg); }
  97%           { opacity: 0; transform: scale(0.8) rotate(-6deg); }
}
@keyframes sticker-pop-in-4 {
  0%, 70%, 100% { opacity: 0; transform: scale(0.4) rotate(18deg); }
  75%           { opacity: 1; transform: scale(1.15) rotate(-4deg); }
  80%, 95%      { opacity: 1; transform: scale(1) rotate(0deg); }
  97%           { opacity: 0; transform: scale(0.8) rotate(8deg); }
}
@keyframes sticker-spark-spin {
  0%   { transform: rotate(0deg) scale(0.85); }
  50%  { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(0.85); }
}

/* ── ui library: full sign-in flow ── */
.preview-ui .ui-step {
  opacity: 0;
  transform: translateY(6px);
}

/* 9s cycle for the form */
.preview-ui .u1 { animation: ui-step-1 9s ease-out infinite; }
.preview-ui .u2 { animation: ui-step-2 9s ease-out infinite; }
.preview-ui .ui-input.u3 {
  animation:
    ui-step-3 9s ease-out infinite,
    ui-input-focus-email 9s ease-in-out infinite;
}
.preview-ui .ui-input.u4 {
  animation:
    ui-step-4 9s ease-out infinite,
    ui-input-focus-pwd 9s ease-in-out infinite;
}
.preview-ui .u5 { animation: ui-step-5 9s ease-out infinite; }
.preview-ui .ui-btn.u6 {
  animation:
    ui-step-6 9s ease-out infinite,
    ui-btn 9s ease-in-out infinite;
}

@keyframes ui-step-1 { 0%, 100% { opacity: 0; transform: translateY(6px); } 4%, 95% { opacity: 1; transform: translateY(0); } }
@keyframes ui-step-2 { 0%, 7%, 100% { opacity: 0; transform: translateY(6px); } 11%, 95% { opacity: 1; transform: translateY(0); } }
@keyframes ui-step-3 { 0%, 13%, 100% { opacity: 0; transform: translateY(6px); } 17%, 95% { opacity: 1; transform: translateY(0); } }
@keyframes ui-step-4 { 0%, 19%, 100% { opacity: 0; transform: translateY(6px); } 23%, 95% { opacity: 1; transform: translateY(0); } }
@keyframes ui-step-5 { 0%, 25%, 100% { opacity: 0; transform: translateY(6px); } 29%, 95% { opacity: 1; transform: translateY(0); } }
@keyframes ui-step-6 { 0%, 31%, 100% { opacity: 0; transform: translateY(6px); } 35%, 95% { opacity: 1; transform: translateY(0); } }

/* email input: focus → type → blur */
@keyframes ui-input-focus-email {
  0%, 17%, 100% { border-color: var(--border); background: var(--bg-2); box-shadow: 0 0 0 0 transparent; }
  20%, 38%      { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
  42%, 100%     { border-color: var(--border); background: var(--bg-2); box-shadow: 0 0 0 0 transparent; }
}
.preview-ui .u3 .ui-input-text { animation: ui-typing-email 9s steps(1) infinite; }
@keyframes ui-typing-email {
  0%, 20%      { width: 0; }
  22%          { width: 6px; }
  24%          { width: 14px; }
  26%          { width: 22px; }
  28%          { width: 32px; }
  30%          { width: 44px; }
  32%          { width: 56px; }
  34%, 95%     { width: 110px; }
  100%         { width: 0; }
}
.preview-ui .u3 .ui-input-caret { animation: ui-caret-email 9s linear infinite; }
@keyframes ui-caret-email {
  0%, 18%, 42%, 100% { opacity: 0; }
  19%, 38%           { opacity: 1; animation-timing-function: steps(2); }
}

/* password: focus → dots fill in → blur */
@keyframes ui-input-focus-pwd {
  0%, 38%, 100% { border-color: var(--border); background: var(--bg-2); box-shadow: 0 0 0 0 transparent; }
  42%, 58%      { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
  62%, 100%     { border-color: var(--border); background: var(--bg-2); box-shadow: 0 0 0 0 transparent; }
}
.preview-ui .ui-pwd-dots span {
  animation: ui-pwd-dot 9s steps(1) infinite;
}
.preview-ui .ui-pwd-dots span:nth-child(1) { animation-delay: 0s; }
.preview-ui .ui-pwd-dots span:nth-child(2) { animation-delay: 0s; }
.preview-ui .ui-pwd-dots span:nth-child(3) { animation-delay: 0s; }
.preview-ui .ui-pwd-dots span:nth-child(4) { animation-delay: 0s; }
.preview-ui .ui-pwd-dots span:nth-child(5) { animation-delay: 0s; }
.preview-ui .ui-pwd-dots span:nth-child(6) { animation-delay: 0s; }
.preview-ui .ui-pwd-dots span:nth-child(7) { animation-delay: 0s; }
.preview-ui .ui-pwd-dots span:nth-child(8) { animation-delay: 0s; }
.preview-ui .ui-pwd-dots span:nth-child(1) { animation-name: ui-pwd-dot-1; }
.preview-ui .ui-pwd-dots span:nth-child(2) { animation-name: ui-pwd-dot-2; }
.preview-ui .ui-pwd-dots span:nth-child(3) { animation-name: ui-pwd-dot-3; }
.preview-ui .ui-pwd-dots span:nth-child(4) { animation-name: ui-pwd-dot-4; }
.preview-ui .ui-pwd-dots span:nth-child(5) { animation-name: ui-pwd-dot-5; }
.preview-ui .ui-pwd-dots span:nth-child(6) { animation-name: ui-pwd-dot-6; }
.preview-ui .ui-pwd-dots span:nth-child(7) { animation-name: ui-pwd-dot-7; }
.preview-ui .ui-pwd-dots span:nth-child(8) { animation-name: ui-pwd-dot-8; }

@keyframes ui-pwd-dot-1 { 0%, 42%, 100% { opacity: 0; } 44%, 95% { opacity: 1; } }
@keyframes ui-pwd-dot-2 { 0%, 44%, 100% { opacity: 0; } 46%, 95% { opacity: 1; } }
@keyframes ui-pwd-dot-3 { 0%, 46%, 100% { opacity: 0; } 48%, 95% { opacity: 1; } }
@keyframes ui-pwd-dot-4 { 0%, 48%, 100% { opacity: 0; } 50%, 95% { opacity: 1; } }
@keyframes ui-pwd-dot-5 { 0%, 50%, 100% { opacity: 0; } 52%, 95% { opacity: 1; } }
@keyframes ui-pwd-dot-6 { 0%, 52%, 100% { opacity: 0; } 54%, 95% { opacity: 1; } }
@keyframes ui-pwd-dot-7 { 0%, 54%, 100% { opacity: 0; } 56%, 95% { opacity: 1; } }
@keyframes ui-pwd-dot-8 { 0%, 56%, 100% { opacity: 0; } 58%, 95% { opacity: 1; } }

/* button: press → spinner → success */
@keyframes ui-btn {
  0%, 72%   { transform: scale(1); background: var(--text); }
  75%       { transform: scale(0.95); background: var(--text); }
  78%       { transform: scale(1); background: var(--text); }
  82%, 90%  { transform: scale(1); background: var(--accent); }
  92%, 100% { transform: scale(1); background: #4DB87C; }
}
.preview-ui .ui-btn-label { animation: ui-btn-label 9s ease-in-out infinite; }
@keyframes ui-btn-label {
  0%, 78%   { opacity: 1; transform: translateY(0); }
  80%, 100% { opacity: 0; transform: translateY(-12px); }
}
.preview-ui .ui-btn-spin {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  opacity: 0;
  animation: ui-btn-spin 9s linear infinite;
}
@keyframes ui-btn-spin {
  0%, 81%, 92%, 100% { opacity: 0; transform: rotate(0deg); }
  82%                { opacity: 1; }
  85%                { transform: rotate(360deg); }
  90%                { transform: rotate(900deg); opacity: 1; }
  91%                { opacity: 0; }
}
.preview-ui .ui-btn-check {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  transform: scale(0.4);
  animation: ui-btn-check 9s ease-out infinite;
}
@keyframes ui-btn-check {
  0%, 90%, 100% { opacity: 0; transform: scale(0.4); }
  92%           { opacity: 1; transform: scale(1.2); }
  94%, 99%      { opacity: 1; transform: scale(1); }
}

/* cursor: travels through the form */
.preview-ui .ui-cursor {
  position: absolute;
  top: 0; left: 0;
  color: var(--accent);
  filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--accent) 40%, transparent));
  z-index: 5;
  opacity: 0;
  animation: ui-cursor 9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  pointer-events: none;
}
@keyframes ui-cursor {
  /* enters from bottom-right, hops between elements as they animate */
  0%, 15%   { transform: translate(220px, 200px); opacity: 0; }
  18%       { transform: translate(220px, 200px); opacity: 1; }
  /* email input */
  22%       { transform: translate(110px, 130px); opacity: 1; }
  24%, 38%  { transform: translate(110px, 130px); opacity: 1; }
  /* password input */
  42%       { transform: translate(110px, 162px); opacity: 1; }
  44%, 58%  { transform: translate(110px, 162px); opacity: 1; }
  /* checkbox */
  62%       { transform: translate(28px, 194px); opacity: 1; }
  64%, 70%  { transform: translate(28px, 194px); opacity: 1; }
  /* button */
  74%       { transform: translate(120px, 226px); opacity: 1; }
  77%       { transform: translate(120px, 230px); opacity: 1; }
  82%       { transform: translate(120px, 226px); opacity: 1; }
  90%       { transform: translate(120px, 226px); opacity: 1; }
  95%, 100% { transform: translate(220px, 240px); opacity: 0; }
}

/* prevent any horizontal overflow at narrow widths */

/* ───────── reduced motion ───────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .split .w > span, .mask > span { transform: none; }
}
