/* Google Fonts imported in HTML for better performance */

:root {
  /* ── Luminous Obsidian 2026 ── */
  --surface: #050505;
  --surface-1: #0a0a0a;
  --surface-2: #121212;
  --surface-3: #1a1a1a;
  --surface-4: #242424;

  /* ── Previously undefined — now fixed ── */
  --surface-container: #141414;
  --surface-container-low: #0d0d0d;
  --surface-container-highest: #2a2a2a;
  --outline-variant: rgba(197, 240, 21, 0.22);

  --primary: #c5f015;
  --primary-rgb: 197, 240, 21;
  --primary-container: #1a1f03;
  --on-primary-container: #d9ff4d;
  --secondary: #8e9e44;
  --tertiary: #d4e157;
  --on-surface: #f2f2f2;
  --on-surface-variant: #a1a1a1;

  /* ── Baseline Grid (4px) ── */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-24: 6rem;

  /* ── Radius tokens — unified ── */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 9999px;
  --r-btn: 4px;

  /* ── Glassmorphism ── */
  --glass-bg: rgba(10, 10, 10, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-reflection: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);

  /* ── Motion ── */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
  --viscous-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fluid: 0.6s var(--ease-out-expo);
  --transition-snappy: 0.3s var(--ease-out-expo);
  --transition-viscous-fast: 0.25s var(--viscous-ease);
}

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

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

body {
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: 'Public Sans', sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

p, .body-md {
  margin-bottom: 2.25rem;
  color: var(--on-surface-variant);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Public Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--on-surface);
  text-wrap: balance;
}

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

ul { list-style: none; }

/* ─────────────────────────────────────────
   Scroll Progress Bar
───────────────────────────────────────── */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--tertiary));
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.6);
}

/* ─────────────────────────────────────────
   Cursor Glow Orb
───────────────────────────────────────── */
#cursorGlow {
  display: none;
}

/* ─────────────────────────────────────────
   Grain Texture Overlay
───────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ─────────────────────────────────────────
   Typography
───────────────────────────────────────── */
.display-lg {
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: -0.05em;
  font-weight: 800;
}

.label-md {
  font-family: 'Spline Sans', sans-serif;
  font-weight: 500;
  font-size: clamp(0.7rem, 0.8vw, 0.85rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
}

.label-sm {
  font-family: 'Spline Sans', sans-serif;
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* ─────────────────────────────────────────
   Navigation
───────────────────────────────────────── */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: var(--s-4) 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.5s var(--ease-out-expo);
}

.top-nav.scrolled {
  background: rgba(8, 8, 8, 0.75);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  padding: var(--s-3) 0;
  border-bottom-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Shiny specular highlight refraction */
.top-nav::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent 2%,
    rgba(255, 255, 255, 0.25) 20%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(var(--primary-rgb), 0.2) 80%,
    transparent 98%
  );
  pointer-events: none;
  opacity: 0.8;
}

.top-nav.scrolled::after {
  height: 1px;
  opacity: 1;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 25%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(var(--primary-rgb), 0.3) 75%,
    transparent 100%
  );
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--s-6);
}

.nav-brand { flex: 1; display: flex; }

.nav-logo-link {
  opacity: 0;
  transform: translateY(-6px) scale(0.85);
  transition: opacity 0.45s var(--ease-out-expo),
              transform 0.45s var(--ease-out-expo);
  display: inline-flex;
  pointer-events: none;
}

/* Triggered by IntersectionObserver in enhancements.js */
.nav-logo-link.logo-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Keep scrolled fallback for backwards compat */
.top-nav.scrolled .nav-logo-link.logo-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.nav-logo {
  height: clamp(28px, 4vh, 32px);
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: var(--transition-snappy);
}

.nav-logo:hover {
  opacity: 1;
  filter: brightness(0) invert(1) drop-shadow(0 0 8px var(--primary));
}

.nav-links {
  display: flex;
  gap: var(--s-8);
  align-items: center;
  flex: 0;
}

