/* ==========================================================================
   CREATIVE DEVELOPER PORTFOLIO — STYLE SYSTEM
   Aesthetic: Modern Professional · Clean & Readable
   Typography: Montserrat (headers) · Open Sans (body)
   Accent: #d43f11 (burnt orange)
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Open+Sans:wght@400;500;600&display=swap');

/* --- Custom Properties --- */
:root {
  /* Colours - Lightened Dark Theme */
  --bg-primary: #121212;
  --bg-secondary: #1a1a1a;
  --bg-elevated: #242424;
  --bg-accent: #d43f11;
  --text-primary: #f5f5f5;
  --text-secondary: #c9c9c9;
  --text-muted: #8a8a8a;
  --accent: #d43f11;
  --accent-glow: rgba(212, 63, 17, 0.3);
  --terminal-green: #4ade80;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);

  /* Typography */
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace; /* Keep for code/terminal elements only */

  /* Sizing */
  --nav-height: 64px;
  --section-pad-x: clamp(24px, 5vw, 80px);
  --section-pad-y: clamp(80px, 12vh, 160px);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 0.3s;
  --duration-med: 0.6s;
  --duration-slow: 1.2s;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: auto; /* Lenis handles smooth scroll */
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem; /* 16px - optimal for readability */
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

a:hover {
  color: var(--accent);
}

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

::selection {
  background: var(--accent);
  color: var(--text-primary);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

/* --- Noise/Grain Overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  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-repeat: repeat;
  background-size: 256px 256px;
}

/* ==========================================================================
   LOADER
   ========================================================================== */

#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

#loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.loader-track {
  width: 200px;
  height: 2px;
  background: var(--border-subtle);
  border-radius: 1px;
  overflow: hidden;
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.3s ease;
}

#loader-percent {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2001;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-pad-x);
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: transform 0.4s var(--ease-out-expo);
}

/* When mobile nav is open: remove backdrop-filter (it makes position:fixed children
   position relative to the header instead of the viewport, clipping the overlay)
   and clear the background so the X button floats cleanly over the dark overlay */
.site-header.nav-open {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
  border-bottom-color: transparent;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.nav-logo .accent-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--duration-fast) ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-num {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.6875rem;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: calc(var(--nav-height) - 1px);
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 1001;
  transition: none;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 2002;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s var(--ease-out-quart);
  border-radius: 2px;
  position: relative;
}

/* Transform hamburger to X when nav is open */
.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--accent);
  width: 26px;
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--accent);
  width: 26px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) var(--section-pad-x) var(--section-pad-y);
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
}

/* Ambient accent glow — pulses slowly behind the heading */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 65% 55% at 28% 42%, rgba(212, 63, 17, 0.12), transparent 70%);
  animation: hero-glow-pulse 8s ease-in-out infinite;
}

@keyframes hero-glow-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.65; transform: scale(1.08); }
}

/* Mouse-tracking spotlight */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle 500px at var(--mx, 30%) var(--my, 50%),
    rgba(255, 255, 255, 0.05),
    transparent 70%
  );
  transition: background 0.1s ease;
}

/* Canvas topology layer */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}

/* 3D Interactive Shapes Container */
#hero-3d-container {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: 35%;
  height: 60%;
  z-index: 1;
  pointer-events: auto;
  cursor: pointer;
}

#hero-3d-container canvas {
  border-radius: 8px;
}

/* Glow effect for 3D shapes on hover */
#hero-3d-container::after {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(212, 63, 17, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

#hero-3d-container:hover::after {
  opacity: 1;
}

/* Mobile: hide 3D container on small screens */
@media (max-width: 768px) {
  #hero-3d-container {
    display: none;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 20px);
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero-heading {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    margin-bottom: 16px;
  }

  .hero-tagline {
    font-size: clamp(1rem, 4vw, 1.25rem);
    margin-bottom: 32px;
    max-width: 100%;
  }

  .hero-ctas {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
    width: 100%;
  }

  .hero-ctas .btn {
    width: 100%;
    text-align: center;
    padding: 12px 24px;
  }

  .hero-meta {
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
  }

  .hero-meta-item {
    font-size: 0.625rem;
  }

  .scroll-indicator {
    bottom: 20px;
  }

  .hero-coordinates {
    position: static;
    flex-direction: row;
    gap: 16px;
    margin-top: 20px;
    align-items: center;
  }
}

