/* ---------- Tokens (dark is the default look) ---------- */
:root {
  --bg: #08100d;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-solid: #0f1a16;
  --ink: #eaf3ee;
  --muted: #8ea398;
  --line: rgba(234, 243, 238, 0.1);
  --line-strong: rgba(234, 243, 238, 0.2);
  --accent: #3ddc97;
  --accent-2: #38c6e0;
  --on-accent: #04130c;
  --glow: rgba(61, 220, 151, 0.22);
  --aurora-opacity: 1;
  --code-bg: #0b1512;
  --code-ink: #cfe3d9;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;

  --step-0: 1.0625rem;
  --step-1: 1.2rem;
  --step-2: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
  --step-3: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);
  --step-4: clamp(2.3rem, 1.1rem + 3.4vw, 4.3rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-gap: clamp(5rem, 10vw, 8.5rem);
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f2f6f3;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-solid: #ffffff;
  --ink: #0f231b;
  --muted: #55675d;
  --line: rgba(15, 35, 27, 0.1);
  --line-strong: rgba(15, 35, 27, 0.22);
  --accent: #0e8f57;
  --accent-2: #0b88a3;
  --on-accent: #ffffff;
  --glow: rgba(14, 143, 87, 0.18);
  --aurora-opacity: 0.55;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; transition: background 0.4s, color 0.4s;
}
h1, h2, h3, p, ul, ol, dl, dd, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 100; padding: 0.6rem 1rem; background: var(--accent); color: var(--on-accent); border-radius: 10px; }
.skip:focus { top: 1rem; }

/* Soft coloured light behind the page */
.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--aurora-opacity);
  background:
    radial-gradient(48rem 30rem at 82% -6%, var(--glow), transparent 62%),
    radial-gradient(40rem 26rem at -8% 22%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 60%),
    radial-gradient(46rem 30rem at 60% 108%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
}

