@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,500;0,9..40,700;1,9..40,300&display=swap');

:root {
  --bg: #050810;
  --bg2: #080d1a;
  --neon: #00f5c4;
  --neon2: #7b2fff;
  --neon3: #ff3cac;
  --neon4: #ffcc00;
  --text: #e8eaf6;
  --muted: #5a6080;
  --card: rgba(255,255,255,0.03);
  --border: rgba(0,245,196,0.12);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  cursor: none;
  min-height: 100vh;
}

/* ── CURSOR ── */
#cursor {
  position: fixed; width: 12px; height: 12px;
  background: var(--neon); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width .2s, height .2s, background .2s;
  mix-blend-mode: screen;
}
#cursor-ring {
  position: fixed; width: 40px; height: 40px;
  border: 1.5px solid rgba(0,245,196,.5); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: all .15s ease; mix-blend-mode: screen;
}
body.hovering #cursor { width: 20px; height: 20px; background: var(--neon3); }
body.hovering #cursor-ring { width: 60px; height: 60px; border-color: var(--neon3); }

/* ── CANVAS ── */
#bg-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%; z-index: 0; pointer-events: none;
}

/* ── PROGRESS BAR ── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 2px;
  background: linear-gradient(90deg, var(--neon2), var(--neon), var(--neon3));
  z-index: 999; transition: width .1s;
}

/* ── NOISE ── */
body::after {
  content: '';
  position: fixed; inset: 0;
  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)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9990; opacity: .3;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 60px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(5,8,16,.8); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
nav.scrolled { background: rgba(5,8,16,.97); }
.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.9rem; letter-spacing: 4px;
  color: var(--neon); text-shadow: 0 0 20px rgba(0,245,196,.6);
  text-decoration: none; cursor: pointer;
}
.logo span { color: var(--neon3); }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-family: 'Space Mono', monospace; font-size: .78rem;
  color: var(--muted); text-decoration: none;
  letter-spacing: 2px; text-transform: uppercase;
  transition: color .3s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--neon); transition: width .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--neon); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-btn {
  font-family: 'Space Mono', monospace; font-size: .75rem;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--bg); background: var(--neon); border: none;
  padding: 10px 24px; cursor: pointer;
  clip-path: polygon(8px 0%,100% 0%,calc(100% - 8px) 100%,0% 100%);
  transition: background .3s, transform .2s;
}
.nav-btn:hover { background: var(--neon3); transform: translateY(-2px); }

/* ── BUTTONS ── */
.btn-primary {
  font-family: 'Space Mono', monospace; font-size: .78rem;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--bg); background: var(--neon); border: none;
  padding: 16px 40px; cursor: pointer; position: relative; overflow: hidden;
  clip-path: polygon(12px 0%,100% 0%,calc(100% - 12px) 100%,0% 100%);
  transition: transform .3s; display: inline-block; text-decoration: none;
}
.btn-primary::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.3),transparent);
  transition: left .4s;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover { transform: translateY(-3px); }

.btn-outline {
  font-family: 'Space Mono', monospace; font-size: .78rem;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--neon); background: transparent; border: 1px solid var(--neon);
  padding: 16px 40px; cursor: pointer;
  clip-path: polygon(12px 0%,100% 0%,calc(100% - 12px) 100%,0% 100%);
  transition: background .3s, color .3s, transform .3s;
  display: inline-block; text-decoration: none;
}
.btn-outline:hover { background: rgba(0,245,196,.1); transform: translateY(-3px); }

/* ── SECTION HEADER ── */
.section-tag {
  font-family: 'Space Mono', monospace; font-size: .7rem;
  letter-spacing: 4px; color: var(--neon); text-transform: uppercase; margin-bottom: 12px;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem,6vw,6rem); line-height: 1; letter-spacing: 2px;
}
.section-title em { font-style: normal; color: transparent; -webkit-text-stroke: 1px var(--neon3); }

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg,transparent,var(--border),transparent);
  margin: 0 60px;
}

/* ── REVEAL ── */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity .7s, transform .7s;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RIPPLE ── */
.ripple {
  position: fixed; border-radius: 50%;
  border: 2px solid var(--neon); pointer-events: none; z-index: 9997;
  transform: translate(-50%,-50%);
  animation: rippleOut .8s ease-out forwards;
}
@keyframes rippleOut {
  from { width: 0; height: 0; opacity: 1; }
  to { width: 80px; height: 80px; opacity: 0; }
}

/* ── TRAIL ── */
.trail-dot {
  position: fixed; width: 6px; height: 6px; border-radius: 50%;
  background: var(--neon); pointer-events: none; z-index: 9990;
  transform: translate(-50%,-50%); opacity: 0;
}

/* ── KBD HINT ── */
#kbd-hint {
  position: fixed; bottom: 30px; right: 30px; z-index: 200;
  background: rgba(8,13,26,.9); border: 1px solid var(--border);
  padding: 14px 18px; font-family: 'Space Mono',monospace;
  font-size: .66rem; color: var(--muted); backdrop-filter: blur(10px);
  opacity: 0; animation: fadeUp .8s 1.5s forwards;
}
#kbd-hint .kbd {
  display: inline-block; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  padding: 1px 6px; border-radius: 3px; color: var(--text); margin: 0 2px;
}
#kbd-hint-log { margin-top: 6px; color: var(--neon); min-height: 16px; font-size: .63rem; }

/* ── PAGE TRANSITION ── */
.page-transition {
  position: fixed; inset: 0; background: var(--bg); z-index: 10000;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .45s cubic-bezier(.76,0,.24,1);
  pointer-events: none;
}
.page-transition.out { transform: scaleY(1); transform-origin: bottom; }
.page-transition.in  { transform: scaleY(0); transform-origin: top; }

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

/* ── MOBILE ── */
@media (max-width: 768px) {
  nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .divider { margin: 0 24px; }
}
