/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Authentic High-Craft Light & Dark Theme Tokens
   Inspired by Apple Human Interface Guidelines & Vercel Editorial Minimalism.
   No artificial grid lines, neon orbs, or fake window chrome. */
:root {
  --amber: #f59e0b;
  --gold: #d97706;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-3d: 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  --display-font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --mono-font: 'SF Mono', ui-monospace, Menlo, Monaco, Consolas, monospace;
  --header-h: 60px;

  color-scheme: light;
  --bg: #fafafa;
  --bg-elevated: #f4f4f5;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-subtle: #f4f4f5;
  --border: rgba(24, 24, 27, 0.08);
  --border-hover: rgba(24, 24, 27, 0.18);
  --border-strong: rgba(24, 24, 27, 0.14);
  --text: #09090b;
  --text-secondary: #3f3f46;
  --text-muted: #71717a;
  --text-subtle: #a1a1aa;
  --accent: #0066cc;
  --accent-hover: #0052a3;
  --accent-soft: rgba(0, 102, 204, 0.08);
  --btn-primary-bg: #18181b;
  --btn-primary-fg: #fafafa;
  --btn-primary-hover: #27272a;
  --green: #15803d;
  --green-dot: #22c55e;
  --green-soft: rgba(22, 163, 74, 0.10);
  --header-bg: rgba(250, 250, 250, 0.84);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.03), 0 4px 16px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.06);
  --shadow-photo: 0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-device: 0 20px 44px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-float: 0 10px 30px rgba(0, 0, 0, 0.16);
  --shadow-float-hover: 0 14px 36px rgba(0, 0, 0, 0.22);
  --device-bezel: #18181b;
  --badge-bg: #18181b;
  --badge-bg-hover: #27272a;
  --badge-border: rgba(255, 255, 255, 0.10);
  --badge-border-hover: rgba(255, 255, 255, 0.24);
  --cta-bg: #18181b;
  --cta-border: rgba(255, 255, 255, 0.12);
  --cta-border-hover: rgba(255, 255, 255, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --gold: #fbbf24;
    --bg: #09090b;
    --bg-elevated: #0f0f12;
    --bg-card: #121215;
    --bg-card-solid: #121215;
    --bg-card-hover: #16161a;
    --bg-subtle: #18181c;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-subtle: #52525b;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --btn-primary-bg: #fafafa;
    --btn-primary-fg: #09090b;
    --btn-primary-hover: #e4e4e7;
    --green: #4ade80;
    --green-dot: #22c55e;
    --green-soft: rgba(34, 197, 94, 0.12);
    --header-bg: rgba(9, 9, 11, 0.82);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.45);
    --shadow-photo: 0 10px 28px rgba(0, 0, 0, 0.5);
    --shadow-device: 0 22px 52px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.6);
    --shadow-float-hover: 0 16px 40px rgba(0, 0, 0, 0.75);
    --device-bezel: #27272a;
    --badge-bg: #18181c;
    --badge-bg-hover: #27272a;
    --badge-border: rgba(255, 255, 255, 0.10);
    --badge-border-hover: rgba(255, 255, 255, 0.22);
    --cta-bg: #18181c;
    --cta-border: rgba(255, 255, 255, 0.14);
    --cta-border-hover: rgba(255, 255, 255, 0.28);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --gold: #fbbf24;
  --bg: #09090b;
  --bg-elevated: #0f0f12;
  --bg-card: #121215;
  --bg-card-solid: #121215;
  --bg-card-hover: #16161a;
  --bg-subtle: #18181c;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-subtle: #52525b;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --btn-primary-bg: #fafafa;
  --btn-primary-fg: #09090b;
  --btn-primary-hover: #e4e4e7;
  --green: #4ade80;
  --green-dot: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.12);
  --header-bg: rgba(9, 9, 11, 0.82);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-photo: 0 10px 28px rgba(0, 0, 0, 0.5);
  --shadow-device: 0 22px 52px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-float-hover: 0 16px 40px rgba(0, 0, 0, 0.75);
  --device-bezel: #27272a;
  --badge-bg: #18181c;
  --badge-bg-hover: #27272a;
  --badge-border: rgba(255, 255, 255, 0.10);
  --badge-border-hover: rgba(255, 255, 255, 0.22);
  --cta-bg: #18181c;
  --cta-border: rgba(255, 255, 255, 0.14);
  --cta-border-hover: rgba(255, 255, 255, 0.28);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

body {
  font-family: var(--body-font);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }

[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

a { color: var(--accent); text-decoration: none; transition: color var(--transition), opacity var(--transition); cursor: pointer; }
a:hover { opacity: 0.88; }

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 840px; }

/* ===== Skip Link ===== */
.skip-link {
  position: absolute; top: -100px; left: 8px;
  background: var(--text); color: var(--bg);
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; z-index: 200;
}
.skip-link:focus { top: 8px; }

/* ===== Header (Minimal Editorial Top Bar) ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-inner {
  display: flex; align-items: center; gap: 12px;
  height: var(--header-h);
}
.header-inner .logo-group {
  display: flex; align-items: center; gap: 10px;
  margin-right: auto; text-decoration: none; color: var(--text);
}
.header-inner .logo { margin-right: auto; }
.header-inner .logo-group .logo { margin-right: 0; }

.logo {
  width: 32px; height: 32px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700; font-size: 14px;
  border-radius: 8px;
  display: grid; place-items: center;
  text-decoration: none;
  font-family: var(--display-font);
  transition: transform var(--transition-3d);
}
.logo:hover, .logo-group:hover .logo {
  transform: perspective(360px) rotateY(-10deg) rotateX(6deg) scale(1.04);
  opacity: 1;
}
.logo-text {
  display: flex; flex-direction: column;
  line-height: 1.2;
}
.logo-name {
  font-size: 14px; font-weight: 600; letter-spacing: -0.015em; color: var(--text);
}
.logo-role {
  font-size: 11px; font-weight: 400; color: var(--text-muted);
}

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 6px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  transition: color var(--transition), background var(--transition);
}
.nav a:hover, .nav a.active {
  color: var(--text); background: var(--bg-subtle); opacity: 1;
}
.nav a.nav-resume {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-subtle);
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  margin-left: 6px;
}
.nav a.nav-resume:hover {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-bg);
}

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 36px; height: 36px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 18px; height: 1.75px; background: var(--text-secondary);
  border-radius: 2px; transition: all var(--transition);
}

.theme-toggle {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.theme-toggle:hover {
  color: var(--text);
  background: var(--bg-subtle);
  border-color: var(--border-hover);
}
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ===== 3D Asset-Only Depth System =====
   Strictly applied to visual assets (app icons, phone screenshots, profile photo).
   All sections and cards stay flat and grounded. */
.asset-3d {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform var(--transition-3d), box-shadow var(--transition-3d);
}

/* ===== Editorial Executive CV Hero ===== */
.hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--border);
}

.hero-editorial {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: start;
}

/* Legacy fallback for any subpage using .hero-layout */
.hero-layout {
  display: grid; grid-template-columns: auto 1fr; gap: 28px;
  align-items: start;
}

