/* ==========================================================================
   Connor Malarkey Portfolio — Design System
   ========================================================================== */

:root {
  /* High-end minimalist dark: pitch black + high-contrast white */
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --accent: #7BA3D4;
  --accent-bright: #9BC4E8;
  --accent-dim: rgba(123, 163, 212, 0.25);
  /* Blue → green gradient for splash text */
  --gradient-blue-green: linear-gradient(135deg, #5b9bd5 0%, #7BA3D4 30%, #4db8a8 70%, #3dd9b8 100%);
  
  /* Neutrals — high contrast */
  --white: #ffffff;
  --gray-100: #f0f0f0;
  --gray-200: #a0a0a0;
  --gray-300: #606060;
  
  /* Typography — bold modern sans (Inter / Neue Haas feel), tight spacing */
  --font-display: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  
  /* Spacing — generous for modern/clean feel */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;
  
  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.7s;
  
  /* Layout */
  --container-max: 1200px;
  --nav-height: 72px;
  --nav-height-scrolled: 56px;
  
  /* Surfaces */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.2);
  /* Space theme */
  --earthrise-glow: rgba(234, 88, 12, 0.4);
  --earthrise-arc: rgba(255, 255, 255, 0.9);
  --font-serif: 'Playfair Display', Georgia, serif;
  /* Holographic / iridescent gradient (blue → green → deep purple, no pink) */
  --gradient-holographic: linear-gradient(135deg, #5b9bd5 0%, #7BA3D4 25%, #4db8a8 50%, #4a3f6b 75%, #5b9bd5 100%);
  /* Pink to purple (for "The Magic Behind" accent) */
  --gradient-magic-behind: linear-gradient(135deg, #e879a0 0%, #c77eb5 50%, #9b7bb8 100%);
  /* Bento / Projects / Globe: blue–green–purple accent (matches site) */
  --bento-accent: #7BA3D4;
  --bento-accent-glow: rgba(123, 163, 212, 0.35);
  --bento-accent-green: #4db8a8;
  --bento-accent-purple: #4a3f6b;
  /* Soft horizon glow (blue / green / deep purple) — fades into black */
  --earthrise-glow-blue: rgba(91, 155, 213, 0.22);
  --earthrise-glow-green: rgba(77, 184, 168, 0.15);
  --earthrise-glow-purple: rgba(74, 63, 107, 0.2);
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gray-100);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Safe area for notched devices */
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Full-page wave canvas */
#pageCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
main {
  position: relative;
  z-index: 1;
}
body.nav-open,
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--duration-fast) var(--ease-out-expo); }
a:hover { color: var(--accent-bright); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 var(--space-md); }

/* Utility */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-xl); }
@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }
}
.section { padding: var(--space-4xl) 0; }
@media (max-width: 768px) {
  .section { padding: var(--space-3xl) 0; }
}
@media (max-width: 480px) {
  .section { padding: var(--space-2xl) 0; }
}
.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin-bottom: var(--space-md);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-2xl);
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 18ch;
}
.section-title--wide { max-width: none; }

/* ==========================================================================
   Navigation — Control Panel
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(91, 155, 213, 0.18);
  box-shadow:
    0 1px 0 rgba(91, 155, 213, 0.12),
    0 4px 32px rgba(91, 155, 213, 0.10),
    0 12px 60px rgba(155, 123, 184, 0.07);
  transition: height var(--duration-slow) var(--ease-out-expo),
              background var(--duration-normal),
              backdrop-filter var(--duration-normal),
              border-color var(--duration-normal),
              box-shadow var(--duration-normal);
}
.nav.scrolled {
  height: var(--nav-height-scrolled);
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: rgba(91, 155, 213, 0.22);
  box-shadow:
    0 1px 0 rgba(91, 155, 213, 0.15),
    0 4px 32px rgba(91, 155, 213, 0.12),
    0 16px 60px rgba(155, 123, 184, 0.08);
}
.nav.scrolled .nav-inner { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.nav.open { background: rgba(10, 10, 10, 0.98); backdrop-filter: blur(12px); }

/* Dock variant: centered floating glassmorphism bar */
.nav--dock {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: none;
  padding: var(--space-md) var(--space-xl);
  padding-left: max(var(--space-xl), env(safe-area-inset-left, 0));
  padding-right: max(var(--space-xl), env(safe-area-inset-right, 0));
}
.nav--dock .nav-brand--corner {
  position: absolute;
  left: var(--space-xl);
  left: max(var(--space-xl), env(safe-area-inset-left, 0));
  top: 50%;
  transform: translateY(-50%);
}
.nav--dock .nav-toggle {
  position: absolute;
  right: var(--space-md);
  right: max(var(--space-md), env(safe-area-inset-right, 0));
  top: 50%;
  transform: translateY(-50%);
}
.nav-dock {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.nav--dock .nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.nav--dock .nav-link {
  padding: var(--space-sm) var(--space-md);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--gray-200);
}
.nav--dock .nav-link::after { display: none; }
.nav--dock .nav-link:hover { color: var(--white); }
.nav--dock .nav-link.active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--bg);
}
.nav-dock-cta {
  margin-left: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}
.nav-dock-cta:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}
@media (max-width: 900px) {
  .nav-dock .nav-links { display: none; }
  .nav-dock-cta { margin-left: 0; }
}
@media (max-width: 768px) {
  .nav-dock { display: none; }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-xl);
  padding-right: max(var(--space-xl), env(safe-area-inset-right, 0));
  transition: padding var(--duration-slow) var(--ease-out-expo);
}
.nav:not(.nav--dock) .nav-inner { display: flex; }
.nav--dock .nav-inner { display: none; }
.nav-rule {
  display: none;
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 var(--space-lg);
}
@media (min-width: 769px) {
  .nav:not(.nav--dock) .nav-rule { display: block; }
}
@media (max-width: 480px) {
  .nav-inner { padding: var(--space-md) var(--space-md); }
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: color var(--duration-fast);
}
.nav-brand:hover { color: var(--accent); }
.nav-brand-icon {
  display: block;
  flex-shrink: 0;
}

