/* ═══════════════════════════════════════════════════════════
   Analog Array - Portfolio
   Dark, monospaced, studio-brutalist aesthetic.
   Inspired by brutalist studio sites; original implementation.
   Single accent: KVS-style orange (#5a8fc4).
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Surfaces — warm near-black, not clinical pure black */
  --bg:                  #0a0807;
  --bg-elevated:         #131110;
  --bg-tint:             #1a1613;
  --bg-band:             #0c0a08;
  --bg-card:             #15120f;

  /* Ink */
  --ink:                 #f4f1ea;
  --text-primary:        #f4f1ea;
  --text-body:           #c8c4bb;
  --text-muted:          #8e8d89;
  --text-subtle:         #595959;
  --text-dim:            #3a3a3a;

  /* Soft corners + ease-out (no overshoot/bounce, per Impeccable motion law) */
  --radius:              6px;
  --radius-sm:           4px;
  --ease-spring:         cubic-bezier(0.22, 1, 0.36, 1);

  /* Rules */
  --rule:                rgba(197, 196, 194, 0.18);
  --rule-soft:           rgba(197, 196, 194, 0.09);
  --rule-strong:         rgba(197, 196, 194, 0.32);

  /* Orange accent */
  --teal:                #5a8fc4;
  --teal-bright:         #84afe0;
  --teal-hover:          #a8c8ec;
  --teal-deep:           #1a5c92;
  --teal-soft:           rgba(90, 143, 196, 0.12);
  --teal-tint:           rgba(90, 143, 196, 0.22);
  --teal-edge:           rgba(90, 143, 196, 0.48);

  /* Shadows (subtle on dark - mostly glow) */
  --shadow-xs:           0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-sm:           0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-md:           0 8px 24px rgba(0, 0, 0, 0.40);
  --shadow-lg:           0 18px 40px rgba(0, 0, 0, 0.55);
  --shadow-teal:         0 0 0 1px rgba(90, 143, 196, 0.30), 0 0 24px rgba(90, 143, 196, 0.12);

  /* Legacy aliases (project pages reference these) */
  --apple-black:         var(--bg);
  --apple-white:         var(--ink);
  --apple-near-black:    var(--bg-elevated);
  --apple-blue:          var(--teal);
  --apple-blue-hover:    var(--teal-hover);
  --apple-link-dark:     var(--teal-bright);

  --ease-out-expo:       cubic-bezier(0.16, 1, 0.30, 1);
  --ease-out-soft:       cubic-bezier(0.22, 1, 0.36, 1);

  /* Archivo (grotesk) carries display + body; JetBrains Mono stays the
     voice for small labels, nav, and system/terminal text only. */
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-text:    'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ── Base ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; background: var(--bg); }

body {
  display: block;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01' on, 'cv01' on, 'cv02' on;
}

main { display: block; position: relative; }

img { max-width: 100%; display: block; }

::selection { background: var(--teal); color: var(--bg); }

/* Background grain — KVS-flavoured atmosphere */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(90, 143, 196, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(90, 143, 196, 0.04) 0%, transparent 60%);
}

/* Hairline grid overlay — extremely subtle */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--teal); color: var(--bg);
  font-size: 12px; padding: 8px 16px; z-index: 9999;
  transition: top 0.15s; text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════ */
nav#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 56px;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  display: flex; align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}
nav#nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
  border-bottom-color: var(--rule);
}

.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 32px;
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
  min-height: 44px;
  white-space: nowrap;
}
.nav-logo-mark { width: 18px; height: 18px; display: block; flex-shrink: 0; filter: brightness(0) invert(1); opacity: 0.92; }

.nav-links {
  display: flex; gap: 28px; list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-links a::before {
  content: '';
  position: absolute; left: -10px; top: 50%;
  width: 4px; height: 4px;
  background: var(--teal);
  border-radius: 50%;
  opacity: 0;
  transform: translateY(-50%) scale(0.5);
  transition: opacity 0.22s var(--ease-out-expo), transform 0.22s var(--ease-out-expo);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}
.nav-links a:hover::before,
.nav-links a[aria-current="page"]::before {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aa-theme-toggle {
  position: relative;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.aa-theme-toggle:hover,
.aa-theme-toggle:focus-visible {
  background: rgba(255,255,255,0.1);
  border-color: var(--rule-strong);
}

.aa-theme-toggle:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.aa-theme-toggle-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -5px -4px 0 var(--bg);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.aa-theme-toggle-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; cursor: pointer;
  background: none; border: none; padding: 10px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out-expo), opacity 0.25s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.nav-mobile-overlay {
  display: none; position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  z-index: 99;
  flex-direction: column;
  justify-content: center; align-items: center;
}
.nav-mobile-overlay.open { display: flex; }
.nav-mobile-links { list-style: none; display: flex; flex-direction: column; align-items: stretch; width: 100%; }
.nav-mobile-links li { width: 100%; border-bottom: 1px solid var(--rule); }
.nav-mobile-links li:first-child { border-top: 1px solid var(--rule); }
.nav-mobile-links a {
  display: block; padding: 22px 32px;
  font-family: var(--font-mono); font-size: 22px; font-weight: 500;
  color: var(--ink); text-decoration: none;
  letter-spacing: 0;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.nav-mobile-links a:hover {
  color: var(--teal-bright);
  background: var(--bg-elevated);
}

/* ═══════════════════════════════════════════════════════════
   HERO - large monospaced display
   ═══════════════════════════════════════════════════════════ */
.hero-journey {
  --journey-progress: 0;
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  overflow: clip;
  padding: 80px 0 64px;
  display: flex;
  align-items: stretch;
}

.hero-journey-sticky {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  gap: 32px;
  padding: 0 32px;
  max-width: 1400px;
  margin: 0 auto;
}

/* The hero copy sits above a big monospaced display block */
.hero-copy {
  position: relative;
  z-index: 2;
  display: flex; flex-direction: column;
  justify-content: center;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding-top: 24px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 28px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  background: var(--bg-elevated);
  width: fit-content;
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--teal);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--teal-soft);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 96px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  max-width: 1200px;
  text-transform: uppercase;
}
.hero-name .accent { color: var(--teal-bright); }

.hero-tagline {
  font-family: var(--font-text);
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 400;
  color: var(--text-body);
  max-width: 640px;
  line-height: 1.65;
  letter-spacing: 0.005em;
  margin-bottom: 36px;
}

.hero-cta-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

/* Stage: image strip + meta band */
.hero-journey-stage {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.hj-frame {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
}

/* Hero image strip — three image tiles + a metadata column */
.hero-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 0.9fr;
  gap: 1px;
  background: var(--rule);
}
.hero-strip > * {
  background: var(--bg-elevated);
}
.hero-strip-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.hero-strip-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.04) brightness(0.92) saturate(0.85);
  transition: transform 0.8s var(--ease-out-expo), filter 0.4s;
}
.hero-strip-tile:hover img {
  transform: scale(1.04);
  filter: contrast(1.08) brightness(1.0) saturate(1.0);
}
.hero-strip-tile::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 65%, rgba(10,10,10,0.85) 100%);
  pointer-events: none;
}
.hero-strip-tile .strip-label {
  position: absolute; left: 12px; bottom: 10px; right: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}
.hero-strip-tile .strip-label .strip-num { color: var(--teal-bright); }

/* Meta column with status readouts */
.hero-strip-meta {
  padding: 16px 18px;
  display: flex; flex-direction: column;
  gap: 0;
  background: var(--bg-tint);
  font-family: var(--font-mono);
}
.hero-strip-meta-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
}
.hero-strip-meta-row:last-child { border-bottom: none; }
.hero-strip-meta-row .label {
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-strip-meta-row .val {
  color: var(--ink);
  font-weight: 500;
}
.hero-strip-meta-row .val.ok::before {
  content: '●';
  color: var(--teal-bright);
  margin-right: 6px;
  font-size: 9px;
}

/* Marquee — KVS-style infinite scroller of capabilities */
.hero-marquee {
  margin-top: 24px;
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
}
.hero-marquee::before,
.hero-marquee::after {
  content: '';
  position: absolute; top: 0; bottom: 0;
  width: 64px;
  z-index: 1;
  pointer-events: none;
}
.hero-marquee::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.hero-marquee::after  { right: 0; background: linear-gradient(to left,  var(--bg), transparent); }
.hero-marquee-track {
  display: flex;
  gap: 36px;
  width: max-content;
  animation: marquee 50s linear infinite;
}
.hero-marquee-track span {
  display: inline-flex; align-items: center; gap: 36px;
  white-space: nowrap;
}
.hero-marquee-track span::after {
  content: '/';
  color: var(--text-dim);
}
.hero-marquee-track .accent { color: var(--teal-bright); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 0; right: 0;
  display: inline-flex; flex-direction: column; align-items: flex-end; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  pointer-events: none;
}
.hero-scroll-hint::after {
  content: '↓';
  font-size: 14px;
  animation: scrollHint 2.4s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(4px); opacity: 1; }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary,
.hero-cta {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  background: transparent; color: var(--teal-bright);
  padding: 14px 22px;
  border: 1px solid var(--teal-edge);
  text-decoration: none; display: inline-flex; align-items: center; gap: 10px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out-expo);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
}
.btn-primary::after,
.hero-cta::after {
  content: '→';
  font-size: 14px;
}
.btn-primary:visited,
.hero-cta:visited { color: var(--teal-bright); }
.btn-primary:hover,
.hero-cta:hover {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-hover);
}
.btn-primary:active,
.hero-cta:active { transform: translateY(1px); }

.btn-ghost,
.hero-link {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  color: var(--ink);
  padding: 14px 22px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out-expo);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.btn-ghost::after,
.hero-link::after {
  content: '→';
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s var(--ease-out-expo);
}
.btn-ghost:visited,
.hero-link:visited { color: var(--ink); }
.btn-ghost:hover,
.hero-link:hover {
  border-color: var(--teal);
  background: var(--bg-elevated);
}
.btn-ghost:hover::after,
.hero-link:hover::after {
  color: var(--teal-bright);
  transform: translateX(2px);
}

/* ═══════════════════════════════════════════════════════════
   SECTIONS - shared rhythm
   ═══════════════════════════════════════════════════════════ */
section { position: relative; z-index: 1; }

.intro,
.work,
.capabilities,
.background,
.contact {
  padding: 120px 0;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 12px;
}
.section-eyebrow::before {
  content: '';
  display: inline-block; width: 24px; height: 1px;
  background: var(--teal);
  flex-shrink: 0;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  max-width: 1000px;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.section-heading .accent { color: var(--teal-bright); }

.section-sub {
  font-family: var(--font-text);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-body);
  max-width: 640px;
  margin-bottom: 56px;
  letter-spacing: 0.005em;
}

/* signal-tag: brief scan effect on small labels only */
.signal-tag {
  position: relative;
  display: inline-block;
}
.signal-tag::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--teal-tint) 50%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  animation: signalSweep 7s ease-in-out infinite;
}
@keyframes signalSweep {
  0%, 92%, 100% { opacity: 0; transform: translateX(-30%); }
  94%, 96%      { opacity: 0.6; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════════════
   INTRO / POSITIONING
   ═══════════════════════════════════════════════════════════ */
.intro {
  position: relative;
  overflow: hidden;
}
.intro::before {
  content: '';
  position: absolute;
  top: 10%; right: -10%;
  width: 540px; height: 540px;
  background-image: url('/images/prompt3.png');
  background-size: cover; background-position: center;
  opacity: 0.18;
  filter: contrast(1.2) brightness(0.6) saturate(0.7);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  mask-image: radial-gradient(circle at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, black 20%, transparent 70%);
}
.intro .container { position: relative; z-index: 1; }

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 80px;
  align-items: start;
}

.intro-statement {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--ink);
  max-width: 440px;
}
.intro-statement .accent { color: var(--teal-bright); }

.intro-body p {
  font-family: var(--font-text);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 22px;
  max-width: 620px;
  letter-spacing: 0.005em;
}
.intro-body p:last-child { margin-bottom: 0; }

.intro-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
}
.intro-side {
  padding: 22px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  position: relative;
}
.intro-side::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 32px; height: 1px;
  background: var(--teal);
}
.intro-side h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.intro-side h4::before {
  content: '[';
  color: var(--text-muted);
}
.intro-side h4::after {
  content: ']';
  color: var(--text-muted);
}
.intro-side p {
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   SELECTED WORK
   ═══════════════════════════════════════════════════════════ */
.work {
  position: relative;
  overflow: hidden;
}
.work::before {
  content: '';
  position: absolute;
  top: -120px; left: -10%;
  width: 620px; height: 420px;
  background-image: url('/images/prompt4.png');
  background-size: cover; background-position: center;
  opacity: 0.14;
  filter: contrast(1.2) brightness(0.5) saturate(0.6);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}
.work .container { position: relative; z-index: 1; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 8px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.project-card {
  display: flex; flex-direction: column;
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
  transition: background 0.3s var(--ease-out-soft);
  position: relative;
  overflow: hidden;
}
.project-card:visited { color: inherit; }
.project-card:hover {
  background: var(--bg-tint);
}

.project-card-media {
  margin: 0;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-tint);
  border-bottom: 1px solid var(--rule);
}
.project-card-media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: contrast(1.04) brightness(0.92) saturate(0.92);
  transition: transform 0.7s var(--ease-out-expo), filter 0.5s;
}
.project-card:hover .project-card-media img {
  transform: scale(1.04);
  filter: contrast(1.08) brightness(1) saturate(1);
}

.project-card-body {
  padding: 26px 28px 30px;
  display: flex; flex-direction: column;
  flex: 1;
}

.project-card-tag {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.project-card-tag::before {
  content: counter(card, decimal-leading-zero);
  counter-increment: card;
  color: var(--text-muted);
  font-weight: 500;
}

.work-grid { counter-reset: card; }

.project-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-card-desc {
  font-family: var(--font-text);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 20px;
  flex: 1;
  letter-spacing: 0.005em;
}

.project-card-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px;
}
.project-card-tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-card-link {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  color: var(--teal-bright);
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: auto;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.project-card-link::after {
  content: '→';
  font-size: 14px;
  transition: transform 0.25s var(--ease-out-expo);
}
.project-card:hover .project-card-link::after { transform: translateX(4px); }

/* Featured (full-width) variant — used for PlainSight */
.project-card-featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
}
.project-card-featured .project-card-media {
  aspect-ratio: auto;
  border-bottom: none;
  border-right: 1px solid var(--rule);
  min-height: 360px;
}
.project-card-featured .project-card-body {
  padding: 40px 44px;
  justify-content: center;
}
.project-card-featured .project-card-title {
  font-size: clamp(28px, 2.6vw, 36px);
}
.project-card-featured .project-card-desc {
  font-size: 14.5px;
}

.work-more {
  margin-top: 36px;
  font-size: 12px;
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.work-more a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
  transition: color 0.18s, border-color 0.18s;
}
.work-more a:visited { color: var(--text-muted); }
.work-more a:hover { color: var(--teal-bright); border-color: var(--teal); }

/* ═══════════════════════════════════════════════════════════
   CAPABILITIES / WHAT I WORK ON
   ═══════════════════════════════════════════════════════════ */
.capabilities {
  position: relative;
  overflow: hidden;
}
.capabilities::before {
  content: '';
  position: absolute;
  top: -180px; right: -10%;
  width: 720px; height: 480px;
  background-image: url('/images/prompt5.png');
  background-size: cover; background-position: center;
  opacity: 0.14;
  filter: contrast(1.2) brightness(0.5) saturate(0.7);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse at center, black 25%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 70%);
}
.capabilities .container { position: relative; z-index: 1; }

.caps-intro {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 48px;
}

.caps-lead {
  font-family: var(--font-text);
  font-size: 14.5px;
  line-height: 1.7;
  letter-spacing: 0.005em;
  color: var(--text-body);
  max-width: 540px;
  justify-self: end;
}

.caps-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  counter-reset: cap;
}

