/* ---------- Tokens ---------- */
:root {
  --bg: #f5f1ea;
  --surface: #fffcf7;
  --tint: #ece6dc;
  --ink: #1c1a17;
  --muted: #6a6258;
  --line: rgba(28, 26, 23, .12);
  --accent: #b4502f;
  --accent-2: #2e6150;
  --accent-3: #b8862c;
  --accent-4: #4a5fa8;
  --shadow: 0 1px 2px rgba(28, 26, 23, .06), 0 14px 34px -14px rgba(28, 26, 23, .22);
  --radius: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #11100f;
  --surface: #1a1917;
  --tint: #22201d;
  --ink: #f0ebe3;
  --muted: #a59d92;
  --line: rgba(240, 235, 227, .12);
  --accent: #e57f5c;
  --accent-2: #74b89f;
  --accent-3: #e2b865;
  --accent-4: #8ea0e6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -16px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

@property --x { syntax: '<percentage>'; inherits: true; initial-value: 50%; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.6 var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
code { font: 500 .88em var(--mono); }
p code, li code { padding: .1em .35em; border-radius: 5px; background: var(--tint); }
em { font-style: italic; }
h1, h2, h3 { margin: 0; font-weight: 400; }

.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 1rem; z-index: 99; padding: .6rem 1rem; background: var(--ink); color: var(--bg); border-radius: 8px; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  margin: 0 0 1.2rem;
  font: 500 .74rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
h2 { font: 400 clamp(2.3rem, 5.2vw, 3.8rem)/1 var(--serif); letter-spacing: -.015em; }
h2 em, h1 em { color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 400 1.35rem var(--serif); }
.brand svg { width: 26px; height: 26px; transition: transform .8s var(--ease); }
.brand:hover svg { transform: rotate(90deg); }
.brand em { color: var(--accent); }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 1.8rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: .92rem; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

.theme-toggle {
  position: relative;
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform .3s var(--ease), border-color .2s;
}
.theme-toggle:hover { border-color: var(--muted); transform: rotate(-12deg); }
.theme-toggle svg {
  position: absolute; width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round;
  transition: transform .5s var(--ease), opacity .3s;
}
.theme-toggle .i-moon { fill: currentColor; stroke: none; }
[data-theme="light"] .theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="dark"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(.5); }

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3rem;
  align-items: center;
  padding-block: clamp(4rem, 9vw, 7.5rem) clamp(3rem, 7vw, 6rem);
}
h1 { font: 400 clamp(3rem, 7.4vw, 6.4rem)/.94 var(--serif); letter-spacing: -.025em; }
.lede { max-width: 36rem; margin: 2rem 0 0; font-size: 1.12rem; color: var(--muted); }
.stats { display: flex; gap: 2.5rem; margin: 2.8rem 0 0; flex-wrap: wrap; }
.stats div { border-top: 1px solid var(--line); padding-top: .8rem; min-width: 7.5rem; }
.stats dt { font: 400 2.4rem/1 var(--serif); }
.stats dd { margin: .35rem 0 0; font-size: .85rem; color: var(--muted); }

.hero-art { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: end; width: 100%; }
.ha-svg { width: 100%; height: 100%; overflow: visible; }
.ha-ring { fill: none; stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 3 7; transform-origin: 200px 200px; animation: spin 60s linear infinite; }
.ha-ring2 { fill: var(--surface); stroke: var(--line); }
.ha-aa { font: italic 400 150px var(--serif); fill: var(--ink); }
.ha-orbit { transform-origin: 200px 200px; animation: spin 24s linear infinite; }
.ha-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: .7rem .9rem;
  font: 500 .72rem var(--mono);
  color: var(--muted);
  animation: float 7s ease-in-out infinite;
}
.ha-curve { left: -4%; bottom: 10%; width: 44%; }
.ha-curve svg { width: 100%; margin-bottom: .4rem; overflow: visible; }
.ha-curve .c { fill: none; stroke: var(--accent); stroke-width: 2; }
.ha-curve .h { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.ha-curve circle { fill: var(--surface); stroke: var(--muted); }
.ha-curve .ball { fill: var(--accent); stroke: none; }
.ha-type { right: -2%; top: 8%; animation-delay: -2s; }
.ha-type b { display: block; font: italic 400 1.35rem var(--serif); color: var(--ink); }
.ha-swatch { right: 4%; bottom: 2%; display: flex; align-items: center; gap: .3rem; animation-delay: -4s; }
.ha-swatch i { width: 16px; height: 16px; border-radius: 50%; }
.ha-swatch i:nth-child(1) { background: var(--ink); }
.ha-swatch i:nth-child(2) { background: var(--accent); }
.ha-swatch i:nth-child(3) { background: var(--accent-3); }
.ha-swatch i:nth-child(4) { background: var(--tint); border: 1px solid var(--line); }
.ha-swatch span { margin-left: .4rem; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Anatomy ---------- */
.anatomy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding-block: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--line);
}
.anat-text > p:not(.eyebrow) { color: var(--muted); max-width: 34rem; margin: 1.5rem 0; }
.tree {
  margin: 0;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  font: 400 .85rem/1.8 var(--mono);
  overflow-x: auto;
}
.tree .d { color: var(--accent-2); }
.tree b { color: var(--accent); font-weight: 500; }
.tree i { color: var(--muted); font-style: normal; }

.levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.levels li {
  display: grid; grid-template-columns: auto 1fr; gap: 1.2rem;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.lvl-n {
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  font: 400 1.3rem var(--serif);
  color: var(--accent);
}
.levels b { font-weight: 600; }
.levels p { margin: .2rem 0 .9rem; color: var(--muted); font-size: .94rem; }
.bar { height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 1.4s var(--ease); }
.levels li:nth-child(2) .bar i { background: var(--accent-3); transition-delay: .2s; }
.levels li:nth-child(3) .bar i { background: repeating-linear-gradient(90deg, var(--accent-2) 0 14px, transparent 14px 20px); transition-delay: .4s; }
.levels.in .bar i { width: var(--w); }

/* ---------- Skills ---------- */
.skills { padding-block: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--line); }
.section-head { max-width: 50rem; margin-bottom: 2.5rem; }
.section-head > p:not(.eyebrow) { color: var(--muted); margin: 1.4rem 0 0; }
.kosten {
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 8%, transparent);
  border-radius: 0 12px 12px 0;
  font-size: .95rem;
}
.kosten b { color: var(--ink); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 2rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 500 .88rem var(--sans);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip:hover { border-color: var(--muted); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--bg); }
.count { margin-left: auto; font: 500 .8rem var(--mono); color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 1.25rem; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .6s var(--ease), background-color .4s;
}
.js .card { opacity: 0; transform: translateY(18px); }
.js .card.shown { opacity: 1; transform: none; }
.card:hover, .js .card.shown:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card.is-hidden { display: none; }

.viz {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  container-type: inline-size;
  transition: background-color .4s;
}
.viz *, .viz *::before, .viz *::after, .hero-art * { animation-play-state: paused !important; }
.card.in-view .viz *, .card.in-view .viz *::before, .card.in-view .viz *::after, .hero-art.in * { animation-play-state: running !important; }

.viz-chip {
  position: absolute; left: 12px; bottom: 12px; z-index: 4;
  padding: 4px 9px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  font: 500 11px var(--mono);
  color: var(--muted);
}
.viz-chip b { color: var(--ink); font-weight: 500; }

.card-body { display: flex; flex-direction: column; gap: .75rem; padding: 1.4rem 1.4rem 1.2rem; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: .45rem; font: 500 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.badge {
  font: 500 .72rem var(--mono);
  padding: .25rem .6rem;
  border-radius: 99px;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 13%, transparent);
}
.card h3 code { font: 500 1.12rem var(--mono); background: none; padding: 0; letter-spacing: -.01em; }
.card h3 { font-size: 1.1rem; }
.card-body > p { margin: 0; color: var(--muted); font-size: .95rem; }
.can { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.can li { font-size: .78rem; padding: .2rem .6rem; border-radius: 6px; border: 1px solid var(--line); }
.meta {
  margin-top: auto; padding-top: .9rem;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line);
  font: 400 .78rem var(--mono); color: var(--muted);
}
.meta a { color: var(--ink); text-decoration: none; font-weight: 500; }
.meta a:hover { color: var(--accent); }

