/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

/* ── tokens ── */
:root {
  --bg:       #0d0f0e;
  --surface:  #131614;
  --surface2: #1a1e1b;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.13);
  --text:     #e2e8e4;
  --muted:    #bcccc2;
  --dim:      #8c9f94;
  --accent:   #4dff91;
  --accent2:  #00c9ff;
  --amber:    #f5c542;
  --coral:    #ff6b6b;
  --mono:     'IBM Plex Mono', monospace;
  --serif:    'Fraunces', Georgia, serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── scanline texture ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* ── grid overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(77,255,145,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,255,145,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── layout ── */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* ── nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  border-bottom: 1px solid var(--border);
  background: rgba(13,15,14,0.9);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--muted); font-weight: 300; }
.nav-links { display: flex; gap: 0; margin-left: auto; }
.nav-links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding: 0 14px;
  height: 48px;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border);
  letter-spacing: 0.05em;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.cta {
  color: var(--accent);
  border-left: 1px solid var(--border);
}
.nav-links a.cta:hover { background: rgba(77,255,145,0.06); }

/* ── hero ── */
.hero {
  padding: 140px 0 80px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media(max-width:760px){ .hero{ grid-template-columns:1fr; padding:100px 0 60px; gap:40px; } }

.hero-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-kicker::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text);
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 14px;
  color: #c2d4ca;
  line-height: 1.8;
  max-width: 460px;
  margin-bottom: 36px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #0d0f0e;
}
.btn-primary:hover { background: #6fffaa; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text); }

/* ── install block ── */
.install-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.install-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.install-dots { display: flex; gap: 6px; }
.install-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.install-dots span:nth-child(1) { background: #ff5f57; }
.install-dots span:nth-child(2) { background: #ffbd2e; }
.install-dots span:nth-child(3) { background: #28c840; }
.install-label { font-size: 10px; color: var(--dim); letter-spacing: 0.08em; }
.install-copy {
  font-size: 11px;
  color: var(--dim);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: color 0.15s;
  background: none;
  border: none;
  font-family: var(--mono);
}
.install-copy:hover { color: var(--muted); }
.install-body { padding: 20px 20px 24px; }
.install-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.install-line:last-child { margin-bottom: 0; }
.prompt { color: var(--accent); font-size: 13px; user-select: none; }
.cmd { font-size: 13px; color: var(--text); }
.cmd .pkg { color: var(--accent2); }
.cmd .comment { color: var(--dim); }
.output-line {
  font-size: 12px;
  color: var(--dim);
  padding-left: 20px;
  margin-top: -6px;
  margin-bottom: 10px;
}

/* ── section ── */
.section { padding: 80px 0; border-bottom: 1px solid var(--border); }
.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 48px;
}
.section-num {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.1em;
  width: 28px;
}
.section-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.section-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 16px;
}

/* ── how it works ── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
@media(max-width:680px){ .how-grid{ grid-template-columns:1fr; } }
.how-card {
  background: var(--surface);
  padding: 28px 24px;
}
.how-num {
  font-size: 40px;
  font-weight: 300;
  color: var(--dim);
  font-family: var(--serif);
  line-height: 1;
  margin-bottom: 16px;
}
.how-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}
.how-body { font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ── archetypes ── */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 32px;
}
@media(max-width:680px){ .arch-grid{ grid-template-columns:1fr 1fr; } }
.arch-card {
  background: var(--surface);
  padding: 20px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.arch-card:hover { background: var(--surface2); }
.arch-card.active { background: rgba(77,255,145,0.05); border-bottom: 2px solid var(--accent); }
.arch-tag {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.arch-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.arch-hint { font-size: 11px; color: var(--dim); }

.arch-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media(max-width:680px){ .arch-detail{ grid-template-columns:1fr; } }
.arch-detail-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}
.arch-detail-body { font-size: 12px; color: var(--muted); line-height: 1.7; }
.arch-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tool-tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.spec-row:last-child { border-bottom: none; }
.spec-key { color: var(--dim); }
.spec-val { color: var(--text); font-weight: 500; }

/* ── scoring ── */
.score-table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}
table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
tbody td {
  padding: 12px 16px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
tbody td:first-child { color: var(--accent); font-weight: 500; }
tbody tr:last-child td { border-bottom: none; }
.bar-wrap { display: flex; align-items: center; gap: 8px; }
.bar-track {
  width: 80px;
  height: 3px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 2px; background: var(--accent); }

.formula {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 16px;
}
.formula span { color: var(--accent2); }

/* ── code example ── */
.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.code-lang {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.code-file { font-size: 11px; color: var(--muted); }
.code-body {
  padding: 20px;
  font-size: 12px;
  line-height: 1.8;
  overflow-x: auto;
}
.kw  { color: #c792ea; }
.fn  { color: #82aaff; }
.st  { color: var(--amber); }
.cm  { color: var(--dim); }
.acc { color: var(--accent); }
.ac2 { color: var(--accent2); }
.num { color: #f78c6c; }

/* ── output block ── */
.output-block {
  background: #080a09;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.9;
}
.out-rank { color: var(--accent); margin-right: 8px; }
.out-inst { color: var(--text); }
.out-score { color: var(--accent2); }
.out-price { color: var(--amber); }
.out-note  { color: var(--dim); }

/* ── ecosystem ── */
.eco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
@media(max-width:680px){ .eco-grid{ grid-template-columns:1fr; } }
.eco-card {
  background: var(--surface);
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: background 0.15s;
}
.eco-card:hover { background: var(--surface2); }
.eco-status {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.eco-status.live { color: var(--accent); }
.eco-status.soon { color: var(--dim); }
.eco-status.related { color: var(--accent2); }
.eco-name { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.eco-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }
.eco-install {
  font-size: 11px;
  color: var(--accent);
  margin-top: 12px;
  padding: 4px 8px;
  background: rgba(77,255,145,0.06);
  border-radius: 3px;
  display: inline-block;
}

/* ── author ── */
.author-section {
  padding: 64px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media(max-width:680px){ .author-section{ grid-template-columns:1fr; gap:32px; } }
.author-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
}
.author-name {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 12px;
  color: var(--text);
}
.author-bio { font-size: 13px; color: #c2d4ca; line-height: 1.8; margin-bottom: 20px; }
.author-links { display: flex; flex-direction: column; gap: 8px; }
.author-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.author-link:hover { color: var(--text); }
.author-link-icon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  color: var(--dim);
}
.pub-list { display: flex; flex-direction: column; gap: 12px; }
.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s;
}
.pub-card:hover { border-color: var(--border2); }
.pub-venue {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}
.pub-title { font-size: 12px; color: var(--text); line-height: 1.5; }

/* ── footer ── */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-left { font-size: 12px; color: var(--dim); }
.footer-left strong { color: var(--accent); font-weight: 400; }
.footer-right { display: flex; gap: 20px; }
.footer-right a { font-size: 12px; color: var(--dim); text-decoration: none; transition: color 0.15s; }
.footer-right a:hover { color: var(--muted); }

/* ── animations ── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}
.hero-kicker { animation: fadeUp 0.6s ease both; }
.hero h1     { animation: fadeUp 0.6s 0.1s ease both; }
.hero-sub    { animation: fadeUp 0.6s 0.2s ease both; }
.hero-actions{ animation: fadeUp 0.6s 0.3s ease both; }
.install-block{ animation: fadeUp 0.6s 0.15s ease both; }

@keyframes blink {
  0%,100% { opacity:1; }
  50%      { opacity:0; }
}
.cursor { animation: blink 1s step-end infinite; color: var(--accent); }

/* ── utility ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }
code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent2);
}