/* Shared page width */
.nav, .hero, .numbers, .section, .contact, .site-footer { width: min(100% - 2 * var(--gutter), 78rem); margin-inline: auto; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.45rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: var(--on-accent);
  font: 600 1rem/1.2 var(--text); text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 30px -10px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.2s, background 0.2s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.button:active { transform: translateY(0); }
.button-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: none; font-weight: 500; backdrop-filter: blur(8px); }
.button-ghost:hover { border-color: var(--accent); box-shadow: none; }
.button-small { padding: 0.55rem 1rem; font-size: 0.92rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0.9rem; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 0.9rem; padding: 0.55rem 0.6rem 0.55rem 1.1rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 0.65rem; font: 500 1.05rem/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); font-weight: 700; font-size: 0.95rem;
}
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a { display: block; padding: 0.5rem 0.9rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: border-color 0.2s, transform 0.4s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(20deg); }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.icon-moon, [data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: center; gap: clamp(2rem, 4vw, 4rem);
  padding-block: clamp(3rem, 7vh, 5.5rem) clamp(3rem, 7vw, 5rem);
}
.availability {
  display: inline-flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.95rem 0.45rem 0.8rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 0.92rem;
}
.availability time { color: var(--ink); font-variant-numeric: tabular-nums; }
.light { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.light::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { to { transform: scale(3.2); opacity: 0; } }

.hero h1 { margin-top: 1.5rem; font-size: var(--step-4); letter-spacing: -0.04em; line-height: 1.02; }
.shine { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lede { margin-top: 1.5rem; max-width: 46ch; font-size: var(--step-1); line-height: 1.55; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

/* Hero scene */
.scene { position: relative; height: clamp(22rem, 38vw, 28rem); perspective: 1200px; --rx: 0deg; --ry: 0deg; }
.scene > * { transition: transform 0.5s var(--ease); }
.panel {
  position: absolute; border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.panel-code {
  top: 0; right: 0; width: 80%; background: var(--code-bg); color: var(--code-ink); overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
}
.panel-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.8rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.panel-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.panel-bar span { margin-left: 0.6rem; font: 0.78rem var(--mono); color: #7f958a; }
.panel-code pre { padding: 1.1rem 1.2rem 1.4rem; font: 0.86rem/1.7 var(--mono); white-space: pre; overflow: hidden; }
.panel-code b { color: #38c6e0; font-weight: 600; }
.panel-code em { color: #3ddc97; font-style: normal; }
.panel-code u { color: #9db4a8; text-decoration: none; }
.panel-code s { color: #f0c674; text-decoration: none; }

.panel-pass {
  left: 0; bottom: 0; width: min(21rem, 74%); padding: 1.2rem;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(60px);
}
.pass-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--muted); }
.pass-gate { padding: 0.2rem 0.6rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); }
.pass-main { display: flex; align-items: center; gap: 1rem; margin-top: 1.1rem; }
.scan { position: relative; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: var(--surface); color: var(--ink); }
.scan svg { width: 1.7rem; height: 1.7rem; }
.scan::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; padding: 2px;
  background: conic-gradient(var(--state, #f0c674), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pass-who strong { display: block; font: 500 1.1rem/1.2 var(--display); }
.pass-who span { color: var(--muted); font-size: 0.9rem; }
.pass-progress { height: 4px; margin-top: 1.2rem; border-radius: 4px; background: var(--line); overflow: hidden; }
.pass-progress span { display: block; height: 100%; border-radius: inherit; background: var(--state, #f0c674); transform-origin: left; transform: scaleX(0.3); transition: transform 0.8s var(--ease), background 0.4s; }
.pass-status { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.9rem; font-size: 0.95rem; font-weight: 500; }
.pass-status .light { background: var(--state, #f0c674); transition: background 0.4s; }
.panel-pass[data-state="scanning"] { --state: #f0c674; }
.panel-pass[data-state="matched"] { --state: var(--accent-2); }
.panel-pass[data-state="matched"] .pass-progress span { transform: scaleX(0.68); }
.panel-pass[data-state="granted"] { --state: var(--accent); }
.panel-pass[data-state="granted"] .pass-progress span { transform: scaleX(1); }
.panel-pass[data-state="granted"] .scan::before { animation: none; background: var(--accent); }

.float {
  position: absolute; display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem;
  border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.9rem; font-weight: 500;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.55);
}
.float-gate { right: 2%; bottom: 14%; opacity: 0; transform: translateY(8px) translateZ(90px); transition: opacity 0.5s, transform 0.5s var(--ease); }
.scene.is-granted .float-gate { opacity: 1; transform: translateY(0) translateZ(90px); }
.float-stack { right: 4%; top: -1.1rem; animation: bob 6s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -8px; } }

/* ---------- Numbers ---------- */
.numbers {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(10px);
}
.numbers div { padding: clamp(1.25rem, 2.6vw, 2rem); }
.numbers div + div { border-left: 1px solid var(--line); }
.numbers strong { display: block; font: 500 clamp(2rem, 1.2rem + 2.6vw, 3.2rem)/1 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.numbers span { display: block; margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; line-height: 1.35; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; margin-top: clamp(2.5rem, 5vw, 4rem);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; gap: 0.75rem; width: max-content; }
.marquee-track.is-running { animation: slide 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li { padding: 0.5rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); white-space: nowrap; font-size: 0.95rem; }
@keyframes slide { to { transform: translateX(calc(-50% - 0.375rem)); } }

/* ---------- Sections ---------- */
.section { padding-top: var(--section-gap); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 3rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head h2 { font-size: var(--step-3); letter-spacing: -0.035em; max-width: 16ch; }
.section-head p { color: var(--muted); max-width: 34ch; }

.card {
  position: relative; overflow: hidden; padding: clamp(1.25rem, 2.2vw, 1.75rem);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(26rem circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 60%);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card:hover::after { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card h3 { font-size: var(--step-2); }
.card p { color: var(--muted); }

/* ---------- Work bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.work { grid-column: span 2; display: flex; flex-direction: column; }
.work-wide { grid-column: span 4; }
.work-strip { grid-column: span 6; flex-direction: row; align-items: end; justify-content: space-between; gap: 2rem; }
.work-client { margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--accent); }
.work h3 { margin-bottom: 0.6rem; }
.work-wide h3 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
.work-wide p { max-width: 58ch; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 1.25rem; }
.tags li { padding: 0.25rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.82rem; color: var(--muted); }

.viz {
  position: relative; height: 9.5rem; margin-bottom: 1.4rem; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, transparent);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px;
}
/* flow */
.viz-flow { display: flex; align-items: center; gap: 0.5rem; padding: 0 clamp(0.75rem, 2vw, 1.5rem); }
.node { flex: none; padding: 0.5rem 0.85rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-solid); font-size: 0.85rem; font-weight: 500; }
.node-on { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 0 28px var(--glow); }
.wire { position: relative; flex: 1 1 1rem; min-width: 0.75rem; height: 2px; overflow: hidden; background: var(--line-strong); border-radius: 2px; }
.wire::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: var(--accent); border-radius: 2px; transform: translateX(-110%); animation: travel 2.4s var(--ease) infinite; }
.wire:nth-of-type(4)::after { animation-delay: 0.35s; }
.wire:nth-of-type(6)::after { animation-delay: 0.7s; }
@keyframes travel { to { transform: translateX(260%); } }
/* detection */
.box { position: absolute; border: 1.5px solid var(--accent); border-radius: 5px; }
.box i { position: absolute; left: -1.5px; top: -1.35rem; padding: 0.05rem 0.4rem; border-radius: 4px; background: var(--accent); color: var(--on-accent); font: normal 0.68rem var(--mono); white-space: nowrap; }
.box-a { left: 14%; top: 30%; width: 24%; height: 58%; animation: drift 5s ease-in-out infinite alternate; }
.box-b { right: 14%; top: 48%; width: 22%; height: 34%; border-color: var(--accent-2); animation: drift 6s ease-in-out infinite alternate-reverse; }
.box-b i { background: var(--accent-2); }
@keyframes drift { to { transform: translate(8px, -5px); } }
/* bars */
.viz-bars { display: flex; align-items: flex-end; gap: 7%; padding: 1.1rem 9% 0; }
.viz-bars span { flex: 1; height: var(--h); border-radius: 6px 6px 0 0; background: linear-gradient(to top, color-mix(in srgb, var(--accent) 25%, transparent), var(--accent)); transform-origin: bottom; }
.is-visible .viz-bars span { animation: grow 0.9s var(--ease) both; }
.viz-bars span:nth-child(2) { animation-delay: 0.06s; } .viz-bars span:nth-child(3) { animation-delay: 0.12s; }
.viz-bars span:nth-child(4) { animation-delay: 0.18s; } .viz-bars span:nth-child(5) { animation-delay: 0.24s; }
.viz-bars span:nth-child(6) { animation-delay: 0.3s; } .viz-bars span:nth-child(7) { animation-delay: 0.36s; }
@keyframes grow { from { transform: scaleY(0); } }
/* radar */
.viz-radar { display: grid; place-items: center; }
.viz-radar > * { grid-area: 1 / 1; border-radius: 50%; }
.ring { width: 3rem; height: 3rem; border: 1.5px solid var(--accent); opacity: 0; animation: radar 3s ease-out infinite; }
.ring + .ring { animation-delay: 1.5s; }
@keyframes radar { from { transform: scale(0.4); opacity: 0.9; } to { transform: scale(3.2); opacity: 0; } }
.fence { width: 7rem; height: 7rem; border: 1.5px dashed var(--line-strong); }
.pin { width: 12px; height: 12px; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
/* receipt */
.viz-receipt { display: grid; place-items: end center; }
.receipt { width: 62%; padding: 0.9rem 1rem 0.8rem; border-radius: 10px 10px 0 0; background: var(--surface-solid); border: 1px solid var(--line-strong); border-bottom: 0; display: grid; gap: 0.5rem; }
.receipt span { height: 6px; border-radius: 6px; background: var(--line-strong); }
.receipt span:nth-child(2) { width: 72%; } .receipt span:nth-child(3) { width: 48%; }
.receipt b { display: flex; justify-content: space-between; padding-top: 0.5rem; border-top: 1px dashed var(--line-strong); font: 600 0.82rem var(--text); }
.receipt b i { font-style: normal; } .receipt b i:last-child { color: var(--accent); }
/* results */
.results { display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); }
.results dd { font: 500 clamp(2.4rem, 1.5rem + 3vw, 3.8rem)/1 var(--display); letter-spacing: -0.04em; background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.results dt { margin-top: 0.4rem; color: var(--muted); font-size: 0.92rem; white-space: nowrap; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.service-icon { width: 2.9rem; height: 2.9rem; padding: 0.7rem; margin-bottom: 2.5rem; border-radius: 14px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.service h3 { margin-bottom: 0.6rem; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4rem); counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding-top: 3.4rem; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; z-index: 1; display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border-radius: 50%; border: 1px solid var(--accent); background: var(--bg); color: var(--accent); font: 600 0.95rem var(--display);
}
.steps li::after { content: ""; position: absolute; top: 1.2rem; left: 2.4rem; right: -1rem; height: 1px; background: linear-gradient(90deg, var(--accent), var(--line)); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.steps p { color: var(--muted); font-size: 0.98rem; max-width: 24ch; }

/* ---------- Experience ---------- */
.experience { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 0.6rem; bottom: 0.6rem; width: 1px; background: linear-gradient(var(--accent), var(--line) 30%); }
.timeline li { position: relative; padding-bottom: 1.9rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -2rem; top: 0.45rem; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); }
.timeline li:first-child::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent); }
.when { font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline h3 { margin-top: 0.15rem; font-size: var(--step-1); letter-spacing: -0.015em; }
.timeline p { color: var(--muted); }

.tools { position: sticky; top: 6rem; }
.tools:hover { transform: none; }
.tools h3 { margin-bottom: 1.25rem; }
.tools dl { display: grid; gap: 1.1rem; }
.tools dt { margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.tools dd { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tools dd span { padding: 0.3rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; background: color-mix(in srgb, var(--bg) 40%, transparent); }

/* ---------- Contact ---------- */
.contact {
  position: relative; overflow: hidden; margin-top: var(--section-gap); padding: clamp(2.5rem, 7vw, 5.5rem);
  border: 1px solid var(--line-strong); border-radius: calc(var(--radius) * 1.5);
  background:
    radial-gradient(40rem 22rem at 100% 120%, var(--glow), transparent 65%),
    radial-gradient(30rem 18rem at 0% -20%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 65%),
    var(--surface);
}
.contact h2 { font-size: var(--step-3); letter-spacing: -0.035em; }
.contact-lede { margin-top: 1rem; color: var(--muted); font-size: var(--step-1); max-width: 44ch; }
.contact-email {
  display: inline-block; margin-top: clamp(1.75rem, 4vw, 3rem);
  font: 500 clamp(1.25rem, 0.5rem + 3.5vw, 3.2rem)/1.1 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); text-underline-offset: 0.18em;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.contact-email:hover { color: var(--accent); text-decoration-color: var(--accent); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.copy-status { margin-top: 1rem; min-height: 1.6em; color: var(--accent); font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; padding-block: 2.5rem 3rem; color: var(--muted); font-size: 0.95rem; }
.site-footer a { text-underline-offset: 0.2em; }

/* ---------- Hero entrance (pure CSS, so it never waits on the script) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .scene { animation: rise 0.8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
  .scene { animation-delay: 0.3s; }
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } }
}

/* ---------- Scroll reveal (only when the script enables it) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), border-color 0.3s; transition-delay: var(--delay, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .card.reveal.is-visible:hover { transform: translateY(-3px); transition-delay: 0ms; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; }
  .scene { height: 24rem; max-width: 34rem; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work, .work-wide, .work-strip { grid-column: span 1; }
  .work-wide, .work-strip { grid-column: span 2; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers div:nth-child(3) { border-left: 0; }
  .numbers div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .experience { grid-template-columns: 1fr; }
  .tools { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; }
  .steps li:nth-child(2)::after { display: none; }
  .work-strip { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .brand { font-size: 0.98rem; }
  .bento, .services { grid-template-columns: 1fr; }
  .work, .work-wide, .work-strip { grid-column: span 1; }
  .scene { height: 21rem; }
  .panel-code { width: 92%; }
  .panel-code pre { font-size: 0.76rem; }
  .float-stack { display: none; }
  .viz-flow { gap: 0.3rem; padding: 0 0.75rem; }
  .viz-flow > :nth-last-child(-n + 2) { display: none; }
  .node { padding: 0.4rem 0.55rem; font-size: 0.74rem; }
  .availability { border-radius: 16px; }
  .hero-actions .button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