.hero-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.hero-photo {
  flex-shrink: 0;
  perspective: 600px;
}
.hero-photo img {
  width: 88px; height: 88px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-photo);
  transition: transform var(--transition-3d), box-shadow var(--transition-3d);
}
.hero-photo:hover img {
  transform: perspective(500px) rotateY(8deg) rotateX(-5deg) translateZ(8px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-dot);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.status-sep { color: var(--text-subtle); }

.hero-title-group h1, .hero-text h1 {
  font-family: var(--display-font);
  font-size: clamp(28px, 2.2vw + 18px, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 4px;
}

.tagline {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}

.intro {
  font-size: 15.5px;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 26px;
  line-height: 1.7;
}
.intro strong { color: var(--text); font-weight: 600; }

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

/* Right Column of Hero: Clean Metrics + App Icon Dock (3D Icons) */
.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 8px;
  box-shadow: var(--shadow-card);
}
.metric-item {
  padding: 0 12px;
  border-right: 1px solid var(--border);
  text-align: left;
}
.metric-item:last-child { border-right: none; }
.metric-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}
.metric-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.app-dock {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.app-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.app-dock-header a {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}
.app-dock-header a:hover { color: var(--text); }

.app-dock-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
  perspective: 800px;
}
.dock-icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  perspective: 500px;
}
.dock-icon-link:hover { opacity: 1; }
.dock-icon-link img {
  width: 48px; height: 48px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  transition: transform var(--transition-3d), box-shadow var(--transition-3d);
  transform-style: preserve-3d;
}
.dock-icon-link:hover img {
  transform: perspective(400px) rotateY(-12deg) rotateX(10deg) translateZ(10px) translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.20);
}
.dock-icon-link span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  transition: all var(--transition);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  font-family: var(--body-font);
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.btn--primary:hover {
  opacity: 1;
  background: var(--btn-primary-hover);
  color: var(--btn-primary-fg);
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.btn--secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-subtle);
  color: var(--text);
  opacity: 1;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-subtle);
  opacity: 1;
}

.btn--sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.btn--lg { padding: 12px 22px; font-size: 14px; border-radius: 10px; }

/* ===== Sections ===== */
.section { padding: 72px 0; position: relative; }

.section--alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section--tight { padding: 32px 0; border-bottom: 1px solid var(--border); }

.section-eyebrow {
  display: block;
  font-family: var(--mono-font);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 6px;
}

.section-title {
  font-family: var(--display-font);
  font-size: clamp(22px, 1.5vw + 15px, 28px);
  font-weight: 700; letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 14px; color: var(--text-muted);
  margin-bottom: 28px;
}

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 32px;
}
.section-head .section-title { margin-bottom: 4px; }
.section-head .section-subtitle { margin-bottom: 0; }

/*Segmented Filter Tabs */
.filter-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 2px;
  padding: 3px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 9px;
}
.filter-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--body-font);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ===== Featured Flagship Product Card (Boop 3.5 + Web Helper) ===== */
.project-featured {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.project-featured:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.project-featured-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 36px;
  align-items: center;
}

.project-featured-top {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
  perspective: 500px;
}
.project-featured-top .project-icon {
  width: 60px; height: 60px; border-radius: 14px;
}

.project-badges-inline {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 4px;
}

.project-featured h3 {
  font-size: 21px; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.2;
}
.project-featured h3 a { color: var(--text); }
.project-featured h3 a:hover { color: var(--accent); opacity: 1; }

.project-featured-desc {
  font-size: 14.5px; color: var(--text-secondary); line-height: 1.65;
  margin-bottom: 18px;
}

.webhelper-callout {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.webhelper-callout-info {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-secondary);
}
.webhelper-callout-info strong { color: var(--text); font-weight: 600; }
.webhelper-badge {
  padding: 2px 7px; border-radius: 5px;
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border-strong);
  font-family: var(--mono-font); font-size: 10px; font-weight: 600;
  text-transform: uppercase;
}

/* 3D Phone Assets inside Flagship Spotlight */
.project-featured-preview {
  display: flex; justify-content: center; align-items: center;
  perspective: 1100px;
}
.preview-phones-3d {
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transform-style: preserve-3d;
}
.preview-phone-shot {
  width: 150px;
  border-radius: 18px;
  border: 3px solid var(--device-bezel);
  box-shadow: var(--shadow-device);
  transition: transform var(--transition-3d), box-shadow var(--transition-3d);
}
.preview-phone-shot--left {
  transform: rotateY(10deg) rotateZ(-2.5deg) translateX(10px) translateZ(4px);
}
.preview-phone-shot--right {
  transform: rotateY(-10deg) rotateZ(2.5deg) translateX(-10px) translateZ(18px);
}
.project-featured-preview:hover .preview-phone-shot--left {
  transform: rotateY(5deg) rotateZ(-3.5deg) translateX(4px) translateZ(12px) translateY(-4px);
}
.project-featured-preview:hover .preview-phone-shot--right {
  transform: rotateY(-5deg) rotateZ(3.5deg) translateX(-4px) translateZ(28px) translateY(-6px);
}

/* ===== 2-Column Editorial App Cards (Flat Card + 3D Icon + 3D Device Screenshot Asset) ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  display: grid;
  grid-template-columns: 1fr 122px;
  gap: 20px;
  align-items: center;
}
.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}
.project-card.hidden-card {
  display: none;
}

.project-card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.project-header {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 12px;
  perspective: 500px;
}

.project-icon {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 11px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  transition: transform var(--transition-3d), box-shadow var(--transition-3d);
  transform-style: preserve-3d;
}
.project-card:hover .project-icon,
.project-featured:hover .project-icon {
  transform: perspective(400px) rotateY(-10deg) rotateX(8deg) translateZ(8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.project-header-body { min-width: 0; flex: 1; }

.project-title-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.project-header h3 {
  font-size: 16px; font-weight: 700; margin-bottom: 2px;
  letter-spacing: -0.015em;
  color: var(--text);
}
.project-header h3 a { color: var(--text); }
.project-header h3 a:hover { color: var(--accent); opacity: 1; }

.project-meta {
  font-size: 12px; color: var(--text-muted); font-weight: 400;
}

.project-desc, .project-card > p {
  font-size: 13.5px; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 14px;
  flex: 1;
}

.project-tech {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px;
}
.project-tech span {
  padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 500;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.project-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: auto;
}
.project-actions-left {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.project-legal {
  display: flex; gap: 12px; margin-top: 12px;
  padding-top: 10px; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.project-featured .project-legal {
  margin-top: 0; padding-top: 0; border-top: none;
}
.project-legal a {
  font-size: 11.5px; color: var(--text-muted); font-weight: 500;
}
.project-legal a:hover { color: var(--text); }

/* 3D Device Screenshot Asset inside each Project Card */
.project-card-shot {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 750px;
}
.project-card-shot img {
  width: 118px;
  height: auto;
  border-radius: 14px;
  border: 2.5px solid var(--device-bezel);
  box-shadow: var(--shadow-device);
  transform: rotateY(-8deg) rotateX(3deg);
  transition: transform var(--transition-3d), box-shadow var(--transition-3d);
  transform-style: preserve-3d;
}
.project-card:hover .project-card-shot img {
  transform: rotateY(-2deg) rotateX(1deg) translateZ(10px) translateY(-3px);
}

/* Status Pills */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.pill--success { background: var(--green-soft); color: var(--green); }
.pill--gold {
  background: rgba(245, 158, 11, 0.12); color: var(--gold);
}
.pill--neutral { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border); }