/* Keep all hero content above canvas & pseudo-element layers */
.hero > *:not(#hero-canvas):not(#hero-3d-container) {
  position: relative;
  z-index: 1;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}

.hero-meta-item {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terminal-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-heading .word {
  display: inline-block;
  overflow: hidden;
}

.hero-heading .word-inner {
  display: inline-block;
  transform: translateY(110%);
}

.hero-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 520px;
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-bottom: 80px;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-quart);
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  box-shadow: 0 0 20px rgba(240, 237, 232, 0.05);
}

.hero-coordinates {
  position: absolute;
  bottom: 40px;
  right: var(--section-pad-x);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.hero-coordinates span {
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: var(--section-pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-indicator span {
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}

.scroll-indicator .arrow {
  width: 1px;
  height: 40px;
  background: var(--text-muted);
  position: relative;
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.5; }
}

/* ==========================================================================
   SECTION — COMMON STYLES
   ========================================================================== */

.section {
  padding: var(--section-pad-y) var(--section-pad-x);
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: block;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.section-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 600px;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  border: none;
}

/* ==========================================================================
   PROJECTS GRID
   ========================================================================== */

.projects {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.projects-header {
  margin-bottom: 64px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border-subtle);
}

.project-card {
  background: var(--bg-primary);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background var(--duration-fast) ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 1; /* Ensure visible even if JS fails */
  visibility: visible;
}

.project-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.5s var(--ease-out-expo);
}

.project-card:hover {
  background: var(--bg-elevated);
}

.project-card:hover::before {
  width: 100%;
}

.project-code {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.project-badge {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  display: inline-block;
  width: fit-content;
}

.project-badge.badge-dev {
  color: var(--accent);
  background: rgba(212, 63, 17, 0.1);
  border: 1px solid rgba(212, 63, 17, 0.3);
}

.project-badge.badge-concept {
  color: var(--text-secondary);
  background: rgba(160, 157, 152, 0.1);
  border: 1px solid rgba(160, 157, 152, 0.3);
}

.project-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  transition: color var(--duration-fast) ease;
}

.project-card:hover .project-name {
  color: var(--accent);
}

.project-desc {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
  flex-grow: 1;
}

.project-cta {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  transition: color var(--duration-fast) ease, gap var(--duration-fast) ease;
}

.project-card:hover .project-cta {
  color: var(--accent);
  gap: 14px;
}

.project-cta .arrow {
  font-size: 1rem;
  transition: transform var(--duration-fast) ease;
}

.project-card:hover .project-cta .arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */

.about {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 1;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.7);
}

/* All sections after the hero stack above it */
.stats-band,
.services,
.projects,
.testimonials,
.marquee-section,
.contact,
.site-footer {
  position: relative;
  z-index: 1;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 64px;
  align-items: start;
}

/* Real photo */
.about-image-wrap {
  position: sticky;
  top: calc(var(--nav-height) + 40px);
}

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  display: block;
}

/* Stats band — standalone section below About */
.stats-band {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 64px var(--section-pad-x);
}

.stats-band-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border-subtle);
}

.stats-band .stat {
  background: var(--bg-primary);
  padding: 40px 32px;
  text-align: center;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-body p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.about-body strong {
  color: var(--text-primary);
  font-weight: 500;
}

.about-cta-text {
  font-family: var(--font-body) !important;
  font-style: italic;
  font-size: 1.125rem !important;
  color: var(--accent) !important;
  margin-top: 8px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--accent);
  margin-left: 2px;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 12px;
  display: block;
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */

.services {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  background: var(--border-subtle);
  margin-top: 48px;
}

.services-grid .service-card {
  grid-column: span 2;
}

.services-grid .service-card:nth-child(4) {
  grid-column: span 3;
}

.services-grid .service-card:nth-child(5) {
  grid-column: span 3;
}

.service-card {
  background: var(--bg-primary);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background var(--duration-fast) ease;
  position: relative;
  overflow: hidden;
  opacity: 1; /* Ensure visible even if JS fails */
  visibility: visible;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--accent-glow) 0%, transparent 100%);
  transition: height 0.5s var(--ease-out-expo);
}

