/* ============================================================
   AI GitHub 月度调研 · 设计系统
   方向：克制 + 留白 + hairline + 真实图表
   参照：Vercel / Linear / Stripe 文案页版式
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces — 几乎不依赖玻璃拟态，改用纯色 + 1px hairline */
  --bg-0: #0a0a0e;
  --bg-1: #0e0e14;
  --bg-2: #14141c;
  --bg-3: #1a1a24;
  --surface-1: #14141c;
  --surface-2: #1a1a24;
  --border-1: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.10);
  --border-3: rgba(255, 255, 255, 0.18);

  /* Text */
  --text-1: #f6f7fb;
  --text-2: #b8bbcc;
  --text-3: #7a7d96;
  --text-4: #4d5066;

  /* Single accent — cyan only */
  --cyan:    #22d3ee;
  --cyan-2:  #06b6d4;
  --cyan-soft: rgba(34, 211, 238, 0.12);

  /* Category colors — used sparingly, only on small marks */
  --c-agent:     #22d3ee;
  --c-model:     #a855f7;
  --c-inference: #10b981;
  --c-edge:      #f59e0b;
  --c-devtools:  #3b82f6;
  --c-data:      #ec4899;
  --c-multimodal:#ef4444;
  --c-security:  #f97316;
  --c-other:     #8b5cf6;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Spacing — 大留白 */
  --pad-section: 128px;
  --pad-md: 24px;
  --pad-sm: 16px;

  /* Type */
  --font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg-0);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
img, svg, video { max-width: 100%; display: block; }
/* Inline icons (24x24) default to 1em */
.icon-svg, svg.icon { width: 1em; height: 1em; vertical-align: -0.125em; }
svg:not([width]):not([height]):not(.icon-svg):not(.icon):not(.arch-svg):not(.constellation):not(.chart-svg) { width: 1em; height: 1em; vertical-align: -0.125em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--cyan-soft); color: var(--text-1); }

/* ---------- Background — minimal ---------- */
/* 极简背景：一条顶部细光带 + 1px hairline grid mask，no 玻璃 no 霓虹 orbs */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 50% 30% at 50% 0%, rgba(34, 211, 238, 0.06), transparent 70%),
    var(--bg-0);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, black 20%, transparent 80%);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-1);
}
h1 { font-size: clamp(2.75rem, 6vw + 1rem, 5.5rem); letter-spacing: -0.045em; font-weight: 800; }
h2 { font-size: clamp(2rem, 3vw + 1rem, 3.25rem); letter-spacing: -0.035em; }
h3 { font-size: clamp(1.375rem, 1.4vw + 1rem, 1.875rem); }
h4 { font-size: 1.0625rem; font-weight: 600; }
p  { color: var(--text-2); }

