/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #07030f;
  --text: #ece9ff;
  --muted: #a8a1cf;
  --dim: #8c85b8;
  --cyan: #00f0ff;
  --magenta: #ff2bd6;
  --violet: #8a5cff;
  --yellow: #f5ff3b;
  --red: #ff3b6b;

  --glass-bg: rgba(14, 8, 30, 0.62);
  --glass-border: rgba(255, 255, 255, 0.12);

  --font-display: 'Orbitron', 'Chakra Petch', sans-serif;
  --font-body: 'Chakra Petch', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #3b2a63 var(--bg);
  scrollbar-width: thin;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--magenta), var(--violet));
  border: 3px solid var(--bg);
  border-radius: 999px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-loading { overflow: hidden; }

a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--magenta); color: #000; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--cyan);
  color: #04020a;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-expo);
}

.skip-link:focus-visible { transform: none; outline-color: var(--magenta); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Background layers
   ========================================================================== */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(7, 3, 15, 0.7) 100%),
    linear-gradient(to bottom, rgba(7, 3, 15, 0.45), transparent 18%, transparent 75%, rgba(7, 3, 15, 0.55));
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* Shown when WebGL is unavailable or the 3D scene fails to load */
body.no-webgl #scene { display: none; }
body.no-webgl {
  background:
    radial-gradient(ellipse at 50% 115%, rgba(255, 43, 214, 0.35), transparent 60%),
    radial-gradient(ellipse at 85% 0%, rgba(0, 240, 255, 0.18), transparent 50%),
    linear-gradient(#0d0520, #07030f);
  background-attachment: fixed;
}

main, .footer { position: relative; z-index: 3; }

/* ==========================================================================
   Loader
   ========================================================================== */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, #1a0a2e 0%, var(--bg) 70%);
  transition: opacity 0.8s ease, visibility 0.8s;
}

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

.loader-inner {
  width: min(420px, calc(100vw - 32px));
  font-family: var(--font-mono);
}