.nav-links { display: flex; gap: var(--space-xl); }
@media (max-width: 768px) { .nav:not(.nav--dock) .nav-links { display: none; } }

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-300);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--duration-normal) var(--ease-out-expo);
}
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-contact-btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-200);
  background: none;
  border: none;
  padding: var(--space-sm) 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--duration-fast) var(--ease-out-expo);
}
.nav-contact-btn:hover { color: var(--accent); }
@media (max-width: 768px) { .nav-contact-btn { display: none; } }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-md);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform var(--duration-normal), opacity var(--duration-fast);
}
@media (max-width: 768px) { .nav-toggle { display: flex; } }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  top: calc(var(--nav-height) + env(safe-area-inset-top, 0));
  left: env(safe-area-inset-left, 0);
  right: env(safe-area-inset-right, 0);
  bottom: env(safe-area-inset-bottom, 0);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal), visibility var(--duration-normal);
  z-index: 999;
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}
.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}
.nav-overlay-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
}
.nav-overlay-link {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  position: relative;
  z-index: 1;
  padding: var(--space-md) var(--space-lg);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.nav-overlay-link:hover { color: var(--accent); }
button.nav-overlay-link {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 380px) {
  .nav-overlay-link { font-size: 1.25rem; }
}

/* ==========================================================================
   Hero — Space-themed (starfield + Earth-rise)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
  padding-top: calc(var(--nav-height) + env(safe-area-inset-top, 0));
  box-sizing: border-box;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}
.hero-starfield {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
/* Earth-rise: glowing planet horizon — layered SVG arc + atmospheric gradient */
.hero-earthrise {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55vh;
  min-height: 320px;
  background:
    radial-gradient(ellipse 180% 120% at 50% 105%, rgba(0, 0, 0, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 160% 140% at 50% 100%, var(--earthrise-glow-blue) 0%, var(--earthrise-glow-green) 25%, var(--earthrise-glow-purple) 45%, transparent 68%);
  clip-path: none;
  pointer-events: none;
}
/* Layered SVG: glow path + sharp arc */
.hero-earthrise-svg {
  position: absolute;
  left: -5%;
  bottom: 0;
  width: 110%;
  height: 56px;
  overflow: visible;
}
.hero-earthrise-glow {
  opacity: var(--horizon-glow-opacity, 0.9);
  animation: horizon-glow-pulse 4s ease-in-out infinite;
}
.hero-earthrise-arc-line {
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
/* Soft atmospheric band above the arc */
.hero-earthrise::after {
  content: '';
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 0;
  height: 48px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  pointer-events: none;
}
@keyframes horizon-glow-pulse {
  0%, 100% { opacity: var(--horizon-glow-opacity, 0.85); }
  50% { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero--splash .hero-content {
  padding: var(--space-3xl) var(--space-xl);
  max-width: 900px;
}

/* Staggered fade-in */
.hero-content .hero-greeting,
.hero-content .hero-tagline,
.hero-content .hero-gallery,
.hero-content .hero-badge,
.hero-content .hero-ctas,
.hero-content .hero-scroll-indicator {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.hero-content.ready .hero-greeting,
.hero-content.ready .hero-tagline,
.hero-content.ready .hero-gallery,
.hero-content.ready .hero-badge,
.hero-content.ready .hero-ctas,
.hero-content.ready .hero-scroll-indicator {
  opacity: 1;
  transform: translateY(0);
}
.hero-content.ready .hero-greeting { transition-delay: 0s; }
.hero-content.ready .hero-tagline { transition-delay: 0.08s; }
.hero-content.ready .hero-gallery { transition-delay: 0.14s; }
.hero-content.ready .hero-badge { transition-delay: 0.2s; }
.hero-content.ready .hero-ctas { transition-delay: 0.26s; }
.hero-content.ready .hero-scroll-indicator { transition-delay: 0.32s; }

/* Lead greeting: big, first */
.hero-greeting--lead {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin: 0 0 var(--space-md);
  letter-spacing: -0.02em;
}
.hero-greeting-name {
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-holographic);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease-in-out infinite;
}

/* Tagline: smaller, second */
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 500;
  color: var(--gray-200);
  line-height: 1.4;
  margin: 0 0 var(--space-lg);
}
.hero-headline-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  background: var(--gradient-holographic);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease-in-out infinite;
}

/* Hero gallery — bento grid */
.hero-gallery--bento {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 0 var(--space-2xl);
  width: 100%;
}
.hero-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-elevated);
  margin: 0;
  min-height: 180px;
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal);
}
.hero-gallery-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.hero-gallery-item img,
.hero-gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-gallery-item--1 { grid-column: 1 / 3; grid-row: 1; }
.hero-gallery-item--2 { grid-column: 3; grid-row: 1; }
.hero-gallery-item--3 { grid-column: 1; grid-row: 2; }
.hero-gallery-item--4 { grid-column: 2; grid-row: 2; }
.hero-gallery-item--5 { grid-column: 3; grid-row: 2; }

@media (max-width: 768px) {
  .hero-gallery--bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
  }
  .hero-gallery-item--1 { grid-column: 1 / -1; grid-row: 1; min-height: 220px; }
  .hero-gallery-item--2 { grid-column: 1; grid-row: 2; }
  .hero-gallery-item--3 { grid-column: 2; grid-row: 2; }
  .hero-gallery-item--4 { grid-column: 1; grid-row: 3; }
  .hero-gallery-item--5 { grid-column: 2; grid-row: 3; }
}

.hero-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-lg);
  margin-bottom: var(--space-2xl);
  border-radius: 999px;
  background: var(--gradient-holographic);
  background-size: 200% 200%;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  animation: gradient-shift 6s ease-in-out infinite;
}
.hero-badge-text {
  display: inline-block;
  transition: opacity 0.25s ease;
}
.hero-badge.swapping .hero-badge-text {
  opacity: 0;
}

/* CTAs */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-3xl);
}
.hero-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}
.hero-cta-primary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}
.hero-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--gray-100);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color var(--duration-fast), color var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}
.hero-cta-ghost:hover {
  border-color: var(--accent-dim);
  color: var(--white);
}
.hero-cta-copy-icon { flex-shrink: 0; }

.hero--splash .hero-scroll-indicator {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--gray-300);
  animation: scroll-pulse 2.5s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Legacy hero-name/hero-punch (keep for other variants if any) */