.gradient-text {
  background: linear-gradient(180deg, #f6f7fb 0%, #b8bbcc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.mono { font-family: var(--font-mono); font-feature-settings: "zero", "ss01"; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1320px; }
.container-narrow { max-width: 760px; }
section { padding: var(--pad-section) 0; position: relative; }
section + section { border-top: 1px solid var(--border-1); }
.text-center { text-align: center; }

/* ============================================================
   NAV — hairline + scrolled glass
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), backdrop-filter 0.3s var(--ease-out);
}
.nav.scrolled {
  background: rgba(10, 10, 14, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--border-1);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--c-model) 100%);
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px solid rgba(255,255,255,0.9);
  border-radius: 2px;
  background: linear-gradient(transparent 50%, rgba(255,255,255,0.85) 50%);
  background-size: 100% 4px;
  background-position: 0 2px;
  background-repeat: no-repeat;
  opacity: 0.85;
}
.brand-text { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-1); }
.brand-text small { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-top: -1px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; list-style: none; }
.nav-links a {
  font-size: 13.5px;
  color: var(--text-3);
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--text-1); }
.nav-links a.active { color: var(--text-1); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 1.5px;
  background: var(--cyan);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  background: var(--text-1);
  color: var(--bg-0);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s var(--ease-out);
}
.nav-cta:hover { transform: translateY(-1px); }
.menu-toggle { display: none; padding: 8px; color: var(--text-1); }

/* ============================================================
   HERO — 居中、单列、克制
   ============================================================ */
.hero {
  padding: 168px 0 96px;
  position: relative;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-2);
  background: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 32px;
  max-width: 100%;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 2s var(--ease-in-out) infinite;
}
@keyframes blink { 0%,100%{ opacity: 1 } 50%{ opacity: 0.4 } }

.hero h1 { margin-bottom: 24px; max-width: 14ch; margin-left: auto; margin-right: auto; }
.hero h1 .stroke {
  display: inline;
  background: linear-gradient(180deg, #f6f7fb 0%, var(--c-model) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero .lead {
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.1875rem);
  color: var(--text-2);
  max-width: 60ch;
  margin: 0 auto 40px;
  line-height: 1.65;
}
.hero .lead strong { color: var(--text-1); font-weight: 600; }

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

/* Buttons — 形态 + 样式 + 文字 */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary { background: var(--text-1); color: var(--bg-0); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-ghost:hover { color: var(--text-1); border-color: var(--border-3); background: var(--bg-1); }
.btn-link { background: transparent; color: var(--cyan); padding: 6px 0; }
.btn-link:hover { color: var(--text-1); }

/* Constellation — minimal background illustration */
.hero-constellation {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.25;
  overflow: hidden;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 30%, transparent 90%);
}
.hero-constellation svg.constellation { width: 100% !important; height: 100% !important; display: block; }
.hero > .container { position: relative; z-index: 2; }

/* ============================================================
   Section Head — 统一
   ============================================================ */
.section-head { margin-bottom: 72px; }
.section-head.center { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.section-head h2 { margin-bottom: 16px; }
.section-head .lead { color: var(--text-3); max-width: 56ch; font-size: 1rem; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* ============================================================
   Charts — 真正数据可视化
   ============================================================ */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-1);
}
.chart-cell {
  padding: 32px;
  border-right: 1px solid var(--border-1);
  position: relative;
}
.chart-cell:last-child { border-right: 0; }
.chart-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.chart-value {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-1);
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.chart-value .unit { font-size: 0.5em; color: var(--text-3); font-weight: 500; margin-left: 4px; }
.chart-sub { font-size: 13px; color: var(--text-3); }
.chart-svg-wrap { margin-top: 24px; }
.chart-svg { width: 100% !important; height: auto !important; display: block; }

/* ============================================================
   Category Cards — 大小卡错落（不是 bento 平铺）
   ============================================================ */
.cat-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 200px;
  gap: 1px;
  background: var(--border-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cat-mosaic .cat-cell {
  background: var(--bg-1);
  padding: 24px;
  position: relative;
  display: flex; flex-direction: column;
  transition: background 0.3s var(--ease-out);
  grid-column: span 2;
  text-decoration: none;
}
.cat-mosaic .cat-cell:nth-child(1) { grid-column: span 3; grid-row: span 2; padding: 36px; }
.cat-mosaic .cat-cell:nth-child(2) { grid-column: span 3; grid-row: span 2; padding: 36px; }
.cat-mosaic .cat-cell:nth-child(n+5) { grid-column: span 2; }
.cat-mosaic .cat-cell:hover { background: var(--bg-2); }
.cat-cell-head { display: flex; align-items: center; gap: 10px; margin-bottom: auto; }
.cat-cell-icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: var(--bg-0);
}
.cat-cell-icon svg { width: 18px !important; height: 18px !important; }
.cat-cell-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.cat-cell-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
}
.cat-cell-desc { color: var(--text-3); font-size: 13.5px; line-height: 1.55; margin-top: 16px; max-width: 36ch; }
.cat-mosaic .cat-cell:nth-child(1) .cat-cell-name,
.cat-mosaic .cat-cell:nth-child(2) .cat-cell-name { font-size: 22px; }
.cat-mosaic .cat-cell:nth-child(1) .cat-cell-desc,
.cat-mosaic .cat-cell:nth-child(2) .cat-cell-desc { font-size: 15px; max-width: 40ch; margin-top: 24px; }
.cat-mosaic .cat-cell:nth-child(1) .cat-cell-icon,
.cat-mosaic .cat-cell:nth-child(2) .cat-cell-icon { width: 40px; height: 40px; }
.cat-mosaic .cat-cell:nth-child(1) .cat-cell-icon svg,
.cat-mosaic .cat-cell:nth-child(2) .cat-cell-icon svg { width: 24px !important; height: 24px !important; }
.cat-cell-arrow {
  position: absolute;
  top: 20px; right: 20px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  display: grid; place-items: center;
  color: var(--text-3);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: all 0.3s var(--ease-out);
}
.cat-cell:hover .cat-cell-arrow { opacity: 1; transform: translate(0, 0); color: var(--text-1); border-color: var(--border-3); }