.service-card:hover {
  background: var(--bg-elevated);
}

.service-card:hover::after {
  height: 120px;
}

.service-icon {
  color: var(--accent);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  position: relative;
  z-index: 1;
  transition: border-color var(--duration-fast) ease;
}

.service-card:hover .service-icon {
  border-color: var(--accent);
}

.service-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.service-desc {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}


/* ==========================================================================
   TOOLTIP (No-Code Explanation)
   ========================================================================== */

.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: 50%;
  cursor: help;
  position: relative;
  flex-shrink: 0;
  line-height: 1;
}

.tooltip-content {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 4px;
  padding: 12px 16px;
  width: 260px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-fast) ease, visibility var(--duration-fast) ease;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-hover);
}

.tooltip-trigger:hover .tooltip-content,
.tooltip-trigger:focus .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   TESTIMONIALS SECTION
   ========================================================================== */

.testimonials {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border-subtle);
  margin-top: 48px;
}

.testimonial-card {
  background: var(--bg-secondary);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  opacity: 1; /* Ensure visible even if JS fails */
  visibility: visible;
}

.value-icon {
  color: var(--accent);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  transition: border-color var(--duration-fast) ease;
}

.testimonial-card:hover .value-icon {
  border-color: var(--accent);
}

.value-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.testimonial-quote {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
  border: none;
  margin: 0;
  padding: 0;
}

.testimonial-quote strong {
  color: var(--accent);
  font-weight: 500;
  font-style: normal;
}

/* ==========================================================================
   SECTION CTA (inline prompts after sections)
   ========================================================================== */

.section-cta-wrap {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.section-cta-link {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color var(--duration-fast) ease, gap var(--duration-fast) ease;
}

.section-cta-link:hover {
  color: var(--accent);
  gap: 16px;
}

.section-cta-link .arrow {
  font-size: 1.125rem;
  transition: transform var(--duration-fast) ease;
}

.section-cta-link:hover .arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */

.faq {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
  opacity: 1; /* Ensure visible */
  visibility: visible;
}

.faq-item:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  cursor: pointer;
  user-select: none;
}

.faq-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
  line-height: 1.5;
}

.faq-toggle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--duration-fast) ease;
}

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

.faq-icon {
  position: relative;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--text-muted);
  transition: all var(--duration-fast) ease;
}

.faq-icon::before {
  width: 10px;
  height: 2px;
}

.faq-icon::after {
  width: 2px;
  height: 10px;
}

.faq-item.active .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-med) var(--ease-out-expo);
}

.faq-item.active .faq-answer {
  max-height: 400px;
}

.faq-answer p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary);
  padding: 0 28px 24px 28px;
  margin: 0;
}

.faq-answer strong {
  color: var(--text-primary);
  font-weight: 500;
}

.faq-answer a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-answer a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   COMING SOON SECTION
   ========================================================================== */

.coming-soon {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--section-pad-y) var(--section-pad-x);
  overflow: hidden;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Gradient Orb Background */