/* Capability card */
.capability-card {
  padding: 32px 28px;
  background: var(--bg-elevated);
  display: flex; flex-direction: column;
  transition: background 0.3s var(--ease-out-soft);
  min-height: 240px;
  position: relative;
  overflow: hidden;
  counter-increment: cap;
}
.capability-card::before {
  content: counter(cap, decimal-leading-zero);
  position: absolute;
  top: 14px; right: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.capability-card:hover {
  background: var(--bg-tint);
}

.capability-card-icon {
  width: 32px; height: 32px;
  background: var(--teal-soft);
  color: var(--teal-bright);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  border: 1px solid var(--teal-edge);
  flex-shrink: 0;
}
.capability-card-icon svg { width: 16px; height: 16px; display: block; }

.capability-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.capability-card-desc {
  font-family: var(--font-text);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
  letter-spacing: 0.005em;
}

/* Procurement highlight - stronger orange treatment */
.capability-card.is-featured {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, rgba(90, 143, 196, 0.04) 100%);
}
.capability-card.is-featured::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--teal);
}
.capability-card.is-featured .capability-card-icon {
  background: var(--teal);
  color: var(--bg);
  border-color: var(--teal);
}
.capability-card.is-featured .capability-card-title {
  color: var(--teal-bright);
}

/* ═══════════════════════════════════════════════════════════
   BACKGROUND
   ═══════════════════════════════════════════════════════════ */
.bg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.bg-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 10px;
}
.bg-sub::before {
  content: '//';
  color: var(--text-muted);
}

.bg-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bg-list li {
  display: flex;
  flex-direction: column;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  gap: 4px;
}
.bg-list li:last-child { border-bottom: 1px solid var(--rule); }

.bg-primary {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.bg-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════════ */
.contact {
  padding: 140px 0 160px;
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, var(--teal-soft) 0%, transparent 70%),
    var(--bg);
}

.contact-eyebrow { margin-bottom: 28px; }

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.0;
  color: var(--ink);
  margin-bottom: 28px;
  text-transform: uppercase;
}
.contact-heading .accent { color: var(--teal-bright); }

.contact-sub {
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 560px;
  margin-bottom: 44px;
  letter-spacing: 0.005em;
}

.contact-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-link {
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out-expo);
}
.contact-link:visited { color: var(--ink); }
.contact-link:hover {
  border-color: var(--teal);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}
.contact-link.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--bg);
}
.contact-link.primary:visited { color: var(--bg); }
.contact-link.primary:hover {
  background: var(--teal-bright);
  border-color: var(--teal-bright);
  color: var(--bg);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
footer {
  position: static;
  display: block;
  background: var(--bg-band);
  border-top: 1px solid var(--rule);
  padding: 40px 0 32px;
  width: 100%;
}

.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 32px;
  display: flex; justify-content: space-between; align-items: center;
}

.footer-inner-expanded {
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; flex-direction: column; gap: 4px; }

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.footer-nav {
  display: flex; gap: 22px; flex-wrap: wrap;
}
.footer-nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  min-height: 44px; display: inline-flex; align-items: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-nav a:hover { color: var(--teal-bright); }

.footer-social {
  display: flex; gap: 8px; align-items: center;
}
.footer-social a {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--rule);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.footer-social a:hover {
  color: var(--teal-bright);
  border-color: var(--teal);
  background: var(--bg-elevated);
}

.footer-left, .footer-right {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.footer-right a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.footer-right a:visited { color: var(--text-muted); }
.footer-right a:hover { color: var(--teal-bright); }

/* ── Cursor pointer on interactive cards ───────────────────── */
.project-card,
.case-teaser,
.related-card { cursor: pointer; }

/* ═══════════════════════════════════════════════════════════
   FADE-IN
   ═══════════════════════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
  will-change: opacity, transform;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════
   FOCUS
   ═══════════════════════════════════════════════════════════ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   PROJECT DETAIL PAGES
   ═══════════════════════════════════════════════════════════ */

.page-main { min-height: 100vh; background: var(--bg); }

.page-hero {
  padding: 150px 0 86px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 4px),
    var(--bg);
}
.page-hero .container { position: relative; z-index: 1; }

.page-crumbs {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 32px;
  letter-spacing: 0;
}
.page-crumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.18s;
}
.page-crumbs a:visited { color: var(--text-muted); }
.page-crumbs a:hover { color: var(--teal-bright); }
.page-crumbs span { color: var(--text-subtle); }

.page-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--teal-bright);
  margin-bottom: 22px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 108px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.96;
  color: var(--ink);
  margin-bottom: 26px;
  max-width: 980px;
  text-transform: uppercase;
}

.page-lead {
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 64ch;
  margin-bottom: 36px;
  letter-spacing: 0;
}

.page-actions {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

.page-content {
  padding: 96px 0 120px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 72px;
  align-items: start;
}
.page-grid > aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
}

.case-card {
  padding: 56px 0;
  border-top: 1px solid var(--rule);
}
.case-card:first-child { border-top: none; padding-top: 0; }
.case-card:last-child { padding-bottom: 0; }

.case-card h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 22px;
  text-transform: uppercase;
}

.case-copy p,
.case-card > p {
  font-family: var(--font-text);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 18px;
  max-width: 66ch;
  letter-spacing: 0;
}
.case-copy p:last-child { margin-bottom: 0; }

.privacy-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.privacy-copy {
  max-width: 78ch;
}

.privacy-copy h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  margin: 28px 0 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.privacy-copy ul {
  margin: 0 0 20px 1.1rem;
  padding: 0;
  max-width: 68ch;
}

.privacy-copy li {
  font-family: var(--font-text);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 10px;
  letter-spacing: 0;
}

.privacy-copy code,
.case-meta-value code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--ink);
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  padding: 0.08rem 0.28rem;
}

.privacy-copy strong {
  color: var(--ink);
  font-weight: 700;
}

.proj-result {
  padding: 18px 22px;
  margin-top: 8px;
  border-left: 2px solid var(--teal);
  background: var(--teal-soft);
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.6;
  max-width: 66ch;
}
.proj-result strong {
  color: var(--ink);
  font-weight: 600;
}

.inline-link {
  color: var(--teal-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--teal-edge);
  transition: color 0.18s, border-color 0.18s;
}
.inline-link:visited { color: var(--teal-bright); }
.inline-link:hover { color: var(--ink); border-color: var(--ink); }

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 12px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--teal);
  flex-shrink: 0;
}

.case-figure {
  margin: 24px 0 8px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg-elevated);
}
.case-figure img {
  width: 100%; height: auto; display: block;
  filter: grayscale(1) contrast(1.16) brightness(0.76);
}

/* Brand/logo mark inside copy: no frame, no grayscale. */
.case-figure-plain {
  margin: 22px 0;
  border: none;
  background: none;
  overflow: visible;
}
.case-figure-plain img {
  width: min(320px, 100%);
  height: auto;
  display: block;
  filter: none;
  border-radius: 10px;
}

.case-figure-logo {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  background: transparent;
}
.case-figure-logo img,
:root[data-theme="light"] .case-figure.case-figure-logo img {
  width: min(310px, 100%);
  filter: none;
}
.case-figure-logo figcaption {
  max-width: min(310px, 100%);
  margin-top: 8px;
  font-family: var(--font-text);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  letter-spacing: 0;
}
:root[data-theme="light"] .case-figure.case-figure-logo {
  background: transparent;
}

/* Diagrams shown in full colour (not the desaturated screenshot treatment). */
.case-figure-color img,
:root[data-theme="light"] .case-figure-color img {
  filter: none;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  margin: 24px 0 8px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.case-gallery .case-figure { margin: 0; border: none; }

.case-stack {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 16px;
}
.case-stack span,
.case-stack > * {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-body);
  padding: 5px 10px;
  background: #000;
  border: 1px solid var(--rule);
  letter-spacing: 0;
  text-transform: uppercase;
}

.meta-card {
  padding: 24px 0;
}

.case-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}
.case-meta-item {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 4px;
}
.case-meta-item:last-child { border-bottom: 1px solid var(--rule); }

.case-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text-muted);
}
.case-meta-value {
  font-family: var(--font-text);
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.55;
}

.ps-arch-grid {
  display: flex; flex-direction: column;
  gap: 0;
  margin-top: 12px;
}
.ps-arch-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.ps-arch-card:last-child { border-bottom: 1px solid var(--rule); }
.ps-arch-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--teal-bright);
  padding-top: 4px;
}
.ps-arch-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.ps-arch-detail {
  font-family: var(--font-text);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-body);
  max-width: 66ch;
}
.ps-arch-stack {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 14px;
}
.ps-arch-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-body);
  padding: 4px 10px;
  background: #000;
  border: 1px solid var(--rule);
  letter-spacing: 0;
  text-transform: uppercase;
}

/* ── /projects/ index - case teasers ──────────────────────── */
.case-teaser-grid {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.case-teaser {
  padding: 0;
  border: none;
  background: #000;
  overflow: hidden;
  transition: background 0.3s var(--ease-out-soft);
}
.case-teaser:hover {
  background: var(--bg-tint);
}

.case-teaser-split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
  align-items: stretch;
}

.case-teaser:nth-child(even) .case-teaser-split {
  grid-template-columns: 1.1fr 1fr;
}
.case-teaser:nth-child(even) .case-teaser-media {
  order: 2;
  border-right: none;
  border-left: 1px solid var(--rule);
}

.case-teaser-copy {
  min-width: 0;
  padding: 40px 44px;
  display: flex; flex-direction: column; justify-content: center;
}

.case-teaser-media {
  margin: 0;
  overflow: hidden;
  border-right: 1px solid var(--rule);
  background: var(--bg-tint);
  aspect-ratio: 16 / 11;
  min-height: 280px;
}
.case-teaser-media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: grayscale(1) contrast(1.16) brightness(0.74);
  transition: transform 0.6s var(--ease-out-expo), filter 0.4s;
}
.case-teaser:hover .case-teaser-media img {
  transform: scale(1.02);
  filter: grayscale(0.08) contrast(1.08) brightness(0.88);
}

.ps-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 12px;
}
.ps-badge::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--teal);
  flex-shrink: 0;
}

.case-teaser-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 18px;
  text-transform: uppercase;
}

.case-teaser-desc {
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 22px;
  letter-spacing: 0;
}

.proj-case-link {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-bright);
  text-decoration: none;
  letter-spacing: 0;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
}
.proj-case-link::after {
  content: '→';
  font-size: 14px;
  transition: transform 0.25s var(--ease-out-expo);
}
.proj-case-link:visited { color: var(--teal-bright); }
.case-teaser:hover .proj-case-link::after { transform: translateX(4px); }
.proj-case-link:hover { color: var(--ink); }

/* project index hover tint */
.proj-card-purple:hover .case-teaser-media,
.proj-card-amber:hover .case-teaser-media,
.proj-card-green:hover .case-teaser-media,
.proj-card-blue:hover .case-teaser-media { box-shadow: inset 0 0 0 1px var(--teal-edge); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  margin-top: 16px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.related-card {
  padding: 20px 22px;
  border: none;
  background: #000;
  transition: background 0.2s, transform 0.2s var(--ease-out-soft);
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.related-card:visited { color: var(--ink); }
.related-card:hover {
  background: var(--bg-tint);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .intro-grid,
  .caps-intro,
  .bg-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .caps-lead { justify-self: start; }
  .caps-grid-v2 { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: 1fr; }
  .project-card-featured { grid-column: span 1; grid-template-columns: 1fr; }
  .project-card-featured .project-card-media { border-right: none; border-bottom: 1px solid var(--rule); min-height: 240px; }
  .project-card-featured .project-card-body { padding: 28px; }
  .hero-strip { grid-template-columns: 1fr 1fr; }
  .hero-strip-meta { grid-column: span 2; }

  .case-teaser-split,
  .case-teaser:nth-child(even) .case-teaser-split {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .case-teaser:nth-child(even) .case-teaser-media { order: 0; border-left: none; border-bottom: 1px solid var(--rule); }
  .case-teaser-media { border-right: none; border-bottom: 1px solid var(--rule); min-height: 220px; }
  .case-teaser-copy { padding: 28px 28px 32px; }

	  .page-grid {
	    grid-template-columns: 1fr;
	    gap: 48px;
	  }
	  .page-grid > aside { position: static; }
	  .privacy-grid { grid-template-columns: 1fr; }
	}

@media (max-width: 768px) {
  .container,
  .nav-inner,
  .footer-inner {
    padding: 0 20px;
  }

  body.aa-kvs-page .nav-inner {
    gap: 12px;
    padding: 0 14px;
  }

  body.aa-kvs-page .nav-logo {
    gap: 7px;
    font-size: 11px;
  }

  body.aa-kvs-page .nav-right {
    gap: 6px;
  }

  body.aa-kvs-page .aa-nav-status {
    min-height: 38px;
    padding: 0 9px;
    font-size: 10px;
  }

  body.aa-kvs-page .aa-theme-toggle {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .nav-links { display: none; }
  .nav-hamburger { display: none; }

  .hero-journey { min-height: auto; padding: 96px 0 56px; }
  .hero-journey-sticky { padding: 0 20px; }
  .hero-strip { grid-template-columns: 1fr; }
  .hero-strip-meta { padding: 14px 16px; }
  .hero-scroll-hint { display: none; }
  .hero-name { font-size: 36px; }
  .hero-tagline { font-size: 14px; }

  .intro,
  .work,
  .capabilities,
  .background { padding: 80px 0; }
  .contact { padding: 96px 0 112px; }

  .caps-grid-v2 { grid-template-columns: 1fr; }

  .contact-links { flex-direction: column; align-items: stretch; }
  .contact-link { justify-content: center; min-height: 44px; }

  .footer-inner-expanded {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .footer-nav { gap: 14px; }

  .page-hero { padding: 116px 0 56px; }
  .page-content { padding: 72px 0 96px; }
}

@media (max-width: 360px) {
  body.aa-kvs-page .nav-logo-mark {
    display: none;
  }
}

@media (max-width: 340px) {
  body.aa-kvs-page .nav-logo span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.aa-kvs-page .nav-logo-mark {
    display: block;
  }
}

@media (max-width: 480px) {
  .hero-eyebrow { font-size: 10px; }
  .intro-sides { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-scroll-hint { display: none; }
  .signal-tag::after { animation: none; }
  .hero-marquee-track { animation: none; }
  .hero-eyebrow::before { animation: none; }
  .fade-in { transition: none; opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   LIGHTBOX (project pages)
   ═══════════════════════════════════════════════════════════ */
.proj-artifact-zoom {
  display: block; width: 100%;
  padding: 0; border: none; background: none; cursor: zoom-in;
  position: relative;
}
.proj-artifact-zoom img { width: 100%; display: block; }
.proj-artifact-zoom::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(90, 143, 196,0);
  transition: background 0.2s ease;
}
.proj-artifact-zoom:hover::after { background: rgba(90, 143, 196,0.08); }

.zoom-hint {
  font-size: 10px;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 6px;
  font-family: var(--font-mono);
}

#lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
#lightbox[hidden] { display: none; }

#lightbox figure {
  position: relative;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
#lightbox-img {
  max-width: 100%; max-height: 80vh;
  object-fit: contain;
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
}
#lightbox-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#lightbox-close,
#lightbox-prev,
#lightbox-next {
  position: fixed;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px; line-height: 1;
  transition: background 0.2s, border-color 0.2s;
}
#lightbox-close:hover,
#lightbox-prev:hover,
#lightbox-next:hover {
  background: var(--bg-tint);
  border-color: var(--teal);
}
#lightbox-close { top: 20px; right: 20px; font-size: 22px; }
#lightbox-prev  { left: 16px; top: 50%; transform: translateY(-50%); }
#lightbox-next  { right: 16px; top: 50%; transform: translateY(-50%); }

/* ═══════════════════════════════════════════════════════════
   LEGACY .work-item styles (fallback)
   ═══════════════════════════════════════════════════════════ */
.work-item {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 96px;
}
.work-item-reverse { grid-template-columns: 1fr 1.15fr; }
.work-item-reverse .work-media { order: 2; }
.work-media {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: var(--bg-tint);
  border: 1px solid var(--rule);
  position: relative;
}
.work-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.04) brightness(0.92) saturate(0.92);
  transition: transform 0.6s var(--ease-out-expo);
}
.work-item:hover .work-media img { transform: scale(1.02); }
.work-meta {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 16px;
}
.work-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin-bottom: 18px;
  line-height: 1.12;
  text-transform: uppercase;
}
.work-summary {
  font-family: var(--font-text);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 24px;
  max-width: 520px;
}
.work-link {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-bright);
  text-decoration: none;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.work-link:visited { color: var(--teal-bright); }
.work-link:hover { color: var(--ink); }

/* ═══════════════════════════════════════════════════════════
   KVS-inspired site system
   Home uses the full intro/hero; project pages reuse the same shell.
   ═══════════════════════════════════════════════════════════ */

body.aa-kvs-home,
body.aa-kvs-page {
  --bg: #000000;
  --bg-elevated: #0b0b0b;
  --bg-tint: #141414;
  --bg-band: #050505;
  --bg-card: #0f0f0f;
  --ink: #f0f0f0;
  --text-primary: #f0f0f0;
  --text-body: #c5c4c2;
  --text-muted: #8e8d89;
  --text-subtle: #595959;
  --rule: rgba(197, 196, 194, 0.18);
  --rule-soft: rgba(197, 196, 194, 0.09);
  --rule-strong: rgba(197, 196, 194, 0.32);
  --teal: #5a8fc4;
  --teal-bright: #84afe0;
  --teal-hover: #a8c8ec;
  --teal-deep: #1a5c92;
  --teal-soft: rgba(90, 143, 196, 0.12);
  --teal-tint: rgba(90, 143, 196, 0.22);
  --teal-edge: rgba(90, 143, 196, 0.48);
  background: #000;
  color: var(--text-body);
  letter-spacing: 0;
}

body.aa-kvs-home::before,
body.aa-kvs-page::before {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.024) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.45;
}

