/* ============================================================
   doss.me — the-clay edition v3
   SPATIAL. LAYERED. BOLD. PRODUCT-FEEL.
   The Dribbble push. No photography — shapes carry the weight.
   ============================================================ */

/* ---- Design Tokens (Dark Default) ---- */
:root {
  --color-bg: #0A0A14;
  --color-bg-secondary: #10101E;
  --color-bg-tertiary: #18182C;
  --color-surface: #13132A;
  --color-surface-hover: #1A1A38;
  --color-surface-active: #222248;
  --color-text: #EEEAE3;
  --color-text-secondary: #9898AC;
  --color-text-tertiary: #5A5A6E;
  --color-accent: #E8A230;
  --color-accent-hover: #D49010;
  --color-accent-light: rgba(232, 162, 48, 0.12);
  --color-accent-glow: rgba(232, 162, 48, 0.25);
  --color-coral: #E85D75;
  --color-coral-light: rgba(232, 93, 117, 0.12);
  --color-blue: #5B8DEF;
  --color-blue-light: rgba(91, 141, 239, 0.12);
  --color-green: #4ADE80;
  --color-green-light: rgba(74, 222, 128, 0.12);
  --color-purple: #A78BFA;
  --color-purple-light: rgba(167, 139, 250, 0.12);
  --color-highlight: rgba(232, 162, 48, 0.14);
  --color-highlight-strong: rgba(232, 162, 48, 0.25);
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-strong: rgba(255, 255, 255, 0.12);
  --color-nav-bg: rgba(10, 10, 20, 0.88);
  --gradient-accent: linear-gradient(135deg, #E8A230, #E85D75);
  --gradient-warm: linear-gradient(135deg, rgba(232,162,48,0.08), rgba(232,93,117,0.05));
  --gradient-cool: linear-gradient(135deg, rgba(91,141,239,0.06), rgba(167,139,250,0.06));

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 80px rgba(232, 162, 48, 0.08);
  --shadow-card-hover: 0 20px 50px rgba(0,0,0,0.4), 0 0 30px rgba(232,162,48,0.05);
  --shadow-layered: 0 1px 1px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.12), 0 16px 32px rgba(0,0,0,0.16), 0 32px 64px rgba(0,0,0,0.24);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --space-2xs: 0.125rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --dur-fast: 150ms;
  --dur-normal: 300ms;
  --dur-slow: 500ms;
  --dur-slower: 800ms;
  --dur-slowest: 1200ms;

  --max-width: 1200px;
  --nav-height: 72px;
  --page-padding: clamp(1.25rem, 4vw, 3rem);
}