/* ============================================================
   Top 10 — 真正横向条形图（不是 list）
   ============================================================ */
.top-chart {
  display: flex; flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border-1);
}
.bar-row {
  display: grid;
  grid-template-columns: 36px 1fr 240px 100px;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-1);
  text-decoration: none;
  transition: background 0.2s var(--ease-out);
}
.bar-row:hover { background: var(--bg-1); }
.bar-row:hover .bar-name { color: var(--text-1); }
.bar-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-4);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bar-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bar-repo {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-desc { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track {
  height: 6px;
  background: var(--bg-2);
  border-radius: var(--r-full);
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 1.2s var(--ease-out);
  background: linear-gradient(90deg, var(--cyan), var(--c-model));
}
.bar-stars {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.bar-stars .g { font-size: 11px; color: var(--text-3); display: block; margin-top: 2px; font-weight: 500; }

/* ============================================================
   Featured Grid — 4 大卡
   ============================================================ */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.feature-card {
  background: var(--bg-1);
  padding: 32px;
  display: flex; flex-direction: column;
  text-decoration: none;
  transition: background 0.3s var(--ease-out);
  min-height: 280px;
}
.feature-card:hover { background: var(--bg-2); }
.feature-head { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.feature-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  padding: 3px 8px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  margin-left: auto;
}
.feature-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-1); margin-bottom: 8px; }
.feature-sub { color: var(--text-3); font-size: 14px; line-height: 1.6; flex: 1; }
.feature-foot { display: flex; align-items: center; gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-1); }
.feature-stat { display: flex; flex-direction: column; gap: 2px; }
.feature-stat .k { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.feature-stat .v { font-size: 16px; font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; }
.feature-stat .v.g { color: var(--c-inference); }
.feature-arrow { margin-left: auto; color: var(--text-3); transition: color 0.2s, transform 0.2s; }
.feature-card:hover .feature-arrow { color: var(--cyan); transform: translateX(2px); }

/* ============================================================
   Newcomers — 紧凑表
   ============================================================ */
.newcomer-table {
  border-top: 1px solid var(--border-1);
}
.newcomer-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 120px 32px;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-1);
  text-decoration: none;
  transition: background 0.2s;
}
.newcomer-row:hover { background: var(--bg-1); }
.newcomer-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-4);
}
.newcomer-info { min-width: 0; }
.newcomer-repo {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.newcomer-desc { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.newcomer-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.newcomer-cat::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.newcomer-stars {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-1);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.newcomer-stars .g { font-size: 11px; color: var(--c-inference); display: block; margin-top: 2px; }
.newcomer-arrow { color: var(--text-3); text-align: right; }

/* ============================================================
   Terminal
   ============================================================ */
.terminal {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-2);
  overflow: hidden;
}
.terminal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-1); }
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.r { background: #ef4444; }
.terminal-dot.y { background: #f59e0b; }
.terminal-dot.g { background: #10b981; }
.terminal-title { font-size: 11px; color: var(--text-3); margin-left: 8px; }
.terminal-replay {
  position: relative;
  margin-left: auto;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  color: var(--text-3);
  transition: color 0.2s;
}
.terminal-replay:hover { color: var(--cyan); }
.terminal-replay svg { width: 12px !important; height: 12px !important; }
.terminal-body { white-space: pre-wrap; min-height: 240px; }
.terminal-cmd { color: var(--text-1); }
.terminal-cmd::before { content: "$ "; color: var(--cyan); }
.terminal-comment { color: var(--text-4); }
.terminal-output { color: var(--text-2); }
.terminal-cursor { display: inline-block; width: 7px; height: 14px; background: var(--cyan); vertical-align: -2px; margin-left: 2px; animation: cursor 1s steps(1) infinite; }
@keyframes cursor { 50% { opacity: 0; } }

/* ============================================================
   Detail Page
   ============================================================ */
.detail {
  padding: 144px 0 80px;
}
.detail-crumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); margin-bottom: 32px; }
.detail-crumbs a { color: var(--text-3); transition: color 0.2s; }
.detail-crumbs a:hover { color: var(--text-1); }
.detail-crumbs .sep { color: var(--text-4); }
.detail-title { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); margin-bottom: 16px; letter-spacing: -0.04em; }
.detail-subtitle { font-size: 1.0625rem; color: var(--text-3); max-width: 60ch; line-height: 1.65; margin-bottom: 40px; }

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 64px;
}
.detail-meta { background: var(--bg-1); padding: 20px 24px; }
.detail-meta .label { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.detail-meta .value { font-size: 22px; font-weight: 700; color: var(--text-1); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.detail-meta .value.lg { font-size: 28px; }
.detail-meta .value.sm { font-size: 16px; font-weight: 500; }

.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 64px; align-items: start; }
.detail-body section { padding: 48px 0; border-top: 1px solid var(--border-1); }
.detail-body section:first-of-type { border-top: 0; padding-top: 0; }
.detail-body h2 { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; font-size: 24px; }
.detail-body h2 .num { font-family: var(--font-mono); font-size: 12px; color: var(--text-4); }
.detail-body p { line-height: 1.75; margin-bottom: 12px; }
.detail-body ul { padding-left: 20px; color: var(--text-2); }
.detail-body li { margin-bottom: 8px; line-height: 1.7; }
.detail-body li::marker { color: var(--text-4); }
.detail-body strong { color: var(--text-1); font-weight: 600; }

.arch-badge-wrap { margin: 48px 0 0; }
.arch-badge-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 16px; }
.arch-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.arch-meta { color: var(--text-4); font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 8px; }
.arch-badge {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 24px;
  overflow: hidden;
}
.arch-svg { display: block; width: 100% !important; max-width: 720px; height: auto !important; margin: 0 auto; position: relative; z-index: 1; }