/* ===== Experience & Career Dossier (Clean Editorial CV Layout) ===== */
.exp-2col {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

.exp-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.exp-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.exp-group-label {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.exp-group-count {
  font-family: var(--mono-font);
  font-size: 11px; font-weight: 500;
  color: var(--text-muted);
}

.exp-item {
  display: flex; gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.exp-item:first-of-type { padding-top: 0; }
.exp-item:last-child { padding-bottom: 0; border-bottom: none; }

.exp-dot {
  width: 8px; height: 8px; flex-shrink: 0;
  border-radius: 50%; background: var(--border-strong);
  margin-top: 7px;
}
.exp-item--current .exp-dot {
  background: var(--green-dot);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.exp-content {
  flex: 1; min-width: 0;
}

.exp-top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; margin-bottom: 2px; flex-wrap: wrap;
}

.exp-top h4 {
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.exp-date {
  font-family: var(--mono-font);
  font-size: 11.5px; color: var(--text-muted); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.exp-item--current .exp-date {
  color: var(--green);
  font-weight: 600;
}

.exp-company {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 8px;
  font-weight: 500;
}

.exp-highlights {
  list-style: none; padding: 0; margin: 6px 0 0;
}
.exp-highlights li {
  position: relative; padding-left: 13px;
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 4px;
}
.exp-highlights li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--text-subtle);
}
.exp-highlights li strong { color: var(--text); font-weight: 600; }

.exp-tools {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px;
}
.exp-tools span {
  padding: 2px 7px; border-radius: 5px;
  font-size: 10.5px; font-weight: 500;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.exp-apps {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.exp-app-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 6px;
  background: var(--bg-subtle); color: var(--text);
  font-size: 11.5px; font-weight: 500;
  border: 1px solid var(--border-strong);
  transition: all var(--transition);
}
.exp-app-badge:hover {
  border-color: var(--text-muted);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  opacity: 1;
}
.exp-app-badge svg { flex-shrink: 0; }

/* ===== Skills Matrix & Education Row ===== */
.skills-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.skill-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.skill-group-title {
  font-size: 12px; font-weight: 600;
  color: var(--text); margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.skills-bar {
  display: flex; flex-wrap: wrap; gap: 6px;
}

.skill-tag {
  padding: 3px 9px; border-radius: 6px;
  font-size: 12px; font-weight: 500;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.edu-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 16px;
}

.edu-card {
  padding: 20px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; justify-content: space-between;
}
.edu-card-eyebrow {
  font-family: var(--mono-font);
  font-size: 10.5px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px;
}
.edu-card h4 {
  font-size: 15px; font-weight: 600; margin-bottom: 2px;
  color: var(--text);
}
.edu-card p { font-size: 13px; color: var(--text-muted); }

/* ===== GitHub Contributions Graph (Light & Dark Mode Native Heatmap) ===== */
:root {
  --gh-lv0: #ebedf0;
  --gh-lv1: #9be9a8;
  --gh-lv2: #40c463;
  --gh-lv3: #30a14e;
  --gh-lv4: #216e39;
  --gh-cell-border: rgba(27, 31, 35, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --gh-lv0: #161b22;
    --gh-lv1: #0e4429;
    --gh-lv2: #006d32;
    --gh-lv3: #26a641;
    --gh-lv4: #39d353;
    --gh-cell-border: rgba(255, 255, 255, 0.05);
  }
}
:root[data-theme="dark"] {
  --gh-lv0: #161b22;
  --gh-lv1: #0e4429;
  --gh-lv2: #006d32;
  --gh-lv3: #26a641;
  --gh-lv4: #39d353;
  --gh-cell-border: rgba(255, 255, 255, 0.05);
}

.gh-contrib-block {
  margin-top: 24px;
}
.gh-contrib-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.gh-contrib-title {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.gh-contrib-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}
.gh-contrib-profile:hover { color: var(--text); }
.gh-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-dot);
  box-shadow: 0 0 0 2px var(--green-soft);
}

.gh-contrib-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 16px;
  box-shadow: var(--shadow-card);
}

.gh-contrib-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.gh-contrib-months {
  display: grid;
  grid-template-columns: repeat(53, minmax(11px, 1fr));
  column-gap: 4px;
  padding-left: 36px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 780px;
}

.gh-contrib-body {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 780px;
}

.gh-contrib-days {
  display: grid;
  grid-template-rows: repeat(7, 13px);
  row-gap: 4px;
  width: 28px;
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 13px;
}

.gh-contrib-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(53, minmax(11px, 1fr));
  grid-template-rows: repeat(7, 13px);
  grid-auto-flow: column;
  gap: 4px;
}

.gh-cell {
  display: block;
  width: 100%;
  height: 13px;
  border-radius: 3px;
  background: var(--gh-lv0);
  outline: 1px solid var(--gh-cell-border);
  outline-offset: -1px;
  transition: transform 0.15s ease, background-color 0.25s ease;
}
.gh-contrib-grid .gh-cell:hover {
  transform: scale(1.22);
  z-index: 2;
}
.gh-cell[data-level="0"] { background: var(--gh-lv0); }
.gh-cell[data-level="1"] { background: var(--gh-lv1); }
.gh-cell[data-level="2"] { background: var(--gh-lv2); }
.gh-cell[data-level="3"] { background: var(--gh-lv3); }
.gh-cell[data-level="4"] { background: var(--gh-lv4); }
.gh-cell--empty { visibility: hidden; }

.gh-contrib-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-left: 36px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.gh-contrib-learn {
  color: var(--text-muted);
}
.gh-contrib-learn:hover {
  color: var(--accent);
  text-decoration: underline;
}
.gh-contrib-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.gh-contrib-legend span {
  margin: 0 3px;
}
.gh-contrib-legend .gh-cell {
  width: 12px;
  height: 12px;
}
@media (max-width: 600px) {
  .gh-contrib-footer { padding-left: 0; }
}

/* ===== Contact & Resume CTA Card ===== */
.contact-card-3d {
  max-width: 740px; margin: 0 auto;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.contact-wrap { text-align: center; max-width: 560px; margin: 0 auto; }

.contact-wrap .section-title {
  font-size: clamp(24px, 1.8vw + 16px, 32px);
  margin-bottom: 10px;
}

.contact-text {
  font-size: 15px; color: var(--text-secondary); line-height: 1.65;
  margin-bottom: 22px;
}

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

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border); padding: 28px 0;
  background: var(--bg);
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--text-muted);
  gap: 16px; flex-wrap: wrap;
}
.footer-links {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.footer-inner a { color: var(--text-muted); font-weight: 500; }
.footer-inner a:hover { color: var(--text); }

/* ===== Scroll Animations ===== */
.fade-up {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
  opacity: 1; transform: translateY(0);
}

/* ===== Store Badges ===== */
.store-badge {
  display: inline-block;
  transition: transform var(--transition), opacity var(--transition);
}
.store-badge:hover { transform: translateY(-1px); opacity: 1; }
.store-badge svg { display: block; border-radius: 6px; border: 1px solid var(--border); }
.store-badge--lg svg { border: none; }
.store-badge--ghost svg { border: 1px solid var(--badge-border); }

/* ===== App Hero (per-app landing pages: Flat Text, 3D Icon & Device Asset) ===== */
.app-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.app-hero-layout {
  display: grid; grid-template-columns: 1fr 280px; gap: 56px;
  align-items: center; position: relative;
}

.app-hero-text { min-width: 0; perspective: 600px; }

.app-hero-icon {
  width: 76px; height: 76px; border-radius: 18px;
  margin-bottom: 14px;
  object-fit: cover;
  box-shadow: var(--shadow-photo);
  border: 1px solid var(--border);
  transition: transform var(--transition-3d), box-shadow var(--transition-3d);
}
.app-hero-icon:hover {
  transform: perspective(400px) rotateY(-10deg) rotateX(8deg) translateZ(10px);
}

.app-label {
  font-family: var(--mono-font);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 10px;
}

.app-hero-text h1 {
  font-family: var(--display-font);
  font-size: clamp(32px, 2.4vw + 22px, 46px); font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.06; margin-bottom: 12px;
}

.app-tagline {
  font-size: 18px; font-weight: 500; color: var(--text);
  margin-bottom: 14px; max-width: 540px;
}

.app-desc {
  font-size: 14.5px; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 20px; max-width: 560px;
}

.app-badges { margin-bottom: 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.app-tech-row {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.app-tech-row span {
  padding: 3px 9px; border-radius: 6px;
  font-size: 11.5px; font-weight: 500;
  background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text-secondary);
}

/* App hero device frame: 3D tilt on the phone screenshot asset itself */
.app-hero-image {
  flex-shrink: 0;
  position: relative;
  display: flex; justify-content: center;
  perspective: 1000px;
}
.app-hero-image img, .app-hero-image video {
  transition: transform var(--transition-3d), box-shadow var(--transition-3d);
  transform-style: preserve-3d;
}
.app-hero-image:hover img, .app-hero-image:hover video {
  transform: rotateY(-8deg) rotateX(4deg) translateY(-4px);
}
.app-hero-image img {
  border-radius: 28px;
  border: 6px solid var(--device-bezel);
  background: #000;
  box-shadow: var(--shadow-device);
  max-width: 280px;
  width: 100%;
}

.app-legal {
  display: flex; gap: 18px; justify-content: center; margin-top: 22px;
  flex-wrap: wrap;
}
.app-legal a {
  font-size: 12.5px; color: var(--text-muted); font-weight: 500;
}
.app-legal a:hover { color: var(--text-secondary); }

/* ===== Bento-style Showcase Gallery (per-app pages) ===== */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 16px;
}

.showcase-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
  cursor: default;
  box-shadow: var(--shadow-card);
  perspective: 900px;
}
.showcase-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.showcase-item--feature {
  grid-column: span 2;
  grid-row: span 2;
}