/* ---- Light Theme ---- */
[data-theme="light"] {
  --color-bg: #F7F5F0;
  --color-bg-secondary: #EDEBE4;
  --color-bg-tertiary: #E2DFD6;
  --color-surface: #FFFFFF;
  --color-surface-hover: #FEFEFE;
  --color-surface-active: #F8F6F2;
  --color-text: #1A1A1E;
  --color-text-secondary: #52525A;
  --color-text-tertiary: #9C9CA6;
  --color-accent: #C88A18;
  --color-accent-hover: #A87010;
  --color-accent-light: rgba(200, 138, 24, 0.10);
  --color-accent-glow: rgba(200, 138, 24, 0.15);
  --color-coral: #DC2626;
  --color-coral-light: rgba(220, 38, 38, 0.08);
  --color-blue: #2563EB;
  --color-blue-light: rgba(37, 99, 235, 0.08);
  --color-green: #16A34A;
  --color-green-light: rgba(22, 163, 74, 0.08);
  --color-purple: #7C3AED;
  --color-purple-light: rgba(124, 58, 237, 0.08);
  --color-highlight: #FEF3C7;
  --color-highlight-strong: #FDE68A;
  --color-border: rgba(0, 0, 0, 0.06);
  --color-border-strong: rgba(0, 0, 0, 0.12);
  --color-nav-bg: rgba(247, 245, 240, 0.88);
  --gradient-accent: linear-gradient(135deg, #C88A18, #DC2626);
  --gradient-warm: linear-gradient(135deg, rgba(200,138,24,0.06), rgba(220,38,38,0.03));
  --gradient-cool: linear-gradient(135deg, rgba(37,99,235,0.04), rgba(124,58,237,0.04));
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.03);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.10);
  --shadow-glow: 0 0 60px rgba(200, 138, 24, 0.06);
  --shadow-card-hover: 0 20px 50px rgba(0,0,0,0.10);
  --shadow-layered: 0 1px 1px rgba(0,0,0,0.02), 0 4px 8px rgba(0,0,0,0.04), 0 16px 32px rgba(0,0,0,0.06), 0 32px 64px rgba(0,0,0,0.08);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--dur-slow) var(--ease-out), color var(--dur-slow) var(--ease-out);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ---- Ambient Background ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(232, 162, 48, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(91, 141, 239, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(167, 139, 250, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(200, 138, 24, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(37, 99, 235, 0.02) 0%, transparent 70%);
}

/* Cursor glow */
body::after {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 162, 48, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(calc(var(--cursor-x, 50%) - 300px), calc(var(--cursor-y, 50%) - 300px));
  transition: transform 0.3s ease-out, opacity var(--dur-slow) var(--ease-out);
  opacity: 0;
}
body.cursor-active::after { opacity: 1; }
[data-theme="light"] body::after {
  background: radial-gradient(circle, rgba(200, 138, 24, 0.03) 0%, transparent 70%);
}

/* Noise overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  mix-blend-mode: overlay;
}
[data-theme="light"] .noise-overlay { opacity: 0.018; }

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}
h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  letter-spacing: -0.025em;
}
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.25rem); }
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
mark, .highlight {
  background: var(--color-highlight);
  padding: 0.1em 0.3em;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
  position: relative;
  z-index: 1;
}
.page-content {
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-5xl);
  min-height: 100vh;
}
.section { padding: var(--space-4xl) 0; }
.section + .section { border-top: 1px solid var(--color-border); }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: var(--color-nav-bg);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--color-border);
  transition: transform var(--dur-normal) var(--ease-out), background var(--dur-slow) var(--ease-out);
}
.nav.nav-hidden { transform: translateY(-100%); }
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.nav-logo:hover { opacity: 0.7; }
.nav-logo-dot { color: var(--color-accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.nav-link {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav-link:hover {
  color: var(--color-text);
  background: var(--color-accent-light);
}
.nav-link.active {
  color: var(--color-accent);
  background: var(--color-accent-light);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-normal) var(--ease-spring);
}
.theme-toggle:hover {
  color: var(--color-accent);
  background: var(--color-accent-light);
}
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

/* Mobile nav */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  border-radius: var(--radius-sm);
}
.nav-mobile-toggle span {
  width: 18px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--dur-normal) var(--ease-spring), opacity var(--dur-fast);
}
.nav-mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-toggle.active span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 999;
  padding: var(--space-2xl) var(--page-padding);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity var(--dur-normal) var(--ease-out), transform var(--dur-normal) var(--ease-out);
}
.nav-mobile-menu.open {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  opacity: 1;
  transform: translateY(0);
}
.nav-mobile-link {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  padding: var(--space-md) 0;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  transition: color var(--dur-fast), padding-left var(--dur-normal) var(--ease-spring);
}
.nav-mobile-link:hover {
  color: var(--color-accent);
  padding-left: var(--space-md);
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
}

/* ============================================================
   V3 SPATIAL COMPONENTS
   ============================================================ */

/* ---- Decorative Floating Shapes ---- */
.shape {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.shape-circle {
  border-radius: 50%;
}
.shape-ring {
  border-radius: 50%;
  background: transparent !important;
  border: 2px solid;
}
.shape-dot-grid {
  background-image: radial-gradient(circle, currentColor 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.15;
}
.shape-line {
  height: 2px;
  border-radius: 1px;
}
.shape-cross {
  width: 24px;
  height: 24px;
}
.shape-cross::before,
.shape-cross::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 1px;
}
.shape-cross::before {
  width: 100%;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}
.shape-cross::after {
  width: 2px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

/* ---- Hero V3: Spatial Composition ---- */
.hero-spatial {
  min-height: calc(100vh - var(--nav-height));
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-3xl);
  padding: var(--space-4xl) 0;
  position: relative;
  overflow: visible;
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-quote {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--color-text);
  cursor: pointer;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  font-variation-settings: 'SOFT' 50, 'WONK' 1;
  margin-bottom: var(--space-2xl);
}
.hero-quote::selection {
  background: var(--color-accent-glow);
}
.hero-attribution {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.hero-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
}
.hero-dash {
  color: var(--color-text-tertiary);
  font-weight: 300;
}
.hero-detail {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
}

/* Hero floating card stack */
.hero-cards {
  position: relative;
  z-index: 2;
  height: 420px;
}
.hero-card {
  position: absolute;
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-2xl);
  box-shadow: var(--shadow-layered);
  transition: transform var(--dur-slow) var(--ease-spring);
}
.hero-card-1 {
  background: linear-gradient(135deg, #E8A230, #D4751C);
  color: #0A0A14;
  top: 0;
  right: 0;
  width: 85%;
  z-index: 3;
  transform: rotate(-2deg);
}
.hero-card-1:hover { transform: rotate(-1deg) translateY(-4px); }
.hero-card-1 .hero-card-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: var(--space-sm);
}
.hero-card-1 .hero-card-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xs);
}
.hero-card-1 .hero-card-role {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.85;
}