@media (min-width: 900px) {
  .nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

.nav-actions {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--s-4);
}

.nav-item {
  font-family: 'Spline Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--primary);
  border-radius: var(--r-full);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary);
}

.nav-item.active::after,
.nav-item:hover::after {
  width: 100%;
}

/* ─────────────────────────────────────────
   Mobile Bottom Navigation
───────────────────────────────────────── */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6);
  display: none;
}

.sheet-peek {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.peek-icons {
  display: flex;
  width: 100%;
  justify-content: space-around;
  padding: 0 var(--s-4);
}

.peek-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--on-surface-variant);
  transition: color 0.25s ease, transform 0.25s var(--ease-out-expo);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  min-width: 48px;
  min-height: 44px;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.peek-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.peek-item .nav-label {
  font-family: 'Spline Sans', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.peek-item:hover,
.peek-item.active {
  color: var(--primary);
  transform: translateY(-2px);
}

.peek-item.active svg {
  filter: drop-shadow(0 0 6px rgba(var(--primary-rgb), 0.5));
}

@media (max-width: 768px) {
  .desktop-only { display: none; }
  .bottom-sheet { display: block; }
  .top-nav { padding: var(--s-4) 0; }
  .nav-container { padding: 0 var(--s-4); }
  body { padding-bottom: 68px; }
}

/* Language Toggle */
.toggle-btn {
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  color: var(--on-surface-variant);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-sm);
  padding: 0.6rem 1.4rem;
  font-family: 'Spline Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.1);
}

.toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 12px rgba(var(--primary-rgb), 0.08);
  transform: translateY(-2.5px);
  letter-spacing: 0.18em;
}

.lang-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
}

.globe-icon { width: 16px; height: 16px; flex-shrink: 0; }

.lang-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ─────────────────────────────────────────
   Ambient Background
───────────────────────────────────────── */
.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--surface);
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.06;
}

.ambient-orb:nth-child(1) {
  width: 50vw;
  height: 50vh;
  background: radial-gradient(circle, var(--primary), transparent 70%);
  top: -15vh;
  left: -15vw;
}

.ambient-orb:nth-child(2) {
  width: 40vw;
  height: 40vh;
  background: radial-gradient(circle, var(--secondary), transparent 70%);
  bottom: -15vh;
  right: -10vw;
}

/* ─────────────────────────────────────────
   Container & Section Spacing
───────────────────────────────────────── */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--s-6);
  container-type: inline-size;
}

section {
  padding: var(--s-24) 0;
  position: relative;
  scroll-margin-top: 80px;
}

/* ─────────────────────────────────────────
   Glassmorphism Components
───────────────────────────────────────── */
.glass-panel {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(18, 18, 18, 0.7),
    rgba(10, 10, 10, 0.4) 100%
  );
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  padding: clamp(1.5rem, 3vw, 3rem);
  overflow: hidden;
  transition: var(--transition-snappy);
}

/* Top-edge reflection shimmer */
.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 40%,
    rgba(var(--primary-rgb), 0.15) 60%,
    transparent 100%
  );
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(var(--primary-rgb), 0.04);
}

/* ─────────────────────────────────────────
   Buttons — Unified Glass Design System
   All buttons share the same glass appearance.
   Hover highlights border + text to --primary,
   matching the nav item interaction pattern.
───────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--on-surface);
  font-family: 'Spline Sans', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  padding: 0.9rem 2.2rem;
  border-radius: var(--r-btn);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--on-surface-variant);
  font-family: 'Spline Sans', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  padding: 0.9rem 2.2rem;
  border-radius: var(--r-btn);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.btn-primary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(var(--primary-rgb), 0.15),
    0 8px 24px rgba(var(--primary-rgb), 0.08);
  transform: translateY(-2.5px);
  letter-spacing: 0.28em;
}

.btn-secondary:hover {
  border-color: var(--on-surface);
  color: var(--on-surface);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2.5px);
}

.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.96) translateY(-1px);
  transition-duration: 0.1s;
}

/* ─────────────────────────────────────────
   Filter Chips — Same glass system
───────────────────────────────────────── */
.filter-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.chip {
  padding: 0.9rem 2.2rem;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-btn);
  color: var(--on-surface-variant);
  cursor: pointer;
  font-family: 'Spline Sans', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.15);
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(var(--primary-rgb), 0.15),
    0 8px 24px rgba(var(--primary-rgb), 0.08);
  transform: translateY(-2.5px);
  letter-spacing: 0.28em;
}

