/* ============================================================
   DAVID IRIONDO — PORTFOLIO DESIGN SYSTEM
   Dark mode premium · Editorial · Product Design
   ============================================================ */

/* --- DESIGN TOKENS --- */
:root {
  /* Backgrounds */
  --bg-primary: #09090b;
  --bg-secondary: #0f0f12;
  --bg-tertiary: #141418;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.055);
  --bg-card-solid: #18181b;
  --bg-elevated: rgba(255, 255, 255, 0.06);

  /* Text */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-inverse: #09090b;

  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.2);

  /* Accent */
  --accent: #a78bfa;
  --accent-dim: rgba(167, 139, 250, 0.15);
  --accent-secondary: #818cf8;
  --accent-secondary-dim: rgba(129, 140, 248, 0.15);

  /* Semantic */
  --success: #34d399;
  --success-dim: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-dim: rgba(251, 191, 36, 0.12);

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #a78bfa, #818cf8);
  --gradient-subtle: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(129, 140, 248, 0.08));
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  --gradient-hero-glow: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(167, 139, 250, 0.12), transparent);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 880px;
  --max-width-text: 720px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(167, 139, 250, 0.1);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

/* --- LIGHT MODE TOKENS --- */
[data-theme="light"] {
  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8fa;
  --bg-tertiary: #f1f1f4;
  --bg-card: rgba(0, 0, 0, 0.02);
  --bg-card-hover: rgba(0, 0, 0, 0.04);
  --bg-card-solid: #f4f4f5;
  --bg-elevated: rgba(0, 0, 0, 0.04);

  /* Text */
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-tertiary: #a1a1aa;
  --text-inverse: #fafafa;

  /* Borders */
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --border-strong: rgba(0, 0, 0, 0.2);

  /* Accent — slightly deeper for light bg contrast */
  --accent: #7c3aed;
  --accent-dim: rgba(124, 58, 237, 0.10);
  --accent-secondary: #6366f1;
  --accent-secondary-dim: rgba(99, 102, 241, 0.10);

  /* Semantic */
  --success: #059669;
  --success-dim: rgba(5, 150, 105, 0.10);
  --warning: #d97706;
  --warning-dim: rgba(217, 119, 6, 0.10);

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #7c3aed, #6366f1);
  --gradient-subtle: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(99, 102, 241, 0.05));
  --gradient-card: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.005) 100%);
  --gradient-hero-glow: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(124, 58, 237, 0.08), transparent);

  /* Shadows — lighter */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.10);
  --shadow-glow: 0 0 60px rgba(124, 58, 237, 0.06);
}

/* --- THEME SWITCH TOGGLE --- */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 56px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: background var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle__thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transform: translateX(26px);
  transition: transform 250ms var(--ease-out),
              background 250ms var(--ease-out),
              border-color 250ms var(--ease-out),
              box-shadow 250ms var(--ease-out);
  flex-shrink: 0;
}

.theme-toggle__sun,
.theme-toggle__moon {
  position: absolute;
  width: 13px;
  height: 13px;
  transition: opacity 200ms var(--ease-out),
              transform 200ms var(--ease-out);
}

/* Dark mode (default): thumb on the right, Moon visible */
.theme-toggle__moon {
  color: var(--text-primary);
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle__sun {
  color: var(--text-secondary);
  opacity: 0;
  transform: scale(0.6) rotate(-20deg);
  pointer-events: none;
}

/* Light mode: thumb on the left, Sun visible */
[data-theme="light"] .theme-toggle {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--border);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.07);
  border-color: var(--border-hover);
}

[data-theme="light"] .theme-toggle__thumb {
  transform: translateX(0);
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .theme-toggle__sun {
  color: var(--text-primary);
  opacity: 1;
  transform: scale(1) rotate(0deg);
  pointer-events: auto;
}

[data-theme="light"] .theme-toggle__moon {
  opacity: 0;
  transform: scale(0.6) rotate(20deg);
  pointer-events: none;
}

/* Light mode overrides for hardcoded colors */
[data-theme="light"] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .hero__glow--1 {
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.06), rgba(99, 102, 241, 0.03), transparent 70%);
}