.hero-name { font-family: var(--font-display); font-size: clamp(3rem, 10vw, 6.5rem); font-weight: 800; color: var(--white); margin-bottom: var(--space-lg); }
.hero-punch { font-size: clamp(0.9rem, 1.8vw, 1.1rem); color: var(--gray-300); margin-bottom: var(--space-2xl); }
.hero-gradient-text {
  background: var(--gradient-blue-green);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.hero-title {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--gray-200);
  margin-bottom: var(--space-xl);
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Funnel: diminishing horizontal lines drawing eye downward */
.hero-funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-4xl);
}
.hero-funnel-line {
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  width: 88%;
}
.hero-funnel-line:nth-child(2) { width: 72%; }
.hero-funnel-line:nth-child(3) { width: 56%; }
.hero-funnel-line:nth-child(4) { width: 40%; }
.hero-funnel-line:nth-child(5) { width: 26%; }
.hero-funnel-line:nth-child(6) { width: 14%; }

.hero-scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--gray-300);
  transition: opacity var(--duration-slow);
}
.hero-scroll-indicator.hidden { opacity: 0; pointer-events: none; }
.hero-scroll-indicator svg {
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ==========================================================================
   Globe break — 3D globe between hero and rest of page
   ========================================================================== */
.globe-break {
  padding: var(--space-3xl) var(--space-xl);
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.globe-break-card {
  width: 100%;
  max-width: 900px;
  background: #0a0a0a;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-2xl);
  box-shadow: inset 0 2px 24px rgba(0, 0, 0, 0.4);
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal);
}

.globe-break-card:hover {
  border-color: rgba(123, 163, 212, 0.45);
  box-shadow: 0 0 0 1px rgba(123, 163, 212, 0.2), inset 0 2px 24px rgba(0, 0, 0, 0.4);
}

/* Synthetic Heart card: red glow on hover */
.synthetic-heart-card:hover {
  border-color: rgba(220, 68, 68, 0.5);
  box-shadow: 0 0 0 1px rgba(220, 68, 68, 0.25), inset 0 2px 24px rgba(0, 0, 0, 0.4);
}

.globe-break-headline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--white);
  text-align: center;
  margin: 0 0 var(--space-sm);
  line-height: 1.35;
}

.globe-break-subtext {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-300);
  text-align: center;
  margin: 0 0 var(--space-xl);
}

.globe-break-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--bento-accent);
}

.synthetic-heart-accent {
  color: #dc4444;
}

.globe-break-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(20, 15, 25, 0.95) 0%, #050508 100%);
}

.synthetic-heart .globe-break-canvas-wrap {
  background-color: #050508;
  background-image: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
                    radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.12) 0%, transparent 50%),
                    radial-gradient(1px 1px at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
                    radial-gradient(ellipse 70% 70% at 50% 50%, rgba(30, 20, 40, 0.4) 0%, transparent 70%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-position: 0 0, 0 0, 0 0, 0 0;
}

.globe-break-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   About Me — Bio + History Timeline
   ========================================================================== */
.about {
  background: transparent;
  padding-top: var(--space-2xl);
}
.about .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.about .section-label,
.about .section-title {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.about .section-title { max-width: none; }
.about .about-collage,
.about .about-bio-block,
.about .about-intro {
  text-align: left;
  margin-left: auto;
  margin-right: auto;
}
.about .about-intro { width: 100%; }

/* About Me — collage grid (modern, clean) */
.about-collage {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
  max-width: 900px;
  width: 100%;
}
.about-collage-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-elevated);
}
.about-collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-collage-item--lead {
  grid-column: 1;
  grid-row: 1 / 3;
  min-height: 0;
}
.about-collage-item--lead img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}
.about-collage-item--tall {
  grid-column: 3;
  grid-row: 2 / 4;
  min-height: 0;
}
.about-collage-item--tall img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}
.about-collage-item:nth-child(2) { grid-column: 2; grid-row: 1; }
.about-collage-item:nth-child(3) { grid-column: 3; grid-row: 1; }
.about-collage-item:nth-child(4) { grid-column: 2; grid-row: 2; }
.about-collage-item:nth-child(5) { grid-column: 1; grid-row: 3; }
.about-collage-item:nth-child(6) { grid-column: 2; grid-row: 3; }
.about-collage-item:nth-child(7) { grid-column: 3; grid-row: 2 / 4; }
.about-collage-item:nth-child(2) img,
.about-collage-item:nth-child(3) img,
.about-collage-item:nth-child(4) img,
.about-collage-item:nth-child(5) img,
.about-collage-item:nth-child(6) img {
  aspect-ratio: 4 / 3;
}
@media (max-width: 768px) {
  .about-collage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    max-width: 640px;
  }
  .about-collage-item--lead {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 1;
    max-height: 320px;
    justify-self: center;
    max-width: 320px;
  }
  .about-collage-item--tall {
    grid-column: auto;
    grid-row: auto;
  }
  .about-collage-item:nth-child(2),
  .about-collage-item:nth-child(3),
  .about-collage-item:nth-child(4),
  .about-collage-item:nth-child(5),
  .about-collage-item:nth-child(6),
  .about-collage-item:nth-child(7) {
    grid-column: auto;
    grid-row: auto;
  }
}
@media (max-width: 480px) {
  .about-collage {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .about-collage-item--lead { max-width: none; }
}

/* Shared photo caption (hover, desktop only) */
.about-collage-item .about-photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: var(--space-md) var(--space-lg);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--duration-normal) var(--ease-out-expo), transform var(--duration-normal) var(--ease-out-expo);
}
@media (hover: hover) {
  .about-collage-item:hover .about-photo-caption {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Legacy about-photos / about-photo-wrap (if used elsewhere) */
.about-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}
@media (max-width: 768px) {
  .about-photos { grid-template-columns: 1fr; gap: var(--space-lg); }
}
.about-photo-wrap {
  position: relative;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.about-photo-wrap img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.about-photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: var(--space-md) var(--space-lg);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--duration-normal) var(--ease-out-expo), transform var(--duration-normal) var(--ease-out-expo);
}
/* Hover description: only when hover is available (desktop), not on touch */
@media (hover: hover) {
  .about-photo-wrap:hover .about-photo-caption {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-intro {
  display: block;
  margin-bottom: var(--space-4xl);
}
@media (max-width: 768px) {
  .about-intro { margin-bottom: var(--space-3xl); }
}

.about-portrait-wrap {
  perspective: 1000px;
  will-change: transform;
}
.about-portrait {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--bg-elevated) 0%, var(--accent-dim) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-normal) var(--ease-out-expo);
  background-size: cover;
  background-position: center;
  background-image: url('../media/Connor Malarkey Headshot.png');
}