.chip.active {
  background: var(--primary);
  color: var(--surface);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3),
              0 0 0 1px rgba(var(--primary-rgb), 0.2);
  font-weight: 700;
}

/* ─────────────────────────────────────────
   Hero Section
───────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  padding: max(var(--s-24), 120px) var(--s-8) var(--s-16) var(--s-8);
  text-align: center;
}

/* Ken-Burns removed for GPU performance */

/* Override ::after for hero background — use the section's bg */
.hero {
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .hero {
    min-height: 65vh;
    padding: max(var(--s-24), 180px) 0 var(--s-8) 0;
    background-attachment: scroll;
  }
  .hero-brand {
    width: 65%;
    max-width: 250px;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(5, 5, 5, 0.35) 0%,
      rgba(5, 5, 5, 0.55) 40%,
      rgba(5, 5, 5, 0.9) 80%,
      rgba(5, 5, 5, 1) 100%
    );
  z-index: 1;
}

.hero-brand {
  position: relative;
  z-index: 10;
  width: 52%;
  max-width: 900px;
  margin: 0 auto var(--s-5) auto;
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
}

.hero-subtitle {
  display: block;
  opacity: 0.7;
  text-align: left;
  margin-top: var(--s-5);
  font-family: 'Spline Sans', sans-serif;
  font-weight: 500;
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-surface);
  line-height: 1;
  /* Entrance animation to match logo */
  opacity: 0;
  animation: subtitleEntrance 1.2s var(--ease-out-expo) 0.15s forwards;
}

@keyframes subtitleEntrance {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 0.7;
    transform: translateY(0);
  }
}

.hero-logo {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.7;
  margin: 0;
  cursor: pointer;
  filter: drop-shadow(0 0 40px rgba(var(--primary-rgb), 0.2));
  transition: opacity 0.35s ease,
              filter 0.35s ease,
              transform 0.35s var(--ease-out-expo);
  animation: logoEntrance 1.2s var(--ease-out-expo) forwards;
}

@keyframes logoEntrance {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    filter: blur(10px) drop-shadow(0 0 0 transparent);
  }
  to {
    opacity: 0.7;
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 40px rgba(var(--primary-rgb), 0.2));
  }
}

.hero-logo:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 0 60px rgba(var(--primary-rgb), 0.3));
  opacity: 1;
}

.top-nav.scrolled ~ .hero .hero-brand {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  width: 100%;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: fadeSlideUp 1s var(--ease-out-expo) 0.8s forwards;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-bio {
  max-width: 800px;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--s-8);
  text-wrap: pretty;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  width: 100%;
}

.cta-tertiary {
  font-family: 'Spline Sans', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--on-surface-variant);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.2);
  text-underline-offset: 4px;
  transition: all 0.3s ease;
  margin-top: 1rem;
  width: 100%;
}

.cta-tertiary:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

@media (min-width: 768px) {
  .hero-cta-group {
    justify-content: center;
    width: auto;
  }
  .cta-tertiary {
    width: auto;
    margin-top: 0;
    margin-left: 1rem;
  }
}

/* ─────────────────────────────────────────
   Gallery Section
───────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-5);
}

.gallery-item {
  position: relative;
  background: var(--surface-2);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  border: 1px solid var(--glass-border);
  /* Entrance animation applied via JS */
  opacity: 0;
  transform: translateY(20px);
  transition:
    transform 0.5s var(--ease-out-expo),
    box-shadow 0.4s ease,
    border-color 0.3s ease,
    opacity 0.5s ease;
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(var(--primary-rgb), 0.3);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(var(--primary-rgb), 0.15);
}

