@import url('https://fonts.googleapis.com/css2?family=Newsreader:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-primary: #ff0000;
  --c-accent: #ff006e;
  --c-dark: #1a1a2e;
  --c-darker: #0d0d1a;
  --c-mid: #16213e;
  --c-surface: #1f1f3a;
  --c-border: #ff006e44;
  --c-text: #e8e8f0;
  --c-text-dim: #9898b8;
  --c-neon-cyan: #00ffff;
  --c-neon-blue: #0080ff;
  --font-head: 'Newsreader', Georgia, serif;
  --font-body: 'Roboto', system-ui, sans-serif;
  --max-w: 900px;
  --gap: 1.5rem;
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  background-color: var(--c-darker);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* CRT scanlines overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.18) 2px,
    rgba(0,0,0,0.18) 4px
  );
  pointer-events: none;
  z-index: 9999;
  animation: crt-flicker 8s infinite;
}

@keyframes crt-flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.97; }
  97% { opacity: 1; }
  98% { opacity: 0.95; }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  line-height: 1.25;
  color: var(--c-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 500; }

p { margin-bottom: 1rem; }
a { color: var(--c-accent); text-decoration: none; transition: color 0.2s, text-shadow 0.2s; }
a:hover { color: var(--c-primary); text-shadow: 0 0 8px var(--c-primary); }

strong, b { color: #fff; font-weight: 700; }
small { font-size: 0.8rem; }

/* ===== EYEBROW ===== */
small.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-accent);
  text-shadow: 0 0 6px var(--c-accent);
  margin-bottom: 0.4rem;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-dark);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 2px 20px rgba(255,0,110,0.15);
}

.brand-bar {
  background: linear-gradient(90deg, var(--c-darker) 0%, var(--c-mid) 100%);
  border-bottom: 1px solid var(--c-border);
  padding: 0.6rem 1.5rem;
}

.brand-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  height: 36px;
  width: auto;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-primary);
  text-shadow: 0 0 12px var(--c-primary), 0 0 24px rgba(255,0,0,0.4);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-name:hover {
  color: var(--c-accent);
  text-shadow: 0 0 14px var(--c-accent);
}

.brand-tagline {
  font-size: 0.78rem;
  color: var(--c-text-dim);
  letter-spacing: 0.05em;
}

.main-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar { display: none; }

.main-nav > a {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-text-dim);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
  min-height: 44px;
  text-decoration: none;
}

.main-nav > a:hover,
.main-nav > a[aria-current="page"] {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
  text-shadow: 0 0 6px var(--c-accent);
}

/* ===== PAGE WRAP ===== */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ===== HERO ===== */
.hero--home {
  position: relative;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, var(--c-darker) 0%, var(--c-dark) 60%, var(--c-mid) 100%);
  overflow: hidden;
  margin: -2rem -1.5rem 2.5rem;
  padding: 3rem 1.5rem 4rem;
}

.hero--home::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,0,0,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(255,0,110,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-h1 {
  margin-bottom: 1rem;
  color: #fff;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--c-text-dim);
  margin-bottom: 1.5rem;
  max-width: 560px;
}

/* Slash divider */
.hero-slash {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--c-darker);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* Silhouette deco */
.hero-deco {
  flex-shrink: 0;
  width: 120px;
}

.silhouette-wrap {
  position: relative;
  width: 100px;
  height: 160px;
}

.silhouette {
  position: absolute;
  border-radius: 0;
}

.silhouette.s1 {
  width: 60px;
  height: 140px;
  background: linear-gradient(180deg, var(--c-accent) 0%, transparent 100%);
  opacity: 0.25;
  left: 0;
  bottom: 0;
  clip-path: polygon(20% 0, 100% 0, 80% 100%, 0% 100%);
}

.silhouette.s2 {
  width: 45px;
  height: 100px;
  background: linear-gradient(180deg, var(--c-primary) 0%, transparent 100%);
  opacity: 0.2;
  right: 0;
  bottom: 0;
  clip-path: polygon(0 0, 80% 0, 100% 100%, 20% 100%);
}

/* ===== GLITCH EFFECT ===== */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  animation: glitch-anim 4s infinite;
}

.glitch::before {
  color: var(--c-accent);
  clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
  animation-delay: 0.1s;
  animation-name: glitch-top;
}

.glitch::after {
  color: var(--c-neon-cyan);
  clip-path: polygon(0 60%, 100% 60%, 100% 75%, 0 75%);
  animation-name: glitch-bot;
  animation-delay: 0.3s;
}

@keyframes glitch-top {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  91% { transform: translate(-3px, -1px); opacity: 0.7; }
  93% { transform: translate(3px, 1px); opacity: 0.7; }
  95% { transform: translate(0); opacity: 0; }
}

@keyframes glitch-bot {
  0%, 92%, 100% { transform: translate(0); opacity: 0; }
  93% { transform: translate(4px, 2px); opacity: 0.6; }
  95% { transform: translate(-2px, -1px); opacity: 0.6; }
  97% { transform: translate(0); opacity: 0; }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 0;
  text-decoration: none;
  box-shadow: 0 0 14px rgba(255,0,0,0.5), 0 0 30px rgba(255,0,0,0.2);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  min-height: 44px;
  align-items: center;
}

.btn-primary:hover {
  background: var(--c-accent);
  box-shadow: 0 0 20px rgba(255,0,110,0.7), 0 0 40px rgba(255,0,110,0.3);
  color: #fff;
  text-shadow: none;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: transparent;
  color: var(--c-accent);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--c-accent);
  border-radius: 0;
  text-decoration: none;
  box-shadow: 0 0 8px rgba(255,0,110,0.25);
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
  min-height: 44px;
}

