/* ════════════════════════════════════════════════
   LATERALUS — Y2K Aesthetic Shared Stylesheet
   Used by blog, os, download, papers, etc.
   ════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&family=Space+Mono:wght@400;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --lime: #00ff41;
  --hot-pink: #ff00aa;
  --cyber-blue: #00ccff;
  --electric-yellow: #ffee00;
  --deep-purple: #6600cc;
  --neon-orange: #ff6600;
  --bg: #0a001a;
  --bg2: #110028;
  --bg3: #1a0033;
  --border: #330066;
  --border-light: #9966ff;
  --text: #e0e0ff;
  --text2: #9999bb;
  --accent: #7c5cfc;
  --accent2: #a78bfa;
  --cyan: #00ccff;
  --green: #00ff41;
  --orange: #ff6600;
  --pink: #ff00aa;
  --yellow: #ffee00;
  --red: #ff4444;
  --blue: #60a5fa;
  --card-bg: #110028;
  --muted: #9999bb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'VT323', monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(0,0,0,0.12) 2px, rgba(0,0,0,0.12) 4px);
  pointer-events: none;
  z-index: 10000;
}

/* Grid bg */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,255,65,0.03) 1px, transparent 1px), linear-gradient(0deg, rgba(0,255,65,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

a { color: var(--cyber-blue); text-decoration: none; }
a:hover { color: var(--lime); }
code, pre { font-family: 'JetBrains Mono', monospace; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Topbar ─────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: linear-gradient(180deg, #2a0055, #1a0033);
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, var(--hot-pink), var(--cyber-blue), var(--lime)) 1;
}
.topbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 48px;
}
.topbar-logo {
  font-family: 'Press Start 2P', monospace; font-size: 12px; color: var(--lime);
  display: flex; align-items: center; gap: 6px;
  text-shadow: 0 0 10px rgba(0,255,65,0.6); text-decoration: none;
}
.topbar-logo .pipe { color: var(--electric-yellow); font-size: 14px; }
.topbar-links { display: flex; gap: 6px; align-items: center; }
.topbar-links a {
  font-family: 'Press Start 2P', monospace; font-size: 9px; color: var(--text2);
  padding: 6px 10px; border: 1px solid transparent;
  text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s;
}
.topbar-links a:hover, .topbar-links a.active {
  color: var(--lime); border-color: var(--lime);
  background: rgba(0,255,65,0.05); text-shadow: 0 0 6px rgba(0,255,65,0.4);
}

/* ── Hamburger ──────────────────────────── */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; z-index: 200; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--lime); margin: 5px 0; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Buttons ────────────────────────────── */
.btn-y2k {
  display: inline-block; font-family: 'Press Start 2P', monospace; font-size: 11px;
  padding: 12px 24px; border: 2px outset var(--border-light);
  background: linear-gradient(180deg, #3a0077, #220044); color: var(--lime);
  cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(0,255,65,0.4); transition: all 0.15s; text-decoration: none;
}
.btn-y2k:hover {
  border-style: inset; background: linear-gradient(180deg, #220044, #3a0077);
  color: var(--electric-yellow); text-shadow: 0 0 10px rgba(255,238,0,0.6);
}
.btn-y2k.pink {
  background: linear-gradient(180deg, #aa0066, #660033);
  color: var(--hot-pink); border-color: var(--hot-pink);
}
.btn-y2k.pink:hover { background: linear-gradient(180deg, #660033, #aa0066); color: var(--electric-yellow); }

/* ── Window Panels ──────────────────────── */
.window {
  background: var(--bg3); border: 2px solid var(--border-light);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.1), 4px 4px 0 rgba(0,0,0,0.5);
  margin-bottom: 24px;
}
.window-title {
  background: linear-gradient(90deg, #3300aa, #6600cc, #3300aa);
  padding: 5px 10px; display: flex; align-items: center; justify-content: space-between;
  font-family: 'Press Start 2P', monospace; font-size: 10px; color: white;
  border-bottom: 2px solid var(--border-light);
}
.window-buttons { display: flex; gap: 4px; }
.window-buttons span {
  width: 14px; height: 14px; display: inline-block;
  border: 1px solid rgba(255,255,255,0.3); background: var(--bg2);
  font-size: 9px; text-align: center; line-height: 12px; color: var(--text2);
}
.window-body { padding: 24px; }

/* ── Section Titles ─────────────────────── */
.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(14px, 2.5vw, 20px);
  text-align: center; margin-bottom: 40px;
  color: var(--electric-yellow);
  text-shadow: 0 0 15px rgba(255,238,0,0.3);
}
.section-title .bracket { color: var(--hot-pink); }

/* ── Rainbow Divider ────────────────────── */
.rainbow-divider {
  height: 4px;
  background: linear-gradient(90deg, var(--lime), var(--cyber-blue), var(--hot-pink), var(--electric-yellow), var(--lime));
  background-size: 200% 100%;
  animation: rainbow-shift 3s linear infinite;
  margin: 40px 0;
}
@keyframes rainbow-shift {
  0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; }
}

/* ── Article styling (blog posts) ───────── */
.article { max-width: 800px; margin: 0 auto; padding: 80px 24px 60px; }
.article h1 {
  font-family: 'Press Start 2P', monospace; font-size: clamp(16px, 2.5vw, 22px);
  color: var(--electric-yellow); margin-bottom: 8px; line-height: 1.5;
  text-shadow: 0 0 10px rgba(255,238,0,0.2);
}
.article .meta { font-size: 14px; color: var(--text2); margin-bottom: 24px; }
.article h2 {
  font-family: 'Press Start 2P', monospace; font-size: 14px;
  color: var(--cyber-blue); margin: 32px 0 16px;
  text-shadow: 0 0 8px rgba(0,204,255,0.2);
}
.article h3 { font-family: 'Space Mono', monospace; font-size: 16px; color: var(--lime); margin: 24px 0 12px; }
.article p { color: var(--text2); margin-bottom: 16px; font-size: 17px; line-height: 1.7; }
.article ul, .article ol { color: var(--text2); margin: 0 0 16px 20px; font-size: 17px; }
.article li { margin-bottom: 6px; }
.article pre {
  background: #0a0014; border: 2px solid var(--lime);
  padding: 16px; margin: 16px 0; overflow-x: auto;
  font-size: 14px; line-height: 1.6; color: var(--text);
  box-shadow: 0 0 15px rgba(0,255,65,0.05);
}
.article code { color: var(--lime); font-size: 0.9em; }
.article blockquote {
  border-left: 3px solid var(--hot-pink); padding: 12px 20px;
  margin: 16px 0; background: rgba(255,0,170,0.04); color: var(--text2);
}
.article a { color: var(--cyber-blue); }
.article a:hover { color: var(--lime); text-decoration: underline; }
.article strong { color: var(--text); }

/* ── Cards (features, ecosystem, etc) ───── */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.feat {
  background: var(--bg2); border: 2px solid var(--border-light);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4); transition: all 0.2s;
}
.feat:hover { border-color: var(--lime); box-shadow: 0 0 20px rgba(0,255,65,0.1), 3px 3px 0 rgba(0,0,0,0.4); }
.feat-header {
  background: linear-gradient(90deg, #2a0055, #3a0077);
  padding: 8px 12px; border-bottom: 2px solid var(--border-light);
  display: flex; align-items: center; gap: 8px;
}
.feat-header h3 { font-family: 'Press Start 2P', monospace; font-size: 10px; color: var(--cyber-blue); }
.feat-body { padding: 16px; font-size: 16px; color: var(--text2); line-height: 1.5; }

.eco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.eco-card {
  background: var(--bg2); border: 1px solid var(--border);
  padding: 14px 10px; text-align: center; font-family: 'Space Mono', monospace; font-size: 12px;
  transition: all 0.2s;
}
.eco-card:hover { border-color: var(--cyber-blue); background: rgba(0,204,255,0.04); }
.eco-icon { font-size: 24px; margin-bottom: 6px; }
.eco-name { color: var(--cyber-blue); font-weight: 700; margin-bottom: 2px; }
.eco-desc { color: var(--text2); font-size: 11px; }

/* ── Footer ─────────────────────────────── */
footer {
  border-top: 2px solid; border-image: linear-gradient(90deg, var(--hot-pink), var(--cyber-blue), var(--lime)) 1;
  text-align: center; padding: 40px 20px;
}
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-bottom: 16px; }
.footer-links a { font-family: 'Press Start 2P', monospace; font-size: 9px; color: var(--text2); }
footer p { color: var(--text2); font-size: 14px; }

/* ── Responsive ─────────────────────────── */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .topbar-links {
    display: none; position: fixed; top: 48px; left: 0; right: 0;
    background: rgba(10,0,26,0.97); backdrop-filter: blur(16px);
    flex-direction: column; padding: 20px 24px; gap: 12px;
    border-bottom: 2px solid var(--border-light);
  }
  .topbar-links.show { display: flex; }
  .topbar-links a { font-size: 11px !important; }
  .feat-grid { grid-template-columns: 1fr; }
  .eco-grid { grid-template-columns: repeat(3, 1fr); }
}