.about-bio-block { max-width: 56ch; }
.about-bio { color: var(--gray-200); margin-bottom: var(--space-lg); line-height: 1.7; }
.about-bio-secondary { margin-bottom: 0; color: var(--gray-200); }

/* History Timeline — dynamic line + reveal */
.timeline-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.timeline {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.timeline-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  background: var(--gradient-holographic);
  background-size: 100% 200%;
  border-radius: 3px;
  transition: height 1s var(--ease-out-expo);
  animation: timeline-gradient-shift 8s ease-in-out infinite;
}
.timeline-line.animated::after { height: 100%; }
@keyframes timeline-gradient-shift {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr 180px;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-node {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  margin-left: -1px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: border-color 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
}
.timeline-item.visible .timeline-node {
  border-color: transparent;
  background: var(--gradient-holographic);
  background-size: 200% 200%;
  box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.25);
  animation: gradient-shift 6s ease-in-out infinite;
}
.timeline-item:hover .timeline-node {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.timeline-content { padding-top: 0; }
.timeline-photo-wrap {
  grid-column: 3;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 2px;
}
.timeline-photo-wrap:empty { min-height: 0; }
.timeline-photo {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.timeline-year {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}
.timeline-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--space-xs);
}
.timeline-desc {
  font-size: 0.95rem;
  color: var(--gray-300);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .timeline-item {
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
  }
  .timeline-content { grid-column: 2; grid-row: 1; }
  .timeline-photo-wrap {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
    padding-top: var(--space-sm);
  }
  .timeline-photo { width: 120px; height: 120px; }
}

/* Experience */
.experience-section {
  background: var(--bg-elevated);
  padding-bottom: var(--space-2xl);
}
.experience-list { display: flex; flex-direction: column; gap: var(--space-xl); }
.experience-card {
  padding: var(--space-2xl);
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal);
}
.experience-card:hover {
  border-color: var(--accent-dim);
  box-shadow: var(--shadow-soft);
}
.experience-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.experience-role {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}
.experience-dates {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}
.experience-company {
  font-size: 0.9rem;
  color: var(--gray-300);
  margin-bottom: var(--space-sm);
}
.experience-desc {
  font-size: 0.95rem;
  color: var(--gray-200);
  line-height: 1.6;
  margin: 0;
}
.experience-education {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.experience-education-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 var(--space-md);
}
.experience-education-item {
  font-size: 0.95rem;
  color: var(--gray-200);
  line-height: 1.6;
  margin: 0;
}
.experience-education-item--with-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin: 0;
}
.experience-education-logo {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
}
.experience-education-item--with-logo p {
  margin: 0;
}
@media (max-width: 480px) {
  .experience-education-item--with-logo {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Projects — Bento Grid
   ========================================================================== */
.section-divider--tri {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  background: var(--bg);
}
.section-divider--tri-line {
  height: 4px;
  width: 100%;
  opacity: 0.85;
  position: relative;
  overflow: hidden;
}
.section-divider--tri-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  width: 30%;
  animation: divider-shimmer 3s ease-in-out infinite;
}
.section-divider--tri-line:nth-child(2)::after { animation-delay: 0.6s; }
.section-divider--tri-line:nth-child(3)::after { animation-delay: 1.2s; }

@keyframes divider-shimmer {
  0%   { left: -30%; }
  100% { left: 130%; }
}

.projects-section {
  background: var(--bg);
  position: relative;
  overflow: visible;
}
.projects-section--bento { padding-bottom: var(--space-4xl); }
.projects-starfield {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Bento grid layout */
.bento-grid {
  display: grid;
  grid-template-columns: 2fr 0.7fr 1fr;
  grid-template-rows: 220px 260px;
  gap: var(--space-lg);
  max-width: 1000px;
  margin: 0 auto;
}
.bento-card--partnership { grid-column: 1 / 3; grid-row: 1; }
.bento-card--innovations { grid-column: 3; grid-row: 1; }
.bento-card--globe { grid-column: 1; grid-row: 2; }
.bento-card--cta { grid-column: 2; grid-row: 2; }
.bento-card--product { grid-column: 3; grid-row: 2; }

/* Card: deep charcoal-to-black gradient, 1px border, inset shadow, hover glow */
.bento-card {
  position: relative;
  min-height: 0;
}
.bento-card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.bento-card-link:hover .bento-card-inner {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.5), 0 0 24px var(--bento-accent-glow), 0 0 48px rgba(123, 163, 212, 0.2);
}
.bento-card-cta {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bento-accent);
  margin-top: var(--space-sm);
  transition: color var(--duration-fast);
}
.bento-card-link:hover .bento-card-cta {
  color: var(--accent-bright);
}
.bento-card-inner {
  position: relative;
  height: 100%;
  min-height: 180px;
  padding: var(--space-xl);
  background: linear-gradient(165deg, #1a1a1a 0%, #0d0d0d 50%, #080808 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform var(--duration-normal) var(--ease-out-expo), border-color var(--duration-normal), box-shadow var(--duration-normal);
}
.bento-card-inner:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.5), 0 0 24px var(--bento-accent-glow), 0 0 48px rgba(123, 163, 212, 0.2);
}

.bento-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--white);
  margin: 0 0 var(--space-xs);
  line-height: 1.25;
}
.bento-title em.bento-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--bento-accent);
}
.bento-sub {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin: 0;
}

/* See more — dropdown of other projects below bento grid */
.projects-more-wrap {
  text-align: center;
  margin-top: var(--space-2xl);
}
.projects-more-dropdown-wrap {
  position: relative;
  display: inline-block;
}
.projects-more-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--duration-fast), color var(--duration-fast), background var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}
.projects-more-btn:hover {
  border-color: var(--bento-accent);
  color: var(--accent-bright);
  background: rgba(123, 163, 212, 0.1);
}
.projects-more-chevron {
  transition: transform var(--duration-fast) var(--ease-out-expo);
}
.projects-more-wrap[data-open="true"] .projects-more-chevron {
  transform: rotate(180deg);
}
.projects-more-dropdown {
  position: absolute;
  left: 50%;
  top: calc(100% + var(--space-sm));
  transform: translateX(-50%);
  min-width: 220px;
  max-width: 320px;
  margin: 0;
  padding: var(--space-sm);
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity var(--duration-fast) var(--ease-out-expo), visibility var(--duration-fast), transform var(--duration-fast) var(--ease-out-expo);
  z-index: 100;
}
.projects-more-wrap[data-open="true"] .projects-more-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.projects-more-dropdown li {
  margin: 0;
}
.projects-more-dropdown-link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-100);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast), color var(--duration-fast);
}
.projects-more-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-bright);
}