.hero-card-2 {
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  bottom: 20px;
  left: 0;
  width: 75%;
  z-index: 2;
  transform: rotate(1.5deg);
}
.hero-card-2:hover { transform: rotate(0.5deg) translateY(-4px); }
.hero-card-2 .hero-card-stat {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.hero-card-2 .hero-card-stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--space-xs);
}

.hero-card-3 {
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  top: 50%;
  right: -20px;
  transform: translateY(-50%) rotate(3deg);
  z-index: 1;
  padding: var(--space-lg) var(--space-xl);
  width: 55%;
}
.hero-card-3:hover { transform: translateY(calc(-50% - 4px)) rotate(2deg); }
.hero-card-3 .hero-card-quote {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--color-text-secondary);
  font-variation-settings: 'SOFT' 50, 'WONK' 1;
  line-height: 1.5;
}

/* Hero gradient orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(232, 162, 48, 0.12);
  top: -10%;
  right: 10%;
  animation: float-orb 12s ease-in-out infinite;
}
.hero-orb-2 {
  width: 350px;
  height: 350px;
  background: rgba(91, 141, 239, 0.08);
  bottom: 0;
  left: -5%;
  animation: float-orb 10s ease-in-out infinite reverse;
}
[data-theme="light"] .hero-orb-1 { background: rgba(200, 138, 24, 0.08); }
[data-theme="light"] .hero-orb-2 { background: rgba(37, 99, 235, 0.05); }

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 3s ease-in-out infinite;
}
.hero-scroll-hint svg { width: 16px; height: 16px; opacity: 0.5; }

/* ---- Bento Grid ---- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: var(--space-lg);
}
.bento-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-normal) var(--ease-spring),
              box-shadow var(--dur-normal) var(--ease-out),
              border-color var(--dur-normal);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.bento-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-layered);
  border-color: var(--color-border-strong);
}
.bento-wide { grid-column: span 2; }
.bento-tall { grid-row: span 2; }
.bento-feature { grid-column: span 2; grid-row: span 2; }

/* Bento with bold color fills */
.bento-amber {
  background: linear-gradient(135deg, #E8A230, #D4751C);
  color: #0A0A14;
  border: none;
}
.bento-amber:hover { box-shadow: 0 20px 60px rgba(232, 162, 48, 0.3); }
.bento-coral {
  background: linear-gradient(135deg, #E85D75, #C23052);
  color: #fff;
  border: none;
}
.bento-coral:hover { box-shadow: 0 20px 60px rgba(232, 93, 117, 0.3); }
.bento-blue {
  background: linear-gradient(135deg, #5B8DEF, #3B6BD6);
  color: #fff;
  border: none;
}
.bento-blue:hover { box-shadow: 0 20px 60px rgba(91, 141, 239, 0.3); }
.bento-purple {
  background: linear-gradient(135deg, #A78BFA, #7C3AED);
  color: #fff;
  border: none;
}
.bento-purple:hover { box-shadow: 0 20px 60px rgba(167, 139, 250, 0.3); }
.bento-dark {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
}

.bento-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-md);
  opacity: 0.2;
  position: absolute;
  top: var(--space-lg);
  right: var(--space-xl);
}
.bento-amber .bento-number,
.bento-coral .bento-number,
.bento-blue .bento-number,
.bento-purple .bento-number {
  opacity: 0.25;
  color: rgba(0,0,0,0.15);
}
.bento-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}
.bento-desc {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.5;
}
.bento-arrow {
  position: absolute;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--dur-normal) var(--ease-out), transform var(--dur-normal) var(--ease-spring);
}
.bento-item:hover .bento-arrow {
  opacity: 1;
  transform: translateX(0);
}
.bento-dark .bento-arrow {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* Bento decorative shapes */
.bento-shape {
  position: absolute;
  pointer-events: none;
  opacity: 0.1;
}
.bento-amber .bento-shape,
.bento-coral .bento-shape,
.bento-blue .bento-shape,
.bento-purple .bento-shape {
  opacity: 0.12;
  color: rgba(0,0,0,0.2);
}

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-feature { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .bento-wide, .bento-feature { grid-column: span 1; }
  .bento-tall { grid-row: span 1; }
}

/* ---- Full-Bleed Color Block ---- */
.color-block {
  position: relative;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: var(--space-5xl) calc(50vw - 50%);
  overflow: hidden;
}
.color-block-amber {
  background: linear-gradient(135deg, #E8A230 0%, #D4751C 60%, #C23052 100%);
  color: #0A0A14;
}
[data-theme="light"] .color-block-amber {
  background: linear-gradient(135deg, #E8A230 0%, #D4751C 60%, #C23052 100%);
  color: #fff;
}
.color-block-dark {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.color-block-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.color-block blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 3.5rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 800px;
  font-variation-settings: 'SOFT' 50, 'WONK' 1;
}
.color-block cite {
  display: block;
  margin-top: var(--space-xl);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-style: normal;
  opacity: 0.7;
}
/* Decorative circle in color block */
.color-block-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.color-block-amber .color-block-shape {
  background: rgba(255,255,255,0.08);
}

/* ---- Stats Strip ---- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  transition: transform var(--dur-normal) var(--ease-spring), box-shadow var(--dur-normal);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.stat-card-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-card-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-tertiary);
  margin-top: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
/* Colored stat variants */
.stat-card-amber { border-color: rgba(232, 162, 48, 0.2); }
.stat-card-amber .stat-card-value {
  background: linear-gradient(135deg, #E8A230, #E85D75);
  -webkit-background-clip: text;
  background-clip: text;
}
.stat-card-blue { border-color: rgba(91, 141, 239, 0.2); }
.stat-card-blue .stat-card-value {
  background: linear-gradient(135deg, #5B8DEF, #A78BFA);
  -webkit-background-clip: text;
  background-clip: text;
}
.stat-card-coral { border-color: rgba(232, 93, 117, 0.2); }
.stat-card-coral .stat-card-value {
  background: linear-gradient(135deg, #E85D75, #E8A230);
  -webkit-background-clip: text;
  background-clip: text;
}
.stat-card-green { border-color: rgba(74, 222, 128, 0.2); }
.stat-card-green .stat-card-value {
  background: linear-gradient(135deg, #4ADE80, #5B8DEF);
  -webkit-background-clip: text;
  background-clip: text;
}
@media (max-width: 768px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stats-strip { grid-template-columns: 1fr; }
}

/* ---- Page Header V3 ---- */
.page-header {
  padding: var(--space-4xl) 0 var(--space-2xl);
  margin-bottom: var(--space-3xl);
  position: relative;
}
.page-header h1 {
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}
.page-header-description {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--color-text-secondary);
  max-width: 600px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}
/* Decorative element behind page header */
.page-header-shape {
  position: absolute;
  top: -20px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--color-accent-light);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* ---- Cards V3 ---- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: transform var(--dur-normal) var(--ease-spring),
              box-shadow var(--dur-normal) var(--ease-out),
              border-color var(--dur-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-layered);
  border-color: var(--color-border-strong);
}
.card-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-md);
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.card-body {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}
.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.card-accent-amber { background: var(--gradient-accent); }
.card-accent-blue { background: var(--color-blue); }
.card-accent-green { background: var(--color-green); }
.card-accent-purple { background: var(--color-purple); }
.card-accent-coral { background: var(--color-coral); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--dur-normal) var(--ease-spring);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--dur-fast);
  background: rgba(255,255,255,0.08);
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: var(--shadow-sm), 0 2px 16px rgba(232, 162, 48, 0.25);
}
.btn-primary:hover {
  box-shadow: var(--shadow-md), 0 4px 24px rgba(232, 162, 48, 0.35);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}
.btn-ghost {
  color: var(--color-text-secondary);
  padding: 0.5rem 1rem;
}
.btn-ghost:hover {
  color: var(--color-accent);
  background: var(--color-accent-light);
}
.btn .btn-arrow {
  transition: transform var(--dur-normal) var(--ease-spring);
}
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---- Tags ---- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.tag:hover { transform: scale(1.05); }
.tag-amber { background: var(--color-accent-light); color: var(--color-accent); }
.tag-coral { background: var(--color-coral-light); color: var(--color-coral); }
.tag-blue { background: var(--color-blue-light); color: var(--color-blue); }
.tag-green { background: var(--color-green-light); color: var(--color-green); }
.tag-purple { background: var(--color-purple-light); color: var(--color-purple); }

/* Status dots */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: var(--space-xs);
}
.status-dot-active {
  background: var(--color-green);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.4);
  animation: pulse-dot 2s ease-in-out infinite;
}
.status-dot-building {
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}
.status-dot-shipped { background: var(--color-blue); }

