/* ============================================================
   SPARN — Modern Light Theme
   Clean, minimal, gray palette. Award-worthy.
   ============================================================ */

:root {
  /* Backgrounds */
  --bg-primary: #fafafa;
  --bg-secondary: #f2f2f4;
  --bg-card: #ffffff;
  --bg-hero: #f4f4f6;
  --bg-entry: #111111;

  /* Text */
  --text-primary: #111111;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-inverse: #fafafa;

  /* Accents */
  --accent: #111111;
  --accent-warm: #f97316;
  --accent-muted: #d4d4d8;

  /* Borders & Shadows */
  --border: rgba(0, 0, 0, 0.07);
  --border-hover: rgba(0, 0, 0, 0.14);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.1);

  /* Fonts */
  --font-display: 'Syne', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Scale */
  --text-hero: clamp(3.5rem, 10vw, 7rem);
  --text-h2: clamp(2rem, 4vw, 3.25rem);
  --text-h3: clamp(1.15rem, 2vw, 1.5rem);
  --text-body: 1rem;
  --text-small: 0.875rem;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* Layout */
  --navbar-height: 4rem;
  --side-nav-width: 4rem;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  cursor: none;
}

@media (hover: none) and (pointer: coarse) {
  body { cursor: auto; }
  .cursor { display: none !important; }
}

a { color: inherit; text-decoration: none; cursor: none; }
button { font-family: inherit; cursor: none; background: none; border: none; color: inherit; }
@media (hover: none) and (pointer: coarse) {
  a, button { cursor: pointer; }
}

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

::selection {
  background: rgba(17, 17, 17, 0.1);
  color: var(--text-primary);
}

/* --- 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;
  }
  .cursor, .grain, .scroll-indicator, .coord-readout { display: none !important; }
  .entry-screen { display: none !important; }
  .marquee-track { animation: none !important; }
  #hero-canvas { opacity: 0.15; }
}

/* --- Film Grain --- */
.grain {
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  animation: grainShift 0.5s steps(4) infinite;
}

@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 2px); }
  50% { transform: translate(2px, -2px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(1px, 1px); }
}

/* --- Entry Screen --- */
.entry-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-entry);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
  cursor: auto;
}

.entry-screen.hidden {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.entry-logo {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--text-inverse);
  display: flex;
  gap: 0.05em;
}

.entry-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) scale(0.9);
}

.entry-btn {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  opacity: 0;
  transform: translateY(10px);
  transition: color 0.3s, border-color 0.3s;
  cursor: pointer !important;
}

.entry-screen a,
.entry-screen button {
  cursor: pointer !important;
}

.entry-btn:hover {
  color: #ffffff;
  border-color: rgba(255,255,255,0.3);
}

/* --- Custom Cursor --- */
.cursor {
  pointer-events: none;
  position: fixed;
  z-index: 10000;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--text-primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease-out-expo), height 0.2s var(--ease-out-expo);
  z-index: 10001;
}

.cursor-trail {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease-out-expo), height 0.35s var(--ease-out-expo), border-color 0.3s;
  z-index: 10000;
}

body:has(a:hover) .cursor-dot,
body:has(button:hover) .cursor-dot {
  width: 12px;
  height: 12px;
}

body:has(a:hover) .cursor-trail,
body:has(button:hover) .cursor-trail {
  width: 50px;
  height: 50px;
  border-color: rgba(0,0,0,0.2);
}

/* --- Coordinate Readout --- */
.coord-readout {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  display: flex;
  gap: 1rem;
  z-index: 900;
  opacity: 0;
  transition: opacity 0.4s;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .coord-readout { display: none; }
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
  opacity: 0;
}

.navbar.scrolled {
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  transition: opacity 0.3s;
}

.navbar-brand:hover { opacity: 0.6; }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  z-index: 1001;
}

.navbar-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

.navbar-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.navbar-toggle.active span:nth-child(2) { opacity: 0; }
.navbar-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* --- Mobile Menu --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(250, 250, 250, 0.97);
  backdrop-filter: blur(30px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out-expo);
}

.mobile-menu.active { opacity: 1; pointer-events: all; }

.mobile-menu-link {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 700;
  color: var(--text-tertiary);
  transition: color 0.3s;
}

.mobile-menu-link:hover { color: var(--text-primary); }

.mobile-menu-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.mobile-menu-footer a {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--text-tertiary);
}

/* --- Side Nav --- */
.side-nav {
  position: fixed;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  opacity: 0;
}

.side-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0.3;
  transition: opacity 0.3s;
}

.side-nav-item:hover, .side-nav-item.active { opacity: 1; }

.side-nav-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: color 0.3s;
  min-width: 1.5rem;
}

.side-nav-item.active .side-nav-number { color: var(--text-primary); }

.side-nav-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s, transform 0.3s var(--ease-out-expo), color 0.3s;
}

.side-nav-item:hover .side-nav-label,
.side-nav-item.active .side-nav-label {
  opacity: 1;
  transform: translateX(0);
}

.side-nav-item.active .side-nav-label { color: var(--text-primary); }

/* --- Sections --- */
.section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
}

.section-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 2rem 7rem calc(var(--side-nav-width) + 3rem);
  position: relative;
}