.showcase-item--wide {
  grid-column: span 2;
}

.showcase-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  background: var(--bg-elevated);
  transition: transform var(--transition-3d);
}
.showcase-item:hover img {
  transform: scale(1.015) translateZ(6px);
}

.showcase-caption {
  padding: 14px 16px;
}
.showcase-caption h3 {
  font-size: 14.5px; font-weight: 600; margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.showcase-caption p {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.55;
}

/* ===== App icon picker (per-app pages) ===== */
.section--flush-top { padding-top: 0; }

.icon-picker {
  list-style: none;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px 16px;
  padding: 28px 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.icon-choice {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; text-align: center; min-width: 0;
}
.icon-choice img {
  width: 88px; height: 88px; border-radius: 22.37%;
  display: block;
  box-shadow: var(--shadow-photo);
  transition: transform var(--transition-3d);
}
.icon-choice:hover img { transform: translateY(-4px) scale(1.04); }
.icon-choice-name {
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  color: var(--text);
}
.icon-choice-tag {
  display: block; margin-top: 3px;
  font-size: 11px; font-weight: 500; color: var(--text-muted);
}
.icon-choice--default .icon-choice-tag { color: var(--accent); }
.icon-picker-note {
  margin-top: 16px; text-align: center;
  font-size: 13px; color: var(--text-muted);
}
.icon-picker-note strong { color: var(--text-secondary); font-weight: 600; }

@media (max-width: 900px) {
  .icon-picker { grid-template-columns: repeat(3, 1fr); gap: 24px 12px; }
}
@media (max-width: 560px) {
  .icon-picker { padding: 22px 14px; gap: 20px 8px; }
  .icon-choice img { width: 72px; height: 72px; }
  .icon-choice-name { font-size: 13px; }
}

/* ===== Sticky Download CTA (per-app pages) ===== */
.sticky-cta {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 90;
  opacity: 0; transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.sticky-cta.visible {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.sticky-cta a {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 999px;
  background: var(--cta-bg); color: #fff;
  font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--cta-border);
  box-shadow: var(--shadow-float);
  text-decoration: none;
  transition: all var(--transition);
}
.sticky-cta a:hover {
  border-color: var(--cta-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-float-hover);
  opacity: 1;
}

/* ===== Responsive & Mobile ===== */
@media (max-width: 1024px) {
  .hero-editorial { grid-template-columns: 1fr; gap: 32px; }
  .project-grid { grid-template-columns: 1fr; }
  .skills-matrix { grid-template-columns: repeat(2, 1fr); }
  .project-featured-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .container { padding: 0 20px; }

  .hero { padding: 40px 0 36px; }
  .hero-layout { grid-template-columns: 1fr; gap: 18px; }
  .intro { max-width: 100%; }

  .project-featured { padding: 22px; }
  .project-featured h3 { font-size: 19px; }

  .exp-2col { grid-template-columns: 1fr; gap: 20px; }
  .exp-group { padding: 20px; }
  .edu-row { grid-template-columns: 1fr; }

  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-card-solid); border-bottom: 1px solid var(--border);
    padding: 12px 20px 18px;
    box-shadow: var(--shadow-card-hover);
  }
  .nav.open a.nav-resume { margin-left: 0; margin-top: 6px; justify-content: center; }
  .nav-toggle { display: flex; }

  .section { padding: 48px 0; }
}

@media (max-width: 900px) {
  .app-hero { padding: 40px 0 32px; }
  .app-hero-layout { grid-template-columns: 1fr; gap: 28px; }
  .app-hero-text h1 { font-size: 32px; }
  .app-hero-image { max-width: 220px; align-self: center; margin: 0 auto; }
  .app-hero-image img { max-width: 220px; }

  .showcase-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; grid-auto-rows: auto; }
  .showcase-item--feature, .showcase-item--wide { grid-column: span 2; grid-row: auto; }

  .sticky-cta { bottom: 16px; right: 16px; }
  .sticky-cta a { padding: 10px 16px; font-size: 12.5px; }
}

@media (max-width: 600px) {
  .hero-profile { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-photo img { width: 76px; height: 76px; border-radius: 16px; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); gap: 12px 0; }
  .metric-item:nth-child(2) { border-right: none; }
  .skills-matrix { grid-template-columns: 1fr; }

  .project-card {
    grid-template-columns: 1fr;
  }
  .project-card-shot {
    order: -1;
    padding-bottom: 8px;
  }
  .project-card-shot img {
    width: 130px;
    transform: none;
  }

  .app-hero-text h1 { font-size: 26px; }
  .app-tagline { font-size: 16px; }

  .showcase-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .showcase-item--feature, .showcase-item--wide { grid-column: span 1; }

  .contact-card-3d { padding: 28px 20px; }
  .section { padding: 40px 0; }
}

/* ===== Legal & Support Pages ===== */
.legal-page {
  max-width: 720px; margin: 0 auto;
  padding: 64px 20px 48px;
}
.legal-page h1 {
  font-size: 30px; font-weight: 700; letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.legal-page .legal-updated {
  font-size: 13px; color: var(--text-muted); margin-bottom: 28px;
}
.legal-page h2 {
  font-size: 17px; font-weight: 600; margin-top: 28px; margin-bottom: 10px;
  color: var(--text);
}
.legal-page p, .legal-page li {
  font-size: 14.5px; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 10px;
}
.legal-page ul { padding-left: 20px; margin-bottom: 14px; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--accent); }
.legal-page a:hover { text-decoration: underline; }

.legal-contact {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  margin-top: 36px;
}
.legal-contact h2 { margin-top: 0; }
.legal-contact p { margin-bottom: 5px; }

.support-page {
  max-width: 720px; margin: 0 auto;
  padding: 64px 20px 48px; text-align: center;
}
.support-page h1 {
  font-size: 30px; font-weight: 700; letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.support-page > p {
  font-size: 15px; color: var(--text-secondary); margin-bottom: 28px;
}
.support-contact-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  display: inline-block;
}
.support-contact-box p {
  font-size: 14.5px; color: var(--text-secondary); margin-bottom: 14px;
}
.support-btn {
  display: inline-block; padding: 11px 24px; border-radius: var(--radius-sm);
  background: var(--btn-primary-bg); color: var(--btn-primary-fg); font-weight: 600; font-size: 14.5px;
  text-decoration: none; transition: all var(--transition);
}
.support-btn:hover { background: var(--btn-primary-hover); opacity: 1; }
.support-links {
  margin-top: 28px; display: flex; gap: 18px; justify-content: center;
}
.support-links a {
  font-size: 12.5px; color: var(--text-muted); font-weight: 500;
}
.support-links a:hover { color: var(--text-secondary); }
.faq-section { text-align: left; margin-top: 40px; }
.faq-section h2 {
  font-size: 19px; font-weight: 700; text-align: center;
  margin-bottom: 22px;
}
.faq-item { margin-bottom: 18px; }
.faq-item h3 {
  font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 4px;
}
.faq-item p {
  font-size: 13.5px; color: var(--text-secondary); line-height: 1.55; margin: 0;
}

@media (max-width: 768px) {
  .legal-page { padding: 56px 20px 40px; }
  .legal-page h1 { font-size: 24px; }
  .support-page { padding: 56px 20px 40px; }
  .support-page h1 { font-size: 24px; }
}

/* ===== Focus ===== */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
  border-radius: 6px;
}

/* ===== Boop 3.0 media & Subpages ===== */
.app-hero-video {
  display: block; width: 100%; max-width: 280px; height: auto;
  aspect-ratio: 480 / 1040;
  border-radius: 28px;
  background: #fbe7d0;
  box-shadow: var(--shadow-device);
  object-fit: cover;
}