/* Creator Hub: photo thumbnail grid */
/* Content Creator Hub — split layout */
.bento-card-inner--split {
  flex-direction: row !important;
  align-items: stretch;
  gap: var(--space-xl);
  padding: var(--space-xl);
}
.bento-split-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-xs);
}
.bento-camera-icon {
  width: 28px;
  height: 28px;
  color: rgba(123,163,212,0.70);
  margin-bottom: var(--space-xs);
}
.bento-split-photo {
  flex: 0 0 54%;
  border-radius: calc(var(--radius-lg) - 4px);
  overflow: hidden;
  align-self: stretch;
  margin: 8px 8px 8px 0;
}
.bento-hub-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0.88;
  transition: opacity var(--duration-normal);
}
.bento-card-inner--split:hover .bento-hub-photo { opacity: 1; }

.bento-photogrid {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(4, 30px);
  grid-template-rows: repeat(2, 24px);
  gap: 5px;
}
.bento-pg-cell {
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(123,163,212,0.07);
}
.bento-pg-cell--1 { background: rgba(123,163,212,0.16); }
.bento-pg-cell--3 { background: rgba(130,88,200,0.12); }
.bento-pg-cell--5 { background: rgba(70,158,182,0.12); }
.bento-pg-cell--7 { background: rgba(155,115,220,0.10); }
.bento-pg-cell--1::after,
.bento-pg-cell--3::after,
.bento-pg-cell--5::after {
  content: '';
  display: block;
  width: 100%;
  height: 45%;
  background: rgba(255,255,255,0.05);
  border-radius: 3px 3px 0 0;
}

/* Product Promotional Pages: sales chart + dollar */
.bento-sales {
  position: absolute;
  bottom: var(--space-xl);
  right: var(--space-xl);
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.bento-sales-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 30px;
}
.bento-sales-bar {
  width: 5px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(to top, var(--bento-accent), rgba(123,163,212,0.25));
  opacity: 0.75;
}
.bento-sales-bar--1 { height: 28%; }
.bento-sales-bar--2 { height: 50%; }
.bento-sales-bar--3 { height: 72%; }
.bento-sales-bar--4 { height: 100%; }
.bento-sales-dollar {
  position: absolute;
  top: var(--space-md);
  right: var(--space-xl);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(123,163,212,0.55);
  line-height: 1;
  letter-spacing: -0.02em;
  user-select: none;
  text-shadow: 0 0 12px rgba(123,163,212,0.5), 0 0 28px rgba(123,163,212,0.25);
}

/* Innovations: tech pills cloud */
.bento-tech-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  max-height: 100px;
  overflow: hidden;
}
.bento-tech-pill {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  color: var(--gray-200);
}

/* Map: top-down grid map with pulsing location pins */
.bento-map {
  position: absolute;
  left: 50%;
  top: 28%;
  transform: translate(-50%, -50%);
  width: 130px;
  height: 95px;
  border-radius: 8px;
  background: rgba(10, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.bento-map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 18px 18px;
}
.bento-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(123, 163, 212, 0.09) 2px, transparent 2px),
    linear-gradient(90deg, rgba(123, 163, 212, 0.09) 2px, transparent 2px);
  background-size: 54px 36px;
  background-position: 9px 12px;
}
.bento-map-pin {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bento-accent);
  box-shadow: 0 0 8px var(--bento-accent);
  opacity: 0;
  animation: map-pin-drop 6s ease-in-out infinite;
}
.bento-map-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--bento-accent);
  opacity: 0;
  animation: map-pin-ring-drop 6s ease-out infinite;
}
.bento-map-pin--a { left: 22%; top: 28%; animation-delay: 0s; }
.bento-map-pin--b { left: 63%; top: 58%; animation-delay: 1.8s; }
.bento-map-pin--c { left: 78%; top: 22%; animation-delay: 3.6s; }
.bento-map-pin--a::after { animation-delay: 0s; }
.bento-map-pin--b::after { animation-delay: 1.8s; }
.bento-map-pin--c::after { animation-delay: 3.6s; }
@keyframes map-pin-drop {
  0%   { opacity: 0; transform: translateY(-14px) scale(0.4); }
  8%   { opacity: 1; transform: translateY(3px) scale(1.3); }
  13%  { opacity: 1; transform: translateY(0) scale(1); }
  52%  { opacity: 1; transform: translateY(0) scale(1); }
  60%  { opacity: 0; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-14px) scale(0.4); }
}
@keyframes map-pin-ring-drop {
  0%   { opacity: 0;   transform: translate(-50%, -50%) scale(1); }
  8%   { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
  40%  { opacity: 0;   transform: translate(-50%, -50%) scale(4); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(1); }
}

/* CTA: email copy button */
.bento-cta-btn {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--white);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast), opacity var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}
.bento-cta-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}
.bento-cta-btn:active { transform: scale(0.98); }