/* Detail Sidebar */
.side-stack { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--r-lg); padding: 20px; }
.side-card h4 { font-size: 11px; font-family: var(--font-mono); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; margin-bottom: 12px; }
.side-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--text-1); color: var(--bg-0); border-radius: var(--r-full); font-size: 13px; font-weight: 600; }
.side-cat { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.side-cat-icon { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--bg-0); }
.side-cat-icon svg { width: 18px !important; height: 18px !important; }
.side-cat-name { font-size: 14px; font-weight: 600; }
.side-cat-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); display: block; margin-top: 1px; }

.related-row { padding: 12px 0; border-bottom: 1px solid var(--border-1); display: flex; align-items: center; gap: 12px; }
.related-row:last-child { border-bottom: 0; }
.related-info { flex: 1; min-width: 0; }
.related-repo { font-size: 13px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-desc { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-stars { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ============================================================
   Project Cards (categories page)
   ============================================================ */
.proj-card {
  display: block;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  padding: 18px;
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
  position: relative;
}
.proj-card:hover { border-color: var(--border-3); background: var(--bg-2); }
.proj-card-strip {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--c-other);
  border-radius: 2px 0 0 2px;
  opacity: 0.8;
}
.proj-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.proj-icon { width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--bg-0); flex-shrink: 0; }
.proj-icon svg { width: 16px !important; height: 16px !important; }
.proj-meta { flex: 1; min-width: 0; }
.proj-repo { font-size: 13.5px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-owner { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-desc { color: var(--text-2); font-size: 13px; line-height: 1.55; margin-bottom: 16px; min-height: 40px; }
.proj-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.proj-stars { display: inline-flex; align-items: center; gap: 4px; color: var(--text-1); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.proj-stars svg { width: 12px !important; height: 12px !important; color: var(--text-3); }
.proj-growth { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); }

.badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 3px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.badge.new { background: var(--c-amber-soft, rgba(245,158,11,0.12)); color: var(--c-edge); }
.badge.hot { background: var(--c-inference-soft, rgba(16,185,129,0.12)); color: var(--c-inference); }

/* ============================================================
   Categories Page
   ============================================================ */
.cat-summary {
  display: flex; align-items: baseline; gap: 8px;
  font-size: clamp(2rem, 3.5vw + 1rem, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.cat-summary .num { background: linear-gradient(180deg, #f6f7fb 0%, var(--c-model) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cat-summary .total { color: var(--text-3); font-size: 0.4em; font-weight: 500; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}
.chip:hover { color: var(--text-1); border-color: var(--border-3); }
.chip.active { background: var(--text-1); color: var(--bg-0); border-color: var(--text-1); }
.chip .count { font-family: var(--font-mono); font-size: 11px; opacity: 0.7; }

.search-bar { position: relative; margin-bottom: 24px; max-width: 480px; }
.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border-2);
  background: var(--bg-1);
  border-radius: var(--r-full);
  color: var(--text-1);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--cyan); }
.search-bar svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px !important; height: 16px !important; color: var(--text-3); }

.filter-row { display: flex; gap: 8px; margin-bottom: 32px; }

.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 96px 24px;
  text-align: center;
  color: var(--text-3);
}
.empty-state h3 { color: var(--text-1); margin-bottom: 8px; }

/* ============================================================
   Footer — 克制 hairline
   ============================================================ */
footer { border-top: 1px solid var(--border-1); padding: 64px 0 32px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 64px; }
.footer-col h5 { font-size: 12px; font-family: var(--font-mono); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-2); font-size: 13.5px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text-1); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--border-1); font-size: 12.5px; color: var(--text-3); }