[data-theme="light"] .hero__glow--2 {
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.05), rgba(124, 58, 237, 0.02), transparent 70%);
}

[data-theme="light"] .scene-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 0 0 0 rgba(124, 58, 237, 0);
}

[data-theme="light"] .scene-card:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10), 0 0 30px rgba(124, 58, 237, 0.06);
}

[data-theme="light"] .postit--yellow { background: rgba(251, 191, 36, 0.90); }
[data-theme="light"] .postit--pink { background: rgba(244, 114, 182, 0.85); }
[data-theme="light"] .postit--blue { background: rgba(96, 165, 250, 0.85); }
[data-theme="light"] .postit--green { background: rgba(52, 211, 153, 0.85); }

[data-theme="light"] .wireframe-mini {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .wireframe-dot { background: rgba(0, 0, 0, 0.12); }
[data-theme="light"] .wireframe-bar { background: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .wireframe-bubble { background: rgba(0, 0, 0, 0.05); }
[data-theme="light"] .wireframe-bubble--out { background: rgba(124, 58, 237, 0.12); }
[data-theme="light"] .wireframe-send { background: rgba(124, 58, 237, 0.25); }
[data-theme="light"] .wireframe-header { border-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .wireframe-input { border-color: rgba(0, 0, 0, 0.06); }

[data-theme="light"] .metric-bar { background: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .metric-bar__fill { background: linear-gradient(90deg, rgba(124, 58, 237, 0.6), rgba(124, 58, 237, 0.3)); }
[data-theme="light"] .metric-bar__fill--accent { background: linear-gradient(90deg, rgba(99, 102, 241, 0.7), rgba(99, 102, 241, 0.3)); }
[data-theme="light"] .metric-bar__fill--secondary { background: linear-gradient(90deg, rgba(99, 102, 241, 0.5), rgba(99, 102, 241, 0.2)); }

[data-theme="light"] .funnel-bar { background: linear-gradient(90deg, rgba(124, 58, 237, 0.4), rgba(124, 58, 237, 0.15)); }
[data-theme="light"] .funnel-bar--mid { background: linear-gradient(90deg, rgba(99, 102, 241, 0.4), rgba(99, 102, 241, 0.15)); }
[data-theme="light"] .funnel-bar--narrow { background: linear-gradient(90deg, rgba(5, 150, 105, 0.5), rgba(5, 150, 105, 0.2)); }

[data-theme="light"] .map-mini { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .map-line { background: rgba(0, 0, 0, 0.05); }
[data-theme="light"] .map-route { background: linear-gradient(90deg, #059669, #7c3aed); }

[data-theme="light"] .ds-input-mini { border-color: rgba(0, 0, 0, 0.10); background: rgba(0, 0, 0, 0.02); }
[data-theme="light"] .ds-spacing-bar { background: rgba(124, 58, 237, 0.15); }
[data-theme="light"] .ds-btn-mini { background: var(--accent); color: #fff; }

[data-theme="light"] .hero__connections path { stroke: rgba(124, 58, 237, 0.10); }

[data-theme="light"] ::selection {
  background: rgba(124, 58, 237, 0.2);
}

/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color var(--duration-normal) ease, color var(--duration-normal) ease;
  color-scheme: dark;
}

[data-theme="light"] body {
  color-scheme: light;
}

::selection {
  background: rgba(167, 139, 250, 0.3);
  color: var(--text-primary);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h3 {
  font-size: clamp(22px, 2.5vw, 32px);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h4 {
  font-size: clamp(18px, 1.5vw, 22px);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

p {
  margin-bottom: 1em;
}

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-lg {
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.6;
}

.text-xl {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.5;
}

.text-sm {
  font-size: 14px;
  line-height: 1.6;
}

.text-muted {
  color: var(--text-tertiary);
}

.lead {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: var(--max-width-narrow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* --- LAYOUT --- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.wrap--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section--border {
  border-bottom: 1px solid var(--border);
}

.section--alt {
  background: var(--bg-secondary);
}

.section__header {
  margin-bottom: var(--space-3xl);
}

.section__header .eyebrow {
  margin-bottom: var(--space-md);
}

.section__header h2 {
  margin-bottom: var(--space-lg);
}

.section__header .lead {
  margin-top: var(--space-md);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Flex */
.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { align-items: center; justify-content: space-between; }
.flex--wrap { flex-wrap: wrap; }
.flex--col { flex-direction: column; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: all var(--duration-normal) var(--ease-out);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.navbar__logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  transition: opacity var(--duration-fast);
}

.navbar__logo:hover {
  opacity: 0.8;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: color var(--duration-fast);
  position: relative;
}

.navbar__link:hover,
.navbar__link.active {
  color: var(--text-primary);
}

.navbar__link--cta {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all var(--duration-fast);
}

.navbar__link--cta:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* Mobile Nav Toggle */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar__toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-out);
}

.navbar__toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.navbar__toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-5xl) 0 var(--space-4xl);
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

/* Subtle Glow Backgrounds */
.hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
}

.hero__glow--1 {
  width: 500px;
  height: 350px;
  top: -80px;
  right: 5%;
  background: radial-gradient(ellipse, rgba(167, 139, 250, 0.04), transparent 70%);
  opacity: 0.5;
}

.hero__glow--2 {
  width: 350px;
  height: 250px;
  top: 45%;
  right: 20%;
  background: radial-gradient(ellipse, rgba(129, 140, 248, 0.03), transparent 70%);
  opacity: 0.4;
}

/* Hero Inner — Split Layout */
.hero__inner {
  display: grid;
  grid-template-columns: 45% 55%;
  align-items: center;
  gap: var(--space-3xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Hero Text (left) */
.hero__text {
  position: relative;
  z-index: 2;
}

.hero__text h1 {
  margin-bottom: var(--space-xl);
  max-width: 560px;
  line-height: 1.08;
}

.hero__text .lead {
  margin-bottom: var(--space-2xl);
  max-width: 480px;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.hero__tags .tag {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: none;
}

.hero__tags .tag:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ============================================================
   HERO SCENE — Interactive Visual (right side)
   ============================================================ */
.hero__scene {
  position: relative;
  width: 100%;
  height: 580px;
  perspective: 1200px;
}

/* Particle Canvas */
.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* SVG Connection Lines */
.hero__connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero__connections path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

[data-theme="light"] .hero__connections path {
  stroke: rgba(0, 0, 0, 0.06);
}

/* ============================================================
   SCENE CARDS — Refined Process Artifacts
   ============================================================ */
.scene-card {
  position: absolute;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  z-index: 2;
  will-change: transform;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .scene-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.scene-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .scene-card:hover {
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Card Label (phase) */
.scene-card__label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.scene-card__label::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: label-pulse 2s ease-in-out infinite;
}

@keyframes label-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Card Project Tag */
.scene-card__project {
  margin-top: 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  text-align: right;
  opacity: 0.6;
}

/* Card Positions — organic layout */
.scene-card--1 {
  top: 4%;
  left: 2%;
  width: 210px;
  animation: card-float-1 5s ease-in-out infinite;
}

.scene-card--2 {
  top: 2%;
  right: 4%;
  width: 190px;
  animation: card-float-2 4.5s ease-in-out infinite 0.5s;
}

.scene-card--3 {
  top: 38%;
  left: 12%;
  width: 170px;
  animation: card-float-3 5.5s ease-in-out infinite 1s;
}

.scene-card--4 {
  top: 42%;
  right: 0%;
  width: 195px;
  animation: card-float-4 4.8s ease-in-out infinite 0.3s;
}

.scene-card--5 {
  bottom: 6%;
  left: 0%;
  width: 185px;
  animation: card-float-5 5.2s ease-in-out infinite 0.8s;
}

.scene-card--6 {
  bottom: 4%;
  right: 8%;
  width: 175px;
  animation: card-float-6 4.6s ease-in-out infinite 1.2s;
}

/* Float Animations — each unique */
@keyframes card-float-1 {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  33% { transform: translate3d(4px, -8px, 0) rotate(0.3deg); }
  66% { transform: translate3d(-3px, -4px, 0) rotate(-0.2deg); }
}

@keyframes card-float-2 {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(-5px, -10px, 0) rotate(-0.4deg); }
}

@keyframes card-float-3 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  40% { transform: translate3d(6px, -6px, 0); }
  70% { transform: translate3d(-2px, -9px, 0); }
}

@keyframes card-float-4 {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(-4px, -7px, 0) rotate(0.5deg); }
}

@keyframes card-float-5 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  35% { transform: translate3d(5px, -5px, 0); }
  65% { transform: translate3d(-3px, -8px, 0); }
}

@keyframes card-float-6 {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(3px, -9px, 0) rotate(-0.3deg); }
}

/* ============================================================
   CARD CONTENTS — Visual elements for each card
   ============================================================ */

/* --- Post-it Grid (Research / ELCA) --- */
.postit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.postit {
  padding: 6px 7px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 500;
  line-height: 1.3;
  color: #1a1a2e;
  position: relative;
}

.postit--yellow { background: rgba(251, 191, 36, 0.85); }
.postit--pink { background: rgba(244, 114, 182, 0.80); }
.postit--blue { background: rgba(96, 165, 250, 0.80); }
.postit--green { background: rgba(52, 211, 153, 0.80); }

/* --- Metric Bars (Insights / HOEM) --- */
.metrics-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.metric-bar {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.metric-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.7), rgba(167, 139, 250, 0.4));
  transition: width 1.5s ease-out;
}

.metric-bar__fill--accent {
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.8), rgba(129, 140, 248, 0.4));
}

.metric-bar__fill--secondary {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.7), rgba(99, 102, 241, 0.3));
}

.metric-bar__label {
  position: absolute;
  right: 0;
  top: -14px;
  font-size: 8px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.metric-highlight {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-highlight__value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.metric-highlight__desc {
  font-size: 9px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* --- Wireframe (Ideation / WhatsApp) --- */
.wireframe-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px;
}

.wireframe-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wireframe-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.wireframe-dot--sm {
  width: 6px;
  height: 6px;
  margin-left: auto;
}

.wireframe-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.10);
}

.wireframe-bar--short { width: 50px; }
.wireframe-bar--long { flex: 1; }

.wireframe-chat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
}

.wireframe-bubble {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.wireframe-bubble--in {
  width: 70%;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.wireframe-bubble--out {
  width: 55%;
  align-self: flex-end;
  background: rgba(167, 139, 250, 0.15);
  border-bottom-right-radius: 2px;
}

.wireframe-bubble--short {
  width: 45%;
}

.wireframe-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wireframe-send {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.3);
  flex-shrink: 0;
}

/* --- Design System (Prototyping / Liffey) --- */
.ds-mini {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ds-tokens {
  display: flex;
  gap: 4px;
}

.ds-token {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--token-color);
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.scene-card:hover .ds-token {
  opacity: 1;
}

.ds-component {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ds-btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  font-size: 8px;
  font-weight: 600;
  color: var(--bg-primary);
  background: var(--accent);
  border-radius: 4px;
  letter-spacing: 0.02em;
  width: fit-content;
}

.ds-input-mini {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 4px;
  font-size: 8px;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.02);
}

.ds-spacing {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ds-spacing-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(167, 139, 250, 0.2);
}

/* --- Conversion Funnel (Validation / HOEM) --- */
.funnel-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.funnel-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.funnel-step span {
  font-size: 8px;
  color: var(--text-tertiary);
  white-space: nowrap;
  font-weight: 500;
}

.funnel-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.5), rgba(167, 139, 250, 0.25));
  transition: width 1.2s ease-out;
}