/* ---- Stream V3: Card-based ---- */
.stream-grid {
  display: grid;
  gap: var(--space-lg);
}
.stream-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-normal) var(--ease-spring),
              box-shadow var(--dur-normal) var(--ease-out),
              border-color var(--dur-normal);
}
.stream-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-layered);
  border-color: var(--color-border-strong);
}
.stream-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}
.stream-card[data-tag="meta"] .stream-card-accent { background: var(--color-accent); }
.stream-card[data-tag="work"] .stream-card-accent { background: var(--color-blue); }
.stream-card[data-tag="life"] .stream-card-accent { background: var(--color-purple); }
.stream-card[data-tag="tech"] .stream-card-accent { background: var(--color-coral); }
.stream-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}
.stream-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
}
.stream-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.stream-body {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 680px;
}
/* Short-form */
.stream-card-short {
  border: none;
  background: var(--gradient-warm);
}
.stream-card-short:hover { box-shadow: var(--shadow-lg); }
.stream-card-short .stream-body {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-text);
  font-variation-settings: 'SOFT' 50, 'WONK' 1;
  max-width: none;
}
/* Two-column stream layout for wider entries */
.stream-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
@media (max-width: 768px) {
  .stream-featured { grid-template-columns: 1fr; }
}

/* ---- Resume / Timeline V3 ---- */
.timeline {
  position: relative;
  padding-left: var(--space-2xl);
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-accent), var(--color-border) 90%);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--space-3xl);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-2xl) + 4px);
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-accent);
  z-index: 1;
  transition: transform var(--dur-normal) var(--ease-spring), border-color var(--dur-normal);
}
.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  border-color: var(--color-coral);
}
.timeline-dot-current {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 16px var(--color-accent-glow);
}
.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-xs);
}
.timeline-role {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-2xs);
}
.timeline-org {
  font-size: 1rem;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  font-weight: 500;
}
.timeline-details {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}
.timeline-details li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
}
.timeline-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}
.timeline-moment {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-text);
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--gradient-warm);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
  font-variation-settings: 'SOFT' 50, 'WONK' 1;
}