body.aa-kvs-home::after {
  z-index: 9997;
  opacity: 0.12;
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.7) 0, rgba(255,255,255,0.7) 1px, transparent 1px, transparent 4px);
  background-size: auto;
  mix-blend-mode: overlay;
  mask-image: none;
  -webkit-mask-image: none;
}

body.aa-kvs-home a { color: inherit; }

/* Outline accent buttons keep their label in the accent ink (these links
   would otherwise inherit muted body text from the rule above). The token
   re-maps per theme, so the accent stays legible in dark and light. */
body.aa-kvs-home .aa-nav-status:not(.aa-nav-hub),
body.aa-kvs-home .aa-nav-status:not(.aa-nav-hub):visited,
body.aa-kvs-home .btn-primary,
body.aa-kvs-home .btn-primary:visited,
body.aa-kvs-home .hero-cta,
body.aa-kvs-home .hero-cta:visited,
body.aa-kvs-home .aa-button:not(.aa-button-muted),
body.aa-kvs-home .aa-button:not(.aa-button-muted):visited,
body.aa-kvs-home .aa-work-more a,
body.aa-kvs-home .aa-showcase-panel a,
body.aa-kvs-home .aa-contact-links a:first-child {
  color: var(--teal-bright);
}

body.aa-kvs-home .skip-link {
  background: var(--teal);
  color: var(--bg);
}

body.aa-kvs-page .skip-link {
  background: var(--teal);
  color: var(--bg);
}

.aa-cursor-canvas {
  position: fixed;
  inset: 0;
  z-index: 100001;
  width: 100vw;
  height: 100svh;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.aa-cursor-canvas.is-active {
  opacity: 1;
}

body.aa-kvs-home nav#nav {
  height: 64px;
  background: rgba(0, 0, 0, 0.76);
  border-bottom: 1px solid var(--rule-soft);
}

body.aa-kvs-home nav#nav.scrolled {
  background: rgba(0, 0, 0, 0.92);
  border-bottom-color: var(--rule);
}

body.aa-kvs-home .nav-inner {
  max-width: none;
  padding: 0 5vw;
}

body.aa-kvs-home .nav-logo {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
}

body.aa-kvs-home .nav-logo-mark {
  filter: grayscale(1) contrast(1.4) brightness(1.4);
}

body.aa-kvs-home .nav-links {
  gap: 18px;
}

body.aa-kvs-home .nav-links a {
  color: var(--text-body);
  font-size: 11px;
  letter-spacing: 0;
}

body.aa-kvs-home .nav-links a::before {
  left: -7px;
  background: var(--teal);
  border-radius: 0;
}

.aa-nav-status {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: transparent;
  color: var(--teal-bright);
  border: 1px solid var(--teal-edge);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.aa-nav-status:visited {
  color: var(--teal-bright);
}

.aa-nav-status:not(.aa-nav-hub):hover,
.aa-nav-status:not(.aa-nav-hub):focus-visible {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-hover);
}

.aa-nav-hub {
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule);
}

.aa-nav-hub:visited {
  color: var(--ink);
}

.aa-nav-hub:hover,
.aa-nav-hub:focus-visible {
  background: rgba(255,255,255,0.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28);
}

.aa-main {
  background: #000;
}

.aa-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* Fluid vertical rhythm so the whole hero scales to fit any height. */
  padding: clamp(76px, 10svh, 112px) 5vw clamp(48px, 7svh, 84px);
  isolation: isolate;
  background: #000;
}

.aa-signal-canvas {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: 0.52;
}

.aa-hero-noise {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.035) 0, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 5px),
    linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.72));
}

.aa-hero-corner {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  text-transform: uppercase;
}

.aa-hero-corner-left {
  left: 5vw;
  top: clamp(76px, 10svh, 112px);
}

.aa-hero-corner-right {
  right: 5vw;
  top: clamp(76px, 10svh, 112px);
  text-align: right;
}

.aa-hero-center {
  width: min(1080px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.aa-hero-kicker {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(8px, 2svh, 26px);
  padding: 8px 14px;
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.aa-hero-name {
  margin: 0;
  display: grid;
  gap: 0;
  position: relative;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 11.5svh, 7.8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.aa-hero-name span {
  position: relative;
  display: block;
  /* Solid ink, no gradient-clip and no decorative glow (Impeccable bans
     gradient text + dark-glow). Hierarchy comes from scale + weight. */
  color: var(--ink);
}

.aa-hero-actions {
  margin-top: clamp(12px, 2.6svh, 34px);
}

@keyframes aa-name-glisten {
  0%,
  100% {
    background-position: 0% 50%;
  }
  42%,
  58% {
    background-position: 100% 50%;
  }
}

@keyframes aa-name-glint {
  0%,
  18% {
    background-position: -120% 50%;
    opacity: 0;
  }
  32% {
    opacity: 0.9;
  }
  48% {
    background-position: 120% 50%;
    opacity: 0;
  }
  100% {
    background-position: 120% 50%;
    opacity: 0;
  }
}

.aa-button,
.aa-button:visited {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--teal-edge);
  background: transparent;
  color: var(--teal-bright);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-spring);
}

.aa-button:hover {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-hover);
  transform: translateY(-1px);
}

.aa-button-muted,
.aa-button-muted:visited {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.aa-button-muted:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.aa-hero-status {
  position: absolute;
  left: 5vw;
  bottom: 42px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  border: 1px solid var(--rule);
  background: rgba(0,0,0,0.58);
}

.aa-hero-status div {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 12px;
  border-right: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.aa-hero-status div:last-child {
  border-right: 0;
}

.aa-hero-status span {
  color: var(--text-muted);
  font-size: 10px;
}

.aa-hero-status strong {
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 800;
}

.aa-scroll-link {
  position: absolute;
  right: 5vw;
  bottom: 46px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-body);
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: none;
  text-transform: uppercase;
}

.aa-scroll-link::after {
  content: "";
  width: 42px;
  height: 1px;
  margin-left: 10px;
  background: var(--teal);
}

.aa-privacy-corner,
.aa-privacy-corner:visited {
  position: absolute;
  right: 5vw;
  bottom: 42px;
  z-index: 5;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--teal-edge);
  background: rgba(0, 0, 0, 0.62);
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-spring);
}

.aa-privacy-corner::before {
  content: "Legal";
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.aa-privacy-corner:hover,
.aa-privacy-corner:focus-visible {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-hover);
  outline: none;
  transform: translateY(-1px);
}

.aa-hub .aa-privacy-corner {
  right: clamp(20px, 5vw, 72px);
  bottom: clamp(24px, 4svh, 42px);
}

.aa-section {
  position: relative;
  min-height: 100svh;
  padding: 112px 0;
  background: #000;
  border-top: 1px solid var(--rule-soft);
}

.aa-section-shell {
  width: min(1220px, calc(100% - 64px));
  margin: 0 auto;
}

.aa-about .aa-section-shell {
  width: min(1800px, calc(100% - clamp(64px, 9vw, 220px)));
}

.aa-work .aa-section-shell {
  width: min(1580px, calc(100% - 64px));
}

body.aa-kvs-home .section-eyebrow {
  margin-bottom: 20px;
  color: var(--teal-bright);
  font-size: 11px;
  letter-spacing: 0;
}

body.aa-kvs-home .signal-tag {
  padding: 0;
  background: transparent;
  color: var(--teal-bright);
  border: 0;
}

body.aa-kvs-home .section-heading {
  max-width: 860px;
  color: var(--ink);
  font-size: 3.9rem;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.aa-kvs-home .section-sub {
  max-width: 680px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.aa-section-head {
  margin-bottom: 42px;
}

.aa-showcase {
  position: relative;
  /* Fixed height so switching projects never resizes the preview; the side
     panel's index list scrolls within it instead of stretching the row. */
  height: min(760px, calc(100svh - 112px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 0.62fr);
  grid-template-rows: minmax(0, 1fr);
  margin-bottom: 68px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background:
    radial-gradient(circle at 34% 44%, rgba(90, 143, 196,0.14), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,0.035), transparent 38%),
    #000;
  isolation: isolate;
}

.aa-showcase::after {
  content: "WORK";
  position: absolute;
  left: 34px;
  bottom: 24px;
  z-index: 0;
  color: rgba(240,240,240,0.06);
  font-family: var(--font-mono);
  font-size: clamp(54px, 7vw, 112px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
}

.aa-showcase-preview {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: min(760px, calc(100svh - 112px));
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-right: 1px solid var(--rule);
  background: #050505;
}

.aa-showcase-preview::before,
.aa-showcase-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.aa-showcase-preview::before {
  background:
    linear-gradient(to right, rgba(0,0,0,0.54), transparent 22%, transparent 78%, rgba(0,0,0,0.52)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.052) 0, rgba(255,255,255,0.052) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: screen;
  opacity: 0.36;
}

.aa-showcase-preview::after {
  background:
    linear-gradient(rgba(90,143,196,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90,143,196,0.10) 1px, transparent 1px);
  background-size: 84px 84px;
  opacity: 0.18;
}

.aa-showcase-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  filter: grayscale(0.5) contrast(1.12) brightness(0.78);
  transition: opacity 0.2s ease, filter 0.4s ease;
}

/* Switching cross-fades the preview; no zoom/movement so clicking through
   the projects stays still and predictable. */
.aa-showcase.is-switching .aa-showcase-image {
  opacity: 0.82;
}

/* Diagrams (vs screenshots) show in full so edge labels aren't cropped. */
.aa-showcase-image.is-contain {
  object-fit: contain;
  background: #0c0d0f;
}
:root[data-theme="light"] .aa-showcase-image.is-contain {
  background: var(--bg-tint);
}

.aa-showcase-preview-meta {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,0.7);
}

.aa-showcase-side {
  position: relative;
  z-index: 3;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: rgba(0,0,0,0.84);
  color: var(--text-body);
}

.aa-showcase-controls {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
}

.aa-showcase-controls button {
  min-height: 44px;
  position: static;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--rule);
  background: rgba(255,255,255,0.06);
  color: var(--text-body);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.aa-showcase-controls button:hover,
.aa-showcase-controls button:focus-visible {
  background: var(--teal);
  color: var(--bg);
  outline: none;
}

.aa-showcase-controls [data-showcase-next] {
  border-right: 0;
  background: var(--teal);
  color: var(--bg);
}

.aa-showcase-panel {
  position: relative;
  z-index: 2;
  width: auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  max-height: none;
  overflow: visible;
  padding: clamp(24px, 3.2vw, 38px);
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--text-body);
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: none;
}