.funnel-bar--mid {
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.5), rgba(129, 140, 248, 0.25));
}

.funnel-bar--narrow {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.6), rgba(52, 211, 153, 0.3));
}

.scene-card__check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 600;
  color: var(--success);
  opacity: 0.85;
}

/* --- Map (Product / VANAVAN) --- */
.map-mini {
  position: relative;
  width: 100%;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.map-grid {
  position: absolute;
  inset: 0;
}

.map-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.04);
}

.map-line--h {
  left: 0;
  right: 0;
  height: 1px;
}

.map-line--v {
  top: 0;
  bottom: 0;
  width: 1px;
}

.map-route {
  position: absolute;
  top: 60%;
  left: 15%;
  width: 65%;
  height: 2px;
  background: linear-gradient(90deg, #34d399, var(--accent));
  border-radius: 1px;
  opacity: 0.6;
  transform: rotate(-12deg);
}

.map-route::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -5%;
  width: 110%;
  height: 18px;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.08), rgba(167, 139, 250, 0.08));
  border-radius: 10px;
  filter: blur(4px);
}

.map-pin {
  position: absolute;
  z-index: 1;
}

.map-pin--start {
  top: 55%;
  left: 12%;
}

.map-pin--end {
  top: 28%;
  right: 15%;
  animation: pin-bounce 2s ease-in-out infinite;
}

