/* ═══════════════════════════════════════════════════
   GHOSTFRAME — shared.css
   Design System: "Warm Monochrome"
   ═══════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg:         #06060a;
  --surface:    #0c0c10;
  --surface-2:  #131318;
  --surface-3:  #1a1a20;

  --border:       rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-active:rgba(255, 255, 255, 0.18);

  --text-1:     rgba(255, 255, 255, 0.92);
  --text-2:     rgba(255, 255, 255, 0.60);
  --text-3:     rgba(255, 255, 255, 0.35);
  --text-4:     rgba(255, 255, 255, 0.18);

  --glow:       rgba(255, 250, 240, 0.06);
  --glow-strong:rgba(255, 250, 240, 0.12);
  --glow-hero:  rgba(255, 250, 240, 0.08);

  --accent:     rgba(255, 180, 100, 1);
  --accent-glow:rgba(255, 180, 100, 0.15);
  --accent-dim: rgba(255, 180, 100, 0.4);

  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --nav-h: 64px;
  --max-w: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-2xl: 120px;
  --space-3xl: 160px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto; /* Lenis handles this */
}
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

/* ── SCROLL PROGRESS ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-3);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 10001;
  pointer-events: none;
}

/* ── GRAIN OVERLAY ── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: soft-light;
}

/* ── LAYOUT ── */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.section {
  padding: var(--space-2xl) 0;
  position: relative;
}
.section-lg {
  padding: var(--space-3xl) 0;
}
.section-border {
  border-bottom: 1px solid var(--border);
}

/* ── TYPOGRAPHY ── */
.h-display {
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--text-1);
}
.h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.body-lg {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.75;
  color: var(--text-2);
}
.body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-2);
}
.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.pull-quote {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(180deg, rgba(255,252,245,0.97) 0%, rgba(255,255,255,0.40) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Accent highlight */
.accent { color: var(--accent); }
.accent-glow {
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
}

/* Full bleed breakout */
.full-bleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
}

/* Breathing spacer */
.breathing {
  height: 30vh;
  min-height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Zoom text (pinned scaling) */
.zoom-section {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.zoom-text {
  font-family: var(--sans);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-align: center;
  color: var(--text-1);
  will-change: transform, opacity;
}
.zoom-after {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  will-change: opacity, transform;
}

/* Masked line reveal container */
.line-mask {
  overflow: hidden;
  display: block;
}
.line-mask > * {
  display: block;
  will-change: transform;
}

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(6, 6, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled {
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.nav-logo {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-1);
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.7; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-3);
  padding: 8px 16px;
  border-radius: 6px;
  position: relative;
  transition: color 0.25s ease, background 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 16px; right: 16px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-link:hover {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.03);
}
.nav-link.active {
  color: var(--text-1);
}
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.hamburger:hover { background: rgba(255,255,255,0.04); }
.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--text-2);
  border-radius: 1px;
  transition: all 0.3s var(--ease);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile Overlay */
.mob-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(6, 6, 10, 0.97);
  backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.mob-overlay.open { opacity: 1; pointer-events: all; }
.mob-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.mob-link {
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: -0.02em;
  transition: color 0.25s;
  padding: 8px 0;
}
.mob-link:hover, .mob-link.active { color: var(--text-1); }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s ease;
}
.card:hover { border-color: var(--border-hover); }

/* Spotlight glow effect */
.spotlight-card {
  --x: 50%;
  --y: 50%;
}
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px circle at var(--x) var(--y),
    var(--glow-strong),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.spotlight-card:hover::before { opacity: 1; }

/* ── CODE BLOCK ── */
.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.code-body {
  padding: var(--space-md) var(--space-md);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.9;
  overflow-x: auto;
  color: var(--text-2);
}
.code-body::-webkit-scrollbar { height: 4px; }
.code-body::-webkit-scrollbar-track { background: transparent; }
.code-body::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; }
/* Syntax colors — muted, not neon */
.c-comment { color: rgba(255,255,255,0.22); font-style: italic; }
.c-keyword { color: rgba(200, 180, 220, 0.75); }
.c-string  { color: rgba(180, 210, 180, 0.70); }
.c-var     { color: rgba(200, 220, 240, 0.70); }
.c-func    { color: rgba(235, 215, 180, 0.75); }
.c-val     { color: rgba(255, 255, 255, 0.50); }
.c-punct   { color: rgba(255, 255, 255, 0.30); }