.aa-showcase-panel h3 {
  margin-top: 12px;
  color: var(--ink);
  max-width: 100%;
  font-size: clamp(28px, 2.7vw, 44px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.aa-showcase-panel p:not(.aa-card-index) {
  margin-top: 18px;
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.aa-showcase-panel .aa-tags {
  margin-top: 18px;
}

.aa-showcase-panel a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  padding: 0 16px;
  background: transparent;
  color: var(--teal-bright);
  border: 1px solid var(--teal-edge);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.aa-showcase-panel a:hover {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-hover);
}

.aa-showcase-index {
  min-height: 0;
  display: grid;
  align-content: start;
  overflow: auto;
  background: var(--rule);
}

.aa-showcase-index-item {
  min-height: 74px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: rgba(255,255,255,0.025);
  color: var(--text-body);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.aa-showcase-index-item:hover,
.aa-showcase-index-item:focus-visible {
  background: rgba(90,143,196,0.13);
  color: var(--ink);
  outline: none;
}

.aa-showcase-index-item.is-active {
  background: rgba(90,143,196,0.18);
  box-shadow: inset 3px 0 0 var(--teal);
  color: var(--ink);
}

.aa-showcase-index-num,
.aa-showcase-index-category {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.aa-showcase-index-num {
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 800;
}

.aa-showcase-index-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.aa-showcase-index-title {
  color: inherit;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  white-space: normal;
}

.aa-showcase-index-category {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .aa-showcase {
    min-height: 0;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .aa-showcase-preview {
    min-height: clamp(300px, 52svh, 520px);
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .aa-showcase-side {
    display: block;
  }

  .aa-showcase-index {
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
  }

  .aa-showcase-index-item {
    flex: 0 0 min(286px, 82vw);
    border-bottom: 0;
    border-right: 1px solid var(--rule);
    scroll-snap-align: start;
  }
}

@media (max-width: 520px) {
  .aa-showcase-preview {
    min-height: 280px;
  }

  .aa-showcase-panel {
    padding: 22px 18px;
  }

  .aa-showcase-panel h3 {
    font-size: 2rem;
  }

  .aa-showcase-preview-meta {
    left: 16px;
    right: 16px;
    bottom: 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

.aa-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.aa-work-card {
  position: relative;
  min-height: 540px;
  display: grid;
  grid-template-rows: minmax(240px, 1fr) auto;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--rule);
  background: #050505;
}

.aa-work-card:visited {
  color: var(--ink);
}

.aa-work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid transparent;
  transition: border-color 0.22s ease;
}

.aa-work-card:hover::after {
  border-color: var(--teal);
}

.aa-work-card-featured {
  grid-column: 1 / -1;
  min-height: 600px;
  grid-template-columns: 1.35fr 0.9fr;
  grid-template-rows: 1fr;
}

.aa-work-media {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #111;
}

.aa-work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.16) brightness(0.76);
  transform: scale(1.01);
  transition: transform 0.7s var(--ease-out-expo), filter 0.45s ease;
}

.aa-work-card:hover .aa-work-media img {
  filter: grayscale(0.15) contrast(1.04) brightness(0.86);
  transform: scale(1.045);
}

.aa-work-body {
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 28px;
  border-top: 1px solid var(--rule);
  background: rgba(0,0,0,0.82);
}

.aa-work-card-featured .aa-work-body {
  border-top: 0;
  border-left: 1px solid var(--rule);
}

.aa-card-index {
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.aa-work-body h3 {
  color: var(--ink);
  font-size: 2.15rem;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
}

.aa-work-body p {
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.6;
}

.aa-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aa-tags span {
  padding: 6px 8px;
  color: var(--text-body);
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.aa-work-more {
  margin-top: 22px;
}

.aa-work-more a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  background: transparent;
  color: var(--teal-bright);
  border: 1px solid var(--teal-edge);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.aa-work-more a:hover {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-hover);
}

.aa-system-grid,
.aa-about-grid,
.aa-background-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 80px;
  align-items: start;
}

/* Sit above the per-section accent motif (.aa-section::before, z-index 0). */
.aa-about-grid {
  position: relative;
  z-index: 1;
  min-height: calc(100svh - clamp(76px, 10svh, 96px) - clamp(52px, 8svh, 96px));
  grid-template-columns: minmax(0, 0.82fr) minmax(430px, 1fr);
  gap: clamp(40px, 5.6vw, 88px);
  align-items: center;
}

.aa-about-copy {
  align-self: center;
  max-width: 660px;
}

.aa-about-intro {
  min-width: 0;
}

.aa-about-portrait {
  position: relative;
  align-self: stretch;
  min-height: clamp(420px, calc(100svh - clamp(76px, 10svh, 96px) - clamp(52px, 8svh, 96px)), 820px);
  margin: 0;
  overflow: visible;
  isolation: isolate;
  border: 0;
  background: transparent;
}

.aa-about-portrait::before,
.aa-about-portrait::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.aa-about-portrait::before {
  inset: -12% -18% -10% -16%;
  z-index: 0;
  background:
    linear-gradient(rgba(90, 143, 196, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 143, 196, 0.18) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.34;
  mask-image: radial-gradient(ellipse at 62% 52%, black 0 42%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse at 62% 52%, black 0 42%, transparent 74%);
}

.aa-about-portrait::after {
  inset: -12% -22% -14% -8%;
  z-index: 1;
  background:
    radial-gradient(ellipse at 62% 42%, rgba(90, 143, 196, 0.38), transparent 46%),
    radial-gradient(ellipse at 80% 78%, rgba(90, 143, 196, 0.22), transparent 52%),
    linear-gradient(90deg, transparent 0%, rgba(90, 143, 196, 0.13) 52%, transparent 92%);
  filter: blur(20px);
  opacity: 0.92;
}

.aa-about-portrait-word {
  position: absolute;
  right: -0.24em;
  top: 9%;
  z-index: 1;
  display: block;
  color: rgba(132, 175, 224, 0.13);
  font-family: var(--font-display);
  font-size: clamp(7.5rem, 13.8vw, 16rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.aa-about-portrait img {
  position: absolute;
  right: clamp(-64px, -3.2vw, -24px);
  bottom: clamp(-72px, -5svh, -32px);
  z-index: 2;
  width: min(110%, clamp(560px, 48vw, 760px));
  height: 106%;
  object-fit: contain;
  object-position: right bottom;
  filter:
    drop-shadow(0 34px 58px rgba(0, 0, 0, 0.76))
    drop-shadow(0 0 22px rgba(90, 143, 196, 0.20));
  mask-image: linear-gradient(to bottom, black 0 87%, rgba(0, 0, 0, 0.96) 93%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0 87%, rgba(0, 0, 0, 0.96) 93%, transparent 100%);
}

.aa-about-portrait figcaption {
  position: absolute;
  left: clamp(8px, 2vw, 28px);
  bottom: clamp(28px, 5vw, 68px);
  z-index: 3;
  display: grid;
  gap: 4px;
  padding-left: 12px;
  border-left: 2px solid var(--teal);
  color: #f0f0f0;
  font-family: var(--font-mono);
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.72);
}

.aa-about-portrait figcaption span {
  color: var(--teal-bright);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.aa-about-portrait figcaption strong {
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.04em;
}

body.is-section-mode[data-section="about"] #about {
  padding-top: clamp(76px, 10svh, 96px);
  padding-bottom: clamp(52px, 8svh, 96px);
}

body.aa-kvs-home .aa-about-copy .section-heading {
  font-size: clamp(3.25rem, 6.2vw, 5.45rem);
  line-height: 0.98;
}

@media (min-width: 1101px) and (max-height: 760px) {
  body.aa-kvs-home .aa-about-copy .section-eyebrow {
    margin-bottom: 14px;
  }

  body.aa-kvs-home .aa-about-copy .section-heading {
    font-size: clamp(2.55rem, 7.4svh, 4.35rem);
  }

  body.aa-kvs-home .aa-about-copy {
    gap: 14px;
  }

  body.aa-kvs-home .aa-about-copy p {
    font-size: 13px;
    line-height: 1.52;
  }

  .aa-about-portrait-word {
    top: 6%;
    font-size: clamp(6.4rem, 12vw, 13rem);
  }

  .aa-about-portrait img {
    bottom: clamp(-48px, -4svh, -24px);
    width: min(106%, clamp(500px, 46vw, 700px));
    height: 104%;
  }

  .aa-about-portrait figcaption {
    bottom: clamp(18px, 4svh, 42px);
  }
}

/* Looping terminal readout — fills the lower half of the About section.
   Kept dark in both themes so it always reads as a terminal; colors are
   local vars, independent of the page light/dark palette. */
.aa-terminal {
  --term-bg: #0b0e10;
  --term-rule: rgba(255, 255, 255, 0.10);
  --term-prompt: #5a8fc4;
  --term-cmd: #eef3f4;
  --term-out: #93a1a6;
  --term-sys: #84afe0;
  margin-top: clamp(20px, 2.5vw, 36px);
  border: 1px solid var(--term-rule);
  border-radius: var(--radius);
  background: var(--term-bg);
  overflow: hidden;
  font-family: var(--font-mono);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.aa-term-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--term-rule);
  background: rgba(255, 255, 255, 0.02);
}

.aa-term-dots {
  display: inline-flex;
  gap: 7px;
}

.aa-term-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.aa-term-dots i:first-child { background: rgba(255, 255, 255, 0.26); }

.aa-term-title {
  color: var(--term-out);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.aa-term-body {
  padding: 18px 20px 20px;
  min-height: 232px;
}

/* .aa-terminal prefix keeps these above `.aa-about-copy p` (0,1,1),
   which would otherwise force uppercase + its own size/color. */
.aa-terminal .aa-term-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  text-transform: none; /* authentic lowercase vs the site's uppercase copy */
  color: var(--term-out);
  white-space: pre-wrap;
  word-break: break-word;
}

.aa-terminal .aa-term-line.is-cmd {
  color: var(--term-cmd);
}

.aa-terminal .aa-term-line.is-cmd::before {
  content: 'anjelo@akl-net:~$\00a0';
  color: var(--term-prompt);
}

.aa-terminal .aa-term-line.is-sys {
  color: var(--term-sys);
}

.aa-terminal .aa-term-line.is-gap {
  min-height: 0.7em;
}

/* Blinking caret appended to the active line by the script. */
.aa-term-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--term-prompt);
  animation: aa-term-blink 1.05s steps(1, end) infinite;
}

@keyframes aa-term-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .aa-term-cursor { animation: none; }
}

.aa-system-copy {
  display: grid;
  gap: 34px;
}

.aa-large-line {
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1.35;
}

.aa-capability-list {
  display: grid;
  border-top: 1px solid var(--rule);
}

.aa-capability-list article,
.aa-timeline article {
  display: grid;
  grid-template-columns: 56px minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.aa-timeline article {
  grid-template-columns: 126px minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
}

.aa-timeline article.has-logo {
  grid-template-columns: 126px minmax(0, 0.9fr) minmax(0, 1.1fr) 64px;
}

.aa-cert-logo {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--rule);
  background: var(--bg-elevated, rgba(255, 255, 255, 0.03));
  border-radius: 4px;
  justify-self: end;
  flex-shrink: 0;
  transition: border-color 0.25s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.aa-cert-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.aa-timeline article.has-logo:hover .aa-cert-logo {
  border-color: rgba(90, 143, 196, 0.5);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .aa-timeline article.has-logo {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "logo"
      "title"
      "body";
  }
  .aa-timeline article.has-logo > span:first-child { grid-area: label; }
  .aa-timeline article.has-logo > h3 { grid-area: title; }
  .aa-timeline article.has-logo > p { grid-area: body; }
  .aa-timeline article.has-logo > .aa-cert-logo {
    grid-area: logo;
    justify-self: start;
  }
}

.aa-capability-list span,
.aa-timeline span {
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.aa-capability-list h3,
.aa-timeline h3 {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.aa-capability-list p,
.aa-timeline p,
.aa-about-copy p {
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.65;
}

.aa-about-copy {
  display: grid;
  gap: 18px;
}

.aa-timeline {
  display: grid;
  border-top: 1px solid var(--rule);
}

.aa-contact {
  display: grid;
  align-items: center;
}

.aa-contact-inner {
  min-height: 70svh;
  display: grid;
  align-content: center;
  justify-items: start;
}

.aa-contact h2 {
  color: var(--ink);
  font-size: 6rem;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.aa-contact p:not(.section-eyebrow) {
  max-width: 640px;
  margin-top: 24px;
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.65;
}

.aa-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.aa-contact-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  background: transparent;
  color: var(--teal-bright);
  border: 1px solid var(--teal-edge);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.aa-contact-links a:not(:first-child) {
  color: var(--ink);
  border-color: var(--rule-strong);
}

.aa-contact-links a:first-child:hover {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-hover);
}

.aa-contact-links a:not(:first-child):hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.aa-footer {
  background: #000;
  border-top: 1px solid var(--rule);
}

body.aa-kvs-home .footer-inner {
  max-width: none;
  padding: 26px 5vw;
}

body.aa-kvs-home .footer-tagline,
body.aa-kvs-home .footer-copy,
body.aa-kvs-home .footer-nav a {
  letter-spacing: 0;
}

@media (max-width: 1100px) {
  body.aa-kvs-home .nav-links {
    display: none;
  }

  body.aa-kvs-home .nav-hamburger {
    display: none;
  }

  .aa-nav-status {
    display: inline-flex;
  }

  .aa-hero-name {
    font-size: clamp(2.4rem, 10svh, 5.7rem);
  }

  body.aa-kvs-home .section-heading {
    font-size: 3.05rem;
  }

  .aa-work-card-featured {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(300px, 1fr) auto;
  }

  .aa-work-card-featured .aa-work-body {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  .aa-system-grid,
  .aa-about-grid,
  .aa-background-grid {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .aa-about-grid {
    min-height: auto;
  }

  .aa-about-portrait {
    align-self: auto;
    min-height: clamp(360px, 52svh, 540px);
    overflow: hidden;
  }

  .aa-about-portrait-word {
    right: -0.18em;
    top: 14%;
    font-size: clamp(5.8rem, 20vw, 10rem);
  }

  .aa-about-portrait img {
    right: -4%;
    bottom: 0;
    width: min(96%, 560px);
    height: 100%;
  }

  .aa-terminal { margin-top: 8px; }
  .aa-term-body {
    padding: 16px 14px 18px;
    min-height: clamp(180px, 40vh, 240px);
  }
  .aa-terminal .aa-term-line { font-size: 11px; }
  .aa-terminal .aa-term-line.is-cmd::before { content: 'akl-net:~$\00a0'; }
}

@media (max-width: 760px) {
  body.aa-kvs-home .nav-inner {
    padding: 0 20px;
  }

  .aa-hero {
    min-height: 100svh;
    /* Reserve a bottom band for the fixed Nyan "HOP ON" button so it
       never lands on the hero content. */
    padding: 96px 20px 150px;
  }

  .aa-hero-corner {
    position: static;
    justify-self: stretch;
    width: 100%;
    text-align: left;
    margin-bottom: 18px;
  }

  .aa-hero-corner-right {
    display: none;
  }

  .aa-hero-center {
    justify-items: start;
    text-align: left;
  }

  .aa-hero-kicker {
    justify-content: flex-start;
    margin-bottom: 20px;
    font-size: 10px;
  }

  .aa-hero-name {
    font-size: 3.05rem;
    line-height: 0.98;
  }

  .aa-hero-actions {
    align-items: stretch;
    width: 100%;
    flex-direction: column;
  }

  .aa-button {
    width: 100%;
  }

  .aa-hero-status {
    /* Flow under the buttons instead of pinning to the bottom edge, so
       it doesn't collide with the fixed Nyan button down there. */
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 30px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aa-hero-status div:nth-child(2) {
    border-right: 0;
  }

  .aa-hero-status div:nth-child(n+3) {
    border-top: 1px solid var(--rule-soft);
  }

  .aa-scroll-link {
    display: none;
  }

  .aa-hero .aa-privacy-corner {
    position: static;
    justify-self: stretch;
    width: 100%;
    margin-top: 16px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .aa-section {
    min-height: auto;
    padding: 82px 0;
  }

  .aa-section-shell {
    width: calc(100% - 40px);
  }

  body.aa-kvs-home .section-heading {
    font-size: 2.15rem;
    line-height: 1.06;
  }

  .aa-work-grid {
    grid-template-columns: 1fr;
  }

  .aa-showcase {
    min-height: 0;
    margin-bottom: 76px;
  }

  .aa-showcase-controls {
    display: grid;
  }

  .aa-work-card,
  .aa-work-card-featured {
    grid-column: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: 220px auto;
  }

  .aa-work-body {
    padding: 22px;
  }

  .aa-work-body h3 {
    font-size: 1.5rem;
  }

  .aa-large-line {
    font-size: 1.2rem;
  }

  .aa-about-portrait {
    min-height: 390px;
    margin-top: 26px;
  }

  .aa-about-portrait-word {
    right: -0.3em;
    top: 17%;
    font-size: clamp(4.6rem, 25vw, 6.8rem);
  }

  .aa-about-portrait img {
    right: -18%;
    width: min(120%, 480px);
    height: 100%;
  }

  .aa-about-portrait figcaption {
    left: 14px;
    bottom: 14px;
  }

  .aa-capability-list article,
  .aa-timeline article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .aa-contact-inner {
    min-height: 56svh;
  }

  .aa-contact h2 {
    font-size: 3.1rem;
  }

  .aa-contact-links {
    width: 100%;
    flex-direction: column;
  }

  .aa-contact-links a {
    width: 100%;
    justify-content: center;
  }

  body.aa-kvs-home .footer-inner {
    padding: 24px 20px;
  }
}

/* ─────────────────────────────────────────────────────────────
   Magnetic + tilt + lift polish
   ───────────────────────────────────────────────────────────── */
.aa-magnetic {
  display: inline-flex;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.aa-tilt {
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.4s ease;
  will-change: transform;
}
.aa-tilt > * {
  transform: translateZ(0);
}

/* Stronger hover affordance on existing cards (works with magnetic/tilt) */
.aa-work-card {
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.3s ease,
              background 0.3s ease,
              box-shadow 0.4s ease;
}
.aa-work-card:hover {
  border-color: rgba(90, 143, 196, 0.55);
  box-shadow: 0 30px 60px -28px rgba(90, 143, 196, 0.35),
              0 0 0 1px rgba(90, 143, 196, 0.18);
}
.aa-work-card .aa-work-media img {
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
              filter 0.5s ease;
}
.aa-work-card:hover .aa-work-media img {
  transform: scale(1.045);
  filter: saturate(1.05) contrast(1.02);
}
.aa-work-card h3 {
  transition: color 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.aa-work-card:hover h3 {
  color: #5a8fc4;
}

/* Button polish — let the magnetic wrapper carry transform */
.aa-button { transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease; }

/* Nav link slide underline */
.nav-links a {
  position: relative;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* ─────────────────────────────────────────────────────────────
   Word/line stagger reveal
   ───────────────────────────────────────────────────────────── */
.aa-reveal-line {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1.05;
}
.aa-reveal-word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.6s ease;
  will-change: transform, opacity;
}
.aa-reveal.is-visible .aa-reveal-word {
  transform: translateY(0);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .aa-reveal-word { transform: none; opacity: 1; transition: none; }
}

/* Floating accent dot that follows the cursor on the hero (subtle) */
.aa-hero {
  --hero-pointer-x: 50%;
  --hero-pointer-y: 50%;
}
.aa-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--hero-pointer-x) var(--hero-pointer-y),
    rgba(90, 143, 196, 0.10),
    transparent 65%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}
.aa-hero.is-pointer-in::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .aa-hero::after { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   Sub-page continuity — make case-teaser cards feel alive
   (orange hover halo, lift, tilt-compatible).
   ───────────────────────────────────────────────────────────── */
.case-teaser {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.3s ease,
              box-shadow 0.4s ease,
              border-color 0.3s ease;
  will-change: transform;
}
.case-teaser::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.4s ease;
}
.case-teaser:hover::after {
  border-color: rgba(90, 143, 196, 0.45);
  box-shadow:
    0 30px 60px -28px rgba(90, 143, 196, 0.35),
    inset 0 0 0 1px rgba(90, 143, 196, 0.20);
}
.case-teaser:hover .case-teaser-title {
  color: var(--teal-bright);
}
.case-teaser-title {
  transition: color 0.25s ease;
}

/* Unify the per-project color variants — all four use the same
   orange hover ring (variables already resolve to orange, but
   override is explicit so future palette tweaks don't drift). */
.proj-card-purple:hover .case-teaser-media,
.proj-card-amber:hover .case-teaser-media,
.proj-card-green:hover .case-teaser-media,
.proj-card-blue:hover .case-teaser-media {
  box-shadow: inset 0 0 0 1px rgba(90, 143, 196, 0.45);
}

/* Magnetic lift hint on the case-study link itself */
.proj-case-link {
  display: inline-flex;
  transition: color 0.25s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

/* Page hero — let word-reveal targets share the same stagger */
.page-title {
  position: relative;
}
.page-title .aa-reveal-word {
  /* match the dark/orange body palette */
  color: var(--ink);
}

/* Sub-page hero CTAs already pick up .aa-magnetic via JS; this
   keeps their idle state visually consistent with the home buttons. */
.hero-cta,
.hero-link {
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease,
              transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

/* ─────────────────────────────────────────────────────────────
   Rocket-hub navigation
   A hash-driven navigation layer with a CSS-built 3D rocket,
   cinematic state changes, and a destination control deck.
   ───────────────────────────────────────────────────────────── */

.aa-rocket {
  --rocket-size: clamp(104px, 8vw, 132px);
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: clamp(78px, 12svh, 132px);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: max-content;
  min-width: var(--rocket-size);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 0, 0) scale(1);
  transform-origin: center;
  transition: opacity 0.32s ease, filter 0.32s ease;
  isolation: isolate;
}

.aa-rocket.is-ready {
  opacity: 1;
  pointer-events: auto;
}

.aa-rocket:disabled {
  cursor: default;
  pointer-events: none;
}

.aa-rocket:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.86);
  outline-offset: 10px;
}

.aa-rocket-stage {
  position: relative;
  display: block;
  width: var(--rocket-size);
  height: var(--rocket-size);
  transform-style: preserve-3d;
  perspective: 820px;
  overflow: visible;
  filter:
    drop-shadow(0 22px 34px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 22px rgba(90, 143, 196, 0.12));
  transition: filter 0.28s ease, transform 0.28s var(--ease-out-expo);
}

.aa-rocket-canvas {
  position: absolute;
  inset: -13%;
  width: 126%;
  height: 126%;
  display: block;
  pointer-events: none;
}

.aa-rocket:hover .aa-rocket-stage,
.aa-rocket:focus-visible .aa-rocket-stage {
  filter:
    drop-shadow(0 28px 42px rgba(0, 0, 0, 0.62))
    drop-shadow(0 0 28px rgba(90, 143, 196, 0.32))
    drop-shadow(0 0 14px rgba(120, 158, 205, 0.18));
}

.aa-rocket-shadow {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: 64%;
  height: 15%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(90, 143, 196, 0.28), rgba(0, 0, 0, 0) 68%);
  opacity: 0.54;
  transform: translate3d(-50%, 0, -44px) rotateX(68deg);
  filter: blur(5px);
}

.aa-rocket-model {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 58%;
  height: 88%;
  transform: translate3d(-50%, -50%, 34px) rotateX(14deg) rotateY(-18deg) rotateZ(8deg);
  transform-origin: 50% 68%;
  transform-style: preserve-3d;
}

.aa-rocket-hull {
  position: absolute;
  left: 50%;
  top: 10%;
  width: 44%;
  height: 70%;
  border-radius: 52% 52% 30% 30% / 34% 34% 24% 24%;
  background:
    linear-gradient(100deg, rgba(255,255,255,0.92) 0%, rgba(206,207,205,0.98) 18%, rgba(88,91,94,0.98) 54%, rgba(19,20,22,1) 76%, rgba(232,236,234,0.84) 100%);
  box-shadow:
    inset 9px 0 14px rgba(255, 255, 255, 0.34),
    inset -13px 0 18px rgba(0, 0, 0, 0.64),
    0 0 0 1px rgba(255, 255, 255, 0.22);
  transform: translateX(-50%) translateZ(28px);
  overflow: hidden;
}

.aa-rocket-hull::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(120, 158, 205, 0.18) 48%, transparent 56%),
    linear-gradient(to bottom, rgba(90, 143, 196, 0.16), transparent 34%, rgba(0, 0, 0, 0.24));
  mix-blend-mode: screen;
}

.aa-rocket-nose {
  position: absolute;
  left: 50%;
  top: -18%;
  width: 112%;
  height: 38%;
  background:
    linear-gradient(105deg, #fff 0%, #bfc2c1 28%, #323436 70%, #f5f1e8 100%);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  transform: translateX(-50%);
  filter: drop-shadow(0 -1px 0 rgba(255,255,255,0.3));
}

.aa-rocket-window {
  position: absolute;
  left: 50%;
  top: 32%;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,0.96), rgba(120, 158, 205, 0.75) 28%, rgba(10, 14, 18, 0.92) 70%);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow:
    0 0 14px rgba(120, 158, 205, 0.22),
    inset 0 0 9px rgba(0, 0, 0, 0.62);
  transform: translateX(-50%);
}

.aa-rocket-rib {
  position: absolute;
  left: 18%;
  right: 18%;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.54);
}

.aa-rocket-rib-a { top: 56%; }
.aa-rocket-rib-b { top: 72%; }

.aa-rocket-fin {
  position: absolute;
  bottom: 18%;
  width: 25%;
  height: 28%;
  background:
    linear-gradient(130deg, rgba(255, 112, 36, 0.96), rgba(116, 38, 0, 0.98) 64%, rgba(255, 203, 174, 0.72));
  box-shadow:
    inset -6px 0 10px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.16);
}

.aa-rocket-fin-left {
  left: 18%;
  clip-path: polygon(100% 0%, 0% 100%, 100% 78%);
  transform: translateZ(14px) skewY(-7deg);
}

.aa-rocket-fin-right {
  right: 18%;
  clip-path: polygon(0% 0%, 100% 100%, 0% 78%);
  transform: translateZ(7px) skewY(7deg);
}

.aa-rocket-engine {
  position: absolute;
  left: 50%;
  bottom: 11%;
  width: 26%;
  height: 10%;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(90deg, #101112, #7d8282, #171819);
  transform: translateX(-50%) translateZ(20px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18), inset 0 -4px 7px rgba(0,0,0,0.72);
}

.aa-rocket-flame {
  position: absolute;
  left: 50%;
  bottom: -11%;
  width: 26%;
  height: 34%;
  border-radius: 50% 50% 58% 58%;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255,255,255,0.96), rgba(255, 226, 198, 0.92) 20%, rgba(90, 143, 196, 0.88) 48%, rgba(90, 143, 196, 0) 76%);
  opacity: 0.68;
  transform: translateX(-50%) scaleY(0.78) translateZ(2px);
  transform-origin: 50% 0%;
  filter: blur(0.2px) drop-shadow(0 0 16px rgba(90, 143, 196, 0.48));
  transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}

.aa-rocket-trail {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(34vw, 390px);
  height: 2px;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(90deg, rgba(90, 143, 196, 0), rgba(90, 143, 196, 0.6), rgba(120, 158, 205, 0.35), rgba(255, 255, 255, 0));
  filter: blur(1px);
  transform: translate3d(-50%, -50%, -1px) rotate(-23deg) scaleX(0.2);
  transform-origin: 100% 50%;
}

.aa-rocket-label-wrap {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.64);
  color: var(--text-body);
  box-shadow:
    0 0 0 1px rgba(90, 143, 196, 0.08),
    0 12px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, opacity 0.22s ease;
}