.loader-logo {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 28px;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.loader-log {
  height: 8.4em;
  margin-bottom: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}

.loader-log li::before { content: '> '; color: var(--magenta); }
.loader-log li.ok::after { content: ' [OK]'; color: var(--cyan); }

.loader-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loader-bar span {
  display: block;
  height: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  box-shadow: 0 0 12px var(--cyan);
  transition: transform 0.35s ease;
}

.loader-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

#loader-pct { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Glitch text
   ========================================================================== */
.glitch { position: relative; }

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.glitch::before {
  color: var(--cyan);
  animation: glitch-a 3.4s infinite steps(1);
}

.glitch::after {
  color: var(--magenta);
  animation: glitch-b 2.9s infinite steps(1);
}

@keyframes glitch-a {
  0%, 90%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  91% { clip-path: inset(12% 0 58% 0); transform: translate(-6px, 0); }
  93% { clip-path: inset(62% 0 10% 0); transform: translate(5px, 0); }
  95% { clip-path: inset(34% 0 40% 0); transform: translate(-3px, 0); }
  97% { clip-path: inset(80% 0 2% 0); transform: translate(4px, 0); }
}

@keyframes glitch-b {
  0%, 86%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  87% { clip-path: inset(50% 0 30% 0); transform: translate(6px, 0); }
  89% { clip-path: inset(5% 0 75% 0); transform: translate(-5px, 0); }
  92% { clip-path: inset(70% 0 12% 0); transform: translate(3px, 0); }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.nav.is-scrolled {
  background: rgba(10, 5, 22, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.logo-mark {
  width: 0.95em;
  height: 0.95em;
  fill: var(--magenta);
  filter: drop-shadow(0 0 6px rgba(255, 43, 214, 0.7));
}
.logo-dot { color: var(--cyan); letter-spacing: 0.04em; }

.nav-links { display: flex; gap: 4px; }

.nav-links a {
  position: relative;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a::before {
  content: attr(data-num);
  margin-right: 6px;
  font-size: 0.68rem;
  color: var(--magenta);
}

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

.nav-links a.is-active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.sound-toggle:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.35); }

.sound-toggle[aria-pressed="true"] {
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 18px -6px var(--cyan);
}

.sound-toggle:disabled { opacity: 0.4; cursor: not-allowed; }

.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq i {
  width: 3px;
  height: 4px;
  background: currentColor;
}

.eq i:nth-child(2) { height: 9px; }
.eq i:nth-child(3) { height: 6px; }
.eq i:nth-child(4) { height: 11px; }

.sound-toggle[aria-pressed="true"] .eq i { animation: eq 0.8s ease-in-out infinite alternate; }
.sound-toggle[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -0.3s; }
.sound-toggle[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -0.55s; }
.sound-toggle[aria-pressed="true"] .eq i:nth-child(4) { animation-delay: -0.15s; }

@keyframes eq {
  from { height: 3px; }
  to { height: 14px; }
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease-out);
}

.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.nav-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ==========================================================================
   HUD (section indicator, wide screens only)
   ========================================================================== */
.hud {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  pointer-events: none;
}

.hud-sector { font-variant-numeric: tabular-nums; }
.hud-sector span { color: var(--cyan); }

.hud-track {
  position: relative;
  width: 2px;
  height: 140px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.hud-track span {
  position: absolute;
  inset: 0;
  transform-origin: top;
  transform: scaleY(var(--p, 0));
  background: linear-gradient(var(--cyan), var(--magenta));
}

.hud-name { writing-mode: vertical-rl; }

@media (min-width: 1320px) {
  .hud { display: flex; }
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) var(--gutter) 96px;
}

.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 40px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 24px rgba(7, 3, 15, 0.8);
}

.section-head h2 em,
.contact-title em {
  font-style: normal;
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(0, 240, 255, 0.55);
}

/* Scroll reveal */
.reveal {
  opacity: 0.35;
  translate: 0 20px;
  transition: opacity 0.9s var(--ease-expo), translate 0.9s var(--ease-expo);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  translate: 0 0;
}

/* ==========================================================================
   Glass
   ========================================================================== */
.glass {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.04)),
    var(--glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.panel { padding: clamp(22px, 3vw, 36px); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  --cut: 12px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 14px 26px;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: transform 0.2s var(--ease-out), background 0.2s, color 0.2s;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease-out);
}

.btn:hover { transform: translateY(-2px); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(0.98); }

/* clip-path would cut off a normal outline, so focus is drawn inside the shape */
.btn:focus-visible { outline: none; }

.btn-primary {
  background: var(--cyan);
  color: #04020a;
}

.btn-primary:hover { background: #fff; }

.btn-primary:focus-visible {
  background: #fff;
  box-shadow: inset 0 0 0 3px var(--magenta);
}

/* The element's own background is the border; ::before fills the inside,
   so the 1px edge follows the cut corners too. */
.btn-ghost {
  isolation: isolate;
  background: rgba(255, 255, 255, 0.34);
  color: var(--text);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-ghost::before {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  clip-path: inherit;
  background: rgba(12, 7, 26, 0.9);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--cyan);
  color: var(--cyan);
}

.btn-ghost:focus-visible::before { inset: 2px; }

.btn-sm {
  --cut: 8px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 0.72rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { align-items: center; }

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 3, 15, 0.72) 0%, rgba(7, 3, 15, 0.3) 50%, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
}

.hero-content { position: relative; }

.hero-content > * {
  opacity: 0;
  translate: 0 24px;
}

.is-ready .hero-content > * { animation: rise 0.9s var(--ease-out) forwards; }
.is-ready .hero-content > :nth-child(2) { animation-delay: 0.1s; }
.is-ready .hero-content > :nth-child(3) { animation-delay: 0.2s; }
.is-ready .hero-content > :nth-child(4) { animation-delay: 0.3s; }
.is-ready .hero-content > :nth-child(5) { animation-delay: 0.4s; }

@keyframes rise {
  to { opacity: 1; translate: 0 0; }
}

.hero-title {
  margin: 0.25em 0 0.2em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 10vw, 6rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.45), 0 0 48px rgba(255, 43, 214, 0.3);
}