.gallery-img-wrapper {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
}

/* Gradient overlay visible on hover */
.gallery-img-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 5, 5, 0.7) 0%,
    rgba(5, 5, 5, 0.15) 40%,
    transparent 100%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-img-wrapper::before {
  opacity: 1;
}

.gallery-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(35%) contrast(1.1);
  transition:
    transform 0.6s var(--ease-out-expo),
    filter 0.5s ease;
}

.gallery-item:hover .gallery-img-wrapper img {
  transform: scale(1.08);
  filter: grayscale(0%) contrast(1.05) brightness(0.95);
}

/* Caption panel — polished glass footer */
.gallery-footer {
  padding: var(--s-3) var(--s-4) var(--s-4);
  background: linear-gradient(180deg,
    var(--surface-container-low) 0%,
    var(--surface-1) 100%
  );
  border-top: 1px solid var(--glass-border);
  transition: background 0.3s ease;
}

.gallery-item:hover .gallery-footer {
  background: linear-gradient(180deg,
    rgba(25, 32, 5, 0.9) 0%,
    var(--surface-1) 100%
  );
}

.gallery-title {
  font-family: 'Public Sans', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-1);
  color: var(--on-surface);
  transition: color 0.25s ease;
}

.gallery-item:hover .gallery-title {
  color: var(--primary);
}

.gallery-desc {
  font-size: 0.72rem;
  color: var(--on-surface-variant);
  margin-bottom: 0;
  font-family: 'Spline Sans', sans-serif;
  font-style: italic;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

/* Skeleton loading */
.gallery-item.loading {
  pointer-events: none;
}

.gallery-item.loading .gallery-img-wrapper {
  background: var(--surface-3);
  overflow: hidden;
}

.gallery-item.loading .gallery-img-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  animation: skeleton 1.6s ease-in-out infinite;
}

@keyframes skeleton {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* Load-more button visibility */
.load-more-container {
  text-align: center;
  margin-top: 2rem;
}

/* ─────────────────────────────────────────
   Scroll-Driven Animations (2026)
───────────────────────────────────────── */
/* Scroll-driven blur animation removed for performance */

/* ─────────────────────────────────────────
   Text Reveal Animations
───────────────────────────────────────── */
.reveal-text {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s var(--viscous-ease),
    transform 0.8s var(--viscous-ease);
}

.reveal-text.active {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}

.reveal-text:nth-child(2) { transition-delay: 0.08s; }
.reveal-text:nth-child(3) { transition-delay: 0.16s; }
.reveal-text:nth-child(4) { transition-delay: 0.24s; }
.reveal-text:nth-child(5) { transition-delay: 0.32s; }
.reveal-text:nth-child(6) { transition-delay: 0.40s; }

/* ─────────────────────────────────────────
   About / Profile Section
───────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-12);
  align-items: center;
}

@container (min-width: 800px) {
  .about-grid {
    grid-template-columns: 1fr 350px;
  }
  .about-grid .portrait-wrapper {
    order: 2;
  }
  .about-grid .about-text {
    order: 1;
  }
}

.portrait-wrapper {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
}

/* Subtle shimmer overlay on portrait */
.portrait-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.portrait-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  filter: contrast(1.1) brightness(0.92);
  transition: transform 0.8s var(--ease-out-expo), filter 0.5s ease;
}

.portrait-wrapper:hover img {
  transform: scale(1.03);
  filter: contrast(1.05) brightness(0.96);
}

.portrait-credit {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--on-surface-variant);
  padding: var(--s-2) var(--s-4);
  font-size: 0.6rem;
  font-family: 'Spline Sans', sans-serif;
  text-decoration: none;
  border-top-left-radius: var(--r-md);
  transition: var(--transition-snappy);
  border-left: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border);
}

.portrait-credit:hover {
  background: var(--primary);
  color: var(--surface);
}

