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

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-green: #87ff71;
  --c-cyan: #01cdfe;
  --c-dark: #192617;
  --c-dark2: #0d1a0b;
  --c-dark3: #1e3419;
  --c-purple: #b967ff;
  --c-pink: #ff71ce;
  --c-text: #d4f5d0;
  --c-muted: #7db87a;
  --nav-h: 100px;
  --radius: 0px;
  --glass-bg: rgba(25, 38, 23, 0.72);
  --glass-border: rgba(135, 255, 113, 0.18);
  --glow-green: 0 0 12px #87ff71, 0 0 32px rgba(135,255,113,0.4);
  --glow-cyan: 0 0 12px #01cdfe, 0 0 32px rgba(1,205,254,0.4);
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font);
  background-color: var(--c-dark2);
  color: var(--c-text);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(1,205,254,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 10%, rgba(185,103,255,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(135,255,113,0.08) 0%, transparent 60%);
}

/* ── Scanlines ── */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 800;
  background: rgba(13, 26, 11, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid rgba(135,255,113,0.08);
}

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

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

.brand-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--c-green), var(--c-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 8px rgba(135,255,113,0.5));
}

/* Hamburger */
.hamburger {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  cursor: pointer;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  min-height: 40px;
  min-width: 40px;
  justify-content: center;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-green);
  box-shadow: var(--glow-green);
  transition: transform 0.25s, opacity 0.25s;
}

/* Menu Row */
.menu-row {
  padding: 0.4rem 2rem;
}
.menu-row p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.1rem;
  align-items: center;
}
.menu-row p a {
  color: var(--c-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.45rem 0.75rem;
  border-radius: 2px;
  transition: color 0.2s, text-shadow 0.2s, background 0.2s;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.menu-row p a:hover {
  color: var(--c-cyan);
  text-shadow: var(--glow-cyan);
  background: rgba(1,205,254,0.07);
}

/* ── Overlay Menu ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10, 20, 8, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(10px);
}
.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.overlay-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: 1px solid var(--glass-border);
  color: var(--c-green);
  font-size: 1.4rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: box-shadow 0.2s, background 0.2s;
}
.overlay-close:hover {
  box-shadow: var(--glow-green);
  background: rgba(135,255,113,0.08);
}
.overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 2rem;
}
.overlay-link {
  color: var(--c-text);
  text-decoration: none;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.6rem 2rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-left: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
  opacity: 0;
  transform: translateX(-20px);
}
.nav-overlay.active .overlay-link {
  opacity: 1;
  transform: translateX(0);
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s,
              opacity 0.35s calc(var(--i) * 0.06s),
              transform 0.35s calc(var(--i) * 0.06s);
}
.overlay-link:hover {
  color: var(--c-green);
  border-left-color: var(--c-green);
  text-shadow: var(--glow-green);
}

/* ── Hero ── */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 3rem 2rem 2.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.hero-bg-text {
  position: absolute;
  right: -0.05em;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(6rem, 18vw, 16rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, rgba(135,255,113,0.07) 0%, rgba(1,205,254,0.04) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 3rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-content {
  flex: 1 1 420px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-cyan);
  text-shadow: var(--glow-cyan);
  margin-bottom: 0.8rem;
  border: 1px solid rgba(1,205,254,0.3);
  padding: 0.25rem 0.75rem;
}

.hero-h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--c-green) 0%, var(--c-cyan) 60%, var(--c-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(135,255,113,0.3));
}

.hero-desc {
  font-size: 1rem;
  color: var(--c-muted);
  margin-bottom: 1.5rem;
  max-width: 480px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.8rem;
  background: linear-gradient(135deg, var(--c-green), var(--c-cyan));
  color: var(--c-dark2);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 0;
  min-height: 44px;
  transition: box-shadow 0.25s, filter 0.25s;
  letter-spacing: 0.03em;
}
.hero-cta:hover {
  box-shadow: 0 0 24px rgba(135,255,113,0.6), 0 0 48px rgba(1,205,254,0.3);
  filter: brightness(1.1);
}

.hero-media {
  flex: 0 0 320px;
  max-width: 380px;
}
.hero-img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 40px rgba(1,205,254,0.2), 0 0 80px rgba(135,255,113,0.1);
}

.hero-placeholder {
  width: 100%;
  height: 220px;
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
}

/* Retro Grid */
.retro-grid {
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(135,255,113,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135,255,113,0.15) 1px, transparent 1px);
  background-size: 30px 30px;
  position: relative;
}
.retro-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--c-dark2) 100%);
}