/* ============================================================
   Reveal Animation
   ============================================================ */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* ============================================================
   Cursor spotlight (bento)
   ============================================================ */
.bento-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.bento-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--cat-color, var(--cyan)) 10%, transparent),
    transparent 50%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none; border-radius: inherit;
}
.bento-card:hover::after { opacity: 1; }

/* ============================================================
   Progress bar (top of page)
   ============================================================ */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cyan);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 200;
  transition: transform 0.1s linear;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  :root { --pad-section: 80px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .menu-toggle { display: grid; place-items: center; }
  .nav-inner { justify-content: space-between; }
  .chart-grid { grid-template-columns: 1fr; }
  .chart-cell { border-right: 0; border-bottom: 1px solid var(--border-1); }
  .chart-cell:last-child { border-bottom: 0; }
  .cat-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .cat-mosaic .cat-cell:nth-child(n) { grid-column: span 1; grid-row: span 1; padding: 20px; }
  .cat-mosaic .cat-cell:nth-child(1) { grid-column: span 2; }
  .cat-mosaic .cat-cell:nth-child(2) { grid-column: span 2; }
  .cat-mosaic .cat-cell:nth-child(1) .cat-cell-name,
  .cat-mosaic .cat-cell:nth-child(2) .cat-cell-name { font-size: 18px; }
  .cat-mosaic .cat-cell:nth-child(1) .cat-cell-desc,
  .cat-mosaic .cat-cell:nth-child(2) .cat-cell-desc { font-size: 13.5px; margin-top: 12px; }
  .featured-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 28px 1fr 60px; }
  .bar-row .bar-track { display: none; }
  .newcomer-row { grid-template-columns: 32px 1fr 60px 28px; }
  .newcomer-cat { display: none; }
  .detail-meta-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .side-stack { position: static; }
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}
@media (max-width: 640px) {
  .hero { padding: 128px 0 64px; }
  .hero h1 { font-size: clamp(2.25rem, 9vw, 3.5rem); }
  .hero-eyebrow { font-size: 11px; flex-wrap: wrap; justify-content: center; }
  .hero-eyebrow span:last-child { white-space: normal; line-height: 1.4; text-align: left; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .proj-grid { grid-template-columns: 1fr; }
  .cat-mosaic { grid-template-columns: 1fr; }
  .cat-mosaic .cat-cell:nth-child(n) { grid-column: span 1; }
  .detail-meta-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
  .bar-num { display: inline-block; }
  .newcomer-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .hero-eyebrow, .hero h1, .hero .lead { max-width: 100%; }
  h1, h2 { letter-spacing: -0.03em; }
  .chart-cell { padding: 20px; }
  .chart-value { font-size: 1.75rem; }
  .featured-grid { grid-template-columns: 1fr; }
  .newcomer-table { font-size: 12.5px; }
  .cat-summary { font-size: 2rem; }
}