@keyframes pin-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--text-primary);
  color: var(--text-inverse);
}

.btn--primary:hover {
  background: #e4e4e7;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn--secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-tertiary);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 12px 16px;
}

.btn--ghost:hover {
  color: var(--text-primary);
}

.btn__icon {
  width: 16px;
  height: 16px;
}

.btn__arrow {
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* --- TAG / PILL --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all var(--duration-fast);
}

.tag:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.tag--accent {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-dim);
}

/* --- CARDS --- */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.card--lg {
  padding: var(--space-2xl);
}

.card--interactive {
  cursor: pointer;
}

.card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.card__tag {
  margin-bottom: var(--space-md);
}

.card h4 {
  margin-bottom: var(--space-sm);
}

.card p:last-child {
  margin-bottom: 0;
}

/* Project Card (Home) */
.project-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--border-hover);
}

.project-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-tertiary);
  position: relative;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.project-card:hover .project-card__image img {
  transform: scale(1.04);
}

.project-card__content {
  padding: var(--space-xl) var(--space-xl) var(--space-2xl);
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.project-card__title {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.025em;
}

.project-card__desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--duration-fast) var(--ease-out);
}

.project-card:hover .project-card__link {
  gap: 10px;
}

/* --- EDITORIAL PROJECT SHOWCASE (HOME) --- */
.projects-editorial {
  display: flex;
  flex-direction: column;
  gap: var(--space-4xl);
}