.btn-secondary:hover {
  background: var(--c-accent);
  color: #fff;
  text-shadow: none;
  box-shadow: 0 0 16px rgba(255,0,110,0.6);
}

/* ===== PAGE EYEBROW BAR ===== */
.page-eyebrow-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.page-eyebrow-bar small.eyebrow {
  margin-bottom: 0;
}

/* ===== PAGE H1 ===== */
.page-h1 {
  margin-bottom: 0.75rem;
  text-shadow: 0 0 20px rgba(255,0,0,0.3);
}

.page-lead {
  font-size: 1.05rem;
  color: var(--c-text-dim);
  margin-bottom: 1.5rem;
  max-width: 680px;
}

/* ===== PAGE META ===== */
.page-meta {
  font-size: 0.8rem;
  color: var(--c-text-dim);
}

.pub-date, .mod-date {
  font-size: 0.8rem;
  color: var(--c-text-dim);
}

/* ===== CONTENT BODY ===== */
.content-body {
  margin-bottom: 3rem;
}

.content-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}

.content-body h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--c-accent);
}

.content-body h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.content-body ul,
.content-body ol {
  margin: 0.75rem 0 1rem 1.5rem;
}

.content-body li {
  margin-bottom: 0.4rem;
  line-height: 1.65;
}

.content-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--c-primary);
  background: var(--c-surface);
  color: var(--c-text-dim);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.content-body th {
  background: var(--c-surface);
  color: var(--c-accent);
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--c-primary);
}

.content-body td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--c-border);
}

.content-body tr:hover td {
  background: rgba(255,0,110,0.05);
}

.content-body a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-body code {
  background: var(--c-surface);
  padding: 0.15em 0.4em;
  border-radius: 2px;
  font-size: 0.88em;
  color: var(--c-neon-cyan);
}

.content-body pre {
  background: var(--c-surface);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 3px solid var(--c-primary);
}

.content-body pre code {
  background: none;
  padding: 0;
}

/* ===== INDEX SECTION ===== */
.index-section {
  margin-bottom: 3rem;
}

.index-section h2 {
  margin-bottom: 1.25rem;
}

/* ===== CARD TABLE ===== */
.card-table {
  width: 100%;
  border-collapse: collapse;
}

.card-row {
  border-bottom: 1px solid var(--c-border);
  transition: background 0.2s;
}

.card-row:hover {
  background: rgba(255,0,110,0.06);
}

.card-cell {
  padding: 0;
}

.card-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.5rem 0.85rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.card-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--c-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.card-row:hover .card-link::after {
  transform: scaleX(1);
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
}

.card-row:hover .card-title {
  color: var(--c-accent);
  text-shadow: 0 0 6px rgba(255,0,110,0.4);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--c-text-dim);
  line-height: 1.5;
}

.card-date {
  font-size: 0.75rem;
  color: var(--c-text-dim);
  margin-top: 0.1rem;
}

/* ===== ABOUT PAGE ===== */
.about-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--c-border);
}

.about-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.about-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  background: var(--c-surface);
  border-bottom: 2px solid var(--c-primary);
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}

.about-link-card:hover {
  background: var(--c-mid);
  box-shadow: 0 0 16px rgba(255,0,0,0.2);
}

.alc-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.alc-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.35;
}

/* ===== PRIVACY NAV ===== */
.privacy-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
}

/* ===== ARTICLE HERO IMG ===== */
.article-hero-img {
  margin: 1.5rem 0;
}

.article-hero-img .hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 3px solid var(--c-primary);
}

/* ===== ARTICLE HEADER ===== */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--c-border);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--c-dark);
  border-top: 1px solid var(--c-border);
  margin-top: 3rem;
}

.footer-cta {
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-accent) 100%);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.footer-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255,255,255,0.04) 8px,
    rgba(255,255,255,0.04) 16px
  );
  pointer-events: none;
}

.cta-text {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  position: relative;
}

.footer-cta .btn-primary {
  background: #fff;
  color: var(--c-primary);
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
  position: relative;
}

.footer-cta .btn-primary:hover {
  background: var(--c-dark);
  color: var(--c-accent);
}

.footer-cols {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-dl dt {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-primary);
  text-shadow: 0 0 8px rgba(255,0,0,0.4);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-dl dd {
  margin: 0 0 0.5rem 0;
}

.footer-dl dd a {
  font-size: 0.85rem;
  color: var(--c-text-dim);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
  display: block;
  min-height: 40px;
  padding: 0.3rem 0;
  line-height: 1.4;
}

.footer-dl dd a:hover {
  color: var(--c-accent);
  text-shadow: 0 0 6px rgba(255,0,110,0.5);
}

.footer-bottom {
  background: var(--c-darker);
  border-top: 1px solid var(--c-border);
  padding: 1rem 1.5rem;
  text-align: center;
}

.copyright {
  font-size: 0.78rem;
  color: var(--c-text-dim);
  margin: 0;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== SCROLL PARALLAX DECO ===== */
.hero--home .hero-deco {
  transition: transform 0.1s linear;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  body::before {
    display: none;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero--home {
    min-height: auto;
    padding: 2rem 1rem 3rem;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-deco {
    display: none;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-link-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    padding: 0 0.75rem;
  }

  .main-nav > a {
    padding: 0.65rem 0.6rem;
    font-size: 0.78rem;
  }

  .brand-tagline {
    display: none;
  }

  .page-wrap {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --gap: 1rem;
  }

  .brand-bar {
    padding: 0.5rem 1rem;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .footer-cta {
    padding: 1.5rem 1rem;
  }

  .footer-cols {
    padding: 1.5rem 1rem;
  }

  .content-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .card-link {
    padding: 0.85rem 0.25rem;
  }
}
