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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1c2333;
  --border: #30363d;
  --text: #e6edf3;
  --text2: #8b949e;
  --text-dim: #6e7681;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --green: #3fb950;
  --green-bg: #3fb95020;
  --green-border: #3fb95055;
  --yellow: #d29922;
  --yellow-bg: #d2992220;
  --yellow-border: #d2992255;
  --red: #f85149;
  --red-bg: #f8514920;
  --red-border: #f8514955;
  --orange: #d4760e;
  --orange-bg: #d4760e20;
  --orange-border: #d4760e55;
  --purple: #bc8cff;
  --purple-bg: #bc8cff20;
  --purple-border: #bc8cff55;
  --radius: 8px;
}

html { scroll-behavior: smooth; font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 40%, #1c2333 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(88,166,255,0.03) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(188,140,255,0.03) 0%, transparent 50%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  border: 1px solid var(--accent);
  background: rgba(88,166,255,0.08);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #58a6ff, #bc8cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}
.hero-tagline {
  font-size: 1.1rem;
  color: var(--text2);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.5;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── SECTION NAV ── */
.section-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}
.nav-link {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.nav-link:hover { color: var(--text); }
.nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ── MAIN ── */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  width: 100%;
  flex: 1;
}

/* ── SECTIONS ── */
.section { margin-bottom: 2.5rem; }
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  line-height: 1.7;
}
.card p { margin-bottom: 0.75rem; }
.card p:last-child { margin-bottom: 0; }
.card-sub {
  font-size: 0.85rem;
  color: var(--text2);
  margin-top: 0.5rem;
}
.mt-1 { margin-top: 0.75rem !important; }

/* ── PRINCIPLE LIST ── */
.principle-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}
.principle {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
}
.principle-icon { flex-shrink: 0; }

/* ── CAPABILITY GRID ── */
.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
@media (max-width: 550px) {
  .cap-grid { grid-template-columns: 1fr; }
}
.cap {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem;
}
.cap-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--accent);
}
.cap-desc {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.5;
}
.cap-desc code {
  background: rgba(88,166,255,0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.75rem;
}

/* ── VERDICT GRID ── */
.verdict-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.v-item {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  border: 1px solid;
}
.v-fact-true { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.v-fact-false { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.v-likely { background: var(--yellow-bg); color: var(--yellow); border-color: var(--yellow-border); }
.v-debated { background: var(--orange-bg); color: var(--orange); border-color: var(--orange-border); }
.v-review { background: var(--purple-bg); color: var(--purple); border-color: var(--purple-border); }
.v-insufficient { background: transparent; color: var(--text2); border-color: var(--border); }

/* ── CONFIDENCE TAGS ── */
.tag-conf-high {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}
.tag-conf-med {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid var(--yellow-border);
}
.tag-conf-low {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid var(--orange-border);
}

/* ── TIER LIST ── */
.tier-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.tier {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.tier-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  min-width: 6rem;
  text-align: center;
}
.tier-high { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.tier-med { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow-border); }
.tier-low { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.tier-do-not { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-border); }
.tier-sources {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ── SOURCE CARD ── */
.source-card { text-align: center; }
.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  margin: 0.75rem auto;
  transition: all 0.15s;
}
.gh-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.gh-icon { font-size: 1.3rem; }
.gh-arrow { font-size: 0.9rem; color: var(--text2); }
.gh-link:hover .gh-arrow { color: var(--accent); }

/* ── FOOTER ── */
.footer {
  text-align: center;
  color: var(--text2);
  font-size: 0.8rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}
.footer-sub { margin-top: 0.25rem; font-size: 0.75rem; }
.footer-link {
  color: var(--accent);
  text-decoration: none;
}
.footer-link:hover { text-decoration: underline; }

/* ── SKILL DETAIL (block-style skills) ── */
.skill-detail {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
}
.skill-detail p { margin-bottom: 0.5rem; }
.skill-detail p:last-child { margin-bottom: 0; }
.skill-detail ul { margin: 0.5rem 0 0 1.3rem; }
.skill-detail li { margin-bottom: 0.25rem; color: var(--text2); }
.skill-detail li strong { color: var(--text); }
.skill-detail code {
  background: rgba(88,166,255,0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.8rem;
}
.skill-outcome {
  margin-top: 0.6rem !important;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}

/* ── SKILL GROUPS ── */
.skill-group { margin-bottom: 1.5rem; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.skill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 600px) {
  .skill-grid { grid-template-columns: 1fr; }
}
.skill-card {
  display: flex;
  gap: 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem;
  transition: border-color 0.15s;
}
.skill-card:hover { border-color: var(--accent); }
.skill-icon {
  flex-shrink: 0;
  font-size: 1.3rem;
  line-height: 1.3;
}
.skill-body { min-width: 0; }
.skill-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}
.skill-desc {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ── SCROLL MARGIN ── */
.section { scroll-margin-top: 3rem; }

/* ── SELECTION ── */
::selection { background: rgba(88,166,255,0.3); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero-stats { gap: 1.2rem; }
  .stat-num { font-size: 1.4rem; }
  .nav-link { font-size: 0.8rem; padding: 0.6rem 0.9rem; }
}