/* Skills */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.skill-tag {
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--dur-normal) var(--ease-spring);
  cursor: default;
}
.skill-tag:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---- Lab Projects V3 ---- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}
.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  transition: transform var(--dur-normal) var(--ease-spring),
              box-shadow var(--dur-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-layered);
}
/* Featured project (first one) spans full width */
.project-card-featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}
.project-card-featured .project-card-visual {
  background: linear-gradient(135deg, #E8A230, #D4751C);
  border-radius: var(--radius-xl);
  height: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.project-card-featured .project-card-visual-text {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(10, 10, 20, 0.15);
  letter-spacing: -0.04em;
}
.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}
.project-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.project-card-description {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}
.project-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}
@media (max-width: 768px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card-featured { grid-column: span 1; grid-template-columns: 1fr; }
}

/* ---- About Sections V3 ---- */
.about-section {
  padding: var(--space-3xl) 0;
}
.about-section + .about-section {
  border-top: 1px solid var(--color-border);
}
.about-content {
  max-width: 680px;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text-secondary);
}
.about-content p + p { margin-top: var(--space-lg); }
.about-pullquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.3;
  color: var(--color-text);
  padding: var(--space-2xl) 0;
  max-width: 640px;
  font-variation-settings: 'SOFT' 50, 'WONK' 1;
}
.about-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.about-fact {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-normal), transform var(--dur-normal) var(--ease-spring), box-shadow var(--dur-normal);
}
.about-fact:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.about-fact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-xs);
}
.about-fact-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