.projects-row {
  display: grid;
  gap: var(--space-3xl);
  align-items: start;
}

/* BLOCK 1: HOEM (58-60%) + WHATSAPP (40-42%) */
.projects-row--block-1 {
  grid-template-columns: 1.4fr 1fr;
}

/* BLOCK 2: SACYL (50%) + LIFFEY (50%) */
.projects-row--block-2 {
  grid-template-columns: 1fr 1fr;
}

/* BLOCK 3: ELCA (50%) + VANAVAN (50%) */
.projects-row--block-3 {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
}

/* Project Item (Editorial - No Cards) */
.project-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.project-item__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-tertiary);
  margin-bottom: var(--space-lg);
  position: relative;
}

.project-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--duration-slow) var(--ease-out);
}

#project-hoem .project-item__image img {
  object-position: left center;
}

#project-whatsapp .project-item__image img {
  object-position: left center;
}

#project-sacyl .project-item__image img {
  object-position: 35% center;
}

#project-liffey .project-item__image img {
  object-position: center;
}

#project-elca .project-item__image img {
  object-position: center;
}

#project-vanavan .project-item__image img {
  object-position: center;
}

.project-item:hover .project-item__image img {
  transform: scale(1.025);
}

.landing-expand-btn:hover {
  background: var(--bg-primary) !important;
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

/* HOEM MVP evidence container max-width */
.hoem-mvp-container {
  max-width: 90%;
  margin: 0 auto;
}

@media (max-width: 991px) {
  .hoem-mvp-container {
    max-width: 95%;
  }
}

@media (max-width: 768px) {
  .hoem-mvp-container {
    max-width: 100%;
  }
}

.project-item__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.project-item__num {
  color: var(--accent);
  font-family: var(--font-mono, monospace);
}

.project-item__sep {
  color: var(--text-tertiary);
}

.project-item__tags {
  color: var(--text-tertiary);
}

.project-item__tags--accent {
  color: var(--accent);
}

.project-item__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
  line-height: 1.25;
  transition: color var(--duration-fast) var(--ease-out);
}

