/* ── Monokai Palette ─────────────────────────────────── */
:root {
  --bg:        #272822;
  --bg2:       #1e1f1a;
  --bg3:       #3e3d32;
  --panel:     #2d2e27;
  --border:    #49483e;
  --fg:        #F8F8F2;
  --fg2:       #75715E;
  --green:     #A6E22E;
  --yellow:    #E6DB74;
  --orange:    #FD971F;
  --red:       #F92672;
  --purple:    #AE81FF;
  --cyan:      #66D9E8;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'VT323', monospace;
  font-size: 20px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Scanlines overlay ───────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Typography ──────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.4;
}

a {
  color: var(--cyan);
  text-decoration: none;
}
a:hover { color: var(--green); text-decoration: underline; }

code, .code {
  font-family: 'VT323', monospace;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 2px 6px;
  color: var(--yellow);
  font-size: 0.95em;
}

/* ── Layout ──────────────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 72px 0; }

/* ── Nav ─────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg2);
  border-bottom: 2px solid var(--green);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav-logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--green);
  letter-spacing: 2px;
}
.nav-logo span { color: var(--fg2); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: 16px;
}

.nav-links a {
  color: var(--fg);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--green); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────── */
#hero {
  padding: 96px 0 72px;
  text-align: center;
}

.hero-title {
  font-size: clamp(28px, 5vw, 52px);
  color: var(--green);
  text-shadow: 0 0 20px rgba(166,226,46,0.4);
  margin-bottom: 16px;
  letter-spacing: 4px;
}

.hero-tagline {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(9px, 1.5vw, 12px);
  color: var(--yellow);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.hero-desc {
  font-size: 22px;
  color: var(--fg2);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: 14px 24px;
  border: 2px solid currentColor;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  display: inline-block;
  letter-spacing: 1px;
  image-rendering: pixelated;
}

.btn-primary {
  color: var(--bg);
  background: var(--green);
  border-color: var(--green);
}
.btn-primary:hover {
  background: transparent;
  color: var(--green);
  box-shadow: 0 0 12px rgba(166,226,46,0.5);
  text-decoration: none;
}

.btn-secondary {
  color: var(--cyan);
  background: transparent;
  border-color: var(--cyan);
}
.btn-secondary:hover {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 12px rgba(102,217,232,0.4);
  text-decoration: none;
}

/* ── Terminal mockup ─────────────────────────────────── */
.terminal {
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: 4px;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.terminal-bar {
  background: var(--bg3);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 0;
  display: inline-block;
}

.dot-red    { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-green  { background: var(--green); }

.terminal-title {
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: var(--fg2);
  margin-left: 8px;
}

.terminal-body {
  padding: 20px 24px;
  font-size: 18px;
  line-height: 1.7;
  min-height: 260px;
}

.t-tabbar {
  background: var(--bg3);
  padding: 4px 0;
  margin: -20px -24px 16px;
  padding: 6px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

.t-tab-active {
  background: var(--bg2);
  color: var(--fg);
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-bottom: none;
  display: inline-block;
}

.t-tab {
  color: var(--fg2);
  padding: 2px 10px;
  display: inline-block;
}

.t-linenum { color: var(--fg2); display: inline-block; width: 42px; }
.t-keyword { color: var(--red); }
.t-func    { color: var(--green); }
.t-str     { color: var(--yellow); }
.t-comment { color: var(--fg2); font-style: italic; }
.t-type    { color: var(--cyan); }
.t-num     { color: var(--purple); }

.t-statusbar {
  background: var(--bg3);
  padding: 4px 24px;
  margin: 16px -24px -20px;
  border-top: 1px solid var(--border);
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  color: var(--fg);
}
.t-statusbar .status-right { color: var(--fg2); }

.t-cursor {
  display: inline-block;
  width: 10px;
  height: 1em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Section heading ─────────────────────────────────── */
.section-heading {
  font-size: clamp(12px, 2vw, 18px);
  color: var(--green);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.section-sub {
  font-size: 22px;
  color: var(--fg2);
  margin-bottom: 48px;
}

/* ── Features grid ───────────────────────────────────── */
#features { background: var(--bg2); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 28px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(166,226,46,0.15);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.feature-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--green);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.feature-desc {
  font-size: 18px;
  color: var(--fg2);
  line-height: 1.5;
}

/* ── Install ─────────────────────────────────────────── */
.code-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  padding: 20px 24px;
  margin-bottom: 20px;
  overflow-x: auto;
  font-size: 18px;
  line-height: 1.8;
}

.code-block .prompt { color: var(--green); user-select: none; }
.code-block .cmd    { color: var(--fg); }
.code-block .arg    { color: var(--yellow); }
.code-block .comment { color: var(--fg2); }

/* ── Shortcuts ───────────────────────────────────────── */
#shortcuts { background: var(--bg2); }

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 40px;
}

.shortcut-group h3 {
  font-size: 10px;
  color: var(--orange);
  margin-bottom: 16px;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid rgba(73,72,62,0.4);
  gap: 16px;
}

.shortcut-row:last-child { border-bottom: none; }

.key {
  font-family: 'VT323', monospace;
  font-size: 17px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--border);
  padding: 2px 8px;
  color: var(--yellow);
  white-space: nowrap;
  flex-shrink: 0;
}

.shortcut-desc {
  font-size: 18px;
  color: var(--fg2);
  text-align: right;
}

/* ── Footer ──────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 2px solid var(--border);
  padding: 40px 0;
  text-align: center;
  font-size: 18px;
}

.footer-logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--green);
  margin-bottom: 16px;
}

footer p { color: var(--fg2); margin-bottom: 8px; }
footer a { color: var(--cyan); }

/* ── Divider ─────────────────────────────────────────── */
.pixel-divider {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--green) 0px, var(--green) 8px,
    transparent 8px, transparent 16px
  );
  opacity: 0.4;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .terminal-body { font-size: 15px; min-height: 200px; }
}