.shot-grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.shot-grid li { min-width: 0; }
.shot-grid img {
  width: 100%; height: auto; aspect-ratio: 600 / 1300;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  background: #fbe7d0;
  transition: transform var(--transition-3d), box-shadow var(--transition-3d);
}
.shot-grid img:hover { transform: perspective(600px) rotateY(-6deg) rotateX(3deg) translateY(-4px); box-shadow: var(--shadow-card-hover); }

.whats-new {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 28px;
}
.whats-new li {
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.whats-new h3 {
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.whats-new p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

.promo-video {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-lg);
  background: #fbe7d0;
  box-shadow: var(--shadow-card-hover);
}
.promo-video--landscape { max-width: 960px; margin: 0 auto; aspect-ratio: 16 / 9; }
.promo-video--vertical { display: none; max-width: 360px; margin: 0 auto; aspect-ratio: 9 / 16; }

@media (max-width: 900px) {
  .shot-grid {
    grid-template-columns: none;
    grid-auto-flow: column; grid-auto-columns: 46%;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 20px;
    margin: 0 -20px; padding: 4px 20px 14px;
  }
  .shot-grid li { scroll-snap-align: start; }
  .whats-new { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .shot-grid { grid-auto-columns: 64%; }
  .whats-new { grid-template-columns: 1fr; }
  .promo-video--landscape { display: none; }
  .promo-video--vertical { display: block; }
}

.app-h1-sub {
  display: block; margin-top: 10px;
  font-family: var(--body-font);
  font-size: clamp(16px, 0.6vw + 13px, 19px); font-weight: 600;
  letter-spacing: -0.005em; line-height: 1.35; color: var(--text-secondary);
}

.whats-new--4 { grid-template-columns: repeat(4, 1fr); margin-top: 0; }
.whats-new a { color: var(--accent); font-weight: 600; }
.whats-new a:hover { text-decoration: underline; }

.feature-split {
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 48px; align-items: center;
}
.feature-split-media { display: block; border-radius: var(--radius-lg); }
.feature-split-media img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  box-shadow: var(--shadow-card-hover); background: #fbe7d0;
}
.feature-split-lead {
  font-size: 15px; color: var(--text-secondary); line-height: 1.65;
  margin: 8px 0 16px; max-width: 560px;
}
.mini-steps {
  margin: 0 0 22px; padding-left: 22px; max-width: 560px;
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
}
.mini-steps li { margin-bottom: 6px; padding-left: 4px; }
.mini-steps li::marker { color: var(--text-muted); font-weight: 600; }
.mini-steps strong { color: var(--text); font-weight: 600; }

.clip-grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
.clip-grid--3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 720px; margin: 0 auto;
}
.clip-grid li { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.clip-grid video {
  display: block; width: 100%; height: auto; aspect-ratio: 9 / 16;
  border-radius: 16px; border: 1px solid var(--border);
  background: #fbe7d0; box-shadow: var(--shadow-card);
}
.clip-caption {
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
  text-align: center;
}

.faq-list {
  max-width: 760px; margin: 0 auto;
  display: grid; gap: 10px;
}
.faq-list details {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
}
.faq-list summary {
  font-size: 14.5px; font-weight: 600; color: var(--text);
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+'; font-size: 18px; font-weight: 500; color: var(--text-muted);
  transition: transform var(--transition);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p {
  margin-top: 10px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.65;
}
.faq-list details a { color: var(--accent); font-weight: 500; }
.faq-list details a:hover { text-decoration: underline; }

.guide-hero {
  padding: 56px 0 36px; border-bottom: 1px solid var(--border);
}
.guide-breadcrumb {
  font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px;
}
.guide-breadcrumb a { color: var(--text-secondary); font-weight: 500; }
.guide-breadcrumb a:hover { color: var(--text); }
.guide-hero h1 {
  font-size: clamp(28px, 2.2vw + 18px, 40px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 12px;
}
.guide-lead {
  font-size: 16px; color: var(--text-secondary); line-height: 1.65;
  max-width: 680px; margin-bottom: 18px;
}
.guide-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.guide-meta span {
  padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary);
}

.step-list {
  list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}
.step-card {
  counter-increment: step;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
}
.step-card img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5;
  background: #fbe7d0; border-bottom: 1px solid var(--border);
  object-fit: cover;
}
.step-body { padding: 18px 20px 20px; }
.step-num {
  display: inline-block; margin-bottom: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent);
}
.step-body h3 {
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.step-body p {
  font-size: 13.5px; color: var(--text-secondary); line-height: 1.6;
}
.step-body code {
  padding: 1px 6px; border-radius: 5px;
  font-size: 12.5px; background: var(--bg-elevated);
  border: 1px solid var(--border); color: var(--text);
}

@media (max-width: 900px) {
  .whats-new--4 { grid-template-columns: repeat(2, 1fr); }
  .feature-split { grid-template-columns: 1fr; gap: 24px; }
  .feature-split-media { max-width: 340px; margin: 0 auto; }
  .clip-grid, .clip-grid--3 {
    grid-template-columns: none;
    grid-auto-flow: column; grid-auto-columns: 44%;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 20px;
    max-width: none; margin: 0 -20px; padding: 4px 20px 14px;
  }
  .clip-grid li { scroll-snap-align: start; }
}
@media (max-width: 680px) {
  .step-list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .whats-new--4 { grid-template-columns: 1fr; }
  .clip-grid, .clip-grid--3 { grid-auto-columns: 62%; }
}

/* ===== Step-by-step guide pages (e.g. /boop/apple-pay) ===== */
.guide-page {
  max-width: 760px; margin: 0 auto;
  padding: 44px 24px 80px;
}
.breadcrumb { font-size: 12.5px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: var(--text-subtle); }
.breadcrumb a { color: var(--text-secondary); font-weight: 500; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current="page"] { color: var(--text-muted); }

.guide-page h1 {
  font-family: var(--display-font);
  font-size: clamp(28px, 2.2vw + 18px, 40px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 14px;
}
.guide-page .guide-lead {
  font-size: 16px; color: var(--text-secondary); line-height: 1.65;
  max-width: 660px; margin-bottom: 20px;
}
.guide-needs {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 8px;
}
.guide-needs li {
  padding: 5px 12px 5px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--text-secondary);
  background: var(--bg-card); border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 6px;
}
.guide-needs li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-dot);
}

.guide-steps {
  list-style: none; margin-top: 44px;
  display: flex; flex-direction: column;
}
.guide-step {
  display: grid; grid-template-columns: minmax(0, 1fr) 232px;
  gap: 44px; align-items: start;
  padding: 44px 0; border-top: 1px solid var(--border);
}
.guide-step:first-child { border-top: none; padding-top: 0; }
.guide-step > div { min-width: 0; }
.guide-step picture { display: block; }
.guide-step img {
  display: block; width: 100%; height: auto;
  border-radius: 22px; border: 1px solid var(--border);
  background: var(--bg-elevated); box-shadow: var(--shadow-device);
}