.aa-rocket-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.aa-rocket:hover .aa-rocket-label-wrap,
.aa-rocket:focus-visible .aa-rocket-label-wrap {
  color: #fff;
  border-color: rgba(90, 143, 196, 0.56);
  background: rgba(16, 10, 7, 0.78);
}

/* Hand-drawn "HOP ON!" cue sitting to the right of the cat (hero only).
   It's a child of the button, so clicks on it still hop in. */
.aa-hop-cue {
  position: absolute;
  left: calc(100% - 4px);
  top: 50%;
  display: none;
  align-items: center;
  gap: 4px;
  transform: translateY(-58%);
  color: var(--ink);
  cursor: pointer;
}

.aa-hop-cue-arrow {
  width: clamp(48px, 5vw, 70px);
  height: auto;
  flex: none; /* arrowhead already points left, toward the cat */
}

.aa-hop-cue-text {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.5svh, 15px);
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-5deg);
}

body.is-hero-mode .aa-rocket .aa-hop-cue {
  display: inline-flex;
}

body.is-hero-mode .aa-rocket .aa-rocket-label-wrap {
  display: none;
}

.aa-rocket:hover .aa-hop-cue,
.aa-rocket:focus-visible .aa-hop-cue {
  color: var(--teal-bright);
}

@media (prefers-reduced-motion: no-preference) {
  body.is-hero-mode .aa-rocket.is-ready .aa-hop-cue-arrow {
    animation: aa-hop-cue-nudge 1.9s ease-in-out infinite;
  }
}

@keyframes aa-hop-cue-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}

/* Nyan Cat ride: local sprite with a lightweight CSS rainbow trail. */
.aa-nyan-nav {
  --nyan-width: clamp(202px, 16.8vw, 252px);
  --nyan-height: clamp(78px, 6.4vw, 100px);
  min-width: var(--nyan-width);
}

.aa-nyan-nav .aa-rocket-stage {
  width: var(--nyan-width);
  height: var(--nyan-height);
  perspective: none;
  filter:
    drop-shadow(0 18px 28px rgba(0, 0, 0, 0.64))
    drop-shadow(0 0 20px rgba(120, 158, 205, 0.14));
}

.aa-nyan-nav:hover .aa-rocket-stage,
.aa-nyan-nav:focus-visible .aa-rocket-stage {
  filter:
    drop-shadow(0 22px 34px rgba(0, 0, 0, 0.68))
    drop-shadow(0 0 22px rgba(90, 143, 196, 0.18))
    drop-shadow(0 0 18px rgba(120, 158, 205, 0.22));
}

.aa-nyan-cat-img {
  position: absolute;
  right: 0;
  top: 50%;
  width: calc(var(--nyan-width) * 0.66);
  max-width: none;
  height: auto;
  transform: translate3d(0, -50%, 0);
  transform-origin: 100% 50%;
  image-rendering: pixelated;
  filter:
    drop-shadow(0 10px 15px rgba(0, 0, 0, 0.52))
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.08));
}

.aa-nyan-rainbow {
  position: absolute;
  right: calc(50% + 26px);
  top: calc(var(--nyan-height) * 0.48);
  z-index: -1;
  display: block;
  width: min(44vw, 520px);
  height: calc(var(--nyan-height) * 0.5);
  opacity: 0.96;
  pointer-events: none;
  transform: translate3d(0, -50%, 0);
  filter: saturate(1.22) drop-shadow(0 0 16px rgba(255,255,255,0.12));
  mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 100%);
}

.aa-nyan-rainbow::before,
.aa-nyan-rainbow::after {
  content: '';
  position: absolute;
  left: 8%;
  top: 50%;
  z-index: 2;
  width: 4px;
  height: 4px;
  background: #fff;
  opacity: 0.96;
  image-rendering: pixelated;
  transform: translate3d(0, -50%, 0);
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.82));
  animation: aa-nyan-sparkle-drift 0.82s steps(3, end) infinite;
}

.aa-nyan-rainbow::before {
  box-shadow:
    32px -20px 0 #fff,
    82px 14px 0 #ffe44d,
    126px -6px 0 #fff,
    178px 18px 0 #31a8ff,
    228px -18px 0 #fff,
    286px 8px 0 #ff9fca,
    340px -2px 0 #fff,
    402px 16px 0 #38e06f;
}

.aa-nyan-rainbow::after {
  left: 18%;
  top: 42%;
  width: 3px;
  height: 3px;
  opacity: 0.82;
  background: #ffe44d;
  box-shadow:
    44px 18px 0 #fff,
    96px -15px 0 #9a66ff,
    150px 8px 0 #fff,
    212px -10px 0 #ff314f,
    268px 16px 0 #fff,
    326px -16px 0 #31a8ff,
    382px 10px 0 #fff;
  animation-delay: -0.36s;
}

.aa-nyan-rainbow span {
  position: absolute;
  left: 0;
  right: 0;
  height: calc(100% / 6);
  background:
    linear-gradient(90deg, currentColor 0 78%, transparent 78% 90%, currentColor 90% 100%);
  background-size: 34px 100%;
  box-shadow: 0 0 10px currentColor;
  animation: aa-rainbow-stream 0.48s steps(2, end) infinite;
}