/* 360 Viewer: radar sweep */
.bento-360 {
  position: absolute;
  left: 50%;
  top: 35%;
  transform: translate(-50%, -50%);
  width: 85px;
  height: 85px;
}
.bento-360-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.08);
}
.bento-360-ring--outer { inset: 0; }
.bento-360-ring--mid { inset: 20px; border-color: rgba(255,255,255,0.06); }
.bento-360-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(123,163,212,0.18) 40deg, transparent 40deg);
  animation: radar-spin 3s linear infinite;
}
.bento-360-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px;
  border-radius: 50%;
  background: var(--bento-accent);
  box-shadow: 0 0 8px var(--bento-accent);
}
@keyframes radar-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Room Planner: top-down floor plan */
.bento-floorplan {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 58px;
  border: 1.5px solid rgba(123,163,212,0.22);
  border-radius: 3px;
  background: rgba(10,15,25,0.55);
}
.bento-floorplan::before {
  content: '';
  position: absolute;
  left: 44%;
  top: 0;
  bottom: 38%;
  width: 1.5px;
  background: rgba(123,163,212,0.18);
}
.bento-fp-glow {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(ellipse 65% 55% at 50% 50%, var(--bento-accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.bento-fp-item {
  position: absolute;
  border-radius: 2px;
  background: rgba(123,163,212,0.12);
  border: 1px solid rgba(123,163,212,0.22);
}
.bento-fp-item--sofa { width: 20px; height: 8px; left: 5px; top: 6px; }
.bento-fp-item--table { width: 11px; height: 11px; left: 47px; top: 8px; border-radius: 50%; }
.bento-fp-item--bed { width: 17px; height: 13px; left: 5px; bottom: 6px; }
.bento-fp-cursor {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--bento-accent);
  border-radius: 1px;
  box-shadow: 0 0 6px var(--bento-accent-glow);
  animation: fp-cursor-move 5s ease-in-out infinite;
}
@keyframes fp-cursor-move {
  0%, 5% { left: 5px; top: 6px; opacity: 0; }
  10% { opacity: 1; left: 5px; top: 6px; }
  40% { left: 47px; top: 8px; }
  70% { left: 5px; top: 34px; }
  92% { opacity: 1; }
  100% { left: 5px; top: 34px; opacity: 0; }
}

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
  }
  .bento-card--partnership { grid-column: 1 / -1; grid-row: 1; min-height: 200px; }
  .bento-card--innovations { grid-column: 1 / -1; grid-row: 2; min-height: 180px; }
  .bento-card--globe { grid-column: 1; grid-row: 3; }
  .bento-card--cta { grid-column: 2; grid-row: 3; }
  .bento-card--product { grid-column: 1 / -1; grid-row: 4; min-height: 180px; }
  .bento-tech-cloud { max-height: 80px; }
}
@media (max-width: 480px) {
  .bento-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .bento-card--partnership,
  .bento-card--innovations,
  .bento-card--globe,
  .bento-card--cta,
  .bento-card--product { grid-column: 1; grid-row: auto; }
  .bento-card-inner { min-height: 190px; padding: var(--space-lg); }
  .bento-map { width: 100px; height: 72px; top: 32%; }
  .bento-360 { width: 68px; height: 68px; top: 40%; }
  .bento-floorplan { width: 62px; height: 46px; top: 32%; }
}

/* Fade out decorative bento icons when viewport is too short to avoid overlap */
.bento-sales,
.bento-sales-dollar,
.bento-map,
.bento-360,
.bento-floorplan,
.bento-split-photo,
.bento-camera-icon {
  transition: opacity 0.25s ease;
}
@media (max-height: 650px) {
  .bento-sales,
  .bento-sales-dollar,
  .bento-map,
  .bento-360,
  .bento-floorplan,
  .bento-camera-icon {
    opacity: 0;
    pointer-events: none;
  }
  .bento-split-photo {
    flex: 0 0 0;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
  }
}

/* Legacy project modal (kept for any future use) */
.project-detail-btn {
  align-self: flex-start;
  font-size: 0.9rem;
  color: var(--accent);
  padding: var(--space-sm) 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.project-detail-btn:hover { color: var(--accent-bright); }
.project-detail-btn::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--duration-normal) var(--ease-out-expo);
}
.project-detail-btn:hover::after { width: 100%; }

/* ==========================================================================
   Gallery — Media showcases
   ========================================================================== */
.gallery-section {
  background: var(--bg);
}

.gallery-header { margin-bottom: 0; }

.gallery-intro {
  font-size: 1rem;
  color: var(--gray-200);
  margin-bottom: var(--space-2xl);
  max-width: 52ch;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.gallery-subsection {
  margin-bottom: var(--space-4xl);
}
.gallery-subsection:last-of-type { margin-bottom: 0; }
.gallery-subsection-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 var(--space-lg);
  letter-spacing: -0.02em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg);
}

/* Thumbnail card: link with image on top, then body */
.gallery-card.gallery-card--thumb {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal), transform var(--duration-normal) var(--ease-out-expo);
}
.gallery-card.gallery-card--thumb:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(123, 163, 212, 0.15);
  transform: translateY(-2px);
}

.gallery-card-thumb-wrap {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  overflow: hidden;
}
.gallery-card-thumb-wrap--placeholder {
  background: linear-gradient(145deg, #0d0d0d 0%, #1a1a1a 100%);
}
/* One Story: crop to match 16:10 frame (focus upper-center) */
.gallery-card-thumb-wrap--one-story .gallery-card-thumb {
  object-position: 50% 35%;
}
.gallery-card-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}
.gallery-card.gallery-card--thumb:hover .gallery-card-thumb {
  transform: scale(1.03);
}

.gallery-card-body {
  display: block;
  padding: var(--space-md) var(--space-lg);
}
.gallery-card-type {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin-bottom: var(--space-xs);
}
.gallery-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 var(--space-xs);
  line-height: 1.35;
}
.gallery-card-cta {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  transition: color var(--duration-fast);
}
.gallery-card.gallery-card--thumb:hover .gallery-card-cta {
  color: var(--accent-bright);
}

/* Immersive Tours carousel — 3 visible, left/right arrows rotate through */
.gallery-carousel {
  position: relative;
  margin-bottom: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
}
.gallery-carousel-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  align-self: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--gray-100);
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}
.gallery-carousel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-dim);
  color: var(--accent-bright);
}
.gallery-carousel-btn--prev {
  order: 1;
  margin-right: var(--space-sm);
}
.gallery-carousel-viewport {
  order: 2;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 0 2px;
  box-sizing: border-box;
}
.gallery-carousel-btn--next {
  order: 3;
  margin-left: var(--space-sm);
}
/* Track is 3× viewport (9 cards ÷ 3 visible); each card = 1/9 of track = 1/3 viewport */
.gallery-carousel-track {
  display: flex;
  width: 300%;
  will-change: transform;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-carousel-card {
  flex: 0 0 11.111%;
  width: 11.111%;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
}
.gallery-carousel-card + .gallery-carousel-card {
  padding-left: var(--space-md);
}
/* Mobile: 1 card visible — track expands to 9× viewport, gaps removed */
@media (max-width: 600px) {
  .gallery-carousel-track { width: 900%; }
  .gallery-carousel-card + .gallery-carousel-card { padding-left: 0; }
}
.gallery-carousel-card .gallery-card-thumb-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.gallery-carousel-controls {
  order: 4;
  flex-basis: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-lg);
}
.gallery-carousel-dots {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.gallery-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--duration-fast), transform var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}
.gallery-carousel-dot:hover {
  background: rgba(255, 255, 255, 0.35);
}
.gallery-carousel-dot.is-active {
  background: var(--accent);
  transform: scale(1.2);
}