.section-number {
  position: absolute;
  top: 5rem;
  left: calc(var(--side-nav-width) + 3rem);
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 800;
  color: rgba(0, 0, 0, 0.03);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

/* --- Reveal (initial state, GSAP animates) --- */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
}

/* --- Hero --- */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-hero);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  overflow: hidden;
  opacity: 0;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(15px);
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(15px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
}

.btn svg {
  transition: transform 0.3s var(--ease-out-expo);
}

.btn:active {
  transform: translateY(2px);
}

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

.btn-primary:hover {
  background: #333;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover svg:last-child { transform: translateY(2px); }

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

.btn-ghost:hover {
  border-color: var(--text-primary);
  background: rgba(0,0,0,0.02);
}

.btn-ghost:hover svg:last-child { transform: translate(2px, -2px); }

.btn-large {
  padding: 1rem 2rem;
  font-size: 0.85rem;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.scroll-chevron {
  color: var(--text-tertiary);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* --- Marquee --- */
.marquee {
  padding: 1.5rem 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  white-space: nowrap;
  animation: marqueeScroll 30s linear infinite;
  width: max-content;
}

.marquee-reverse .marquee-track {
  animation-direction: reverse;
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  opacity: 0.06;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.marquee-dot {
  width: 6px !important;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
  opacity: 0.15 !important;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- About --- */
.about-content { position: relative; }

.about-text {
  max-width: 640px;
  margin-bottom: 3rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* --- Cards --- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease-out-expo),
              border-color 0.4s,
              box-shadow 0.4s;
  will-change: transform;
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

/* 3D tilt handled by JS, so no transform here */

.card-icon {
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.card-icon.icon-secondary { color: var(--text-secondary); }
.card-icon.icon-tertiary { color: var(--text-tertiary); }

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: var(--text-small);
  line-height: 1.75;
}

/* --- Projects --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease-out-expo),
              border-color 0.4s,
              box-shadow 0.4s;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.project-card.featured {
  grid-column: 1 / -1;
  border-color: var(--border-hover);
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.project-icon { font-size: 1.5rem; line-height: 1; }
.project-name {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 700;
}

.project-description {
  color: var(--text-secondary);
  font-size: var(--text-body);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  flex: 1;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project-lang {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.project-stars {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.project-license {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.project-link {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.3s var(--ease-out-expo);
}

.project-card:hover .project-link { gap: 0.65rem; }

/* Skeleton cards */
.project-card.skeleton { pointer-events: none; position: relative; }

.project-card.skeleton::after {
  content: 'Coming soon';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(0,0,0,0.04);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.skeleton-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.02) 50%, transparent 100%);
  animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-icon { width: 24px; height: 24px; border-radius: 6px; background: var(--bg-secondary); }
.skeleton-title { width: 45%; height: 18px; }
.skeleton-desc { width: 75%; margin-bottom: 0.4rem; }
.skeleton-desc-short { width: 50%; }
.skeleton-tag { width: 60px; height: 22px; border-radius: 100px; }
.skeleton-meta { display: flex; gap: 0.6rem; margin-top: auto; }

.projects-coming {
  grid-column: 1 / -1;
  text-align: center;
  padding: 0.75rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* --- Pipeline / Philosophy --- */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  position: relative;
}

.pipeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
}

.pipeline-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--text-primary);
  border-radius: 1px;
  transition: width 0.6s var(--ease-out-expo);
}

.pipeline-step {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  margin: 0 auto 1rem;
  color: var(--text-primary);
  transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
}

.pipeline-step:hover .step-icon {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.step-title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-text {
  color: var(--text-secondary);
  font-size: var(--text-small);
  line-height: 1.75;
}

/* --- Community --- */
.community-content { max-width: 600px; }

.community-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.community-cta { margin-bottom: 2rem; }

.contact-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: color 0.3s;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-email {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: width 0.4s var(--ease-out-expo);
}

.contact-link:hover .contact-email::after { width: 100%; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  background: var(--bg-primary);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-left: calc(var(--side-nav-width) + 1rem);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: var(--text-primary);
}

.footer-origin {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  transition: color 0.3s;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: width 0.3s var(--ease-out-expo);
}

.footer-links a:hover { color: var(--text-primary); }
.footer-links a:hover::after { width: 100%; }

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

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

@media (max-width: 1024px) {
  .side-nav { display: none; }
  .section-container { padding-left: 2rem; }
  .section-number { left: 2rem; }
  .footer-inner { padding-left: 0; }

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

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .navbar-toggle { display: flex; }

  .about-cards { grid-template-columns: 1fr; gap: 1rem; }
  .projects-grid { grid-template-columns: 1fr; }

  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }

  .section-container { padding: 5rem 1.25rem; }
  .section-number { left: 1.25rem; font-size: clamp(3rem, 10vw, 5rem); }

  .pipeline { grid-template-columns: 1fr 1fr; gap: 1rem; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-brand { align-items: center; }

  .community-cta .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  :root { --navbar-height: 3.5rem; }
  .navbar { padding: 0 1rem; }
  .hero-title { letter-spacing: 0.06em; }
  .pipeline { grid-template-columns: 1fr; }
}