.aa-rainbow-red { top: 0; color: #ff314f; }
.aa-rainbow-orange { top: calc(100% / 6); color: #ff8a1d; }
.aa-rainbow-yellow { top: calc(100% / 6 * 2); color: #ffe44d; }
.aa-rainbow-green { top: calc(100% / 6 * 3); color: #38e06f; }
.aa-rainbow-blue { top: calc(100% / 6 * 4); color: #31a8ff; }
.aa-rainbow-violet { top: calc(100% / 6 * 5); color: #9a66ff; }

.aa-nyan-cat {
  position: absolute;
  right: 0;
  top: 50%;
  width: 116px;
  height: 66px;
  transform: translate3d(0, -50%, 0) scale(calc(var(--nyan-width) / 184px));
  transform-origin: 100% 50%;
  image-rendering: pixelated;
}

.aa-nyan-body {
  position: absolute;
  z-index: 2;
  left: 24px;
  top: 17px;
  width: 54px;
  height: 34px;
  background: #d7a563;
  border: 4px solid #050607;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.18),
    inset 0 -5px 0 rgba(95, 58, 22, 0.2),
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 18px rgba(255, 133, 188, 0.18);
}

.aa-nyan-body::before,
.aa-nyan-body::after {
  content: '';
  position: absolute;
}

.aa-nyan-body::before {
  inset: 5px;
  background: #ff9fca;
  border: 2px solid #050607;
  box-shadow: inset 0 3px 0 rgba(255,255,255,0.26);
}

.aa-nyan-body::after {
  left: 15px;
  top: 13px;
  width: 4px;
  height: 4px;
  background: #ffec57;
  box-shadow:
    10px -5px 0 #68df68,
    23px 0 0 #4db6ff,
    7px 10px 0 #f7f4ff,
    26px 10px 0 #ff5c82,
    34px 4px 0 #9f7aff;
}

.aa-nyan-head {
  position: absolute;
  z-index: 3;
  left: 76px;
  top: 15px;
  width: 34px;
  height: 32px;
  background: linear-gradient(180deg, #d4d7d8, #92989a);
  border: 4px solid #050607;
  box-shadow:
    inset -5px -5px 0 rgba(0,0,0,0.16),
    inset 4px 4px 0 rgba(255,255,255,0.34),
    0 0 12px rgba(255,255,255,0.08);
}

.aa-nyan-ear {
  position: absolute;
  top: -13px;
  width: 13px;
  height: 13px;
  background: #cfd4d6;
  border: 4px solid #050607;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.aa-nyan-ear-left { left: 3px; }
.aa-nyan-ear-right { right: 3px; }

.aa-nyan-eye {
  position: absolute;
  top: 10px;
  width: 5px;
  height: 5px;
  background: #050607;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}

.aa-nyan-eye-left { left: 9px; }
.aa-nyan-eye-right { right: 9px; }

.aa-nyan-nose {
  position: absolute;
  left: 15px;
  top: 18px;
  width: 5px;
  height: 3px;
  background: #ff8db9;
  box-shadow:
    -8px 4px 0 -1px rgba(5,6,7,0.72),
    8px 4px 0 -1px rgba(5,6,7,0.72),
    -12px 8px 0 -2px #ff9fca,
    12px 8px 0 -2px #ff9fca;
}

.aa-nyan-tail {
  position: absolute;
  z-index: 1;
  left: 8px;
  top: 29px;
  width: 21px;
  height: 10px;
  background: linear-gradient(90deg, #8f9699, #d0d4d6);
  border: 4px solid #050607;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.16);
  animation: aa-nyan-tail 0.7s steps(2, end) infinite;
}

.aa-nyan-leg {
  position: absolute;
  z-index: 1;
  width: 9px;
  height: 11px;
  background: #cbd0d2;
  border: 4px solid #050607;
  animation: aa-nyan-paws 0.42s steps(2, end) infinite;
}

.aa-nyan-leg-a { left: 30px; top: 47px; }
.aa-nyan-leg-b { left: 48px; top: 47px; animation-delay: 0.21s; }
.aa-nyan-leg-c { left: 71px; top: 45px; }
.aa-nyan-leg-d { left: 88px; top: 43px; animation-delay: 0.21s; }

body.is-hero-mode .aa-nyan-nav.is-ready .aa-rocket-stage,
body.is-hub-mode .aa-nyan-nav.is-ready .aa-rocket-stage {
  animation: aa-nyan-float 2.9s ease-in-out infinite;
}

body.is-section-mode .aa-nyan-nav.is-ready .aa-rocket-stage {
  animation: aa-nyan-float-small 3.1s ease-in-out infinite;
}

body.is-section-mode .aa-nyan-nav {
  --nyan-width: 118px;
  --nyan-height: 54px;
}

body.is-section-mode .aa-nyan-rainbow {
  width: 72px;
  opacity: 0.58;
}

@keyframes aa-rainbow-stream {
  from { background-position-x: 0; }
  to { background-position-x: -34px; }
}

@keyframes aa-nyan-sparkle-drift {
  0% {
    opacity: 0;
    transform: translate3d(34px, -50%, 0) scale(0.6);
  }
  22% {
    opacity: 1;
    transform: translate3d(18px, -50%, 0) scale(1.2);
  }
  55% {
    opacity: 0.94;
    transform: translate3d(-10px, -50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-42px, -50%, 0) scale(0.65);
  }
}

@keyframes aa-nyan-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -7px, 0); }
}

@keyframes aa-nyan-float-small {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -4px, 0); }
}

@keyframes aa-nyan-paws {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes aa-nyan-tail {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

body.is-hero-mode .aa-rocket {
  /* Size + offset track viewport height so the cat shrinks and tucks in
     on short screens instead of crashing into the hero buttons. */
  --rocket-size: clamp(72px, 8.5svh, 132px);
  --nyan-width: clamp(150px, 24svh, 252px);
  --nyan-height: clamp(54px, 7.5svh, 100px);
  left: 50%;
  top: auto;
  bottom: clamp(88px, calc(7.5svh + 32px), 164px);
  transform: translate3d(-50%, 0, 0) scale(1);
}

body.is-hub-mode .aa-rocket {
  --rocket-size: clamp(92px, 6.8vw, 114px);
  left: 50%;
  top: clamp(76px, 11svh, 112px);
  bottom: auto;
  transform: translate3d(-50%, 0, 0) scale(0.94);
}

body.is-hub-mode .aa-rocket .aa-rocket-label-wrap {
  opacity: 0;
  pointer-events: none;
}

body.is-section-mode .aa-rocket {
  --rocket-size: 66px;
  left: clamp(18px, 3vw, 34px);
  top: auto;
  bottom: clamp(18px, 3vw, 34px);
  flex-direction: row;
  gap: 10px;
  min-width: 0;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: bottom left;
}

body.is-section-mode .aa-rocket .aa-rocket-label-wrap {
  min-height: 32px;
  padding: 0 12px;
  background: rgba(5, 5, 5, 0.78);
}

body.is-hero-mode .aa-rocket.is-ready .aa-rocket-stage,
body.is-hub-mode .aa-rocket.is-ready .aa-rocket-stage {
  animation: aa-rocket-stage-idle 3.8s ease-in-out infinite;
}

body.is-section-mode .aa-rocket.is-ready .aa-rocket-stage {
  animation: aa-rocket-section-idle 3.6s ease-in-out infinite;
}

body.is-hero-mode .aa-rocket.aa-nyan-nav.is-ready .aa-rocket-stage,
body.is-hub-mode .aa-rocket.aa-nyan-nav.is-ready .aa-rocket-stage {
  animation: aa-nyan-float 2.9s ease-in-out infinite;
}

body.is-section-mode .aa-rocket.aa-nyan-nav.is-ready .aa-rocket-stage {
  animation: aa-nyan-float-small 3.1s ease-in-out infinite;
}

.aa-rocket.is-launching .aa-rocket-flame,
.aa-rocket.is-routing .aa-rocket-flame,
.aa-rocket.is-returning .aa-rocket-flame {
  opacity: 1;
  transform: translateX(-50%) scaleY(1.36) translateZ(2px);
  filter: blur(0.4px) drop-shadow(0 0 28px rgba(90, 143, 196, 0.82));
}

.aa-rocket.is-landing .aa-rocket-flame {
  opacity: 0.86;
  transform: translateX(-50%) scaleY(1.02) translateZ(2px);
}

.aa-rocket.is-launching .aa-rocket-trail,
.aa-rocket.is-routing .aa-rocket-trail,
.aa-rocket.is-returning .aa-rocket-trail {
  animation: aa-rocket-trail-pulse 0.42s ease-in-out infinite alternate;
}

body.is-hero-mode .aa-rocket.is-arriving {
  animation: none;
  pointer-events: none;
}

body.is-hub-mode .aa-rocket.is-arriving {
  animation: none;
  pointer-events: none;
}

body.is-hero-mode .aa-rocket.is-launching {
  animation: none;
  pointer-events: none;
}

body.is-hero-mode .aa-rocket.is-idle-wandering {
  pointer-events: none;
}

body.is-hero-mode .aa-rocket.is-idle-wandering .aa-hop-cue {
  opacity: 0;
}

body.is-hero-mode .aa-rocket.is-idle-wandering .aa-rocket-stage {
  animation: none;
}

body.is-hero-mode .aa-rocket.is-idle-wandering:not(.is-wandering-left) .aa-nyan-rainbow {
  right: calc(50% + clamp(72px, 5vw, 104px));
}

body.is-hero-mode .aa-rocket.is-idle-wandering.is-wandering-left .aa-nyan-cat-img {
  transform-origin: 50% 50%;
  transform: translate3d(0, -50%, 0) scaleX(-1);
}

body.is-hero-mode .aa-rocket.is-idle-wandering.is-wandering-left .aa-nyan-rainbow {
  left: calc(50% + clamp(96px, 7vw, 136px));
  right: auto;
  transform: translate3d(0, -50%, 0) scaleX(-1);
  mask-image: linear-gradient(90deg, black 0%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, black 0%, black 92%, transparent 100%);
}

body.is-hub-mode .aa-rocket.is-routing {
  animation: none;
  pointer-events: none;
}

body.is-section-mode .aa-rocket.is-landing {
  animation: none;
  pointer-events: none;
}

body.is-section-mode .aa-rocket.is-returning {
  animation: none;
  pointer-events: none;
}

body[data-route="work"] .aa-rocket { --route-x: -42vw; --route-y: 62svh; --route-rot: -30deg; }
body[data-route="capabilities"] .aa-rocket { --route-x: -20vw; --route-y: 67svh; --route-rot: -14deg; }
body[data-route="about"] .aa-rocket { --route-x: 0vw; --route-y: 70svh; --route-rot: 4deg; }
body[data-route="background"] .aa-rocket { --route-x: 20vw; --route-y: 67svh; --route-rot: 16deg; }
body[data-route="contact"] .aa-rocket { --route-x: 42vw; --route-y: 62svh; --route-rot: 30deg; }

@keyframes aa-rocket-stage-idle {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(0deg); }
  50% { transform: translate3d(0, -8px, 0) rotateZ(-1.2deg); }
}

@keyframes aa-rocket-section-idle {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -5px, 0); }
}

@keyframes aa-rocket-trail-pulse {
  from { opacity: 0.22; transform: translate3d(-50%, -50%, -1px) rotate(-23deg) scaleX(0.38); }
  to { opacity: 0.88; transform: translate3d(-50%, -50%, -1px) rotate(-23deg) scaleX(1); }
}

@keyframes aa-rocket-arrive {
  0% {
    opacity: 0;
    transform: translate3d(calc(-50% + 38vw), -34svh, 0) scale(0.12) rotate(-20deg);
    filter: blur(4px) brightness(0.72);
  }
  18% {
    opacity: 0.46;
    filter: blur(2.2px) brightness(0.9);
  }
  68% {
    opacity: 1;
    transform: translate3d(calc(-50% - 2vw), -3svh, 0) scale(1.08) rotate(2deg);
    filter: blur(0.4px) brightness(1.04);
  }
  100% {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) scale(1) rotate(0deg);
    filter: blur(0) brightness(1);
  }
}

@keyframes aa-rocket-hub-arrive {
  0% {
    opacity: 0;
    transform: translate3d(calc(-50% - 28vw), -32svh, 0) scale(0.18) rotate(18deg);
    filter: blur(3px) brightness(0.78);
  }
  62% {
    opacity: 1;
    transform: translate3d(calc(-50% + 1.5vw), -2svh, 0) scale(1.02) rotate(-2deg);
    filter: blur(0.3px) brightness(1.04);
  }
  100% {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) scale(0.94) rotate(0deg);
    filter: blur(0) brightness(1);
  }
}

@keyframes aa-rocket-board-launch {
  0% {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) scale(1) rotate(0deg);
    filter: blur(0) brightness(1);
  }
  22% {
    transform: translate3d(-50%, 12px, 0) scale(1.08) rotate(-1deg);
    filter: blur(0) brightness(1.1);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + 8vw), -118svh, 0) scale(0.32) rotate(18deg);
    filter: blur(2.6px) brightness(1.24);
  }
}

@keyframes aa-rocket-route {
  0% {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) scale(0.94) rotate(0deg);
    filter: blur(0) brightness(1);
  }
  28% {
    opacity: 1;
    transform: translate3d(-50%, -12px, 0) scale(1.03) rotate(-2deg);
    filter: blur(0) brightness(1.08);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--route-x, 0vw)), var(--route-y, 68svh), 0) scale(0.28) rotate(var(--route-rot, 12deg));
    filter: blur(2px) brightness(1.2);
  }
}

@keyframes aa-rocket-land {
  0% {
    opacity: 0;
    transform: translate3d(48vw, -74svh, 0) scale(0.34) rotate(28deg);
    filter: blur(2px) brightness(1.18);
  }
  56% {
    opacity: 1;
    transform: translate3d(10px, -18px, 0) scale(1.08) rotate(-3deg);
    filter: blur(0.3px) brightness(1.08);
  }
  78% {
    transform: translate3d(0, 5px, 0) scale(0.98) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    filter: blur(0) brightness(1);
  }
}

@keyframes aa-rocket-return {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    filter: blur(0) brightness(1);
  }
  30% {
    transform: translate3d(6px, -14px, 0) scale(1.08) rotate(-4deg);
    filter: blur(0) brightness(1.12);
  }
  100% {
    opacity: 0;
    transform: translate3d(44vw, -112svh, 0) scale(0.36) rotate(24deg);
    filter: blur(2.2px) brightness(1.22);
  }
}

/* ─── Destination control deck ─── */
.aa-hub {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(136px, 19svh, 190px) clamp(24px, 5vw, 72px) clamp(54px, 8svh, 92px);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #030506 0%, #000 54%, #020202 100%);
  perspective: 1200px;
}

.aa-hub::before {
  content: '';
  position: absolute;
  inset: 46% -20% -22%;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(120, 158, 205, 0.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.065) 1px, transparent 1px);
  background-size: 78px 78px;
  transform: rotateX(66deg) translateY(-12%);
  transform-origin: top center;
  opacity: 0.58;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 72%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 18%, black 72%, transparent);
}

.aa-hub::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.18), transparent 26%, transparent 68%, rgba(0,0,0,0.78)),
    radial-gradient(ellipse at center, transparent 42%, rgba(0,0,0,0.72) 100%);
}

.aa-hub-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.84;
}

.aa-hub-atmosphere {
  display: none;
}

.aa-hub-ring {
  position: absolute;
  left: 50%;
  top: 45%;
  width: min(66vw, 780px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(68deg);
  box-shadow: 0 0 40px rgba(90, 143, 196, 0.08), inset 0 0 34px rgba(120, 158, 205, 0.05);
}

.aa-hub-ring-b {
  width: min(48vw, 560px);
  border-color: rgba(90, 143, 196, 0.22);
  transform: translate(-50%, -50%) rotateX(68deg) rotateZ(12deg);
}

.aa-hub-axis {
  position: absolute;
  left: 50%;
  top: 45%;
  width: min(70vw, 840px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: translate(-50%, -50%) rotateZ(0deg);
}

.aa-hub-axis-y {
  transform: translate(-50%, -50%) rotateZ(90deg);
  background: linear-gradient(90deg, transparent, rgba(90, 143, 196, 0.24), transparent);
}

.aa-hub-shell {
  position: relative;
  z-index: 4;
  width: min(1180px, 100%);
  display: grid;
  justify-items: center;
  gap: 28px;
  transform-style: preserve-3d;
}

.aa-hub-console {
  width: min(760px, 100%);
  min-height: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.14);
  border-bottom: 1px solid rgba(255,255,255,0.14);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.aa-hub-console span {
  padding: 10px 14px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.aa-hub-console span:last-child {
  color: var(--teal-bright);
  border-right: 0;
}

.aa-hub-intro {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.34em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
}

.aa-hub-intro::before,
.aa-hub-intro::after {
  content: '';
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--aa-rainbow-grad);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
          mask-image: linear-gradient(90deg, transparent, #000);
  vertical-align: middle;
  margin-right: 16px;
}

.aa-hub-intro::after {
  margin-right: 0;
  margin-left: 16px;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent);
          mask-image: linear-gradient(90deg, #000, transparent);
}

.aa-sign-cluster {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  transform: rotateX(8deg) translateZ(0);
  transform-style: preserve-3d;
}

.aa-hub-return {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: clamp(22px, 4.8svh, 54px);
  padding: 0 18px;
  border: 1px solid var(--teal-edge);
  background: transparent;
  color: var(--teal-bright);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-spring);
}

.aa-hub-return::before {
  content: none;
}

.aa-hub-return:hover,
.aa-hub-return:focus-visible {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-hover);
  outline: none;
  transform: translateY(-1px);
}

.aa-sign {
  --deck-offset: 0px;
  --sign-accent: var(--teal);
  position: relative;
  min-height: 232px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 22px 20px 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(18, 21, 24, 0.78), rgba(3, 3, 3, 0.88)),
    radial-gradient(circle at 50% 0%, rgba(90, 143, 196, 0.12), transparent 62%);
  color: var(--ink);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 26px 64px rgba(0, 0, 0, 0.42);
  transform: translateY(var(--deck-offset)) translateZ(0);
  transition:
    transform 0.45s var(--ease-out-expo),
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.35s ease;
}

.aa-sign[data-sign="work"] { --sign-accent: #ff314f; }
.aa-sign[data-sign="capabilities"] { --sign-accent: #ff8a1d; }
.aa-sign[data-sign="about"] { --sign-accent: #ffe44d; }
.aa-sign[data-sign="background"] { --sign-accent: #38e06f; }
.aa-sign[data-sign="contact"] { --sign-accent: #31a8ff; }

.aa-sign:nth-child(1),
.aa-sign:nth-child(5) { --deck-offset: 22px; }
.aa-sign:nth-child(2),
.aa-sign:nth-child(4) { --deck-offset: 8px; }

.aa-sign::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.08) 42%, transparent 60%),
    radial-gradient(circle at 50% 16%, rgba(120, 158, 205, 0.12), transparent 48%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.aa-sign::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--sign-accent), rgba(120, 158, 205, 0.34), transparent);
  opacity: 0.62;
  transform-origin: left;
  transform: scaleX(0.72);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out-expo);
}