.gradient-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(
    circle,
    rgba(212, 63, 17, 0.15) 0%,
    rgba(212, 63, 17, 0.08) 30%,
    rgba(212, 63, 17, 0.03) 60%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(60px);
  animation: gradient-pulse 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gradient-pulse {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* Particle Canvas */
#coming-soon-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

/* Content Card */
.coming-soon-card {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 48px);
  background: rgba(26, 26, 26, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.coming-soon-label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}

.coming-soon-heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.coming-soon-heading .accent-text {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.coming-soon-text {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.coming-soon-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.coming-soon-ctas .btn {
  padding: 14px 32px;
  font-size: 0.8125rem;
}

.coming-soon-ctas .btn .arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform var(--duration-fast) ease;
}

.coming-soon-ctas .btn:hover .arrow {
  transform: translateX(4px);
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .coming-soon {
    min-height: auto;
    padding: 80px var(--section-pad-x) 60px;
  }
  
  .gradient-orb {
    width: 100vw;
    height: 100vw;
    max-width: 400px;
    max-height: 400px;
  }
  
  .coming-soon-card {
    padding: 32px 20px;
    background: rgba(26, 26, 26, 0.85);
  }
  
  .coming-soon-ctas {
    flex-direction: column;
    gap: 12px;
  }
  
  .coming-soon-ctas .btn {
    width: 100%;
    text-align: center;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .gradient-orb {
    animation: none;
  }
}

/* ==========================================================================
   MARQUEE
   ========================================================================== */

.marquee-section {
  padding: 80px 0;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}

.marquee-text {
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-muted);
  padding: 0 48px;
  flex-shrink: 0;
  user-select: none;
}

.marquee-text.filled {
  -webkit-text-stroke: none;
  color: var(--text-primary);
}

/* ==========================================================================
   CONTACT / TERMINAL
   ========================================================================== */

.contact {
  background: var(--bg-primary);
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact .section-heading {
  line-height: 1.5;
  padding-bottom: 8px;
  margin-bottom: 28px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 48px;
  align-items: start;
}

.terminal-window {
  background: var(--bg-secondary);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-left: 8px;
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono); /* Keep monospace for terminal effect */
  font-size: 0.875rem;
  line-height: 2;
  color: var(--terminal-green);
}

.terminal-line {
  display: block;
  opacity: 0;
}

.terminal-line.visible {
  opacity: 1;
}

.terminal-prompt {
  color: var(--accent);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--terminal-green);
  margin-left: 4px;
  animation: blink-cursor 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.contact-social {
  display: flex;
  gap: 24px;
  margin-top: 48px;
}

.social-link {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  transition: all var(--duration-fast) ease;
}

.social-link:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

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

/* Honeypot field — hidden from sighted users but still in DOM for bots */
.honeypot-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  visibility: hidden;
  height: 0;
  width: 0;
}

.terminal-map {
  border-top: 1px solid var(--border-subtle);
  overflow: hidden;
  height: 200px;
}

.terminal-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  filter: grayscale(25%) contrast(1.05) brightness(0.95);
}

/* ── Contact Form Panel ── */
.contact-form-panel {
  background: var(--bg-secondary);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.contact-form-body {
  padding: 24px;
  flex: 1;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-primary);
  letter-spacing: normal;
}

.form-optional {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.form-field {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-primary);
  width: 100%;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
  outline: none;
}

.form-field::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-field:focus {
  border-color: var(--terminal-green);
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.08);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-submit {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: var(--text-primary);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-quart);
  align-self: flex-start;
}

.form-submit:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.form-submit-arrow {
  display: inline-block;
  transition: transform var(--duration-fast) ease;
}

.form-submit:hover .form-submit-arrow {
  transform: translateX(4px);
}

/* Form Success/Error Messages */
.form-message {
  padding: 16px 20px;
  margin-bottom: 24px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  display: none;
}

.form-message.success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
  display: block;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  display: block;
}