/* Personal Projects Modal (secret) */
.personal-projects-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  width: 100%;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  border: none;
  background: transparent;
  padding: var(--space-xl);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.personal-projects-modal:not([open]) {
  display: none !important;
  pointer-events: none;
}
.personal-projects-modal::backdrop { background: rgba(0, 0, 0, 0.8); }

.personal-projects-modal-inner {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-2xl);
  padding-top: calc(var(--space-xl) + env(safe-area-inset-top, 0));
  padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0));
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.personal-projects-modal-close {
  position: absolute;
  top: var(--space-lg);
  top: calc(var(--space-lg) + env(safe-area-inset-top, 0));
  right: var(--space-xl);
  right: calc(var(--space-xl) + env(safe-area-inset-right, 0));
  font-size: 2rem;
  color: var(--gray-300);
  line-height: 1;
  padding: var(--space-md);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.personal-projects-modal-close:hover { color: var(--white); }
.personal-projects-modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 var(--space-xs);
  letter-spacing: -0.03em;
}
.personal-projects-modal-desc {
  font-size: 0.9rem;
  color: var(--gray-200);
  margin: 0 0 var(--space-xl);
  line-height: 1.5;
}
.personal-projects-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.personal-projects-list li {
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.personal-projects-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.personal-projects-list a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-100);
  transition: color var(--duration-fast);
}
.personal-projects-list a:hover { color: var(--accent); }

/* Contact Modal */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  width: 100%;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  border: none;
  background: transparent;
  padding: var(--space-xl);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-modal:not([open]) {
  display: none !important;
  pointer-events: none;
}
.contact-modal::backdrop { background: rgba(0, 0, 0, 0.8); }

.contact-modal-inner {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-2xl);
  padding-top: calc(var(--space-xl) + env(safe-area-inset-top, 0));
  padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0));
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
@media (max-width: 600px) {
  .contact-modal-inner {
    margin: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    padding-top: calc(var(--space-xl) + env(safe-area-inset-top, 0));
    padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0));
  }
}

.contact-modal-close {
  position: absolute;
  top: var(--space-lg);
  top: calc(var(--space-lg) + env(safe-area-inset-top, 0));
  right: var(--space-xl);
  right: calc(var(--space-xl) + env(safe-area-inset-right, 0));
  font-size: 2rem;
  color: var(--gray-300);
  line-height: 1;
  padding: var(--space-md);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.contact-modal-close:hover { color: var(--white); }

.contact-modal-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 var(--space-xs);
  letter-spacing: -0.03em;
}
.contact-modal-desc {
  font-size: 0.95rem;
  color: var(--gray-200);
  margin: 0 0 var(--space-lg);
  line-height: 1.5;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}
@media (max-width: 480px) {
  .contact-form-row { grid-template-columns: 1fr; }
}
.contact-form-field {
  margin-bottom: var(--space-md);
}
.contact-form-field:last-of-type { margin-bottom: 0; }

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-200);
  margin-bottom: var(--space-xs);
}
.contact-form .optional { font-weight: 400; color: var(--gray-300); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--gray-300); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.contact-form textarea { resize: vertical; min-height: 80px; }

.contact-form-status {
  font-size: 0.9rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
  min-height: 1.4em;
}
.contact-form-status.success { color: var(--accent); }
.contact-form-status.error { color: #e57373; }

.contact-form-submit {
  width: 100%;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-xl);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast), opacity var(--duration-fast);
}
.contact-form-submit:hover { background: var(--accent-bright); color: var(--bg); }
.contact-form-submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* Contact section CTA (replaces mailto) */
.contact-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent);
  padding: var(--space-md) var(--space-xl);
  margin-bottom: var(--space-2xl);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast), box-shadow var(--duration-fast);
}
.contact-cta:hover {
  color: var(--accent-bright);
  border-color: var(--accent);
  background: rgba(123, 163, 212, 0.06);
  box-shadow: 0 0 32px var(--accent-dim);
}

/* ==========================================================================
   Systems — Architecture View
   ========================================================================== */
.systems-section { background: var(--bg-elevated); }

.systems-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.flowchart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
}
.flow-node {
  padding: var(--space-md) var(--space-xl);
  background: var(--bg);
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  transition: box-shadow var(--duration-fast), border-color var(--duration-fast);
}
.flow-node:hover { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-dim); }
.flow-line {
  width: 40px;
  height: 2px;
  background: var(--accent-dim);
  position: relative;
  overflow: hidden;
}
.flow-particle {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: flowMove 2s linear infinite;
}
@keyframes flowMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

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

.tools-hex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}
.tool-hex {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: var(--bg);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border: 1px solid var(--accent-dim);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  color: var(--gray-200);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast);
}
.tool-hex:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-dim);
  transform: scale(1.05);
  color: var(--white);
}

.ai-layer-desc { color: var(--gray-200); margin-bottom: var(--space-lg); max-width: 60ch; }
.ai-metrics { display: flex; gap: var(--space-2xl); flex-wrap: wrap; }
.ai-metric { font-size: 0.95rem; color: var(--gray-200); }
.ai-metric-value { font-family: var(--font-display); font-weight: 700; color: var(--accent); margin-right: var(--space-sm); }

/* ==========================================================================
   Process — Methodology
   ========================================================================== */
.process-section { background: var(--bg); }

.process-scroll-wrap { overflow-x: auto; overflow-y: hidden; padding-bottom: var(--space-lg); -webkit-overflow-scrolling: touch; }
.process-scroll-wrap::-webkit-scrollbar { height: 8px; }
.process-scroll-wrap::-webkit-scrollbar-track { background: var(--bg-elevated); border-radius: 4px; }
.process-scroll-wrap::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 4px; }