/* ── Section scroll offset ── */
article[id] {
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

/* ── Main Layout ── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  width: 100%;
}

.content-with-aside {
  display: flex;
  gap: 2.5rem;
  padding: 3rem 0;
  align-items: flex-start;
}

.content-body {
  flex: 1 1 0;
  min-width: 0;
}

/* ── Content Sections (page.content) ── */
.content-body article {
  margin-bottom: 4rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(135,255,113,0.1);
}
.content-body article:last-child {
  border-bottom: none;
}

.content-body h2 {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--c-green), var(--c-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(135,255,113,0.25));
}

.content-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--c-cyan);
  text-shadow: 0 0 8px rgba(1,205,254,0.35);
  margin: 1.5rem 0 0.5rem;
}

.content-body p {
  margin-bottom: 1rem;
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.75;
}

.content-body ul,
.content-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}
.content-body li {
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

.content-body a {
  color: var(--c-cyan);
  text-decoration: underline;
  text-decoration-color: rgba(1,205,254,0.35);
  transition: text-shadow 0.2s, text-decoration-color 0.2s;
}
.content-body a:hover {
  text-shadow: var(--glow-cyan);
  text-decoration-color: var(--c-cyan);
}

.content-body strong {
  color: var(--c-green);
  font-weight: 600;
}

.content-body blockquote {
  border-left: 3px solid var(--c-green);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--glass-bg);
  color: var(--c-muted);
  font-style: italic;
  box-shadow: inset 0 0 20px rgba(135,255,113,0.05);
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.content-body th {
  background: rgba(135,255,113,0.1);
  color: var(--c-green);
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}
.content-body td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(135,255,113,0.06);
}
.content-body tr:hover td {
  background: rgba(1,205,254,0.04);
}

/* ── Aside ── */
.content-aside {
  flex: 0 0 220px;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.aside-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 1.4rem 1.2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 30px rgba(135,255,113,0.07);
}

.aside-card h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.aside-card .subtitle {
  font-size: 0.78rem;
  color: var(--c-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.aside-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.2rem;
  color: var(--c-muted);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  min-height: 40px;
  letter-spacing: 0.01em;
}
.aside-link::before {
  content: '›';
  color: var(--c-green);
  font-size: 1rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.aside-link:hover {
  color: var(--c-cyan);
  border-left-color: var(--c-cyan);
  background: rgba(1,205,254,0.05);
}
.aside-link:hover::before {
  opacity: 1;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 1rem;
  background: rgba(13,26,11,0.6);
}

.footer-copy {
  color: var(--c-muted);
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.footer-note {
  display: block;
  color: rgba(125,184,122,0.55);
  font-size: 0.75rem;
  line-height: 1.5;
}

/* ── Glitch animation ── */
@keyframes glitch {
  0%, 100% { clip-path: inset(0 0 96% 0); transform: translate(-2px, 0); }
  20% { clip-path: inset(30% 0 60% 0); transform: translate(2px, 0); }
  40% { clip-path: inset(60% 0 30% 0); transform: translate(-1px, 0); }
  60% { clip-path: inset(80% 0 10% 0); transform: translate(1px, 0); }
  80% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 0); }
}

@keyframes hue-cycle {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Stagger list animation */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.content-body article {
  opacity: 0;
  animation: fadeSlideIn 0.5s forwards;
  animation-delay: calc(var(--section-i, 0) * 0.08s);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Mobile ── */
@media (max-width: 700px) {
  .hero-inner {
    flex-direction: column;
    gap: 1.5rem;
  }
  .hero-media {
    flex: none;
    max-width: 100%;
    width: 100%;
    order: -1;
  }
  .hero-section {
    min-height: auto;
    padding: 2rem 1.25rem 1.75rem;
  }
  .hero-bg-text {
    font-size: 5rem;
    opacity: 0.5;
  }
  .content-with-aside {
    flex-direction: column;
    padding: 2rem 0;
  }
  .content-aside {
    flex: none;
    width: 100%;
    position: static;
  }
  .brand-row {
    padding: 0.65rem 1rem;
  }
  .menu-row {
    padding: 0.3rem 1rem;
    overflow-x: auto;
  }
  .menu-row p {
    flex-wrap: nowrap;
    gap: 0;
  }
  .menu-row p a {
    white-space: nowrap;
    font-size: 0.77rem;
    padding: 0.45rem 0.55rem;
  }
  main {
    padding: 0 1rem;
  }
}

@media (max-width: 400px) {
  .hero-h1 { font-size: 1.45rem; }
  .menu-row p a { font-size: 0.72rem; padding: 0.4rem 0.4rem; }
}