/* ==========================================================================
   PROJECT MODAL
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
}

.modal-overlay.is-open {
  pointer-events: auto;
}

.modal-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) transparent;
}

.modal-panel::-webkit-scrollbar {
  width: 8px;
}

.modal-panel::-webkit-scrollbar-track {
  background: transparent;
}

.modal-panel::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

.modal-image-wrap {
  width: 100%;
  flex-shrink: 0;
}

.modal-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-image-placeholder svg {
  opacity: 0.25;
}

.modal-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  overflow-wrap: break-word;
}

.modal-footer {
  padding: 24px 32px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  position: sticky;
  bottom: 0;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: color var(--duration-fast) ease;
  font-family: var(--font-mono);
}

.modal-close:hover {
  color: var(--accent);
}

.modal-image-wrap {
  width: 100%;
  flex-shrink: 0;
}

.modal-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-image-placeholder svg {
  opacity: 0.25;
}

.modal-code {
  font-family: var(--font-mono); /* Keep monospace for code-like appearance */
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.modal-tags {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.modal-desc {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 64px var(--section-pad-x) 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: block;
  margin-bottom: 12px;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.footer-nav-heading {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a,
.footer-contact a,
.footer-contact span {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color var(--duration-fast) ease;
  display: block;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--accent);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

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

/* ==========================================================================
   GSAP ANIMATION HELPERS
   ========================================================================== */

.gsap-hidden {
  opacity: 0;
  visibility: hidden;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .about-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Photo appears above the text on tablet */
  .about-image-wrap {
    position: static;
    grid-row: 1;
    display: flex;
    justify-content: center;
  }

  .about-text {
    grid-row: 2;
  }

  .about-photo {
    height: auto;
    aspect-ratio: 3 / 4;
    max-width: 280px;
    width: 100%;
    object-fit: cover;
    object-position: top center;
  }

  .stats-band-inner {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid .service-card,
  .services-grid .service-card:nth-child(4),
  .services-grid .service-card:nth-child(5) {
    grid-column: span 1;
  }

  /* Last card spans both columns so no empty slot */
  .services-grid .service-card:last-child {
    grid-column: span 2;
  }

  /* Contact form button — centre and full width on tablet */
  .form-submit {
    align-self: center;
    width: 100%;
  }

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

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

  .faq-grid {
    gap: 12px;
  }

  .faq-question {
    padding: 20px 20px;
  }

  .faq-title {
    font-size: 1rem;
  }

  .faq-answer p {
    padding: 0 20px 20px 20px;
    font-size: 0.875rem;
  }

  /* Modal footer visibility */
  .modal-footer {
    padding: 20px 28px;
    flex-shrink: 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    position: sticky;
    bottom: 0;
  }
}

@media (max-width: 600px) {
  .stats-band-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  /* ── Mobile Nav ─────────────────────────────────── */
  .nav-toggle {
    display: block;
  }

  /* display:contents makes the nav wrapper invisible to flex layout but keeps
     its children (the ul overlay) fully functional in the DOM */
  .site-header nav {
    display: contents;
  }

  /* Full-screen overlay — reliable display:none → flex with @keyframes */
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: #080808;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0;
  }

  .nav-links.open {
    display: flex;
    animation: nav-open 0.35s var(--ease-out-quart) forwards;
  }

  @keyframes nav-open {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Staggered link reveal */
  .nav-links li {
    opacity: 0;
    transform: translateY(20px);
  }

  .nav-links.open li {
    animation: nav-item-in 0.4s var(--ease-out-quart) forwards;
  }

  .nav-links.open li:nth-child(1) { animation-delay: 0.06s; }
  .nav-links.open li:nth-child(2) { animation-delay: 0.12s; }
  .nav-links.open li:nth-child(3) { animation-delay: 0.18s; }
  .nav-links.open li:nth-child(4) { animation-delay: 0.24s; }
  .nav-links.open li:nth-child(5) { animation-delay: 0.30s; }
  .nav-links.open li:nth-child(6) { animation-delay: 0.36s; }

  @keyframes nav-item-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Large, bold, touch-friendly links */
  .nav-links a {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    padding: 16px 0;
    color: var(--text-secondary);
    transition: color var(--duration-fast) ease;
  }

  .nav-links a:hover,
  .nav-links a.active { color: var(--text-primary); }

  .nav-num {
    font-size: 0.8rem;
    color: var(--accent);
  }

  /* ── Hero ───────────────────────────────────────── */
  .hero {
    text-align: center;
    align-items: center;
    min-height: 100dvh;
    padding-top: calc(var(--nav-height) + 32px);
    padding-bottom: 48px;
    justify-content: center;
  }

  .hero-heading {
    font-size: clamp(2.25rem, 10vw, 3.5rem);
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-coordinates {
    display: none;
  }

  .scroll-indicator {
    display: none;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    width: auto;
    margin-bottom: 48px;
  }

  .hero-meta {
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* ── About ──────────────────────────────────────── */
  .about-image-wrap {
    grid-row: 1;
    display: flex;
    justify-content: center;
  }

  .about-photo {
    height: auto;
    aspect-ratio: 3 / 4;
    max-width: 220px;
    width: 100%;
    object-fit: cover;
    object-position: top center;
  }

  /* ── Stats ──────────────────────────────────────── */
  .stats-band {
    padding: 48px var(--section-pad-x);
  }

  .stats-band .stat {
    padding: 28px 20px;
  }

  /* ── Services ───────────────────────────────────── */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .services-grid .service-card,
  .services-grid .service-card:nth-child(4),
  .services-grid .service-card:nth-child(5),
  .services-grid .service-card:last-child {
    grid-column: span 1;
  }

  .service-card {
    padding: 28px 24px;
  }

  /* ── Projects ───────────────────────────────────── */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: 28px 24px;
  }

  /* ── Testimonials ───────────────────────────────── */
  .testimonial-card {
    padding: 32px 24px;
  }

  .testimonial-card::before {
    font-size: 3.5rem;
    top: 12px;
    left: 16px;
  }

  /* ── Marquee ────────────────────────────────────── */
  .marquee-section {
    padding: 40px 0;
  }

  .marquee-text {
    font-size: clamp(3rem, 15vw, 8rem);
  }

  /* ── Contact / Terminal / Form ──────────────────── */
  .terminal-body {
    padding: 16px;
    font-size: 0.8125rem;
  }

  .terminal-header {
    padding: 10px 14px;
  }

  .terminal-map {
    height: 160px;
  }

  .contact-form-body {
    padding: 16px;
  }

  .contact-social {
    flex-wrap: wrap;
    gap: 12px;
  }

  .section-cta-wrap {
    margin-top: 32px;
    padding-top: 24px;
  }

  /* ── Contact form ───────────────────────────────── */
  .form-submit {
    align-self: center;
    width: 100%;
  }

  /* ── Footer ─────────────────────────────────────── */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* ── Modal — bottom sheet on mobile ────────────── */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-panel {
    max-width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }

  /* Drag handle */
  .modal-panel::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border-hover);
    border-radius: 2px;
    margin: 14px auto 0;
    flex-shrink: 0;
  }

  /* Hide image placeholder — saves space, no real images yet */
  .modal-image-wrap {
    display: none;
  }

  .modal-body {
    padding: 16px 20px;
    gap: 10px;
    flex: 1 1 auto;
  }

  .modal-footer {
    padding: 16px 20px;
    flex-wrap: wrap;
    flex-shrink: 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    position: sticky;
    bottom: 0;
  }

  .modal-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
  }

}

/* ── Small phones (≤ 480px) ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero {
    padding-top: calc(var(--nav-height) + 16px);
    padding-bottom: 40px;
  }

  .hero-heading {
    font-size: clamp(1.5rem, 7vw, 2rem);
    margin-bottom: 12px;
  }

  .hero-tagline {
    font-size: clamp(0.9375rem, 3.5vw, 1.125rem);
    margin-bottom: 24px;
    line-height: 1.4;
  }

  .hero-ctas {
    margin-bottom: 24px;
  }

  .section-heading {
    margin-bottom: 16px;
    padding-bottom: 4px;
  }

  .stats-band .stat {
    padding: 24px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-shrink: 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    position: sticky;
    bottom: 0;
  }

  .contact-social {
    gap: 8px;
  }

  .social-link {
    padding: 10px 14px;
    font-size: 0.6875rem;
  }

  .footer-location {
    display: none;
  }
}

/* ── Extra small phones (≤ 375px) ───────────────────────────────────── */
@media (max-width: 375px) {
  .hero {
    padding-top: calc(var(--nav-height) + 12px);
    padding-bottom: 32px;
  }

  .hero-heading {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .hero-tagline {
    font-size: 0.9375rem;
    margin-bottom: 20px;
  }

  .hero-ctas {
    gap: 10px;
    margin-bottom: 20px;
  }

  .hero-ctas .btn {
    padding: 10px 16px;
    font-size: 0.75rem;
  }

  .hero-meta {
    margin-bottom: 16px;
  }

  .scroll-indicator span {
    font-size: 0.5625rem;
  }

  .scroll-indicator .arrow {
    height: 30px;
  }

  .modal-footer {
    padding: 10px 14px;
    flex-shrink: 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    position: sticky;
    bottom: 0;
  }
}