.process-timeline {
  display: flex;
  gap: var(--space-xl);
  min-width: min-content;
  padding: var(--space-md) 0;
}
@media (max-width: 768px) {
  .process-timeline { flex-direction: column; min-width: 100%; }
}

.process-stage {
  flex: 0 0 280px;
  padding: var(--space-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast);
}
.process-stage:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

.process-num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  display: block;
}
.process-icon { font-size: 1.5rem; color: var(--accent-dim); margin-bottom: var(--space-sm); }
.process-stage-title { font-size: 1.1rem; color: var(--white); margin-bottom: var(--space-sm); }
.process-stage-desc { font-size: 0.9rem; color: var(--gray-300); margin: 0; }

/* ==========================================================================
   The Magic Behind — Skillset (3D header + skill cloud)
   ========================================================================== */
.magic-behind {
  margin-top: var(--space-4xl);
  margin-bottom: var(--space-2xl);
  padding-top: var(--space-3xl);
  text-align: center;
}
.magic-behind-label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gray-100);
  margin-bottom: var(--space-xl);
  position: relative;
  z-index: 2;
}
.magic-behind-header {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-3xl);
}
/* 3D glossy black abstract ribbon/floral shape behind the title */
.magic-behind-shape {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  max-width: 420px;
  height: 120px;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, #0d0d0d 0%, #111 40%, #0a0a0a 70%, transparent 100%);
  border-radius: 50%;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 8px rgba(0, 0, 0, 0.4);
  filter: blur(1px);
  pointer-events: none;
}
.magic-behind-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-shadow:
    0 0 40px rgba(255, 255, 255, 0.15),
    0 0 80px rgba(255, 255, 255, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.3);
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.12));
}
.magic-behind-title em.magic-behind-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  background: var(--gradient-magic-behind);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: none;
}

/* Skill cloud — staggered rows (6-6-7-5 feel), centered flex-wrap */
.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.skill-cloud .skill-pill-item:nth-child(7) { margin-left: 1.5rem; }
.skill-cloud .skill-pill-item:nth-child(13) { margin-left: 0.75rem; }
.skill-cloud .skill-pill-item:nth-child(20) { margin-right: 1.25rem; }
.skill-cloud .skill-pill-item:nth-child(24) { margin-left: 2rem; }
.skill-cloud .skill-pill-item:nth-child(26) { margin-right: 1rem; }

.skill-pill-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.skill-pill-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.skill-pill-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}
.skill-pill-item--no-logo img { display: none; }
.skill-pill-item--text-only { padding: var(--space-sm) var(--space-xl); }

@media (max-width: 768px) {
  .magic-behind { margin-top: var(--space-3xl); margin-bottom: var(--space-3xl); padding-top: var(--space-2xl); }
  .magic-behind-shape { width: 120%; max-width: 320px; height: 90px; }
  .magic-behind-title { font-size: clamp(1.85rem, 6vw, 2.5rem); }
  .skill-cloud {
    gap: var(--space-xs) var(--space-sm);
    padding: 0 var(--space-sm);
  }
  .skill-cloud .skill-pill-item:nth-child(7),
  .skill-cloud .skill-pill-item:nth-child(13),
  .skill-cloud .skill-pill-item:nth-child(20),
  .skill-cloud .skill-pill-item:nth-child(24),
  .skill-cloud .skill-pill-item:nth-child(26) { margin-left: 0; margin-right: 0; }
  .skill-pill-item { font-size: 0.82rem; padding: var(--space-xs) var(--space-md); }
  .skill-pill-item img { width: 24px; height: 24px; }
}
@media (max-width: 480px) {
  .magic-behind-label { letter-spacing: 0.2em; }
  .skill-cloud { max-width: none; }
}

/* ==========================================================================
   Skills — The Arsenal
   ========================================================================== */
.skills-section { background: var(--bg-elevated); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
}
@media (max-width: 768px) { .skills-grid { grid-template-columns: 1fr; } }

.skills-col-title {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.skills-tags { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.skill-pill {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-200);
  transition: opacity var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}
.skill-pill:hover {
  opacity: 1;
  border-color: var(--accent);
  color: var(--white);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials-section { background: var(--bg); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.testimonial-card {
  padding: var(--space-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  margin: 0;
  position: relative;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.testimonial-card:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

.testimonial-quote {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.5;
  line-height: 1;
  display: block;
  margin-bottom: var(--space-sm);
}
.testimonial-card p { color: var(--gray-200); margin-bottom: var(--space-md); }
.testimonial-card cite { font-size: 0.85rem; color: var(--gray-300); font-style: normal; }

/* ==========================================================================
   Contact — The Handshake
   ========================================================================== */
.contact-section {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(91, 155, 213, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(155, 123, 184, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 80% 70%, rgba(77, 184, 168, 0.09) 0%, transparent 60%),
    var(--bg);
  text-align: center;
  padding: var(--space-5xl) var(--space-xl);
}

.contact-inner { max-width: 560px; margin: 0 auto; }

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}
.contact-subtitle {
  font-size: 1.1rem;
  color: var(--gray-200);
  margin-bottom: var(--space-2xl);
  line-height: 1.6;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent);
  padding: var(--space-md) var(--space-xl);
  margin-bottom: var(--space-2xl);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-md);
  transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast), box-shadow var(--duration-fast);
}
.contact-email:hover {
  color: var(--accent-bright);
  border-color: var(--accent);
  background: rgba(123, 163, 212, 0.06);
  box-shadow: 0 0 32px var(--accent-dim);
}

.contact-social { display: flex; justify-content: center; gap: var(--space-lg); margin-bottom: var(--space-2xl); }
.contact-social-link {
  padding: var(--space-md) var(--space-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--gray-200);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color var(--duration-fast), color var(--duration-fast), background var(--duration-fast);
}
.contact-social-link:hover { border-color: var(--accent-dim); color: var(--accent); background: rgba(123, 163, 212, 0.04); }

.contact-availability { font-size: 0.8rem; letter-spacing: 0.05em; color: var(--gray-300); text-transform: uppercase; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--bg-elevated);
  padding: var(--space-2xl) var(--space-xl);
  padding-bottom: calc(var(--space-2xl) + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--gray-300);
}

/* ==========================================================================
   Scroll-triggered fade-in
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