/* ── LINK ARROWS (internal CTAs) ── */
.page-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 14px 0;
  position: relative;
  transition: color 0.3s ease, gap 0.3s var(--ease);
}
.page-link:hover {
  color: var(--text-1);
  gap: 20px;
}
.page-link .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.page-link:hover .arrow {
  transform: translateX(4px);
}

/* ── COUNTER ── */
.counter-value {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.counter-label {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-top: var(--space-xs);
}

/* ── STACK LIST ── */
.stack-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.stack-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 20px var(--space-md);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease;
}
.stack-item:last-child { border-bottom: none; }
.stack-item:hover { background: var(--surface); }
.stack-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stack-icon::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
}
.stack-name {
  font-weight: 500;
  font-size: 0.95rem;
}
.stack-desc {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-3);
  text-align: right;
}

/* ── DIVIDER ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  border: none;
  margin: 0;
}

/* ── FOOTER ── */
.footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.footer-logo {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-2);
}
.footer-text {
  font-size: 0.8rem;
  color: var(--text-4);
}

/* ── TERMINAL LINE (the ONE terminal element) ── */
.terminal-line {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-4);
}
.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--text-3);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1.2s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── AMBIENT BACKGROUNDS ── */

/* Dot grid */
.dot-grid {
  position: relative;
}
.dot-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}
.dot-grid > * {
  position: relative;
  z-index: 1;
}

/* Glow orbs — place inside sections */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.glow-orb-1 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 250, 240, 0.25) 0%, rgba(255, 250, 240, 0.08) 40%, transparent 70%);
  top: -300px;
  right: -300px;
  animation: orbDrift1 18s ease-in-out infinite alternate;
}
.glow-orb-2 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(220, 230, 255, 0.20) 0%, rgba(220, 230, 255, 0.06) 40%, transparent 70%);
  bottom: -250px;
  left: -250px;
  animation: orbDrift2 22s ease-in-out infinite alternate;
}
.glow-orb-3 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 252, 245, 0.22) 0%, rgba(255, 252, 245, 0.07) 40%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbDrift3 15s ease-in-out infinite alternate;
}
@keyframes orbDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 30px) scale(1.15); }
}
@keyframes orbDrift2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -40px) scale(1.1); }
}
@keyframes orbDrift3 {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  100% { transform: translate(-45%, -55%) scale(1.2); opacity: 1; }
}

/* Horizontal light beam */
.light-beam {
  position: absolute;
  height: 1px;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 20%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.15) 80%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Gradient mesh section background */
.mesh-bg {
  position: relative;
  overflow: hidden;
}
.mesh-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 250, 240, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(220, 230, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 252, 245, 0.10) 0%, transparent 50%);
  animation: meshShift 25s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.mesh-bg > * {
  position: relative;
  z-index: 1;
}
@keyframes meshShift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(3%, -2%) rotate(1deg); }
  100% { transform: translate(-2%, 3%) rotate(-1deg); }
}

/* Vertical accent line */
.accent-line {
  position: absolute;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ── ANIMATED GRID LINES ── */
.grid-lines { position: relative; }
.grid-lines::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: gridShift 25s linear infinite;
}
@keyframes gridShift {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 60px 60px, 60px 60px; }
}
.grid-lines > * { position: relative; z-index: 1; }

/* ── WATERMARK TEXT ── */
.watermark {
  position: absolute;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(6rem, 15vw, 16rem);
  text-transform: uppercase;
  color: rgba(255,255,255,0.018);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  letter-spacing: -0.04em;
  line-height: 1;
}
.watermark-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.watermark-top { top: 8%; right: -5%; }
.watermark-bottom { bottom: 8%; left: -5%; }

