/* ── THEGITSTACK.COM ENCYCLOPEDIA STYLESHEET ── */
:root {
  --bg: #090d12;
  --bg-subtle: #0d131a;
  --surface: #131b24;
  --surface-alt: #18222e;
  --surface-hover: #1f2b3a;
  --border: #233040;
  --border-subtle: #192432;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --git-green: #10b981;
  --git-green-bg: rgba(16, 185, 129, 0.1);
  --git-green-glow: rgba(16, 185, 129, 0.25);
  
  --git-purple: #8b5cf6;
  --git-purple-bg: rgba(139, 92, 246, 0.12);
  
  --git-amber: #f59e0b;
  --git-amber-bg: rgba(245, 158, 11, 0.12);
  
  --git-blue: #38bdf8;
  --git-blue-bg: rgba(56, 189, 248, 0.12);

  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(139, 92, 246, 0.05), transparent);
  background-repeat: no-repeat;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--git-green), #059669);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 0 16px var(--git-green-glow);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.search-trigger:hover {
  border-color: var(--git-green);
  color: var(--text-main);
}

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-subtle);
}

/* ── HERO ── */
.hero {
  padding: 64px 24px 48px;
  max-width: 1240px;
  margin: 0 auto;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: var(--git-green-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--git-green);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 46px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title span {
  background: linear-gradient(135deg, #fff 30%, var(--git-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* Two Core Meaning Cards */
.meaning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto 48px;
  text-align: left;
}

.meaning-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.meaning-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.meaning-card.purple:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.meaning-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--git-green);
  margin-bottom: 8px;
}

.meaning-card.purple .meaning-kicker {
  color: var(--git-purple);
}

.meaning-card h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.meaning-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 16px;
}

.meaning-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-subtle);
}

/* ── MAIN CONTENT CONTAINER ── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── SECTION HEADER ── */
.section-header {
  margin-bottom: 28px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--git-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 6px;
}

/* ── INTERACTIVE STACK SIMULATOR ── */
.simulator-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 56px;
}

.sim-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: var(--git-green);
  color: #000;
}

.btn-primary:hover {
  background: #059669;
  box-shadow: 0 0 16px var(--git-green-glow);
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

.btn-reset {
  background: transparent;
  color: var(--text-subtle);
  border-color: var(--border-subtle);
  margin-left: auto;
}

.btn-reset:hover {
  color: #ef4444;
  border-color: #ef4444;
}

/* Simulator Visual Stack Flow */
.sim-viewport {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  position: relative;
  overflow-x: auto;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.stack-node {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  min-width: 220px;
  transition: var(--transition);
  position: relative;
}

.stack-node.base {
  border-color: var(--text-subtle);
}

.stack-node.active {
  border-color: var(--git-green);
  box-shadow: 0 0 20px var(--git-green-bg);
}

.node-level {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.node-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.node-diff {
  font-size: 12px;
  color: var(--git-green);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.node-connector {
  color: var(--text-subtle);
  font-size: 20px;
  font-weight: bold;
}

.sim-terminal {
  margin-top: 20px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--git-green);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-terminal .prompt {
  color: var(--text-subtle);
}

/* ── TOOL COMPARISON MATRIX ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.tool-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tool-name {
  font-size: 18px;
  font-weight: 800;
}

.tool-stars {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--git-amber);
  background: var(--git-amber-bg);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.tool-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.tool-cli-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--git-blue);
  margin-bottom: 16px;
}

/* ── COMMAND PLAYBOOK RECIPES ── */
.recipes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 56px;
}

.recipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.recipe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.recipe-title {
  font-size: 17px;
  font-weight: 700;
}

.recipe-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--git-purple-bg);
  color: var(--git-purple);
  font-weight: 600;
}

.recipe-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.code-block {
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #e2e8f0;
  position: relative;
  overflow-x: auto;
  line-height: 1.6;
}

.code-block .copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-sans);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.code-block .copy-btn:hover {
  color: var(--text-main);
  background: var(--surface-hover);
}

/* ── LIVE RADAR TELEMETRY ── */
.radar-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 56px;
}

.radar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.radar-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--git-green);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--git-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--git-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.radar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.radar-table th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.radar-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.radar-table tr:hover td {
  background: var(--surface-alt);
  color: var(--text-main);
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  padding: 48px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-subtle);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-link:hover {
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 800px) {
  .hero-title { font-size: 32px; }
  .meaning-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .sim-controls { flex-direction: column; }
}
