/* === Base Reset & Variables === */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root{
  --bg: #050505;
  --panel: rgba(0,0,0,.65);
  --text: #e0e0e0;
  --muted: #bfbfbf;
  --accent: #ff3b3b; /* primary red */
  --accent-soft: #e23636;
  --shadow: 0 0 20px rgba(255,59,59,.35);
  --wrap: min(92vw, 1000px);

  /* Fluid type scale */
  --step--1: clamp(0.92rem, 0.88rem + 0.2vw, 1rem);
  --step-0:  clamp(1rem,   0.96rem + 0.35vw, 1.125rem);
  --step-1:  clamp(1.25rem, 1.12rem + 0.8vw, 1.6rem);
  --step-2:  clamp(1.8rem,  1.4rem + 1.6vw,  2.4rem);
  --step-3:  clamp(2.2rem,  1.6rem + 2.6vw,  3rem);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Oxanium', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  overflow-x: hidden;
}

/* Typography */
h1, h2, nav, .btn { font-family: 'Orbitron', sans-serif; letter-spacing: 0.03em; }
h2 { font-size: var(--step-2); margin-bottom: .6rem; color: var(--accent); text-shadow: var(--shadow); }
p { font-size: var(--step-0); line-height: 1.65; color: #d8d8d8; }
strong { color: #f0eaea; }

/* Utilities */
.container { width: var(--wrap); margin-inline: auto; }
.section { position: relative; min-height: 100svh; display:flex; align-items:center; justify-content:center; text-align:center; overflow:hidden; }
.section:not(.hero) { padding-block: clamp(64px, 12vh, 120px); }
.hero { position: relative; height: 100svh; }

/* Header */
.site-header{
  position: fixed; inset: 0 0 auto 0; background: var(--panel);
  backdrop-filter: blur(6px);
  z-index: 1000;
}
.header-wrap{
  display:flex; align-items:center; justify-content:space-between;
  padding: .9rem 1.25rem;
}
.logo{
  color: var(--accent-soft);
  text-shadow: 0 0 12px var(--accent-soft);
  font-size: var(--step-1);
}
.site-nav ul{ list-style:none; display:flex; gap: 1.25rem; }
.site-nav a{
  color:#ccc; text-decoration:none; font-size: var(--step--1);
  transition: color .25s ease, text-shadow .25s ease;
}
.site-nav a:hover, .site-nav a:focus{
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent);
}
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left: 1rem; top: 1rem; width: auto; height: auto; padding:.5rem .75rem; background:#111; color:#fff; z-index:2000;
  border:1px solid #333; border-radius: 8px;
}

/* Videos & Overlays */
.video-bg, .bg-video{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; z-index:1;
  filter: brightness(0.95) contrast(1.05) saturate(1.05);
  animation: backgroundPulse 16s infinite ease-in-out alternate;
}
.overlay{
  position:absolute; inset:0; z-index:2;
  background: rgba(0,0,0,.38);
  animation: overlayFade 18s infinite alternate;
}

/* Section-specific overlay subtlety */
#about .overlay { background: rgba(0,0,0,.42); }
#archives .overlay { background: rgba(0,0,0,.48); }
#contact .overlay { background: rgba(0,0,0,.42); }

@keyframes backgroundPulse{
  0% { filter: brightness(.95) contrast(1.05) saturate(1.05); }
  50%{ filter: brightness(1.05) contrast(1.1) saturate(1.1); }
  100%{ filter: brightness(.95) contrast(1.05) saturate(1.05); }
}
@keyframes overlayFade{
  0%{ opacity:.82; } 50%{ opacity:.64; } 100%{ opacity:.82; }
}

/* Content blocks */
.hero-content, .content{
  position:relative; z-index:3; max-width: 880px;
  padding: clamp(16px, 2.5vw, 32px);
}
.hero h2{ font-size: var(--step-3); color:#fff; margin-bottom:.5rem; text-shadow: 0 0 20px var(--accent); }
.hero p{ font-size: var(--step-0); color:#e6e6e6; margin-bottom:1.6rem; }

/* Button */
.btn{
  display:inline-block; padding:.85rem 1.6rem; border:2px solid var(--accent);
  border-radius:10px; color:#fff; text-decoration:none; text-transform:uppercase;
  font-weight:700; letter-spacing:.06em; background: transparent;
  transition: transform .15s ease, box-shadow .15s ease, border-color .2s ease;
}
.btn:hover, .btn:focus-visible{
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent);
  outline: none;
}

/* Glitch pulse (subtle) */
.glitch{ animation: softDataPulse 5s infinite alternate; }
@keyframes softDataPulse{
  0%{ text-shadow: 0 0 6px rgba(255,60,60,.4), 0 0 2px #00ffff; }
  50%{ text-shadow: 0 0 10px rgba(255,60,60,.7), 0 0 6px #00ffff; }
  100%{ text-shadow: 0 0 6px rgba(255,60,60,.4), 0 0 2px #00ffff; }
}
.glitch:nth-child(2n){ animation-delay: 1.2s; }
.glitch:nth-child(3n){ animation-delay: 2.4s; }

/* Reveal on scroll */
.reveal{ opacity: 0; transform: translateY(40px); transition: opacity 1s ease, transform 1s ease; }
.reveal.visible{ opacity: 1; transform: translateY(0); }

/* Footer */
.site-footer{
  background:#000; text-align:center; padding: 1.5rem 0; color:#888;
  border-top: 1px solid #111;
}
.credits{ list-style:none; margin-top:.5rem; }
.credits li{ margin:.25rem 0; }
.credits a{ color:#aaa; text-decoration:none; }
.credits a:hover{ color:#fff; text-decoration:underline; }

/* Responsive improvements */
@media (max-width: 880px){
  .site-nav ul{ gap: 1rem; }
  .site-nav a{ font-size: .95rem; }
  .hero h2{ font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
}
@media (max-width: 768px){
  .header-wrap{ padding: .7rem 1rem; }
  .section{ min-height: auto; padding-block: clamp(56px, 14vh, 96px); }
  .hero{ height: auto; padding-top: 72px; }
  .hero p, .section p{ padding-inline: .25rem; }
  /* Keep videos fixed for mobile to reduce layout jump */
  .video-bg, .bg-video{ position: fixed; opacity: .55; }
}

/* Accessibility & motion preferences */
:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; }
  .video-bg, .bg-video{ display:none; }
  .section, .hero{ background:#0c0c0c; }
}