.project-item:hover .project-item__title {
  color: var(--accent);
}

.project-item__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.project-item__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: auto;
  transition: gap var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.project-item:hover .project-item__link {
  gap: 10px;
  color: var(--accent);
}

/* Hierarchy Variations */
.project-item--main .project-item__image {
  aspect-ratio: 16 / 9.5;
}

.project-item--main .project-item__title {
  font-size: clamp(26px, 2.4vw, 32px);
}

.project-item--featured .project-item__title {
  font-size: clamp(22px, 2vw, 26px);
}

.project-item--secondary .project-item__image {
  aspect-ratio: 16 / 9;
}

.project-item--secondary .project-item__title {
  font-size: 20px;
}

.project-item--secondary .project-item__desc {
  font-size: 14px;
}

/* HOEM Metrics */
.hoem-metrics {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-xs);
  margin-bottom: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.hoem-metric {
  display: flex;
  flex-direction: column;
}

.hoem-metric__value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hoem-metric__label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* UX Exploration (Scam Alert) */
.projects-exploration {
  margin-top: clamp(120px, 12vw, 150px);
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--border);
}

.project-item--exploration {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-2xl);
  align-items: center;
  max-width: 880px;
}

.project-item--exploration .project-item__image {
  margin-bottom: 0;
  aspect-ratio: 16 / 9;
}