.about-text h2 {
  color: var(--primary);
  margin-bottom: var(--s-2);
}

.about-text h3 {
  margin-bottom: var(--s-6);
}

.about-text p {
  margin-bottom: 2.25rem;
  font-size: clamp(1rem, 1.1vw, 1.2rem);
  line-height: 1.6;
  max-width: 100%;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
}

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

.section-sep {
  margin-bottom: clamp(4rem, 12vw, 8rem);
}

section > h2.display-lg {
  margin-bottom: 2rem;
}

/* ─────────────────────────────────────────
   Accordion (Experience)
───────────────────────────────────────── */
/* Experience List (Hover Reveal)
───────────────────────────────────────── */
.exp-list {
  margin-top: 1rem;
  max-width: 100%;
}

.exp-card {
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition:
    background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.exp-card:hover,
.exp-card.active {
  background: rgba(10, 10, 10, 0.65);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(var(--primary-rgb), 0.15);
}

.exp-header {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  user-select: none;
  position: relative;
  transition: all 0.3s ease;
}

.exp-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  transition: color 0.3s ease;
}

.exp-card:hover h3,
.exp-card.active h3 {
  color: var(--primary);
}

.exp-header .date {
  color: var(--on-surface-variant);
  font-weight: 400;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.exp-card:hover .date,
.exp-card.active .date {
  color: var(--tertiary);
}

.exp-info {
  max-height: 0;
  padding: 0 1.5rem;
  opacity: 0;
  transform: translateY(10px);
  transition:
    max-height 0.5s var(--viscous-ease),
    padding 0.4s var(--viscous-ease),
    opacity 0.4s ease,
    transform 0.4s var(--viscous-ease);
}

.exp-card:hover .exp-info,
.exp-card.active .exp-info {
  max-height: 250px;
  padding: 0 1.5rem 1.75rem 1.5rem;
  opacity: 1;
  transform: translateY(0);
}

.exp-card.acc-hidden {
  max-height: 0;
  margin-bottom: 0;
  opacity: 0;
  border: none;
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
  transition:
    max-height 0.5s var(--viscous-ease),
    opacity 0.4s ease,
    margin 0.4s ease;
}

.exp-card.revealed {
  max-height: 400px;
  opacity: 1;
  pointer-events: auto;
  animation: cardReveal 0.6s var(--ease-out-expo) forwards;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────
   Contact Section
───────────────────────────────────────── */
.contact-card {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@container (min-width: 900px) {
  .contact-card {
    grid-template-columns: 0.45fr 0.55fr;
  }
}

.contact-visual {
  position: relative;
  min-height: 400px;
  background-image: url('../images/cactus-bloom_desert-wildflower_1.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--s-10) var(--s-8);
  overflow: hidden;
}

.contact-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 5, 0.2) 0%,
    rgba(5, 5, 5, 0.75) 100%
  );
  z-index: 1;
}

.visual-overlay { display: none; }

.visual-content {
  position: relative;
  z-index: 2;
}

.contact-form-panel {
  padding: var(--s-10) var(--s-8);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
}

.contact-visual .display-lg {
  color: var(--primary);
  margin-bottom: var(--s-2);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  word-break: normal;
}

.contact-visual .contact-lead {
  color: #fff;
  opacity: 0.9;
  margin-bottom: var(--s-8);
  font-size: 1.1rem;
  max-width: 100%;
}

.contact-visual .instagram-cta {
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: var(--transition-snappy);
  padding: 0.5rem 0;
}

.instagram-link:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.instagram-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.form-group label {
  color: var(--on-surface-variant);
  font-family: 'Spline Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  transition: color 0.25s ease;
}

.form-group:focus-within label {
  color: var(--primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-btn);
  padding: 0.85rem 1rem;
  color: var(--on-surface);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s ease,
              background 0.25s ease,
              box-shadow 0.25s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: var(--surface-4);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  align-items: flex-end;
}

.form-status {
  font-size: 0.85rem;
  font-family: 'Spline Sans', sans-serif;
  min-height: 1.2rem;
  transition: opacity 0.3s ease;
}

.form-status.success { color: var(--primary); }
.form-status.error   { color: #ff5252; }
.form-status.loading { color: var(--on-surface-variant); }

/* ─────────────────────────────────────────
   Lightbox
───────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--viscous-ease);
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-overlay.hidden {
  display: none;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 2.5rem;
  padding: 1.2rem;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.25s ease, transform 0.25s var(--ease-out-expo);
  user-select: none;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  min-width: 56px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-nav:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  transform: translateY(-50%) scale(1.1);
}

.lb-prev { left: 2%; }
.lb-next { right: 2%; }

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: lbIn 0.45s var(--ease-out-expo);
}

@media (min-width: 900px) {
  .lightbox-content.cs-layout {
    flex-direction: row;
    align-items: stretch;
    height: 80vh;
    width: 85vw;
    background: var(--surface-1);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    border: 1px solid var(--glass-border);
  }
  
  .cs-visual {
    flex: 2;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-4);
  }
  
  .lightbox-content.cs-layout img {
    max-height: 100%;
    max-width: 100%;
    box-shadow: none;
    border-radius: 0;
  }
  
  .lightbox-content.cs-layout .lightbox-caption {
    flex: 1;
    margin-top: 0;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--glass-border);
    height: 100%;
    overflow-y: auto;
    text-align: left;
    padding: var(--s-6) var(--s-5);
    background: rgba(15,15,15,0.95);
  }
}

@keyframes lbIn {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px var(--glass-border);
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.25s ease, transform 0.25s var(--ease-out-expo);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.05);
  line-height: 1;
  z-index: 100;
}

.lightbox-content.cs-layout .lightbox-close {
  top: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.3);
}

.lightbox-close:hover {
  color: var(--primary);
  transform: rotate(90deg) scale(1.1);
}

.lightbox-caption {
  margin-top: var(--s-4);
  text-align: center;
  padding: var(--s-3) var(--s-4);
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(8px);
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border);
}

.lightbox-caption h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.lightbox-caption p.cs-subtitle {
  color: var(--primary);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  font-family: 'Spline Sans', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cs-details {
  text-align: left;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.cs-label {
  color: var(--on-surface-variant);
  margin-bottom: 0.3rem;
}

.cs-body {
  color: var(--on-surface);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* ─────────────────────────────────────────
   Dialog
───────────────────────────────────────── */
dialog.glass-dialog {
  margin: auto;
  padding: 3rem 2.5rem 2.5rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  background: var(--surface-container);
  color: var(--on-surface);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  max-width: 90vw;
}

dialog.glass-dialog::backdrop {
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ─────────────────────────────────────────
   Footer
───────────────────────────────────────── */
footer {
  padding: var(--s-16) 0 var(--s-8) 0;
  border-top: 1px solid var(--glass-border);
}

.footer-text {
  color: var(--on-surface-variant);
  text-align: right;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
  opacity: 0.6;
}

/* ─────────────────────────────────────────
   Hero Content (bottom-left layout)
───────────────────────────────────────── */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  width: 100%;
}

.hero h1 {
  margin-bottom: 2rem;
  color: #fff;
  overflow: visible;
}

.hero p {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.8);
  margin: 0 auto 3rem;
  max-width: 100%;
  font-weight: 300;
  line-height: 1.7;
  text-align: center;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
}

/* ─────────────────────────────────────────
   Scrollbar
───────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border: 2px solid var(--surface);
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─────────────────────────────────────────
   Touch Targets & Accessibility
───────────────────────────────────────── */
a, button, .chip, .accordion-header, .peek-item {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button, .chip, .accordion-header {
  min-height: 44px;
}

/* ─────────────────────────────────────────
   Reduced Motion
───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #cursorGlow { display: none; }
}

/* ─────────────────────────────────────────
   Utility Classes (SEO & Accessibility)
───────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