/* ── FLOATING SHAPES ── */
.float-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.float-shape {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.04);
  animation: floatDrift 20s ease-in-out infinite alternate;
  will-change: transform;
}
.float-shape.circle { border-radius: 50%; }
.fs-1 { width: 200px; height: 200px; top: 10%; left: 5%; animation-duration: 18s; }
.fs-2 { width: 120px; height: 120px; top: 60%; right: 8%; animation-duration: 22s; animation-delay: -5s; }
.fs-3 { width: 80px; height: 80px; bottom: 15%; left: 20%; animation-duration: 25s; animation-delay: -10s; }
.fs-4 { width: 300px; height: 300px; top: 20%; right: -5%; animation-duration: 30s; animation-delay: -3s; border-radius: 50%; border-color: rgba(255,255,255,0.02); }
.fs-5 { width: 150px; height: 150px; bottom: 20%; right: 25%; animation-duration: 20s; animation-delay: -8s; border-radius: 50%; }
@keyframes floatDrift {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
  25%  { transform: translate(20px, -30px) rotate(5deg); opacity: 1; }
  50%  { transform: translate(-15px, 15px) rotate(-3deg); opacity: 0.7; }
  75%  { transform: translate(10px, -10px) rotate(4deg); opacity: 1; }
  100% { transform: translate(-10px, 20px) rotate(-2deg); opacity: 0.8; }
}

/* ── RADIAL PULSE RINGS ── */
.radial-pulse {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}
.pulse-ring {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.035);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulseExpand 8s ease-out infinite;
}
.pulse-ring:nth-child(1) { width: 200px; height: 200px; }
.pulse-ring:nth-child(2) { width: 400px; height: 400px; animation-delay: 2s; }
.pulse-ring:nth-child(3) { width: 600px; height: 600px; animation-delay: 4s; }
.pulse-ring:nth-child(4) { width: 800px; height: 800px; animation-delay: 6s; }
@keyframes pulseExpand {
  0%   { opacity: 0.6; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

/* ── GRADIENT BLOBS ── */
.gradient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  animation: blobMorph 20s ease-in-out infinite alternate;
}
.blob-warm { background: radial-gradient(circle, rgba(255,220,180,0.20) 0%, transparent 70%); }
.blob-cool { background: radial-gradient(circle, rgba(180,200,255,0.18) 0%, transparent 70%); }
.blob-neutral { background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%); }
@keyframes blobMorph {
  0%   { transform: translate(0, 0) scale(1); border-radius: 50%; }
  33%  { transform: translate(30px, -20px) scale(1.1); border-radius: 40% 60% 50% 50%; }
  66%  { transform: translate(-20px, 20px) scale(0.95); border-radius: 50% 40% 60% 50%; }
  100% { transform: translate(10px, -10px) scale(1.05); border-radius: 45% 55% 45% 55%; }
}

/* ── GLOWING SECTION DIVIDERS ── */
.glow-divider {
  position: relative;
}
.glow-divider::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.08) 70%, transparent);
  z-index: 1;
}

/* ── CUSTOM CURSOR ── */
@media (hover: hover) and (pointer: fine) {
  * { cursor: none !important; }
}
.cursor-outer {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  will-change: transform;
}
@media (hover: none), (pointer: coarse) {
  .cursor-outer, .cursor-dot { display: none !important; }
}

/* ── AURORA ── */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.aurora::before, .aurora::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: conic-gradient(from 0deg at 50% 50%,
    transparent 0deg, rgba(255,250,240,0.06) 60deg,
    transparent 120deg, rgba(220,230,255,0.05) 180deg,
    transparent 240deg, rgba(255,252,245,0.06) 300deg, transparent 360deg);
  animation: auroraSpin 30s linear infinite;
  filter: blur(80px);
}
.aurora::after {
  animation-duration: 45s;
  animation-direction: reverse;
}
@keyframes auroraSpin { to { transform: rotate(360deg); } }

/* ── GLITCH TEXT ── */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}
.glitch.glitching::before {
  color: rgba(255, 80, 120, 0.5);
  animation: glitch1 0.3s steps(2) forwards;
}
.glitch.glitching::after {
  color: rgba(80, 180, 255, 0.5);
  animation: glitch2 0.3s steps(2) forwards;
}
@keyframes glitch1 {
  0%   { clip-path: inset(20% 0 60% 0); transform: translateX(-4px); opacity: 1; }
  50%  { clip-path: inset(50% 0 10% 0); transform: translateX(4px); opacity: 1; }
  100% { clip-path: inset(0); transform: translateX(0); opacity: 0; }
}
@keyframes glitch2 {
  0%   { clip-path: inset(60% 0 5% 0); transform: translateX(4px); opacity: 1; }
  50%  { clip-path: inset(10% 0 70% 0); transform: translateX(-4px); opacity: 1; }
  100% { clip-path: inset(0); transform: translateX(0); opacity: 0; }
}