.guide-step-num {
  display: inline-block; margin-bottom: 8px;
  font-family: var(--mono-font);
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent);
}
.guide-step h2 {
  font-size: clamp(20px, 0.8vw + 16px, 23px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 12px;
}
.guide-step p,
.guide-step li {
  font-size: 15px; color: var(--text-secondary); line-height: 1.65;
}
.guide-step p + p { margin-top: 10px; }
.guide-step ol {
  margin: 10px 0 0; padding-left: 22px;
  display: grid; gap: 6px;
}
.guide-step ol li::marker { color: var(--text-muted); font-weight: 600; }
.guide-step strong { color: var(--text); font-weight: 600; }

.guide-note {
  margin-top: 14px !important;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  font-size: 13.5px !important; line-height: 1.6 !important;
}
.guide-small {
  margin-top: 18px;
  font-size: 12.5px !important; color: var(--text-muted) !important;
}

.guide-tips {
  list-style: none; margin-top: 16px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.guide-tips li {
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.guide-tips h3 {
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: 4px;
}
.guide-tips p { font-size: 13.5px !important; }

.guide-foot {
  margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--border);
  text-align: center;
}
.guide-foot p {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
  max-width: 520px; margin: 0 auto 14px;
}
.guide-foot p a { color: var(--accent); font-weight: 500; }
.guide-foot p a:hover { text-decoration: underline; }
.guide-foot .store-badge { display: inline-block; }

@media (max-width: 680px) {
  .guide-page { padding: 32px 20px 64px; }
  .guide-step { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
  .guide-step:first-child { padding-top: 0; }
  .guide-step picture { max-width: 240px; width: 100%; margin: 0 auto; }
  .guide-tips { grid-template-columns: 1fr; }
}

/* ===== Nemo Aquarium (ocean teal/blue accent; light + dark) ===== */
:root {
  --nemo-teal: #0e7f8c;
  --nemo-teal-soft: rgba(14, 127, 140, 0.10);
  --nemo-glow-a: rgba(45, 190, 200, 0.18);
  --nemo-glow-b: rgba(30, 110, 200, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nemo-teal: #5ee2d6;
    --nemo-teal-soft: rgba(94, 226, 214, 0.14);
    --nemo-glow-a: rgba(45, 190, 200, 0.20);
    --nemo-glow-b: rgba(40, 110, 220, 0.18);
  }
}
:root[data-theme="dark"] {
  --nemo-teal: #5ee2d6;
  --nemo-teal-soft: rgba(94, 226, 214, 0.14);
  --nemo-glow-a: rgba(45, 190, 200, 0.20);
  --nemo-glow-b: rgba(40, 110, 220, 0.18);
}
.app-hero--nemo {
  background:
    radial-gradient(ellipse 60% 80% at 85% 0%, var(--nemo-glow-a), transparent 70%),
    radial-gradient(ellipse 50% 70% at 0% 100%, var(--nemo-glow-b), transparent 70%);
}
.app-hero--nemo .app-label { color: var(--nemo-teal); }
.app-hero--nemo .app-tech-row span { border-color: var(--nemo-teal-soft); }
.pill--beta {
  background: var(--nemo-teal-soft); color: var(--nemo-teal);
  border: 1px solid var(--nemo-teal-soft);
}
.pill--beta-lg { padding: 5px 12px; font-size: 12px; letter-spacing: 0.02em; }
.showcase-grid--nemo .showcase-item:not(.showcase-item--wide) img { aspect-ratio: 4 / 5; }
.showcase-grid--nemo .showcase-item--wide img { flex: 1; min-height: 0; aspect-ratio: 16 / 9; }
.nemo-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; margin-bottom: 20px;
  background: var(--nemo-teal); color: #04242a;
  font-weight: 700; font-size: 14.5px; text-decoration: none;
  transition: transform var(--transition), opacity var(--transition);
}
:root:not([data-theme="dark"]) .nemo-cta-btn { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nemo-cta-btn { color: #04242a; } }
.nemo-cta-btn:hover { transform: translateY(-1px); opacity: 0.92; }

/* ===== Snack Street (warm orange accent; light + dark) ===== */
:root {
  --snack-orange: #c2511f;
  --snack-orange-soft: rgba(194, 81, 31, 0.10);
  --snack-glow-a: rgba(255, 158, 107, 0.22);
  --snack-glow-b: rgba(255, 210, 140, 0.20);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --snack-orange: #ffad7a;
    --snack-orange-soft: rgba(255, 173, 122, 0.14);
    --snack-glow-a: rgba(255, 140, 80, 0.16);
    --snack-glow-b: rgba(255, 190, 110, 0.10);
  }
}
:root[data-theme="dark"] {
  --snack-orange: #ffad7a;
  --snack-orange-soft: rgba(255, 173, 122, 0.14);
  --snack-glow-a: rgba(255, 140, 80, 0.16);
  --snack-glow-b: rgba(255, 190, 110, 0.10);
}
.app-hero--snack {
  background:
    radial-gradient(ellipse 60% 80% at 85% 0%, var(--snack-glow-a), transparent 70%),
    radial-gradient(ellipse 50% 70% at 0% 100%, var(--snack-glow-b), transparent 70%);
}
.app-hero--snack .app-label { color: var(--snack-orange); }
.app-hero--snack .app-tech-row span { border-color: var(--snack-orange-soft); }
/* Framed App Store screenshots already carry their own phone frame and caption */
.app-hero-image--framed img {
  border: 0; background: transparent; border-radius: 22px;
  max-width: 300px;
}
.showcase-grid--snack .showcase-item img { aspect-ratio: 720 / 1561; object-fit: cover; }
.showcase-grid--snack-text { grid-auto-rows: auto; }
.showcase-grid--snack-text .showcase-caption { padding: 18px 18px 20px; }
.showcase-grid--snack-text .showcase-caption h3 { color: var(--snack-orange); }
.coming-soon {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--snack-orange-soft); color: var(--snack-orange);
  border: 1px solid var(--snack-orange-soft);
  font-weight: 700; font-size: 14px; letter-spacing: 0.01em;
}
.coming-soon::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; opacity: 0.85;
}
.coming-soon--lg { padding: 12px 22px; font-size: 15px; }
.project-card-shot--framed img { border: 0; border-radius: 12px; }
.project-actions .coming-soon { padding: 7px 14px; font-size: 12.5px; }
.pill--soon { background: var(--snack-orange-soft); color: var(--snack-orange); border: 1px solid var(--snack-orange-soft); }
@media (max-width: 900px) {
  .app-hero-image--framed img { max-width: 240px; }
}

/* ===== Sound toggle (header speaker, see boop-sfx.js) ===== */
.sound-toggle {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.sound-toggle:hover { color: var(--text); background: var(--bg-subtle); border-color: var(--border-hover); }
.sound-toggle:focus-visible, .theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sound-toggle svg { width: 16px; height: 16px; display: block; }
.sound-toggle[aria-pressed="true"] .icon-sound-off,
.sound-toggle[aria-pressed="false"] .icon-sound-on { display: none; }
.sound-toggle--inline { display: inline-grid; vertical-align: middle; }

/* ===== Hero motion (home page; boop-hero.js) =====
   A live take on the 32 s motion spot: the corgi and cat pop in, then feature cards cycle.
   Fixed height (no layout shift); only transform/opacity/clip-path animate. Each element's
   default style is its finished state, which is also the calm static frame (Reduce Motion, no JS). */
.hero-motion {
  --hm-ink: #4A2518; --hm-ink2: #8B664F; --hm-card: #fff; --hm-chip: #F7EEE2;
  --hm-orange: #F5921E; --hm-orange-text: #E06A10; --hm-green: #3BB273; --hm-green-soft: #E3F5EA; --hm-green-text: #23874F;
  --hm-track: #F3E8D8; --hm-box: #E2D3BF; --hm-strike: #C9B8A2;
  --hm-purple: #7C5CD6; --hm-plum: #2B2340; --hm-slip: #F8F5FF; --hm-slip-line: #D6CBF7; --hm-slip-muted: #8A82A6;
  --hm-shadow: 0 10px 24px rgba(74, 37, 24, .12), 0 2px 6px rgba(74, 37, 24, .06);
  --hm-back: cubic-bezier(.34, 1.56, .64, 1);
  --hm-bg: radial-gradient(120% 150% at 0% 100%, rgba(255, 210, 150, .75) 0%, rgba(255, 210, 150, 0) 55%), linear-gradient(135deg, #FFF8EE 0%, #FDEBD6 100%);
  position: relative; height: 152px; max-width: 560px; margin: 2px 0 18px;
  border-radius: 20px; overflow: hidden; contain: layout paint;
  background: var(--hm-bg); border: 1px solid rgba(74, 37, 24, .08);
  font-family: ui-rounded, 'SF Pro Rounded', var(--body-font);
  color: var(--hm-ink); line-height: 1.2;
  -webkit-user-select: none; user-select: none; pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-motion {
    --hm-ink: #F7EBDD; --hm-ink2: #C9AE95; --hm-card: #241D17; --hm-chip: #3A2E23; --hm-orange-text: #FFA351;
    --hm-green-soft: rgba(59, 178, 115, .18); --hm-green-text: #6FD49C; --hm-track: #3A2F25; --hm-box: #5A4A3B; --hm-strike: #7A6754;
    --hm-purple: #A88BFF; --hm-plum: #EDE7FF; --hm-slip: #221D33; --hm-slip-line: #4A3F73; --hm-slip-muted: #A49CC4;
    --hm-shadow: 0 10px 24px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .05);
    --hm-bg: radial-gradient(120% 150% at 0% 100%, rgba(245, 146, 30, .22) 0%, rgba(245, 146, 30, 0) 55%), linear-gradient(135deg, #1E1813 0%, #15110D 100%);
    border-color: rgba(255, 255, 255, .08);
  }
}
:root[data-theme="dark"] .hero-motion {
  --hm-ink: #F7EBDD; --hm-ink2: #C9AE95; --hm-card: #241D17; --hm-chip: #3A2E23; --hm-orange-text: #FFA351;
  --hm-green-soft: rgba(59, 178, 115, .18); --hm-green-text: #6FD49C; --hm-track: #3A2F25; --hm-box: #5A4A3B; --hm-strike: #7A6754;
  --hm-purple: #A88BFF; --hm-plum: #EDE7FF; --hm-slip: #221D33; --hm-slip-line: #4A3F73; --hm-slip-muted: #A49CC4;
  --hm-shadow: 0 10px 24px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .05);
  --hm-bg: radial-gradient(120% 150% at 0% 100%, rgba(245, 146, 30, .22) 0%, rgba(245, 146, 30, 0) 55%), linear-gradient(135deg, #1E1813 0%, #15110D 100%);
  border-color: rgba(255, 255, 255, .08);
}

/* floating confetti dots */
.hm-dots i {
  position: absolute; width: 9px; height: 9px; border-radius: 50%; opacity: .32; display: block;
}
.hm-dots i:nth-child(1) { left: 18px; top: 16px; background: #F5921E; }
.hm-dots i:nth-child(2) { left: 120px; top: 22px; width: 7px; height: 7px; background: #FFC94D; border-radius: 30%; }
.hm-dots i:nth-child(3) { left: 62px; top: 10px; width: 6px; height: 6px; background: #B9A3F0; }
.hm-dots i:nth-child(4) { left: 136px; top: 70px; width: 6px; height: 6px; background: #9FD8B0; }
.hm-dots i:nth-child(5) { left: 8px; top: 74px; width: 7px; height: 7px; background: #F7B27A; border-radius: 30%; }
.hm-dots i:nth-child(6) { left: 92px; top: 44px; width: 5px; height: 5px; background: #F5921E; }

/* mascots: .hm-pet pops in, .hm-hop hops on cue, the img bobs */
.hm-pets { position: absolute; left: 0; top: 0; bottom: 0; width: 150px; }
.hm-pet { position: absolute; display: block; }
.hm-pet--corgi { left: 12px; bottom: 10px; z-index: 2; }
.hm-pet--cat { left: 76px; bottom: 16px; z-index: 1; }
.hm-hop { display: block; }
.hm-pet img { display: block; filter: drop-shadow(0 6px 8px rgba(74, 37, 24, .18)); }
.hm-pet--corgi img { width: 84px; height: 84px; transform: rotate(-5deg); }
.hm-pet--cat img { width: 72px; height: 72px; transform: rotate(6deg); }

/* cards */
.hm-deck { position: absolute; left: 150px; right: 12px; top: 12px; bottom: 12px; }
.hm-card {
  position: absolute; inset: 0; padding: 11px 14px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 4px;
  background: var(--hm-card); border-radius: 16px; box-shadow: var(--hm-shadow);
  opacity: 0; visibility: hidden; overflow: hidden;
}
.hm-log { opacity: 1; visibility: visible; } /* the static frame */
.hm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.hm-lbl { font-size: 12.5px; font-weight: 700; color: var(--hm-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-lbl--strong { color: var(--hm-ink); font-weight: 800; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.hm-sub { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hm-pill { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.hm-pill--soft { background: #FFF1E0; color: #E06A10; }
.hm-pill--green { background: var(--hm-green-soft); color: var(--hm-green-text); }
.hm-mono { font-family: var(--mono-font); letter-spacing: .12em; font-size: 9.5px; color: var(--hm-slip-muted); }

/* 1 log ₱185 */
.hm-amt { font-size: 32px; font-weight: 900; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; transform-origin: left center; }
.hm-amt.is-empty { color: var(--hm-box); }
.hm-chips { display: flex; align-items: center; gap: 6px; }
.hm-chip { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--hm-chip); color: var(--hm-ink); white-space: nowrap; }
.hm-chip--sel { background: var(--hm-orange); color: #fff; }
.hm-ok { margin-left: auto; font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--hm-green); color: #fff; white-space: nowrap; }

/* 2 budgets */
.hm-bud { display: flex; flex-direction: column; gap: 5px; }
.hm-bud-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.hm-val { font-weight: 700; color: var(--hm-ink2); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.hm-bar { height: 8px; border-radius: 999px; background: var(--hm-track); overflow: hidden; }
.hm-bar i { display: block; height: 100%; border-radius: 999px; background: var(--c); transform-origin: left center; transform: scaleX(var(--w)); }

/* 3 who spent what */
.hm-minicard { display: inline-block; width: 20px; height: 13px; border-radius: 3px; background: linear-gradient(135deg, #FFB466, #F5921E 45%, #DD5A1C); }
.hm-stack { display: flex; height: 11px; border-radius: 999px; overflow: hidden; background: var(--hm-track); }
.hm-stack i { display: block; flex: 0 0 var(--w); background: var(--c); box-shadow: inset -2px 0 0 var(--hm-card); }
.hm-ppl { display: flex; justify-content: space-between; gap: 4px; }
.hm-p { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.hm-p b { flex: none; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 900; display: grid; place-items: center; }
.hm-p > span { display: flex; flex-direction: column; font-size: 10.5px; font-weight: 700; color: var(--hm-ink2); line-height: 1.15; }
.hm-p em { font-style: normal; font-weight: 800; color: var(--hm-ink); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* 4 Money Owed slip */
.hm-slip { background: var(--hm-slip); box-shadow: var(--hm-shadow), inset 0 0 0 2px var(--hm-slip-line); color: var(--hm-plum); }
.hm-brand { display: inline-flex; align-items: center; gap: 6px; color: var(--hm-purple); font-weight: 700; }
.hm-brand img { width: 14px; height: 14px; }
.hm-slip-name { font-size: 15px; font-weight: 800; border-bottom: 2px dashed var(--hm-slip-line); padding-bottom: 4px; }
.hm-slip-total { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hm-slip-v { font-size: 24px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; opacity: .1; }
.hm-stamp {
  position: absolute; right: 10px; bottom: 9px; padding: 5px 12px; border-radius: 9px;
  border: 3px solid var(--hm-purple); outline: 1.5px dashed var(--hm-purple); outline-offset: -7px;
  background: var(--hm-slip); background-image: linear-gradient(rgba(124, 92, 214, .14), rgba(124, 92, 214, .14)); color: var(--hm-purple);
  font-size: 17px; font-weight: 900; white-space: nowrap; transform: rotate(-8deg);
}

/* 5 shopping list */
.hm-items { list-style: none; display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; }
.hm-items li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.hm-box { flex: none; width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--hm-green); background: var(--hm-green); display: grid; place-items: center; }
.hm-box svg { width: 13px; height: 13px; display: block; }
.hm-box path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 0; }
.hm-nm { position: relative; flex: 0 1 auto; margin-right: auto; color: var(--hm-strike); min-width: 0; }
.hm-nm::after { content: ''; position: absolute; left: -1px; right: -1px; top: 54%; height: 1.5px; border-radius: 2px; background: var(--hm-strike); transform-origin: left center; }
.hm-pr { color: var(--hm-ink2); font-variant-numeric: tabular-nums; }

/* ---- live mode: hidden until boop-hero.js starts it after load ---- */
@media (prefers-reduced-motion: no-preference) {
  .hero-motion:not(.is-live) .hm-pet, .hero-motion:not(.is-live) .hm-log {
    opacity: 0; animation: hm-show 0s 6s forwards; /* safety net if the script never runs */
  }
}
@keyframes hm-show { to { opacity: 1; } }

.is-live .hm-pet { animation: hm-pet-in .6s var(--hm-back) both; }
.is-live .hm-pet--cat { animation-delay: .16s; }
.is-live .hm-pet--corgi img { animation: hm-bob-l 3.2s ease-in-out .7s infinite; }
.is-live .hm-pet--cat img { animation: hm-bob-r 3.2s ease-in-out .9s infinite; }
.is-live .hm-hop.is-hop { animation: hm-hop .55s cubic-bezier(.3, .7, .4, 1); }
.is-live .hm-dots i { animation: hm-drift 7s ease-in-out infinite alternate; }
.is-live .hm-dots i:nth-child(2n) { animation-duration: 9s; animation-direction: alternate-reverse; }
.is-live .hm-dots i:nth-child(3n) { animation-duration: 8s; }
.is-live.is-paused *, .is-live.is-paused *::after { animation-play-state: paused !important; }

@keyframes hm-pet-in { from { opacity: 0; transform: translateY(70px) scale(.5); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes hm-bob-l { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-4px); } }
@keyframes hm-bob-r { 0%, 100% { transform: rotate(6deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-5px); } }
@keyframes hm-hop { 0%, 100% { transform: none; } 35% { transform: translateY(-14px) scale(1.04, .97); } 70% { transform: translateY(0) scale(1.05, .94); } }
@keyframes hm-drift { from { transform: translate(0, 0); } to { transform: translate(6px, 14px) rotate(90deg); } }

.is-live .hm-log { opacity: 0; visibility: hidden; }
.is-live .hm-card.is-in { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .6s var(--hm-back); }
.is-live .hm-card { transform: translateY(18px) scale(.95); }
.is-live .hm-card.is-in.is-out { opacity: 0; transform: translateY(-16px) scale(.97); transition: opacity .32s ease-in, transform .4s ease-in; }

/* inner beats (seconds after the card lands); fill both = start state until its beat */
.is-live .is-in .hm-chip { animation: hm-pop-in .35s var(--hm-back) .25s both; }
.is-live .is-in .hm-chip:nth-child(2) { animation-delay: .33s; }
.is-live .is-in .hm-chip--sel { animation: hm-pop-in .35s var(--hm-back) .25s both, hm-select .2s ease 1.35s backwards, hm-bump .4s var(--hm-back) 1.35s; }
.is-live .is-in .hm-ok { animation: hm-pop-in .4s var(--hm-back) 1.9s both; }
.is-live .is-in .hm-pill--green { animation: hm-pop-in .4s var(--hm-back) 1.75s both; }
.is-live .is-in .hm-bud { animation: hm-slide-in .45s var(--hm-back) .15s both; }
.is-live .is-in .hm-bud + .hm-bud { animation-delay: .3s; }
.is-live .is-in .hm-bar i { animation: hm-fill 1s cubic-bezier(.22, 1, .36, 1) .45s both; }
.is-live .is-in .hm-bud + .hm-bud .hm-bar i { animation-delay: .62s; }
.is-live .is-in .hm-stack { animation: hm-wipe .9s cubic-bezier(.65, 0, .35, 1) .4s both; }
.is-live .is-in .hm-p { animation: hm-pop-in .4s var(--hm-back) both; }
.is-live .is-in .hm-p:nth-child(1) { animation-delay: .95s; }
.is-live .is-in .hm-p:nth-child(2) { animation-delay: 1.1s; }
.is-live .is-in .hm-p:nth-child(3) { animation-delay: 1.25s; }
.is-live .is-in .hm-sub { animation: hm-pop-in .4s var(--hm-back) .3s both; }
.is-live .is-in .hm-slip-v { animation: hm-dim .25s ease 1.3s backwards; }
.is-live .is-in .hm-stamp { animation: hm-stamp .3s cubic-bezier(.55, 0, 1, .45) 1.25s both; }
.is-live .hm-slip.is-in { animation: hm-shake .45s linear 1.52s; }
.is-live .is-in .hm-items li:nth-child(1) { --t: .5s; }
.is-live .is-in .hm-items li:nth-child(2) { --t: .9s; }
.is-live .is-in .hm-items li:nth-child(3) { --t: 1.3s; }
.is-live .is-in .hm-box { animation: hm-check .3s var(--hm-back) var(--t) backwards; }
.is-live .is-in .hm-box path { animation: hm-tick .25s ease-out calc(var(--t) + .05s) backwards; }
.is-live .is-in .hm-nm { animation: hm-grey .2s ease calc(var(--t) + .1s) backwards; }
.is-live .is-in .hm-nm::after { animation: hm-strike .3s ease-out calc(var(--t) + .1s) backwards; }

@keyframes hm-pop-in { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@keyframes hm-select { from { background: var(--hm-chip); color: var(--hm-ink); } }
@keyframes hm-bump { from { transform: scale(1.2); } to { transform: none; } }
@keyframes hm-slide-in { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes hm-fill { from { transform: scaleX(0); } }
@keyframes hm-wipe { from { clip-path: inset(0 100% 0 0 round 999px); } to { clip-path: inset(0 0 0 0 round 999px); } }
@keyframes hm-dim { from { opacity: 1; } }
@keyframes hm-stamp { from { opacity: 0; transform: rotate(-8deg) scale(2.4); } 60% { opacity: 1; } to { opacity: 1; transform: rotate(-8deg) scale(1); } }
@keyframes hm-shake { 0%, 100% { translate: 0 0; } 15% { translate: -5px 0; } 30% { translate: 4px 0; } 45% { translate: -3px 0; } 60% { translate: 2px 0; } 80% { translate: -1px 0; } }
@keyframes hm-check { from { background: transparent; border-color: var(--hm-box); transform: scale(1); } 1% { background: var(--hm-green); border-color: var(--hm-green); transform: scale(1.3); } }
@keyframes hm-tick { from { stroke-dashoffset: 16; } }
@keyframes hm-grey { from { color: var(--hm-ink); } }
@keyframes hm-strike { from { transform: scaleX(0); } }

@media (max-width: 600px) {
  .hero-motion { height: 136px; margin-bottom: 16px; }
  .hm-pets { width: 106px; }
  .hm-pet--corgi { left: 6px; bottom: 10px; }
  .hm-pet--corgi img { width: 62px; height: 62px; }
  .hm-pet--cat { left: 50px; bottom: 16px; }
  .hm-pet--cat img { width: 54px; height: 54px; }
  .hm-deck { left: 104px; right: 10px; top: 10px; bottom: 10px; }
  .hm-card { padding: 9px 11px; border-radius: 14px; }
  .hm-lbl { font-size: 11.5px; }
  .hm-lbl--strong, .hm-sub { font-size: 12px; }
  .hm-amt { font-size: 26px; }
  .hm-chip, .hm-ok { font-size: 10.5px; padding: 3px 8px; }
  .hm-chips { gap: 4px; }
  .hm-pill { font-size: 10px; padding: 2px 7px; }
  .hm-bud-row { font-size: 11.5px; }
  .hm-val { font-size: 10.5px; }
  .hm-p { gap: 4px; }
  .hm-p b { width: 18px; height: 18px; font-size: 9.5px; }
  .hm-p > span { font-size: 9.5px; }
  .hm-p em { font-size: 10.5px; }
  .hm-slip-name { font-size: 13px; }
  .hm-slip-v { font-size: 20px; }
  .hm-stamp { font-size: 14px; right: 10px; bottom: 10px; padding: 4px 9px; }
  .hm-items li { font-size: 11.5px; }
  .hm-mono { font-size: 8.5px; letter-spacing: .08em; }
}
@media (max-width: 360px) {
  .hm-chip:nth-child(2) { display: none; }
}

/* ===== Section reveals: start visible, settle in (main.js adds .fade-up below the fold only) ===== */
.fade-up { opacity: .45; transform: translateY(12px); }
@media (prefers-reduced-motion: reduce) { .fade-up { opacity: 1; transform: none; } }
