@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Patrick+Hand&display=swap');

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

:root {
  --c-lime: #87ff71;
  --c-cyan: #01cdfe;
  --c-dark: #192617;
  --c-pink: #ff71ce;
  --c-purple: #b967ff;
  --c-yellow: #fffb96;
  --c-bg: #0d0d1a;
  --c-surface: rgba(25, 38, 23, 0.82);
  --c-text: #e8ffe4;
  --c-muted: #a0d4b0;
  --font-main: 'Kalam', 'Patrick Hand', cursive, system-ui, sans-serif;
  --nav-h: 70px;
  --transition: 0.25s ease;
  --glow-lime: 0 0 8px #87ff71, 0 0 24px #87ff71aa;
  --glow-cyan: 0 0 8px #01cdfe, 0 0 24px #01cdfeaa;
  --glow-pink: 0 0 8px #ff71ce, 0 0 24px #ff71ceaa;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
  line-height: 1.7;
}

body.vp-body {
  font-family: var(--font-main);
  background-color: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

section[id] {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

a {
  color: var(--c-cyan);
  text-decoration: none;
  transition: color var(--transition), text-shadow var(--transition);
}
a:hover {
  color: var(--c-lime);
  text-shadow: var(--glow-lime);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, menu {
  list-style: none;
}

/* ===== VAPORWAVE BG ===== */
.vaporwave-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg,
    #1a0533 0%,
    #2d0a4e 18%,
    #4a1060 30%,
    #ff71ce44 50%,
    #01cdfe22 70%,
    #0d0d1a 100%
  );
  pointer-events: none;
}

.scanlines {
  position: absolute;
  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: 1;
}

.retro-grid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45vh;
  background-image:
    linear-gradient(rgba(1,205,254,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1,205,254,0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(55deg);
  transform-origin: bottom center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(13, 13, 26, 0.92);
  border-bottom: 1px solid var(--c-cyan);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(1,205,254,0.2);
}

.main-nav {
  height: 100%;
}

.nav-details {
  height: 100%;
  position: relative;
}

.nav-details[open] .nav-inner {
  display: flex;
}

.nav-summary {
  display: none;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 0 20px;
  height: var(--nav-h);
  color: var(--c-lime);
  font-family: var(--font-main);
  font-size: 1rem;
  list-style: none;
  user-select: none;
}
.nav-summary::-webkit-details-marker { display: none; }

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--c-lime);
  box-shadow: var(--glow-lime);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
  gap: 16px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-right {
  justify-content: flex-end;
}

.nav-left li a,
.nav-right li a {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: var(--font-main);
  font-weight: 700;
  color: var(--c-text);
  border: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition), text-shadow var(--transition);
  white-space: nowrap;
  min-height: 40px;
}
.nav-left li a:hover,
.nav-right li a:hover {
  color: var(--c-cyan);
  border-color: var(--c-cyan);
  text-shadow: var(--glow-cyan);
}

.nav-brand {
  flex-shrink: 0;
  text-align: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo,
.footer-logo-img {
  height: 44px;
  width: auto;
}

.brand-text {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--c-lime);
  text-shadow: var(--glow-lime);
  letter-spacing: 0.04em;
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13,13,26,0.88) 0%,
    rgba(45,10,78,0.65) 50%,
    rgba(1,205,254,0.12) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 8vw;
  max-width: 780px;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--c-cyan);
  text-shadow: var(--glow-cyan);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.hero-content h1 {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 4rem);
  line-height: 1.2;
  color: var(--c-lime);
  text-shadow: var(--glow-lime), 0 0 60px #87ff7166;
  margin-bottom: 20px;
  word-break: break-all;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--c-text);
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
  padding: 14px 32px;
  background: transparent;
  border: 2px solid var(--c-lime);
  color: var(--c-lime);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-shadow: var(--glow-lime);
  box-shadow: var(--glow-lime), inset 0 0 0 0 var(--c-lime);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  min-height: 40px;
}
.hero-cta:hover {
  background: var(--c-lime);
  color: var(--c-dark);
  text-shadow: none;
  box-shadow: var(--glow-lime);
}

.hero-clip {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--c-bg);
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0 100%);
  z-index: 3;
}

/* ===== PAGE BODY (aside + main) ===== */
.page-body {
  display: flex;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  gap: 36px;
  position: relative;
  z-index: 2;
}

/* ===== ASIDE ===== */
.site-aside {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  align-self: flex-start;
}

.aside-inner {
  border: 1px solid var(--c-cyan);
  padding: 20px 16px;
  background: rgba(13,13,26,0.75);
  backdrop-filter: blur(6px);
}

.aside-heading {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--c-cyan);
  text-shadow: var(--glow-cyan);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.aside-nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-link {
  display: block;
  padding: 8px 10px;
  font-size: 0.85rem;
  color: var(--c-muted);
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.aside-link:hover {
  color: var(--c-lime);
  border-left-color: var(--c-lime);
  text-shadow: var(--glow-lime);
}

.aside-glitch-deco {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.gd-line {
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--c-cyan), var(--c-purple), var(--c-pink));
  opacity: 0.7;
}
.gd-line:nth-child(2) { width: 70%; }
.gd-line:nth-child(3) { width: 45%; }

/* ===== MAIN / CONTENT ===== */
.site-main {
  flex: 1;
  min-width: 0;
}

.wrap {
  width: 100%;
}

.content-section {
  width: 100%;
}

.content-article {
  width: 100%;
}

/* ===== CONTENT STYLES (injected page.content) ===== */
.content-article section {
  padding: 56px 0;
  border-bottom: 1px solid rgba(1,205,254,0.18);
  position: relative;
}
.content-article section:last-child {
  border-bottom: none;
}