/* ── 3D TILT CARD ── */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}
.holo-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    var(--holo-angle, 115deg),
    transparent 20%, rgba(255,100,100,0.07) 30%, rgba(100,255,150,0.07) 40%,
    rgba(100,120,255,0.07) 50%, rgba(255,255,100,0.07) 60%, transparent 80%
  );
  mix-blend-mode: color-dodge;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
}
.tilt-card:hover .holo-sheen { opacity: 1; }

/* ── SPOTLIGHT REVEAL ── */
.spotlight-reveal {
  position: relative;
  overflow: hidden;
}
.spotlight-reveal .reveal-content {
  mask-image: radial-gradient(circle 160px at var(--mx, 50%) var(--my, 50%), black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle 160px at var(--mx, 50%) var(--my, 50%), black 0%, transparent 100%);
}
.spotlight-reveal .reveal-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-4);
  pointer-events: none;
  z-index: 2;
}
@media (hover: none) {
  .spotlight-reveal .reveal-content {
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }
  .spotlight-reveal .reveal-hint { display: none; }
}

/* ── CURTAIN TRANSITION ── */
.curtain-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  pointer-events: none;
}
.curtain-col {
  flex: 1;
  background: var(--surface);
  transform: scaleY(0);
  transform-origin: top;
}

/* ── GHOST TERMINAL ── */
.ghost-terminal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(6, 6, 10, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.ghost-terminal.active {
  opacity: 1;
  pointer-events: all;
}
.terminal-window {
  width: 100%;
  max-width: 700px;
  padding: var(--space-lg);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.8;
}
.terminal-output {
  max-height: 50vh;
  overflow-y: auto;
  margin-bottom: var(--space-md);
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-output::-webkit-scrollbar { width: 4px; }
.terminal-output::-webkit-scrollbar-track { background: transparent; }
.terminal-output::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; }
.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.terminal-prompt {
  color: var(--text-3);
  flex-shrink: 0;
}
.terminal-input {
  flex: 1;
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-1);
  outline: none;
  caret-color: var(--text-1);
}
.terminal-close-hint {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-4);
}

/* ── PARTICLE CANVAS ── */
.particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── HORIZONTAL SCROLL ── */
.horizontal-section {
  overflow: hidden;
  position: relative;
}
.horizontal-container {
  display: flex;
  flex-wrap: nowrap;
}
.horizontal-panel {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-lg);
}
.horizontal-panel .wrap {
  width: 100%;
}
@media (max-width: 768px) {
  .horizontal-container {
    flex-direction: column;
  }
  .horizontal-panel {
    width: 100%;
    height: auto;
    padding: var(--space-xl) 0;
  }
}

/* ── GSAP INITIAL STATES ── */
/* When JS adds .js-loaded to body, GSAP controls reveals.
   Without it, CSS animation kicks in after 1s as fallback. */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}
.reveal-fade {
  opacity: 0;
}

/* Fallback: if GSAP doesn't fire within 1.5s, CSS reveals everything */
@keyframes fallbackReveal {
  to { opacity: 1; transform: translateY(0); }
}
body:not(.js-loaded) .reveal {
  animation: fallbackReveal 0.8s ease forwards;
  animation-delay: 1.5s;
}
body:not(.js-loaded) .reveal-fade {
  animation: fallbackReveal 0.8s ease forwards;
  animation-delay: 1.5s;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-fade { opacity: 1; transform: none; }
  html { scroll-behavior: smooth; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  :root {
    --space-2xl: 96px;
    --space-3xl: 120px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
    --space-lg: 36px;
    --space-xl: 64px;
    --space-2xl: 80px;
    --space-3xl: 96px;
  }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .wrap { padding: 0 20px; }
  .card { padding: var(--space-md); border-radius: 10px; }
  .stack-desc { display: none; }
}

@media (max-width: 480px) {
  :root {
    --space-2xl: 64px;
    --space-3xl: 80px;
  }
  .wrap { padding: 0 16px; }
}