/* Responsive Editorial Showcase */
@media (max-width: 991px) {
  .projects-row--block-1,
  .projects-row--block-2,
  .projects-row--block-3 {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .project-item--exploration {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 768px) {
  .projects-editorial {
    gap: var(--space-3xl);
  }

  .projects-row--block-1,
  .projects-row--block-2,
  .projects-row--block-3 {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
  }

  .project-item--main .project-item__title,
  .project-item--featured .project-item__title,
  .project-item__title {
    font-size: 22px;
  }

  .project-item--exploration {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .project-item--exploration .project-item__image {
    margin-bottom: var(--space-md);
  }
}

/* --- QUOTE BLOCK --- */
.quote {
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  background: var(--gradient-subtle);
  border: 1px solid var(--border);
  position: relative;
}

.quote::before {
  content: '';
  position: absolute;
  left: 0;
  top: var(--space-lg);
  bottom: var(--space-lg);
  width: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

/* --- METRIC CARD --- */
.metric {
  text-align: center;
  padding: var(--space-xl);
}

.metric__value {
  display: block;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.metric__value--gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric__label {
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* --- CALLOUT --- */
.callout {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
}

.callout--success {
  border-color: var(--success-dim);
  background: var(--success-dim);
}

.callout--warning {
  border-color: var(--warning-dim);
  background: var(--warning-dim);
}

.callout strong {
  color: var(--text-primary);
}

/* --- TIMELINE / PROCESS --- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.timeline__step {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-xl);
  padding: var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  transition: border-color var(--duration-fast);
}

.timeline__step:hover {
  border-color: var(--border-hover);
}

.timeline__phase {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 2px;
}

.timeline__content h4 {
  margin-bottom: var(--space-xs);
}

.timeline__content p {
  margin-bottom: 0;
  font-size: 15px;
}

/* --- TABLE --- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: none;
}

td {
  color: var(--text-secondary);
}

/* --- APPROACH / FEATURE CARDS --- */
.approach {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.approach__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 22px;
}

.approach h4 {
  margin-bottom: var(--space-sm);
}

.approach p {
  font-size: 15px;
  margin-bottom: 0;
}

/* --- PROCESS MAP (EDITORIAL DESIGN METHODOLOGY) --- */
.process-map {
  position: relative;
  margin-top: var(--space-3xl);
}

.process-map__track {
  position: absolute;
  top: 27px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-strong);
  z-index: 1;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  position: relative;
  z-index: 2;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.process-step__node {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
  position: relative;
}

.process-step__number {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.process-step__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 0 3px var(--bg-primary);
  display: block;
  z-index: 2;
  position: relative;
}

.process-step__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
}

.process-step__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 768px) {
  .process-map {
    margin-top: var(--space-2xl);
    padding-left: var(--space-xl);
  }

  .process-map__track {
    top: 6px;
    bottom: 24px;
    left: 3px;
    width: 1px;
    height: auto;
    right: auto;
  }

  .process-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
  }

  .process-step {
    position: relative;
  }

  .process-step__node {
    margin-bottom: var(--space-xs);
  }

  .process-step__dot {
    position: absolute;
    left: calc(-1 * var(--space-xl) + 0px);
    top: 5px;
  }

  .process-step__title {
    font-size: 18px;
  }
}

/* --- ABOUT --- */
.about__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.about__narrative h3 {
  margin-bottom: var(--space-lg);
}

.about__narrative p {
  font-size: 16px;
  line-height: 1.75;
}

.experience-item {
  padding: var(--space-lg);
  border-left: 2px solid var(--border);
  margin-bottom: var(--space-lg);
  transition: border-color var(--duration-fast);
}

.experience-item:hover {
  border-color: var(--accent);
}

.experience-item h4 {
  margin-bottom: var(--space-xs);
}

.experience-item p {
  font-size: 15px;
  margin-bottom: 0;
}

.skills__categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.skill-category {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.skill-category h4 {
  margin-bottom: var(--space-md);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.skill-category p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* --- AI WORKFLOW SECTION --- */
.ai-workflow__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4xl);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-3xl);
  position: relative;
  align-items: start;
}

.ai-workflow__col {
  display: flex;
  flex-direction: column;
}

.ai-workflow__col:first-child {
  padding-right: var(--space-3xl);
  border-right: 1px solid var(--border);
}

.ai-workflow__col:last-child {
  padding-left: var(--space-3xl);
}

.ai-workflow__logo-wrap {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: var(--space-md);
}

.ai-workflow__logo {
  height: 40px;
  max-height: 44px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* ChatGPT Logo: Dark mode by default, Light mode override */
.ai-workflow__logo--light {
  display: none;
}

.ai-workflow__logo--dark {
  display: block;
}

[data-theme="light"] .ai-workflow__logo--light {
  display: block;
}

[data-theme="light"] .ai-workflow__logo--dark {
  display: none;
}

.ai-workflow__title {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ai-workflow__subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.ai-workflow__text p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 0;
}

.ai-workflow__closing {
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--border);
}

.ai-workflow__closing p {
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  letter-spacing: -0.02em;
  max-width: var(--max-width);
  margin-bottom: 0;
}

/* --- FOOTER / CONTACT --- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-4xl) 0 var(--space-2xl);
}

.footer__cta {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.footer__cta h2 {
  margin-bottom: var(--space-md);
}

.footer__cta .lead {
  max-width: 640px;
  margin: 0 auto var(--space-xl);
}

.footer__cta-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.footer__claim {
  font-size: 14px;
  color: var(--text-tertiary);
  max-width: 500px;
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
}

.footer__link {
  font-size: 14px;
  color: var(--text-tertiary);
  transition: color var(--duration-fast);
}

.footer__link:hover {
  color: var(--text-primary);
}

/* --- CASE STUDY PAGE --- */
.cs-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: var(--space-5xl) 0 var(--space-4xl);
  position: relative;
  overflow: hidden;
}

.cs-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 30%;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(167, 139, 250, 0.1), transparent 60%);
  pointer-events: none;
}

.cs-hero__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: var(--space-2xl);
  transition: color var(--duration-fast);
}

.cs-hero__back:hover {
  color: var(--text-primary);
}

.cs-hero__back svg {
  transition: transform var(--duration-fast) var(--ease-out);
}

.cs-hero__back:hover svg {
  transform: translateX(-3px);
}

.cs-hero h1 {
  margin-bottom: var(--space-xl);
  max-width: 900px;
}

.cs-hero .lead {
  margin-bottom: var(--space-2xl);
}

.cs-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Case Study Sections */
.cs-section {
  padding: var(--space-4xl) 0;
  border-top: 1px solid var(--border);
}

.cs-section__header {
  margin-bottom: var(--space-2xl);
}

.cs-section__header .eyebrow {
  margin-bottom: var(--space-sm);
}

.cs-role,
.grid--role {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: var(--space-lg);
}