.aa-sign:hover,
.aa-sign:focus-visible,
body[data-route="work"] .aa-sign[data-sign="work"],
body[data-route="capabilities"] .aa-sign[data-sign="capabilities"],
body[data-route="about"] .aa-sign[data-sign="about"],
body[data-route="background"] .aa-sign[data-sign="background"],
body[data-route="contact"] .aa-sign[data-sign="contact"] {
  border-color: rgba(90, 143, 196, 0.62);
  border-color: var(--sign-accent);
  transform: translateY(calc(var(--deck-offset) - 10px)) translateZ(36px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 34px 76px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(90, 143, 196, 0.16),
    0 0 34px color-mix(in srgb, var(--sign-accent) 24%, transparent);
}

.aa-sign:hover::before,
.aa-sign:focus-visible::before,
body[data-route] .aa-sign:hover::before,
body[data-route="work"] .aa-sign[data-sign="work"]::before,
body[data-route="capabilities"] .aa-sign[data-sign="capabilities"]::before,
body[data-route="about"] .aa-sign[data-sign="about"]::before,
body[data-route="background"] .aa-sign[data-sign="background"]::before,
body[data-route="contact"] .aa-sign[data-sign="contact"]::before {
  opacity: 1;
}

.aa-sign:hover::after,
.aa-sign:focus-visible::after,
body[data-route="work"] .aa-sign[data-sign="work"]::after,
body[data-route="capabilities"] .aa-sign[data-sign="capabilities"]::after,
body[data-route="about"] .aa-sign[data-sign="about"]::after,
body[data-route="background"] .aa-sign[data-sign="background"]::after,
body[data-route="contact"] .aa-sign[data-sign="contact"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.aa-sign:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.86);
  outline-offset: 4px;
}

.aa-sign-num {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sign-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.aa-sign-num::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--sign-accent);
  flex-shrink: 0;
  box-shadow: 0 0 12px currentColor;
}

.aa-sign-content {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  gap: 12px;
}

