/* === Reset & Vars (aligned with main) === */
* { box-sizing: border-box; margin: 0; padding: 0; }

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

  --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.75; color: #d8d8d8; }
em { color: #f0eaea; }

/* 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;
}

/* Background */
.bg-video{
  position: fixed; inset:0; width:100%; height:100%;
  object-fit: cover; z-index: -2;
  filter: brightness(0.9) contrast(1.05);
  animation: bgPulse 18s infinite alternate ease-in-out;
}
.overlay{
  position: fixed; inset:0; background: rgba(0,0,0,0.48);
  z-index: -1; animation: overlayFade 20s infinite alternate;
}
@keyframes bgPulse{
  0%{ filter: brightness(.9) contrast(1.05); }
  50%{ filter: brightness(1.05) contrast(1.1); }
  100%{ filter: brightness(.9) contrast(1.05); }
}
@keyframes overlayFade{
  0%{ opacity:.75; } 50%{ opacity:.6; } 100%{ opacity:.75; }
}

/* Container */
.container{ width: var(--wrap); margin-inline:auto; }
.fragment-container{
  width: var(--wrap); margin-inline:auto;
  padding: clamp(92px, 12vh, 120px) 0 clamp(56px, 10vh, 92px);
  text-align: center; position: relative; z-index: 2;
}

/* Title & Meta */
.fragment-container h2{
  font-size: var(--step-3); color:#fff; text-shadow: 0 0 20px var(--accent);
  margin-bottom: .5rem;
}
.fragment-meta{
  font-size: .92rem; color:#aaa; display:flex; justify-content:center; gap: 1rem;
  margin-bottom: clamp(24px, 4vh, 36px);
}
.tag{ color: var(--accent); text-shadow: 0 0 8px var(--accent); }
.date{ opacity: .85; }

/* Body */
.fragment-body{
  background: rgba(10,10,10,0.6);
  border: 1px solid rgba(255,59,59,0.28);
  border-left-width: 3px; border-radius: 12px;
  padding: clamp(18px, 2.2vw, 28px);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 20px rgba(255,59,59,0.15);
  text-align: left; color: #d6d6d6;
  text-shadow: 0 0 6px rgba(255,59,59,0.12);
}
.fragment-body p{ margin-bottom: 1.4rem; }

/* Nav */
.fragment-nav{
  margin-top: clamp(24px, 5vh, 40px);
  display:flex; align-items:center; justify-content:center; gap: 1rem; flex-wrap:wrap;
}

/* Buttons */
.btn{
  display:inline-block; padding:.8rem 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 + Reveal */
.glitch{ animation: softDataPulse 6s 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; }
}
.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; margin-top: 2rem;
}

/* Responsive */
@media (max-width: 820px){
  .fragment-container{ padding-top: 96px; }
  .site-nav ul{ gap: 1rem; }
}
@media (max-width: 720px){
  .bg-video{ opacity: .55; }
  .fragment-container{ padding-inline: 1rem; }
  .fragment-container h2{ font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
  .fragment-meta{ flex-direction: column; gap: .25rem; }
}

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