.hero-role {
  margin: 0 0 18px;
  text-shadow: 0 1px 14px rgba(7, 3, 15, 0.9);
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  color: var(--text);
}

.prompt { color: var(--magenta); margin-right: 0.4em; }

.caret {
  color: var(--cyan);
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-lead {
  max-width: 34rem;
  margin: 0 0 34px;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: #cdc7ec;
  text-shadow: 0 1px 14px rgba(7, 3, 15, 0.95);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.scroll-hint span {
  position: relative;
  width: 1px;
  height: 44px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
}

.scroll-hint span::after {
  content: '';
  position: absolute;
  left: 0; top: -50%;
  width: 100%;
  height: 50%;
  background: var(--cyan);
  animation: drip 1.8s var(--ease-out) infinite;
}

@keyframes drip {
  to { top: 100%; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}

.about-text {
  margin: 0 0 16px;
  color: var(--muted);
}

.hl { color: var(--text); box-shadow: inset 0 -0.45em 0 rgba(255, 43, 214, 0.35); }

.skill-group + .skill-group { margin-top: 22px; }

.skill-group h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li,
.card-tags li {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}

/* ==========================================================================
   Project cards
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}

.card {
  --accent: var(--cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition:
    transform 0.25s ease-out,
    box-shadow 0.3s,
    border-color 0.3s,
    opacity 0.9s var(--ease-expo) var(--delay, 0ms),
    translate 0.9s var(--ease-expo) var(--delay, 0ms);
}

/* spotlight that follows the cursor */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 22%, transparent), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}

/* accent line */
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 22px;
  width: 64px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.card:hover,
.card:focus-within {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow:
    0 0 40px -10px var(--accent),
    0 30px 60px -24px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.card:hover::before { opacity: 1; }

.card-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--dim);
}

.card-index { color: var(--accent); }

.card-visual {
  position: relative;
  height: 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 60%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.1));
}

.card-visual svg {
  width: 52px;
  height: 52px;
  color: var(--accent);
  filter: drop-shadow(0 0 10px var(--accent));
  transition: transform 0.5s var(--ease-expo);
}

.card:hover .card-visual svg { transform: scale(1.12) translateY(-2px); }

.card-title {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}

.card-tagline {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 70%, #fff);
}

.card-desc {
  margin: 0;
  font-size: 0.95rem;
  color: #c3bde3;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-links {
  display: flex;
  gap: 18px;
  margin-top: auto;
  padding-top: 8px;
}

.card-links a {
  position: relative;
  z-index: 1;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  transition: color 0.2s;
}

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

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 64px);
  text-align: center;
}

.contact-title {
  margin: 14px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 4.2rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.contact-text {
  max-width: 32rem;
  margin: 0 auto 28px;
  color: var(--muted);
}

.contact-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 3.6vw, 1.6rem);
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.5);
  border-bottom: 1px dashed rgba(0, 240, 255, 0.5);
  overflow-wrap: anywhere;
  transition: color 0.2s;
}

.contact-email:hover { color: #fff; }

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom));
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.footer-sep { color: var(--magenta); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --nav-h: 64px; }

  .menu-toggle { display: inline-block; }
  .sound-label { display: none; }
  .sound-toggle { width: 44px; min-height: 44px; padding: 0; justify-content: center; }

  .nav-links {
    position: absolute;
    top: calc(var(--nav-h) + env(safe-area-inset-top) - 4px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(12, 6, 26, 0.88);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease-out), visibility 0.25s;
  }

  .nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-links a { padding: 14px 16px; font-size: 0.9rem; }
  .nav-links a.is-active::after { left: 16px; right: auto; width: 24px; bottom: 8px; }

  .section { padding-bottom: 72px; }

  .hero { align-items: flex-end; padding-bottom: 120px; }
  .hero::before {
    background: linear-gradient(to top, rgba(7, 3, 15, 0.85) 0%, rgba(7, 3, 15, 0.4) 55%, transparent 85%);
  }

  .hero-cta .btn { flex: 1 1 auto; }

}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .glitch::before, .glitch::after { display: none; }
}