.aa-sign-label {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  /* Sized so the longest label ("BACKGROUND") fits the card in the wider
     Archivo face; tightened tracking buys back a little width. */
  font-size: clamp(16px, 1.0vw, 18px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 0.96;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.aa-sign-sub {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
}

.aa-sign-route {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: color-mix(in srgb, var(--sign-accent) 82%, white 18%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.aa-sign-route::before {
  content: '';
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(120, 158, 205, 0.42);
}

/* ─── State machine ─── */
body.is-hero-mode .aa-hub,
body.is-hero-mode #work,
body.is-hero-mode #capabilities,
body.is-hero-mode #about,
body.is-hero-mode #background,
body.is-hero-mode #contact,
body.is-hero-mode .aa-footer { display: none; }

body.is-hub-mode .aa-hero,
body.is-hub-mode #work,
body.is-hub-mode #capabilities,
body.is-hub-mode #about,
body.is-hub-mode #background,
body.is-hub-mode #contact,
body.is-hub-mode .aa-footer { display: none; }

body.is-section-mode .aa-hero,
body.is-section-mode .aa-hub { display: none; }

body.is-section-mode #work,
body.is-section-mode #capabilities,
body.is-section-mode #about,
body.is-section-mode #background,
body.is-section-mode #contact { display: none; }

body.is-section-mode[data-section="work"] #work,
body.is-section-mode[data-section="capabilities"] #capabilities,
body.is-section-mode[data-section="about"] #about,
body.is-section-mode[data-section="background"] #background,
body.is-section-mode[data-section="contact"] #contact { display: block; }

body.is-section-mode .aa-section {
  padding-top: 96px;
  min-height: 100svh;
}

@media (min-width: 769px) {
  body.is-hub-mode {
    overflow-y: hidden;
  }
}

@media (max-width: 980px) {
  .aa-hub {
    padding-top: clamp(124px, 18svh, 172px);
  }

  .aa-sign-cluster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    transform: none;
  }

  .aa-sign {
    min-height: 190px;
  }

  .aa-sign:nth-child(1),
  .aa-sign:nth-child(2),
  .aa-sign:nth-child(4),
  .aa-sign:nth-child(5) {
    --deck-offset: 0px;
  }

  .aa-sign:nth-child(5) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .aa-rocket {
    --rocket-size: 88px;
    bottom: 104px;
  }

  /* Dock the Nyan button into the reserved bottom band of the hero
       (overrides the desktop clamp on body.is-hero-mode .aa-rocket).
       Slightly smaller cat here leaves room for the HOP ON! cue. */
  body.is-hero-mode .aa-rocket {
    bottom: 20px;
    --rocket-size: 78px;
    --nyan-width: 164px;
    --nyan-height: 62px;
  }

  /* Compact cue so "HOP ON!" never clips off the right edge. */
  .aa-hop-cue { left: calc(100% - 12px); gap: 2px; }
  .aa-hop-cue-arrow { width: 34px; }
  .aa-hop-cue-text { font-size: 11px; letter-spacing: 0.04em; }

  .aa-nyan-nav {
    --nyan-width: 172px;
    --nyan-height: 70px;
  }

  .aa-nyan-rainbow {
    width: 58vw;
  }

  body.is-hub-mode .aa-rocket {
    --rocket-size: 78px;
    top: 76px;
  }

  body.is-hub-mode .aa-nyan-nav {
    --nyan-width: 160px;
    --nyan-height: 66px;
  }

  body.is-section-mode .aa-rocket {
    --rocket-size: 56px;
    left: 14px;
    right: auto;
    bottom: 16px;
    gap: 8px;
  }

  body.is-section-mode .aa-nyan-nav {
    --nyan-width: 98px;
    --nyan-height: 46px;
  }

  body.is-section-mode .aa-nyan-rainbow {
    width: 46px;
  }

  body.is-section-mode .aa-rocket .aa-rocket-label-wrap {
    min-height: 30px;
    padding: 0 10px;
  }

  body.is-section-mode[data-section="about"] .aa-rocket {
    top: 76px;
    right: 14px;
    bottom: auto;
    left: auto;
    transform-origin: top right;
  }

  body.is-section-mode[data-section="about"] .aa-rocket .aa-rocket-label-wrap {
    display: none;
  }

  .aa-rocket-label {
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  .aa-hub {
    min-height: 100svh;
    padding: 168px 20px 94px;
    align-items: start;
  }

  .aa-hub-shell {
    gap: 20px;
  }

  .aa-hub-return {
    width: 100%;
    margin-top: 0;
    padding: 0 14px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .aa-hub .aa-privacy-corner {
    left: 20px;
    right: 20px;
    bottom: 24px;
    width: auto;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .aa-hub-console {
    display: none;
  }

  .aa-hub-intro {
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  .aa-hub-intro::before,
  .aa-hub-intro::after {
    width: 18px;
    margin-right: 10px;
  }

  .aa-hub-intro::after {
    margin-left: 10px;
  }

  .aa-sign-cluster {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .aa-sign:nth-child(5) {
    grid-column: auto;
  }

  .aa-sign {
    min-height: 0;
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
    gap: 6px 14px;
    padding: 13px 15px;
  }

  .aa-sign::after {
    left: 76px;
    right: 16px;
    bottom: 14px;
  }

  .aa-sign-num {
    grid-row: 1 / 3;
    align-items: start;
    padding-top: 3px;
  }

  .aa-sign-num::before {
    display: none;
  }

  .aa-sign-content {
    align-self: start;
    gap: 6px;
  }

  .aa-sign-label {
    font-size: clamp(18px, 5.4vw, 22px);
  }

  .aa-sign-sub {
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .aa-sign-route {
    display: none;
  }
}

@media (max-width: 420px) {
  body.is-section-mode .aa-rocket .aa-rocket-label-wrap {
    max-width: 98px;
  }

  body.is-section-mode .aa-rocket .aa-rocket-label {
    white-space: normal;
    line-height: 1.1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aa-rocket,
  .aa-rocket-stage,
  .aa-rocket-trail,
  .aa-nyan-rainbow::before,
  .aa-nyan-rainbow::after,
  .aa-nyan-rainbow span,
  body.is-hero-mode .aa-rocket,
  body.is-hub-mode .aa-rocket,
  body.is-section-mode .aa-rocket {
    animation: none !important;
    transition: opacity 0.2s ease !important;
  }

  .aa-hub-canvas {
    opacity: 0.42;
  }
}

/* CRT cleanup: remove scanlines, chromatic split, and display-noise layers. */
body.aa-kvs-home::after,
body.aa-kvs-page::after,
.aa-hero-noise,
.aa-showcase::before {
  display: none !important;
}

body.aa-kvs-home::before,
body.aa-kvs-page::before {
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(90, 143, 196, 0.055) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(120, 158, 205, 0.035) 0%, transparent 60%);
  background-size: auto;
  opacity: 1;
}

.aa-landing-burst {
  --burst-color: #fff;
  position: absolute;
  left: calc(50% + 18px);
  top: calc(50% - 6px);
  z-index: 6;
  width: 5px;
  height: 5px;
  background: var(--burst-color);
  opacity: 0;
  pointer-events: none;
  image-rendering: pixelated;
  transform: translate(-50%, -50%) scale(0.2);
  filter: drop-shadow(0 0 10px var(--burst-color));
}

.aa-rocket[data-burst="work"] .aa-landing-burst { --burst-color: #ff314f; }
.aa-rocket[data-burst="capabilities"] .aa-landing-burst { --burst-color: #ff8a1d; }
.aa-rocket[data-burst="about"] .aa-landing-burst { --burst-color: #ffe44d; }
.aa-rocket[data-burst="background"] .aa-landing-burst { --burst-color: #38e06f; }
.aa-rocket[data-burst="contact"] .aa-landing-burst { --burst-color: #31a8ff; }

.aa-rocket.is-bursting .aa-landing-burst {
  animation: aa-landing-burst 0.78s steps(4, end) both;
}

.aa-rocket.is-celebrating .aa-landing-burst {
  --burst-color: #fff;
  animation: aa-cat-party 1s steps(5, end) both;
}

.aa-rocket.is-celebrating .aa-rocket-stage {
  animation: aa-cat-party-wiggle 0.48s steps(2, end) 2 !important;
}

body.is-section-mode .aa-section {
  position: relative;
  overflow: hidden;
}

body.is-section-mode .aa-section::before {
  content: '';
  position: absolute;
  left: clamp(16px, 3vw, 34px);
  bottom: clamp(24px, 4vw, 52px);
  z-index: 0;
  width: min(420px, 74vw);
  aspect-ratio: 1;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--section-pop) 28%, transparent) 0 14%, transparent 58%),
    conic-gradient(from 0deg, transparent 0 12%, color-mix(in srgb, var(--section-pop) 30%, transparent) 12% 18%, transparent 18% 32%, rgba(255,255,255,0.18) 32% 36%, transparent 36% 100%);
  opacity: 0;
  transform: translate(-34%, 34%) scale(0.48);
  animation: aa-section-arrival-pop 1.05s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.is-section-mode[data-section="work"] .aa-section { --section-pop: #ff314f; }
body.is-section-mode[data-section="capabilities"] .aa-section { --section-pop: #ff8a1d; }
body.is-section-mode[data-section="about"] .aa-section { --section-pop: #ffe44d; }
body.is-section-mode[data-section="background"] .aa-section { --section-pop: #38e06f; }
body.is-section-mode[data-section="contact"] .aa-section { --section-pop: #31a8ff; }

@keyframes aa-landing-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
    box-shadow: none;
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.35);
    box-shadow:
      0 -26px 0 var(--burst-color),
      24px -14px 0 #fff,
      26px 16px 0 var(--burst-color),
      0 28px 0 #fff,
      -26px 16px 0 var(--burst-color),
      -24px -14px 0 #fff;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
    box-shadow:
      0 -48px 0 transparent,
      48px -28px 0 transparent,
      48px 30px 0 transparent,
      0 50px 0 transparent,
      -48px 30px 0 transparent,
      -48px -28px 0 transparent;
  }
}

@keyframes aa-cat-party {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.6);
    box-shadow:
      0 -34px 0 #ff314f,
      30px -18px 0 #ff8a1d,
      34px 18px 0 #ffe44d,
      0 36px 0 #38e06f,
      -34px 18px 0 #31a8ff,
      -30px -18px 0 #9a66ff;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    box-shadow:
      0 -62px 0 transparent,
      58px -36px 0 transparent,
      62px 36px 0 transparent,
      0 64px 0 transparent,
      -62px 36px 0 transparent,
      -58px -36px 0 transparent;
  }
}

@keyframes aa-cat-party-wiggle {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -9px, 0) rotate(-2deg); }
}

@keyframes aa-section-arrival-pop {
  0% {
    opacity: 0;
    transform: translate(-34%, 34%) scale(0.24) rotate(0deg);
  }
  18% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(-34%, 34%) scale(1.18) rotate(26deg);
  }
}

.aa-hero-name,
.aa-showcase::after {
  text-shadow: none;
}

.aa-signal-canvas {
  opacity: 0.34;
}

.signal-tag::after {
  display: none;
}

.page-hero {
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  .aa-landing-burst,
  body.is-section-mode .aa-section::before {
    animation: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   Theme Modes
   Dark remains the signature default; light mode is a warmer,
   editorial control-deck treatment rather than a color inversion.
   ═══════════════════════════════════════════════════════════ */
:root[data-theme="light"] {
  color-scheme: light;

  --bg:                  #f6f2e8;
  --bg-elevated:         #fffaf1;
  --bg-tint:             #eee5d8;
  --bg-band:             #e9dfcf;
  --bg-card:             #fffaf1;

  --ink:                 #151411;
  --text-primary:        #171512;
  --text-body:           #403b34;
  --text-muted:          #746d62;
  --text-subtle:         #a09688;
  --text-dim:            #c8bcaa;

  --rule:                rgba(48, 40, 30, 0.16);
  --rule-soft:           rgba(48, 40, 30, 0.08);
  --rule-strong:         rgba(48, 40, 30, 0.30);

  --teal:                #1a5c92;
  --teal-bright:         #195a8e;
  --teal-hover:          #134f7e;
  --teal-deep:           #0e3e5c;
  --teal-soft:           rgba(26, 92, 146, 0.10);
  --teal-tint:           rgba(26, 92, 146, 0.18);
  --teal-edge:           rgba(26, 92, 146, 0.42);

  --shadow-xs:           0 0 0 1px rgba(35, 29, 20, 0.04);
  --shadow-sm:           0 0 0 1px rgba(35, 29, 20, 0.08);
  --shadow-md:           0 14px 34px rgba(77, 58, 32, 0.12);
  --shadow-lg:           0 24px 60px rgba(77, 58, 32, 0.16);
  --shadow-teal:         0 0 0 1px rgba(26, 92, 146, 0.24), 0 18px 42px rgba(26, 92, 146, 0.10);
}

:root[data-theme="light"] body.aa-kvs-home,
:root[data-theme="light"] body.aa-kvs-page {
  --bg:                  #f6f2e8;
  --bg-elevated:         #fffaf1;
  --bg-tint:             #eee5d8;
  --bg-band:             #e9dfcf;
  --bg-card:             #fffaf1;
  --ink:                 #151411;
  --text-primary:        #171512;
  --text-body:           #403b34;
  --text-muted:          #746d62;
  --text-subtle:         #a09688;
  --text-dim:            #c8bcaa;
  --rule:                rgba(48, 40, 30, 0.16);
  --rule-soft:           rgba(48, 40, 30, 0.08);
  --rule-strong:         rgba(48, 40, 30, 0.30);
  --teal:                #1a5c92;
  --teal-bright:         #195a8e;
  --teal-hover:          #134f7e;
  --teal-deep:           #0e3e5c;
  --teal-soft:           rgba(26, 92, 146, 0.10);
  --teal-tint:           rgba(26, 92, 146, 0.18);
  --teal-edge:           rgba(26, 92, 146, 0.42);
  background: var(--bg);
  color: var(--text-body);
}

:root[data-theme="light"] html,
:root[data-theme="light"] body,
:root[data-theme="light"] .aa-main,
:root[data-theme="light"] .aa-hero,
:root[data-theme="light"] .aa-section,
:root[data-theme="light"] .aa-footer,
:root[data-theme="light"] .page-main {
  background: var(--bg);
}

:root[data-theme="light"] body.aa-kvs-home::before,
:root[data-theme="light"] body.aa-kvs-page::before {
  background-image:
    radial-gradient(ellipse 80% 58% at 18% 0%, rgba(90, 143, 196, 0.10) 0%, transparent 62%),
    radial-gradient(ellipse 62% 44% at 92% 98%, rgba(49, 168, 255, 0.08) 0%, transparent 60%),
    linear-gradient(to right, rgba(48, 40, 30, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(48, 40, 30, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 80px 80px, 80px 80px;
  opacity: 1;
}

:root[data-theme="light"] nav#nav,
:root[data-theme="light"] body.aa-kvs-home nav#nav {
  background: rgba(246, 242, 232, 0.82);
  border-bottom-color: rgba(48, 40, 30, 0.10);
  box-shadow: 0 12px 34px rgba(52, 40, 24, 0.08);
}

:root[data-theme="light"] nav#nav.scrolled,
:root[data-theme="light"] body.aa-kvs-home nav#nav.scrolled {
  background: rgba(255, 250, 241, 0.94);
  border-bottom-color: var(--rule);
}

:root[data-theme="light"] .nav-logo-mark,
:root[data-theme="light"] body.aa-kvs-home .nav-logo-mark {
  filter: none;
  opacity: 1;
}

:root[data-theme="light"] .aa-theme-toggle,
:root[data-theme="light"] .aa-nav-hub {
  background: rgba(21, 20, 17, 0.035);
  border-color: var(--rule);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.52);
}

:root[data-theme="light"] .aa-theme-toggle:hover,
:root[data-theme="light"] .aa-theme-toggle:focus-visible,
:root[data-theme="light"] .aa-nav-hub:hover,
:root[data-theme="light"] .aa-nav-hub:focus-visible {
  background: rgba(90, 143, 196, 0.08);
  border-color: rgba(201, 75, 0, 0.36);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.66), 0 10px 28px rgba(118, 78, 28, 0.10);
}

:root[data-theme="light"] .aa-theme-toggle-icon {
  width: 14px;
  height: 14px;
  background: var(--teal);
  box-shadow:
    0 -8px 0 -5px var(--teal),
    0 8px 0 -5px var(--teal),
    8px 0 0 -5px var(--teal),
    -8px 0 0 -5px var(--teal),
    6px 6px 0 -5px var(--teal),
    -6px -6px 0 -5px var(--teal),
    6px -6px 0 -5px var(--teal),
    -6px 6px 0 -5px var(--teal);
}

:root[data-theme="light"] .aa-nav-status:not(.aa-nav-hub),
:root[data-theme="light"] .aa-nav-status:not(.aa-nav-hub):visited,
:root[data-theme="light"] .hero-cta,
:root[data-theme="light"] .hero-cta:visited,
:root[data-theme="light"] .btn-primary,
:root[data-theme="light"] .btn-primary:visited,
:root[data-theme="light"] .aa-work-more a,
:root[data-theme="light"] .aa-showcase-panel a,
:root[data-theme="light"] .aa-contact-links a:first-child {
  color: var(--teal-bright);
}

:root[data-theme="light"] .contact-link.primary,
:root[data-theme="light"] .contact-link.primary:visited,
:root[data-theme="light"] .skip-link {
  color: var(--bg);
}

:root[data-theme="light"] .aa-button-muted:hover,
:root[data-theme="light"] .hero-link:hover,
:root[data-theme="light"] .aa-contact-links a:hover,
:root[data-theme="light"] .contact-link:hover {
  color: #fffaf1;
}

:root[data-theme="light"] .aa-hero-name span {
  color: var(--ink);
}

:root[data-theme="light"] .aa-hero-status,
:root[data-theme="light"] .aa-privacy-corner,
:root[data-theme="light"] .aa-work-body,
:root[data-theme="light"] body.is-section-mode .aa-rocket .aa-rocket-label-wrap,
:root[data-theme="light"] .aa-rocket-label-wrap {
  background: rgba(255, 250, 241, 0.82);
  color: var(--text-body);
  box-shadow: 0 18px 42px rgba(77, 58, 32, 0.12);
}

:root[data-theme="light"] .aa-privacy-corner:hover,
:root[data-theme="light"] .aa-privacy-corner:focus-visible {
  background: rgba(90, 143, 196, 0.10);
  border-color: rgba(201, 75, 0, 0.36);
  color: var(--teal-bright);
}

:root[data-theme="light"] .aa-showcase {
  background:
    radial-gradient(circle at 34% 44%, rgba(90, 143, 196,0.12), transparent 38%),
    var(--bg-elevated);
}

:root[data-theme="light"] .aa-showcase-preview {
  background: var(--bg-tint);
}

:root[data-theme="light"] .aa-showcase-preview::before {
  background:
    linear-gradient(to right, rgba(246,242,232,0.68), rgba(255,250,241,0) 22%, rgba(255,250,241,0) 78%, rgba(246,242,232,0.62)),
    repeating-linear-gradient(to bottom, rgba(48,40,30,0.045) 0, rgba(48,40,30,0.045) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: multiply;
  opacity: 0.38;
}

:root[data-theme="light"] .aa-showcase-preview::after {
  opacity: 0.13;
}

:root[data-theme="light"] .aa-showcase::after {
  color: rgba(21, 20, 17, 0.055);
}

:root[data-theme="light"] .aa-showcase-side {
  background: rgba(255, 250, 241, 0.86);
  color: var(--text-body);
  box-shadow: 0 18px 42px rgba(77, 58, 32, 0.12);
}

:root[data-theme="light"] .aa-showcase-panel {
  background: transparent;
  box-shadow: none;
}

:root[data-theme="light"] .aa-showcase-controls button {
  background: rgba(48, 40, 30, 0.055);
  color: var(--text-body);
}

:root[data-theme="light"] .aa-showcase-controls button:hover,
:root[data-theme="light"] .aa-showcase-controls button:focus-visible,
:root[data-theme="light"] .aa-showcase-controls [data-showcase-next] {
  background: var(--teal);
  color: #fffaf1;
}

:root[data-theme="light"] .aa-showcase-index {
  background: var(--rule);
}

:root[data-theme="light"] .aa-showcase-index-item {
  background: rgba(255, 250, 241, 0.58);
}

:root[data-theme="light"] .aa-showcase-index-item:hover,
:root[data-theme="light"] .aa-showcase-index-item:focus-visible,
:root[data-theme="light"] .aa-showcase-index-item.is-active {
  background: rgba(90, 143, 196, 0.14);
}

:root[data-theme="light"] .aa-work-media {
  background: var(--bg-tint);
}

:root[data-theme="light"] .aa-work-card,
:root[data-theme="light"] .case-teaser,
:root[data-theme="light"] .related-card,
:root[data-theme="light"] .case-stack span,
:root[data-theme="light"] .case-stack > *,
:root[data-theme="light"] .ps-arch-tag {
  background: var(--bg-elevated);
}

:root[data-theme="light"] .aa-work-card:hover,
:root[data-theme="light"] .case-teaser:hover,
:root[data-theme="light"] .related-card:hover {
  background: #fff5e6;
}

:root[data-theme="light"] .case-figure,
:root[data-theme="light"] .case-teaser-media,
:root[data-theme="light"] .case-gallery,
:root[data-theme="light"] .related-grid,
:root[data-theme="light"] .case-teaser-grid {
  background: var(--bg-tint);
}

:root[data-theme="light"] .case-figure img,
:root[data-theme="light"] .case-teaser-media img,
:root[data-theme="light"] .aa-work-media img {
  filter: grayscale(0.55) contrast(1.04) brightness(0.98);
}

:root[data-theme="light"] .aa-showcase-image {
  filter: grayscale(0.28) contrast(1.03) brightness(0.96);
}

:root[data-theme="light"] .case-teaser:hover .case-teaser-media img,
:root[data-theme="light"] .aa-work-card:hover .aa-work-media img {
  filter: grayscale(0.05) contrast(1.03) brightness(1);
}

:root[data-theme="light"] .page-hero {
  background: var(--bg);
}

:root[data-theme="light"] .proj-result {
  background: rgba(90, 143, 196, 0.08);
}

:root[data-theme="light"] .aa-hub {
  background: linear-gradient(180deg, #fffaf1 0%, #f3ecdf 56%, #eadfce 100%);
}

:root[data-theme="light"] .aa-hub::before {
  background-image:
    linear-gradient(to right, rgba(49, 45, 38, 0.13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201, 75, 0, 0.12) 1px, transparent 1px);
  opacity: 0.62;
}

:root[data-theme="light"] .aa-hub::after {
  background:
    linear-gradient(to bottom, rgba(255,250,241,0.04), transparent 26%, transparent 68%, rgba(235,224,208,0.70)),
    radial-gradient(ellipse at center, transparent 46%, rgba(223,211,194,0.64) 100%);
}

:root[data-theme="light"] .aa-hub-ring {
  border-color: rgba(48, 40, 30, 0.16);
  box-shadow: 0 0 40px rgba(90, 143, 196, 0.08), inset 0 0 34px rgba(49, 168, 255, 0.08);
}

:root[data-theme="light"] .aa-hub-ring-b {
  border-color: rgba(90, 143, 196, 0.24);
}

:root[data-theme="light"] .aa-hub-axis {
  background: linear-gradient(90deg, transparent, rgba(48,40,30,0.18), transparent);
}

:root[data-theme="light"] .aa-hub-axis-y {
  background: linear-gradient(90deg, transparent, rgba(90, 143, 196,0.24), transparent);
}

:root[data-theme="light"] .aa-hub-console {
  border-top-color: rgba(48, 40, 30, 0.18);
  border-bottom-color: rgba(48, 40, 30, 0.18);
}

:root[data-theme="light"] .aa-hub-console span {
  border-right-color: rgba(48, 40, 30, 0.12);
}

:root[data-theme="light"] .aa-sign {
  border-color: rgba(48, 40, 30, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.90), rgba(242, 232, 216, 0.92)),
    radial-gradient(circle at 50% 0%, rgba(90, 143, 196, 0.12), transparent 62%);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.82),
    0 26px 60px rgba(77, 58, 32, 0.16);
}

:root[data-theme="light"] .aa-sign::before {
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.70) 42%, transparent 60%),
    radial-gradient(circle at 50% 16%, rgba(49, 168, 255, 0.16), transparent 48%);
}

:root[data-theme="light"] .aa-sign:hover,
:root[data-theme="light"] .aa-sign:focus-visible,
:root[data-theme="light"] body[data-route="work"] .aa-sign[data-sign="work"],
:root[data-theme="light"] body[data-route="capabilities"] .aa-sign[data-sign="capabilities"],
:root[data-theme="light"] body[data-route="about"] .aa-sign[data-sign="about"],
:root[data-theme="light"] body[data-route="background"] .aa-sign[data-sign="background"],
:root[data-theme="light"] body[data-route="contact"] .aa-sign[data-sign="contact"] {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 34px 70px rgba(77, 58, 32, 0.20),
    0 0 0 1px color-mix(in srgb, var(--sign-accent) 26%, transparent),
    0 0 32px color-mix(in srgb, var(--sign-accent) 20%, transparent);
}

:root[data-theme="light"] .aa-rocket-stage,
:root[data-theme="light"] .aa-nyan-nav .aa-rocket-stage {
  filter:
    drop-shadow(0 18px 26px rgba(77, 58, 32, 0.22))
    drop-shadow(0 0 18px rgba(49, 168, 255, 0.12));
}

/* ─────────────────────────────────────────────────────────────
   Rainbow token + hub-sign polish
   (per-sign glyph, rainbow hub-intro flanks, sign-route hover)
   ───────────────────────────────────────────────────────────── */

:root {
  --aa-rainbow-grad: linear-gradient(
    90deg,
    #ff314f 0%,
    #ff8a1d 20%,
    #ffe44d 40%,
    #38e06f 60%,
    #31a8ff 80%,
    #9a66ff 100%
  );
}

/* Per-sign glyph: small line-drawn icon in the top-right of each sign. */
.aa-sign-glyph {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  opacity: 0.72;
  transition: color 0.3s ease,
              opacity 0.3s ease,
              transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.aa-sign:hover .aa-sign-glyph,
.aa-sign:focus-visible .aa-sign-glyph {
  color: #ff7733;
  opacity: 1;
  transform: rotate(-4deg) scale(1.08);
}

/* Sign-route rainbow underline on hover. Sits under the small "Let's go"
   badge, only appears when its parent sign is hovered. */
.aa-sign-route {
  padding-bottom: 4px;
  background-image: var(--aa-rainbow-grad);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.aa-sign:hover .aa-sign-route,
.aa-sign:focus-visible .aa-sign-route {
  background-size: 100% 1px;
}

@media (prefers-reduced-motion: reduce) {
  .aa-sign-glyph { transition: none; }
  .aa-sign-route { transition: none; }
}

/* Hub-cursor rainbow trail — canvas overlay, painted by script.js. */
.aa-hub-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}
:root[data-theme="light"] .aa-hub-trail {
  mix-blend-mode: multiply;
  opacity: 0.85;
}

/* ─────────────────────────────────────────────────────────────
   Structured-playfulness pass: soft corners, springy motion,
   tactile press, a cat reaction. Surfaces warm; structure stays.
   ───────────────────────────────────────────────────────────── */

/* Soft corners on filled boxes (hairline rules stay sharp) */
.aa-sign,
.aa-work-card,
.case-teaser,
.aa-button,
.btn-primary,
.btn-ghost,
.hero-cta,
.hero-link,
.aa-hero-kicker,
.aa-hub-shell,
.aa-hub-console {
  border-radius: var(--radius);
}
.aa-tags span,
.ps-arch-tag,
.aa-sign-route,
.aa-cert-logo {
  border-radius: var(--radius-sm);
}

/* Warm human aside in the footer */
.footer-aside {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  max-width: 38ch;
}

/* Springy transforms on hover/press — kinship with the cat's bounce.
   Re-declare the full transition so transform overshoots while the
   other properties keep their existing feel. */
.aa-sign {
  transition: border-color 0.3s ease,
              background 0.3s ease,
              transform 0.55s var(--ease-spring),
              box-shadow 0.4s ease;
}
.aa-work-card,
.case-teaser {
  transition: border-color 0.3s ease,
              background 0.3s ease,
              transform 0.55s var(--ease-spring),
              box-shadow 0.4s ease;
}
.aa-sign-glyph {
  transition: color 0.3s ease,
              opacity 0.3s ease,
              transform 0.5s var(--ease-spring);
}
.aa-cert-logo {
  transition: border-color 0.25s ease,
              transform 0.5s var(--ease-spring);
}

/* Tactile button press */
.aa-button,
.btn-primary,
.btn-ghost,
.hero-cta,
.hero-link {
  transition: color 0.25s ease,
              background 0.25s ease,
              border-color 0.25s ease,
              transform 0.4s var(--ease-spring);
}
.aa-button:active,
.btn-primary:active,
.btn-ghost:active,
.hero-cta:active,
.hero-link:active {
  transform: scale(0.96);
}

/* Cat reaction when a route is picked — a quick pop + wiggle.
   Triggered by JS adding .is-reacting to #aa-rocket. */
@keyframes aa-rocket-react {
  0%   { transform: scale(1) rotate(0); }
  30%  { transform: scale(1.22) rotate(-6deg); }
  55%  { transform: scale(0.94) rotate(5deg); }
  78%  { transform: scale(1.08) rotate(-2deg); }
  100% { transform: scale(1) rotate(0); }
}
.aa-rocket.is-reacting .aa-rocket-stage,
.aa-rocket.is-reacting .aa-nyan-stage {
  animation: aa-rocket-react 0.42s var(--ease-spring);
}

@media (prefers-reduced-motion: reduce) {
  .aa-sign,
  .aa-work-card,
  .case-teaser,
  .aa-sign-glyph,
  .aa-cert-logo,
  .aa-button,
  .btn-primary,
  .btn-ghost,
  .hero-cta,
  .hero-link {
    transition: none;
  }
  .aa-button:active,
  .btn-primary:active,
  .hero-cta:active { transform: none; }
  .aa-rocket.is-reacting .aa-rocket-stage,
  .aa-rocket.is-reacting .aa-nyan-stage { animation: none; }
}

/* Keep the hub return control in the same visual family as the hero CTAs. */
.aa-hub-return {
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: 0.1em;
  gap: 10px;
}

.aa-hub-return::after {
  content: '→';
  font-size: 14px;
  color: currentColor;
  transition: transform 0.2s var(--ease-spring);
}

.aa-hub-return:hover::after,
.aa-hub-return:focus-visible::after {
  transform: translateX(2px);
}