/* viz: frontend-design */
.fd { position: absolute; inset: 7%; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); animation: fdwipe 7s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes fdwipe { 0%, 8% { --x: 88%; } 46%, 58% { --x: 12%; } 96%, 100% { --x: 88%; } }
.fd-layer { position: absolute; inset: 0; display: flex; flex-direction: column; }
.fd-bar { display: flex; gap: 4px; padding: 1.4cqi 1.8cqi; background: rgba(0, 0, 0, .12); }
.fd-bar i { width: 1.4cqi; height: 1.4cqi; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.fd-before { background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; font-family: Arial, Helvetica, sans-serif; text-align: center; }
.fd-b-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqi; }
.fd-b-hero b { font-size: 4.6cqi; }
.fd-b-hero span { font-size: 2.4cqi; opacity: .8; }
.fd-b-hero em { font-style: normal; font-size: 2.2cqi; background: #fff; color: #6d28d9; padding: 1cqi 3cqi; border-radius: 99px; }
.fd-b-row { display: flex; gap: 2cqi; padding: 0 6cqi 5cqi; }
.fd-b-row i { flex: 1; height: 9cqi; border-radius: 8px; background: rgba(255, 255, 255, .2); }
.fd-after { background: #f2ebdf; color: #1b1813; clip-path: inset(0 0 0 var(--x)); }
.fd-after .fd-bar { background: rgba(0, 0, 0, .05); }
.fd-after .fd-bar i { background: rgba(0, 0, 0, .2); }
.fd-a { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.8cqi; padding: 0 7cqi; position: relative; z-index: 1; }
.fd-kicker { font: 500 1.9cqi/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #8a4a2f; }
.fd-a strong { font: 400 10.5cqi/.88 var(--serif); letter-spacing: -.02em; }
.fd-a strong em { color: #c2552f; }
.fd-cta { align-self: flex-start; font: 500 2.2cqi var(--sans); border-bottom: 1px solid; padding-bottom: .3cqi; }
.fd-orb { position: absolute; right: -8cqi; bottom: -12cqi; width: 44cqi; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ec9a72, #b8431f 60%, #6b2410); animation: float 7s ease-in-out infinite; }
.fd-handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); z-index: 2; }
.fd-handle::after { content: ''; position: absolute; top: 50%; left: 50%; width: 5cqi; height: 5cqi; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.fd-label { position: absolute; bottom: 2.4cqi; z-index: 3; padding: .6cqi 1.5cqi; border-radius: 99px; background: rgba(20, 18, 16, .6); color: #fff; font: 500 1.9cqi var(--mono); }
.fd-label.l { left: 2.4cqi; }
.fd-label.r { right: 2.4cqi; }

/* viz: algorithmic-art */
.flow { position: absolute; inset: 0; width: 100%; height: 100%; }

/* viz: canvas-design */
.cd { position: absolute; inset: 0; width: 100%; height: 100%; }
.cd-shadow { fill: rgba(0, 0, 0, .12); }
[data-theme="dark"] .cd-shadow { fill: rgba(0, 0, 0, .5); }
.cd-steps text { font: 500 8px var(--mono); fill: var(--muted); }
.cd-t { font: 500 6.5px var(--mono); letter-spacing: 1.4px; fill: #1b1813; }
.cd-a { transform-box: fill-box; transform-origin: center; animation: pop 6s var(--ease) infinite; }
.cd-barx { transform-origin: left; animation-name: growx; animation-delay: .3s; }
.cd-half { transform-origin: bottom; animation-delay: .6s; }
.cd-line { stroke-dasharray: 60; animation: draw 6s var(--ease) infinite .9s; }
.cd-out rect { fill: var(--surface); stroke: var(--line); }
.cd-out text { font: 500 9px var(--mono); fill: var(--ink); text-anchor: middle; }
.cd-out { animation: fadeio 6s var(--ease) infinite 1.2s; }
@keyframes pop { 0% { transform: scale(0); } 14%, 86% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes growx { 0% { transform: scaleX(0); } 14%, 86% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes draw { 0% { stroke-dashoffset: 60; } 14%, 86% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 60; } }
@keyframes fadeio { 0% { opacity: 0; } 14%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* viz: theme-factory */
.tf { --c0: #0b2a3c; --c1: #1d5c73; --c2: #58a4b0; --c3: #e6f0ef; position: absolute; inset: 0; display: grid; grid-template-columns: 1.45fr 1fr; gap: 5cqi; align-items: center; padding: 7cqi; }
.tf-slide { position: relative; aspect-ratio: 16 / 10; background: var(--c3); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.tf-slide > span { position: absolute; transition: background-color .7s var(--ease), color .7s var(--ease); }
.tf-title { left: 8%; top: 12%; font: 400 5cqi/1 var(--serif); color: var(--c0); }
.tf-sub { left: 8%; top: 34%; width: 30%; height: 5%; border-radius: 3px; background: var(--c1); opacity: .6; }
.tf-block { right: 8%; bottom: 12%; width: 40%; height: 50%; border-radius: 6px; background: var(--c1); }
.tf-dot { left: 8%; bottom: 12%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: var(--c2); }
.tf-side { display: flex; flex-direction: column; gap: 1.6cqi; }
.tf-sw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1cqi; }
.tf-sw i { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); transition: background-color .7s var(--ease); }
.tf-name { font: 400 4.6cqi/1.05 var(--serif); }
.tf-count { font: 500 2cqi var(--mono); color: var(--muted); }

/* viz: web-artifacts-builder */
.wa { position: absolute; inset: 0; width: 100%; height: 100%; }
.wa-p { fill: none; stroke: var(--accent-3); stroke-width: 1.6; stroke-dasharray: 4 6; animation: dash 1.2s linear infinite; }
.wa-chip rect { fill: var(--surface); stroke: var(--line); }
.wa-chip text { font: 500 10px var(--mono); fill: var(--ink); text-anchor: middle; }
.wa-file > path:first-child { fill: var(--surface); stroke: var(--ink); stroke-width: 1.2; }
.wa-file .fold { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.wa-file .ln { fill: var(--line); }
.wa-file .ln.a { fill: var(--accent); }
.wa-file text { font: 500 9px var(--mono); fill: var(--muted); text-anchor: middle; }
.wa-file { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s var(--ease) infinite; }
@keyframes dash { to { stroke-dashoffset: -20; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* viz: slack-gif-creator */
.gif { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqi; }
.gif-stage { position: relative; width: 28cqi; aspect-ratio: 1; border-radius: 12px; background: var(--surface); border: 1px dashed var(--muted); overflow: hidden; }
.gif-face { position: absolute; left: 27%; bottom: 14%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: #f5c542; transform-origin: 50% 100%; animation: bounce 1.2s cubic-bezier(.3, 0, .7, 1) infinite; }
.gif-face i { position: absolute; top: 36%; width: 12%; height: 16%; border-radius: 50%; background: #2a2217; }
.gif-face i:first-child { left: 30%; }
.gif-face i:nth-child(2) { right: 30%; }
.gif-face b { position: absolute; left: 32%; top: 58%; width: 36%; height: 18%; border: 0 solid #2a2217; border-bottom-width: 2px; border-radius: 0 0 50% 50%; }
.gif-shadow { position: absolute; left: 30%; bottom: 10%; width: 40%; height: 5%; border-radius: 50%; background: rgba(0, 0, 0, .18); animation: shadow 1.2s cubic-bezier(.3, 0, .7, 1) infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0) scale(1.14, .86); }
  12% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-58%) scale(.95, 1.05); }
  88% { transform: translateY(0) scale(1); }
}
@keyframes shadow { 0%, 100% { transform: scale(1.1); opacity: 1; } 50% { transform: scale(.55); opacity: .4; } }
.gif-strip { position: relative; display: flex; gap: 1.2cqi; }
.gif-strip i { position: relative; width: 7cqi; aspect-ratio: 1; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); }
.gif-strip i::after { content: ''; position: absolute; left: 30%; width: 40%; aspect-ratio: 1; border-radius: 50%; background: #f5c542; bottom: calc(10% + var(--y)); }
.gif-cursor { position: absolute; left: -3px; top: -3px; width: calc(7cqi + 6px); aspect-ratio: 1; border: 2px solid var(--accent); border-radius: 6px; animation: frames 1.2s steps(6) infinite; }
@keyframes frames { to { transform: translateX(calc(8.2cqi * 6)); } }
.gif-size { font: 500 2cqi var(--mono); color: var(--muted); }

/* viz: remotion */
.rm { position: absolute; inset: 6%; display: grid; grid-template-rows: 1fr auto; gap: 2.4cqi; }
.rm-prev { position: relative; overflow: hidden; border-radius: 8px; background: #121022; display: grid; place-items: center; }
.rm-orb { position: absolute; width: 22cqi; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #8ea0e6, transparent 70%); animation: orbit 4s linear infinite; }
@keyframes orbit { 0% { transform: translate(-30cqi, 4cqi); } 50% { transform: translate(0, -6cqi); } 100% { transform: translate(30cqi, 4cqi); } }
.rm-title { position: relative; margin: 0; font: 400 7cqi/1 var(--serif); color: #f3efe8; display: flex; gap: .25em; overflow: hidden; }
.rm-title span { display: inline-block; animation: wordup 4s var(--ease) infinite; }
.rm-title span + span { font-style: italic; color: #e8a17f; animation-delay: .25s; }
@keyframes wordup { 0% { transform: translateY(110%); } 18%, 82% { transform: none; } 96%, 100% { transform: translateY(-110%); } }
.rm-tl { padding: 1.8cqi; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.rm-tracks { position: relative; display: grid; gap: 1cqi; }
.tr { position: relative; height: 2.6cqi; border-radius: 3px; background: var(--tint); }
.tr span { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--c); opacity: .85; }
.rm-head { position: absolute; top: -1cqi; bottom: -1cqi; left: 0; width: 2px; background: var(--ink); animation: playhead 4s linear infinite; }
.rm-head::before { content: ''; position: absolute; top: -3px; left: -4px; border: 5px solid transparent; border-top-color: var(--ink); }
@keyframes playhead { to { left: 100%; } }
.rm-time { display: flex; justify-content: space-between; margin-top: 1.4cqi; font: 500 1.8cqi var(--mono); color: var(--muted); }

/* viz: brand-guidelines */
.br { position: absolute; inset: 7%; display: grid; grid-template-columns: 1fr 1fr; gap: 4cqi; padding: 5cqi; border-radius: 10px; background: #faf9f5; color: #141413; box-shadow: var(--shadow); }
.br-type { display: flex; flex-direction: column; justify-content: center; }
.br-aa1 { font: 600 13cqi/1 'Poppins', sans-serif; }
.br-aa2 { font: 400 11cqi/1 'Lora', serif; margin-top: 2cqi; }
.br-type small { font: 500 1.8cqi var(--mono); color: #6b6a64; }
.br-sw { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; gap: 1.4cqi; font: 500 1.9cqi var(--mono); }
.br-sw li { display: flex; align-items: center; gap: 1.6cqi; }
.br-sw i { height: 4.6cqi; width: 4.6cqi; border-radius: 6px; background: var(--c); border: 1px solid rgba(0, 0, 0, .1); animation: swgrow 5s var(--ease) infinite; animation-delay: calc(var(--i) * .15s); }
@keyframes swgrow { 0% { width: 4.6cqi; } 20%, 80% { width: 14cqi; } 100% { width: 4.6cqi; } }

/* viz: ui-ux-pro-max */
.ux { position: absolute; inset: 7%; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 2.6cqi; }
.ux-t {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  padding: 1.6cqi;
  border-radius: 8px;
  font: 500 2cqi var(--mono);
  outline: 2px solid transparent; outline-offset: 3px;
  animation: uxhl 9s var(--ease) infinite; animation-delay: calc(var(--i) * 1.5s);
}
@keyframes uxhl { 0%, 15% { outline-color: var(--accent); transform: scale(1.04); } 18%, 100% { outline-color: transparent; transform: none; } }
.ux-glass { background: linear-gradient(135deg, #7dd3fc, #c084fc); color: #1e1b4b; }
.ux-glass::before { content: ''; position: absolute; inset: 22% 18% 34%; border-radius: 8px; background: rgba(255, 255, 255, .35); border: 1px solid rgba(255, 255, 255, .6); backdrop-filter: blur(4px); }
.ux-brutal { background: #ffe14d; color: #111; border: 3px solid #111; border-radius: 0; box-shadow: 4px 4px 0 #111; }
.ux-neu { background: #e4e7ec; color: #555c68; box-shadow: inset 4px 4px 8px #c3c8d0, inset -4px -4px 8px #fff; }
.ux-bento { background: var(--surface); color: var(--ink); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr auto; gap: 1cqi; }
.ux-bento em { border-radius: 4px; background: var(--tint); }
.ux-bento em:first-child { grid-row: span 2; background: var(--accent-3); }
.ux-swiss { background: #f4f1ea; color: #111; font-weight: 700; }
.ux-swiss::before { content: ''; position: absolute; top: 12%; right: 12%; width: 40%; aspect-ratio: 1; border-radius: 50%; background: #e0301e; }
.ux-clay { background: #f6c7b6; color: #6b3526; border-radius: 18px; box-shadow: inset -4px -5px 10px rgba(0, 0, 0, .12), inset 4px 4px 8px rgba(255, 255, 255, .6); }

/* viz: web-design-guidelines */
.wg { position: absolute; inset: 7%; display: flex; flex-direction: column; padding: 3.4cqi 4cqi; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font: 2.5cqi var(--sans); }
.wg-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 1.6cqi; font: 500 2cqi var(--mono); color: var(--muted); }
.wg-head b { font: 400 6cqi/1 var(--serif); color: var(--accent-2); }
.wg-row { display: flex; align-items: center; gap: 2cqi; padding: 1.5cqi 0; border-top: 1px solid var(--line); animation: rowin 7s var(--ease) infinite both; animation-delay: calc(var(--i) * .45s); }
.wg-row i { width: 3.8cqi; height: 3.8cqi; display: grid; place-items: center; border-radius: 50%; font: 700 2cqi var(--sans); font-style: normal; color: #fff; }
.wg-row .ok { background: var(--accent-2); }
.wg-row .warn { background: var(--accent-3); }
[data-theme="dark"] .wg-row i { color: #11100f; }
.wg-row span { margin-left: auto; font: 500 1.7cqi var(--mono); color: var(--muted); }
@keyframes rowin { 0% { opacity: 0; transform: translateX(-8px); } 8%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* viz: pptx */
.pp { position: absolute; inset: 7%; display: grid; grid-template-rows: 1fr auto; gap: 2.4cqi; }
.pp-main { position: relative; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.pp-lay { position: absolute; inset: 0; padding: 5cqi 6cqi; display: flex; flex-direction: column; justify-content: center; gap: 1.6cqi; opacity: 0; animation: slidefade 8s var(--ease) infinite; animation-delay: calc(var(--i) * 2s); }
@keyframes slidefade { 0% { opacity: 0; transform: translateX(10px); } 4%, 22% { opacity: 1; transform: none; } 26%, 100% { opacity: 0; transform: translateX(-10px); } }
.pp-k { font: 500 1.9cqi var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pp-h { font: 400 7cqi/1 var(--serif); }
.pp-h em { color: var(--accent); }
.pp-bars { display: flex; align-items: flex-end; gap: 3cqi; height: 70%; border-bottom: 1px solid var(--line); }
.pp-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: var(--accent-2); }
.pp-bars i:last-child { background: var(--accent); }
.pp-cols { flex-direction: row; align-items: center; }
.pp-img { width: 45%; height: 80%; border-radius: 6px; background: linear-gradient(135deg, var(--accent-3), var(--accent)); }
.pp-lines { flex: 1; display: flex; flex-direction: column; gap: 1.6cqi; padding-left: 3cqi; }
.pp-lines i { height: 1.6cqi; border-radius: 99px; background: var(--line); }
.pp-lines i:first-child { height: 3cqi; width: 70%; background: var(--ink); }
.pp-lines i:last-child { width: 60%; }
.pp-num { font: 400 13cqi/1 var(--serif); color: var(--accent-2); }
.pp-thumbs { display: flex; gap: 1.6cqi; justify-content: center; }
.pp-thumbs i { width: 9cqi; aspect-ratio: 16 / 9; border-radius: 3px; background: var(--surface); border: 1px solid var(--line); outline: 2px solid transparent; outline-offset: 1px; animation: thumb 8s infinite; animation-delay: calc(var(--i) * 2s); }
@keyframes thumb { 0%, 24% { outline-color: var(--accent); } 25%, 100% { outline-color: transparent; } }

/* viz: docs */
.dx { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5cqi; }
.doc { position: relative; width: 21cqi; aspect-ratio: 3 / 4; display: flex; flex-direction: column; gap: 1.4cqi; padding: 4.5cqi 2.4cqi 2.4cqi; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; animation-delay: var(--d); }
.doc .ext { position: absolute; top: -1.8cqi; left: 2cqi; padding: .5cqi 1.2cqi; border-radius: 4px; font: 600 1.8cqi var(--mono); color: #fff; }
.doc .l { display: block; height: 1.2cqi; width: var(--w); border-radius: 99px; background: var(--line); transform-origin: left; animation: growx 5s var(--ease) infinite; }
.doc .l.h { height: 2cqi; background: var(--ink); }
.doc .l:nth-child(3) { animation-delay: .15s; }
.doc .l:nth-child(4) { animation-delay: .3s; }
.doc .l:nth-child(5) { animation-delay: .45s; }
.doc .l:nth-child(6) { animation-delay: .6s; }
.doc .f { display: block; height: 3cqi; border-radius: 3px; border: 1px solid var(--line); background: var(--tint); }
.doc .cb { width: 3.2cqi; height: 3.2cqi; border-radius: 3px; border: 1px solid var(--muted); display: grid; place-items: center; }
.doc .cb svg { width: 80%; fill: none; stroke: #c5403a; stroke-width: 2; stroke-dasharray: 12; animation: draw12 5s var(--ease) infinite; }
.doc .sig { margin-top: auto; width: 100%; fill: none; stroke: var(--accent-4); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 120; animation: draw120 5s var(--ease) infinite .4s; }
@keyframes draw12 { 0% { stroke-dashoffset: 12; } 16%, 86% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 12; } }
@keyframes draw120 { 0% { stroke-dashoffset: 120; } 30%, 86% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 120; } }
.cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.cells i { aspect-ratio: 1.6; background: var(--tint); border-radius: 1px; }
.cells i:nth-child(3n) { animation: cell 3s steps(1) infinite; }
.cells i:nth-child(6) { animation-delay: .5s; }
.cells i:nth-child(9) { animation-delay: 1s; }
.cells i:nth-child(12) { animation-delay: 1.5s; }
.cells i:nth-child(15) { background: #217346; animation: none; }
@keyframes cell { 0% { background: color-mix(in srgb, #217346 55%, transparent); } 30%, 100% { background: var(--tint); } }

/* viz: skill-creator */
.sc { position: absolute; inset: 7%; display: grid; grid-template-columns: .8fr 1.2fr; gap: 3cqi; padding: 4cqi; border-radius: 10px; background: #171614; color: #e9e4da; font: 400 2.2cqi/1.7 var(--mono); box-shadow: var(--shadow); }
[data-theme="dark"] .sc { background: #0b0a09; border: 1px solid var(--line); }
.sc pre { margin: 0; font: inherit; }
.sc-tree { color: #857d71; border-right: 1px solid rgba(255, 255, 255, .1); }
.sc-tree .d { color: #8fc9b1; }
.sc-tree b { color: #e8a17f; font-weight: 500; }
.sc-code { display: flex; flex-direction: column; }
.sc .ln { white-space: pre; animation: typeline 9s steps(22) infinite both; animation-delay: calc(var(--i) * .4s); }
.sc .m { color: #857d71; }
.sc .k { color: #e2b865; }
.sc .s { color: #9fd4b5; }
.sc .h { color: #e8a17f; }
.sc .c { color: #857d71; font-style: italic; }
@keyframes typeline { 0% { clip-path: inset(0 100% 0 0); } 7%, 90% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }

/* viz: webapp-testing */
.wt { position: absolute; inset: 7%; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.wt-bar { display: flex; align-items: center; gap: 4px; padding: 1.4cqi 1.8cqi; border-bottom: 1px solid var(--line); }
.wt-bar i { width: 1.4cqi; height: 1.4cqi; border-radius: 50%; background: var(--line); }
.wt-bar span { margin-left: 2cqi; padding: .3cqi 2cqi; border-radius: 99px; background: var(--tint); font: 500 1.7cqi var(--mono); color: var(--muted); }
.wt-page { position: relative; flex: 1; display: flex; flex-direction: column; gap: 1.6cqi; padding: 4cqi 5cqi; }
.wt-h { height: 4cqi; width: 55%; border-radius: 4px; background: var(--ink); }
.wt-p { height: 1.5cqi; width: 80%; border-radius: 99px; background: var(--line); }
.wt-p.s { width: 60%; }
.wt-cards { display: flex; gap: 2cqi; margin-top: 1cqi; flex: 1; }
.wt-cards i { flex: 1; border-radius: 6px; background: var(--tint); }
.wt-scan { position: absolute; left: 0; right: 0; top: 0; height: 30%; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--accent-2) 30%, transparent)); border-bottom: 2px solid var(--accent-2); animation: scan 3.6s var(--ease) infinite; }
@keyframes scan { 0% { transform: translateY(-100%); } 70%, 100% { transform: translateY(340%); } }
.pin { position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 4.4cqi; height: 4.4cqi; display: grid; place-items: center; border-radius: 50%; background: var(--accent-2); color: var(--surface); font: 700 2.2cqi var(--sans); animation: pinpop 3.6s var(--ease) infinite both; animation-delay: calc(.5s + var(--i) * .6s); }
@keyframes pinpop { 0% { transform: scale(0); } 10%, 80% { transform: scale(1); } 100% { transform: scale(0); } }

/* ---------- Fonts ---------- */
.fonts { padding-block: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--line); }
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr)); gap: 1.25rem; }
.pair {
  display: flex; flex-direction: column;
  padding: 1.8rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .9s var(--ease);
}
.pair:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pair-mood { margin: 0; font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pair-d { margin: 1.4rem 0 .9rem; font-family: var(--d), serif; font-weight: var(--dw); font-size: clamp(2rem, 3.4vw, 2.6rem); line-height: 1.02; letter-spacing: -.02em; }
.pair-d em { color: var(--accent); font-weight: 400; }
.pair-b { margin: 0 0 1.6rem; font-family: var(--b), sans-serif; color: var(--muted); font-size: .98rem; }
.pair-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font: 500 .78rem var(--mono); }

.copy {
  flex: none;
  padding: .4rem .8rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 500 .74rem var(--mono);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.copy:hover { border-color: var(--ink); }
.copy.done { background: var(--accent-2); border-color: var(--accent-2); color: var(--surface); }

/* ---------- Tips ---------- */
.tips { padding-block: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--line); }
.tip-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tip { padding: 2rem 1.8rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); counter-increment: tip; }
.tip svg { width: 48px; height: 48px; margin-bottom: 1.2rem; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tip h3 { font: 400 1.6rem var(--serif); }
.tip p { margin: .4rem 0 1rem; color: var(--muted); font-size: .95rem; }
.tip code { display: inline-block; padding: .4rem .7rem; border-radius: 8px; background: var(--tint); font-size: .8rem; }

/* ---------- Install ---------- */
.install { padding-block: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--line); }
.tabs { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.tablist { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tablist button {
  position: relative;
  padding: 1.1rem 1.6rem;
  border: 0; background: none;
  color: var(--muted);
  font: 500 .95rem var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.tablist button::after { content: ''; position: absolute; left: 1.6rem; right: 1.6rem; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .4s var(--ease); }
.tablist button[aria-selected="true"] { color: var(--ink); }
.tablist button[aria-selected="true"]::after { transform: scaleX(1); }
.panel { padding: 2rem clamp(1.2rem, 3vw, 2.4rem); }
.panel > p { margin: 0 0 .8rem; }
.panel .note { margin-top: 1.4rem; color: var(--muted); font-size: .9rem; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .9rem; }
.steps li { counter-increment: s; display: flex; gap: 1rem; align-items: baseline; }
.steps li::before { content: counter(s); font: 400 1.5rem/1 var(--serif); color: var(--accent); min-width: 1.2rem; }
.codebox { position: relative; margin-bottom: 1.4rem; }
.codebox pre { margin: 0; padding: 1.1rem 1.2rem; padding-right: 7rem; border-radius: 12px; background: var(--tint); overflow-x: auto; }
.codebox code { font: 400 .85rem/1.7 var(--mono); }
.codebox .copy { position: absolute; top: .7rem; right: .7rem; background: var(--surface); }

.sources { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 1rem; }
.sources a {
  display: flex; flex-direction: column; gap: .2rem;
  padding: 1.2rem 1.3rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .2s, transform .4s var(--ease);
}
.sources a:hover { border-color: var(--accent); transform: translateY(-2px); }
.sources b { font: 500 .95rem var(--mono); }
.sources b::after { content: ' ↗'; color: var(--accent); }
.sources span { font-size: .85rem; color: var(--muted); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; }
.foot-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.foot-inner p { margin: 0; max-width: 36rem; }
.foot-inner p:first-child { font: 400 1.2rem var(--serif); color: var(--ink); }
.foot-inner em { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero, .anatomy { grid-template-columns: 1fr; }
  .hero-art { justify-self: center; max-width: 380px; }
  .nav-links { display: none; }
  .nav nav { margin-left: auto; }
}
@media (max-width: 560px) {
  .ha-curve { left: 0; }
  .ha-type { right: 0; }
  .count { width: 100%; margin-left: 0; }
  .pair-foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .fd { --x: 50%; }
  .pp-lay:first-child, .rm-title span { opacity: 1; transform: none; }
}