/* Full-width image placeholder */
.cs-image {
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-image--wide {
  margin-left: calc(-1 * var(--space-lg));
  margin-right: calc(-1 * var(--space-lg));
  width: calc(100% + var(--space-lg) * 2);
  border-radius: 0;
}

/* Case Study Next Project */
.cs-next {
  padding: var(--space-4xl) 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cs-next__label {
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.cs-next__title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.035em;
  transition: color var(--duration-fast);
}

.cs-next__title:hover {
  color: var(--accent);
}

/* --- ANIMATIONS --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 100ms; }
.fade-in-delay-2 { transition-delay: 200ms; }
.fade-in-delay-3 { transition-delay: 300ms; }
.fade-in-delay-4 { transition-delay: 400ms; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .about__content { grid-template-columns: 1fr; }
  .skills__categories { grid-template-columns: repeat(2, 1fr); }

  .hero__inner {
    grid-template-columns: 50% 50%;
    gap: var(--space-xl);
  }

  .hero__scene {
    height: 480px;
  }

  .scene-card--3,
  .scene-card--5 {
    opacity: 0.5;
  }
}

@media (max-width: 768px) {
  :root {
    --space-5xl: 80px;
    --space-4xl: 64px;
    --space-3xl: 48px;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .grid--auto {
    grid-template-columns: 1fr;
  }

  .cs-role,
  .grid--role {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  /* Mobile menu overlay */
  .navbar.menu-open,
  .navbar.menu-open.scrolled {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: transparent !important;
    border-bottom-color: transparent !important;
  }

  .navbar__links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-2xl);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000;
    transition: opacity var(--duration-normal) var(--ease-out),
                visibility var(--duration-normal) var(--ease-out);
  }

  .navbar__links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .navbar__links .navbar__link {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
  }

  .navbar__links .navbar__link:hover,
  .navbar__links .navbar__link:active {
    color: var(--accent);
  }

  .navbar__links .navbar__link--cta {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    color: var(--text-primary);
  }

  .navbar__links .navbar__link--cta:hover,
  .navbar__links .navbar__link--cta:active {
    background: transparent;
    border-color: transparent;
    color: var(--accent);
  }

  .navbar__toggle {
    display: flex;
    position: relative;
    z-index: 1002;
  }

  .theme-toggle {
    position: relative;
    z-index: 1002;
    margin-left: auto;
    margin-right: 12px;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 var(--space-3xl);
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
  }

  .hero__text h1 {
    max-width: 100%;
    margin-bottom: var(--space-md);
  }

  .hero__text .lead {
    max-width: 100%;
    margin-bottom: var(--space-lg);
  }

  .hero__tags {
    justify-content: center;
    margin-bottom: var(--space-xl);
  }

  .hero__ctas {
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: var(--space-sm);
  }

  .hero__ctas .btn {
    justify-content: center;
    width: 100%;
    max-width: 320px;
  }

  .hero__scene {
    display: none !important;
  }

  .timeline__step {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .about__content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .skills__categories {
    grid-template-columns: 1fr;
  }

  .ai-workflow__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
  }

  .ai-workflow__col:first-child {
    padding-right: 0;
    border-right: none;
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--border);
  }

  .ai-workflow__col:last-child {
    padding-left: 0;
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }

  .footer__cta-links {
    flex-direction: column;
    align-items: center;
  }

  .cs-hero {
    min-height: auto;
    padding: 120px 0 var(--space-3xl);
  }

  .cs-image--wide {
    margin-left: calc(-1 * var(--space-lg));
    margin-right: calc(-1 * var(--space-lg));
    width: calc(100% + var(--space-lg) * 2);
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 var(--space-md);
  }

  h1 {
    font-size: clamp(36px, 8vw, 48px);
  }

  .card {
    padding: var(--space-lg);
  }

  .card--lg {
    padding: var(--space-lg);
  }

  .project-card__content {
    padding: var(--space-lg);
  }

  .quote {
    font-size: clamp(18px, 5vw, 28px);
    padding: var(--space-lg);
  }
}

/* --- UTILITY --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-xs { margin-top: var(--space-xs); }
.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-sm { margin-bottom: var(--space-sm); }
.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); }

.text-center { text-align: center; }