.content-article h2 {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--c-lime);
  text-shadow: var(--glow-lime);
  margin-bottom: 10px;
  line-height: 1.3;
}

.content-article h2 + .subtitle,
.content-article h2 + .subhead,
.content-article h2 + .desc,
.content-article h2 + .lead {
  color: var(--c-cyan);
  font-size: 1rem;
  margin-bottom: 20px;
  text-shadow: var(--glow-cyan);
}

.content-article h2 + p {
  margin-bottom: 20px;
}

.content-article h3 {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--c-cyan);
  margin-top: 32px;
  margin-bottom: 12px;
  text-shadow: var(--glow-cyan);
}

.content-article p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
  margin-bottom: 16px;
  max-width: 72ch;
}

.content-article ul,
.content-article ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.content-article li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  margin-bottom: 6px;
}
.content-article li::marker {
  color: var(--c-lime);
}

.content-article strong {
  color: var(--c-lime);
  font-weight: 700;
}

.content-article em {
  color: var(--c-cyan);
  font-style: normal;
}

.content-article blockquote {
  border-left: 3px solid var(--c-purple);
  padding: 12px 20px;
  margin: 24px 0;
  background: rgba(185,103,255,0.08);
  color: var(--c-yellow);
  font-size: 1.05rem;
  line-height: 1.7;
}

.content-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}
.content-article th {
  background: rgba(135,255,113,0.12);
  color: var(--c-lime);
  padding: 10px 14px;
  border: 1px solid rgba(135,255,113,0.35);
  text-align: left;
  font-weight: 700;
}
.content-article td {
  padding: 9px 14px;
  border: 1px solid rgba(1,205,254,0.2);
  color: var(--c-text);
  vertical-align: top;
}
.content-article tr:nth-child(even) td {
  background: rgba(1,205,254,0.04);
}

.content-article a {
  color: var(--c-cyan);
  text-decoration: underline;
  text-decoration-color: rgba(1,205,254,0.4);
}
.content-article a:hover {
  color: var(--c-lime);
  text-decoration-color: var(--c-lime);
}

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--c-cyan);
  background: rgba(13,13,26,0.97);
  padding: 48px 24px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(1,205,254,0.15);
}

.footer-brand-col {
  flex: 0 0 280px;
  max-width: 280px;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}

.footer-keywords {
  font-size: 0.78rem;
  color: rgba(160,212,176,0.5);
  line-height: 1.6;
}

.footer-links-col {
  flex: 1;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-dl {
  min-width: 130px;
  flex: 1;
}

.footer-dl dt {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--c-lime);
  text-shadow: var(--glow-lime);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.footer-dl dd {
  margin-bottom: 8px;
}

.footer-dl dd a {
  font-size: 0.88rem;
  color: var(--c-muted);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  transition: color var(--transition);
}
.footer-dl dd a:hover {
  color: var(--c-cyan);
  text-shadow: var(--glow-cyan);
}

.footer-dl dd span {
  font-size: 0.88rem;
  color: rgba(160,212,176,0.4);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-copy,
.footer-meta {
  font-size: 0.8rem;
  color: rgba(160,212,176,0.5);
}

/* ===== GLITCH ANIMATION ===== */
@keyframes glitch-shift {
  0%   { clip-path: inset(0 0 98% 0); transform: translateX(-4px); }
  20%  { clip-path: inset(30% 0 50% 0); transform: translateX(4px); }
  40%  { clip-path: inset(70% 0 10% 0); transform: translateX(-2px); }
  60%  { clip-path: inset(15% 0 75% 0); transform: translateX(3px); }
  80%  { clip-path: inset(55% 0 30% 0); transform: translateX(-3px); }
  100% { clip-path: inset(0 0 98% 0); transform: translateX(0); }
}

@keyframes neon-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.hero-content h1 {
  animation: neon-pulse 3s ease-in-out infinite;
}

/* ===== PARALLAX (JS-enhanced, CSS fallback) ===== */
.hero-media {
  will-change: transform;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .page-body {
    padding: 40px 16px 30px;
    gap: 24px;
  }
  .site-aside {
    width: 180px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 60px;
  }

  .nav-summary {
    display: flex;
  }

  .nav-details:not([open]) .nav-inner {
    display: none;
  }

  .nav-inner {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: rgba(13,13,26,0.98);
    border-bottom: 1px solid var(--c-cyan);
    gap: 8px;
    z-index: 99;
  }

  .nav-left,
  .nav-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    flex: none;
    width: 100%;
  }

  .nav-left li,
  .nav-right li {
    width: 100%;
  }

  .nav-left li a,
  .nav-right li a {
    width: 100%;
    font-size: 1rem;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(1,205,254,0.12);
  }

  .nav-brand {
    order: -1;
    padding: 12px 0 4px;
  }

  .page-body {
    flex-direction: column;
    padding: 32px 16px 24px;
  }

  .site-aside {
    width: 100%;
    position: static;
    order: -1;
  }

  .aside-inner {
    padding: 14px;
  }

  .aside-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .aside-link {
    font-size: 0.8rem;
    padding: 6px 10px;
    border-left: none;
    border-bottom: 2px solid transparent;
    min-height: 40px;
  }
  .aside-link:hover {
    border-left-color: transparent;
    border-bottom-color: var(--c-lime);
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-clip {
    height: 48px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 28px;
  }

  .footer-brand-col {
    flex: none;
    max-width: 100%;
  }

  .footer-links-col {
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.7rem;
  }

  .content-article h2 {
    font-size: 1.35rem;
  }

  .footer-dl {
    min-width: 100%;
  }
}

/* ===== REDUCED MOTION ===== */
@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;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