/* ---- Footer V3 ---- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-2xl);
}
.footer-brand { max-width: 320px; }
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}
.footer-tagline {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.footer-links {
  display: flex;
  gap: var(--space-3xl);
}
.footer-col h5 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-md);
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  padding: var(--space-xs) 0;
  transition: color var(--dur-fast), padding-left var(--dur-normal) var(--ease-spring);
}
.footer-col a:hover {
  color: var(--color-accent);
  padding-left: var(--space-sm);
}
.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer-bottom-text {
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
}
.footer-social {
  display: flex;
  gap: var(--space-sm);
}
.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-tertiary);
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-normal) var(--ease-spring);
}
.footer-social a:hover {
  color: var(--color-accent);
  background: var(--color-accent-light);
  transform: translateY(-2px);
}
@media (max-width: 768px) {
  .footer-inner { flex-direction: column; }
  .footer-links { flex-direction: column; gap: var(--space-xl); }
}

/* ---- AI Badge ---- */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 1rem;
  background: var(--color-accent-light);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  transform: rotate(1deg);
  transition: all var(--dur-normal) var(--ease-spring);
}
.ai-badge:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 0 20px var(--color-accent-glow);
}
.ai-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Divider */
.divider-label {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin: var(--space-3xl) 0 var(--space-2xl);
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Link underline */
.link-underline {
  position: relative;
  color: var(--color-accent);
  font-weight: 500;
}
.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
  transition: width var(--dur-normal) var(--ease-spring);
}
.link-underline:hover::after { width: 100%; }

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(-50%); }
  50% { transform: translateY(-8px) translateX(-50%); }
}
@keyframes float-orb {
  0%, 100% { transform: scale(1) translate(0, 0); }
  33% { transform: scale(1.05) translate(15px, -10px); }
  66% { transform: scale(0.95) translate(-10px, 10px); }
}
@keyframes float-shape {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

/* Scroll-triggered with stagger support */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--dur-slower) var(--ease-out), transform var(--dur-slower) var(--ease-out);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children */
.stagger-children > .animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.stagger-children > .animate-on-scroll:nth-child(2) { transition-delay: 80ms; }
.stagger-children > .animate-on-scroll:nth-child(3) { transition-delay: 160ms; }
.stagger-children > .animate-on-scroll:nth-child(4) { transition-delay: 240ms; }
.stagger-children > .animate-on-scroll:nth-child(5) { transition-delay: 320ms; }
.stagger-children > .animate-on-scroll:nth-child(6) { transition-delay: 400ms; }
.stagger-children > .animate-on-scroll:nth-child(7) { transition-delay: 480ms; }

/* Page entrance */
.page-enter .hero-content { animation: fadeInUp 1s var(--ease-out) 0.15s both; }
.page-enter .hero-cards { animation: fadeInUp 1s var(--ease-out) 0.3s both; }
.page-enter .hero-scroll-hint { animation: fadeIn 1s var(--ease-out) 1s both; }
.page-enter .page-header h1 { animation: fadeInUp 0.8s var(--ease-out) 0.1s both; }
.page-enter .page-header-description { animation: fadeInUp 0.8s var(--ease-out) 0.25s both; }
.page-enter .nav { animation: fadeInDown 0.6s var(--ease-out) 0s both; }

/* Page exit */
.page-exit {
  opacity: 0;
  transform: translateY(-8px);
  transition: all var(--dur-normal) var(--ease-out);
}

/* ---- Utilities ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.text-balance { text-wrap: balance; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-spatial {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: var(--space-2xl) 0;
    gap: var(--space-2xl);
  }
  .hero-cards {
    height: 320px;
  }
  .hero-card-1 { width: 90%; }
  .hero-card-2 { width: 80%; }
  .hero-card-3 { display: none; }
  .hero-scroll-hint { display: none; }
  .page-header { padding: var(--space-2xl) 0 var(--space-xl); }
  .section { padding: var(--space-2xl) 0; }
}

@media (max-width: 480px) {
  .hero-cards { height: 280px; }
  .hero-card-1 { width: 95%; right: 0; }
  .hero-card-2 { width: 85%; left: 0; }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-on-scroll { opacity: 1; transform: none; }
  body::after { display: none; }
  .hero-orb { animation: none; }
}
