:root {
  --bg: #0a0a0a;
  --bg-soft: #141414;
  --bg-elev: #1a1a1a;
  --border: #2a2a2a;
  --text: #eaeaea;
  --text-dim: #888;
  --text-mute: #555;
  --accent: #ff2d55;
  --accent-2: #ff6b35;
  --red: #ff2d55;
  --product: #ff2d55;
  --founder: #4fc3f7;
  --vc: #ffd54f;
  --company: #81c784;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }

.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.nav .brand { font-family: var(--mono); font-weight: 700; font-size: 18px; letter-spacing: -0.5px; color: var(--accent); }
.nav .brand span { color: var(--text); }
.nav a.link { font-family: var(--mono); font-size: 13px; color: var(--text-dim); }
.nav a.link:hover, .nav a.link.active { color: var(--accent); }
.nav .spacer { flex: 1; }
.nav .meta { font-family: var(--mono); font-size: 11px; color: var(--text-mute); }

.container { max-width: 1200px; margin: 0 auto; padding: 48px 24px; }
.container.narrow { max-width: 820px; }

/* home */
.hero { padding: 80px 24px 60px; max-width: 1200px; margin: 0 auto; text-align: center; }
.hero .tag { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 2px; margin-bottom: 24px; text-transform: uppercase; }
.hero h1 { font-size: 72px; font-weight: 900; line-height: 1.05; letter-spacing: -2px; margin-bottom: 20px; }
.hero h1 .glitch { color: var(--accent); }
.hero p.desc { font-size: 18px; color: var(--text-dim); max-width: 640px; margin: 0 auto 40px; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 24px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text); font-family: var(--mono); font-size: 14px;
  border-radius: 4px; transition: all 0.15s; cursor: pointer;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 700; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #000; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }
.stat { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 24px; text-align: center; }
.stat .num { font-family: var(--mono); font-size: 42px; font-weight: 800; color: var(--accent); line-height: 1; }
.stat .label { font-size: 13px; color: var(--text-dim); margin-top: 8px; font-family: var(--mono); }

.section-title { font-size: 12px; font-family: var(--mono); color: var(--text-mute); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; padding: 0 24px; max-width: 1200px; margin: 0 auto 20px; }

.entries { max-width: 1200px; margin: 0 auto; padding: 0 24px 80px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 16px; }
.entry { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 24px; transition: all 0.2s; }
.entry:hover { border-color: var(--accent); transform: translateY(-2px); }
.entry h3 { font-size: 18px; margin-bottom: 8px; }
.entry p { font-size: 14px; color: var(--text-dim); }
.entry .arrow { font-family: var(--mono); color: var(--accent); font-size: 12px; margin-top: 12px; display: inline-block; }

/* articles list */
.page-header { padding: 48px 24px 24px; max-width: 1200px; margin: 0 auto; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.page-header h1 { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.page-header .sub { color: var(--text-dim); margin-top: 8px; font-family: var(--mono); font-size: 13px; }

.filters { max-width: 1200px; margin: 0 auto 24px; padding: 0 24px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filters input { flex: 1; min-width: 200px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); padding: 10px 14px; border-radius: 4px; font-family: var(--mono); font-size: 14px; }
.filters input:focus { outline: none; border-color: var(--accent); }
.filters select { background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); padding: 10px 14px; border-radius: 4px; font-family: var(--mono); font-size: 14px; }

.article-list { max-width: 1200px; margin: 0 auto; padding: 0 24px 80px; }
.article-item { display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--border); align-items: start; }
.article-item .date { font-family: var(--mono); font-size: 13px; color: var(--text-mute); padding-top: 4px; }
.article-item .info h3 { font-size: 18px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.article-item .info h3 a:hover { color: var(--accent); }
.article-item .meta { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.article-item .arrow { font-family: var(--mono); color: var(--accent); font-size: 18px; padding-top: 4px; }
@media (max-width: 640px) {
  .article-item { grid-template-columns: 1fr; gap: 6px; }
  .article-item .arrow { display: none; }
  .hero h1 { font-size: 44px; }
}

/* article detail */
.article-body { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.article-body .head { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article-body .head h1 { font-size: 34px; font-weight: 800; line-height: 1.3; letter-spacing: -0.5px; margin-bottom: 16px; }
.article-body .head .meta { font-family: var(--mono); font-size: 13px; color: var(--text-dim); display: flex; gap: 16px; flex-wrap: wrap; }
.article-body .head .meta .author { color: var(--accent); }
.article-body .content { font-size: 17px; line-height: 1.85; }
.article-body .content h1, .article-body .content h2, .article-body .content h3,
.article-body .content h4 { margin: 1.6em 0 0.6em; font-weight: 700; line-height: 1.3; }
.article-body .content h1 { font-size: 26px; }
.article-body .content h2 { font-size: 22px; }
.article-body .content h3 { font-size: 19px; }
.article-body .content p { margin: 1em 0; }
.article-body .content ul, .article-body .content ol { margin: 1em 0; padding-left: 1.6em; }
.article-body .content li { margin: 0.3em 0; }
.article-body .content blockquote { border-left: 3px solid var(--accent); padding: 4px 16px; margin: 1.4em 0; color: var(--text-dim); background: var(--bg-soft); border-radius: 0 4px 4px 0; }
.article-body .content code { background: var(--bg-elev); padding: 2px 6px; border-radius: 3px; font-family: var(--mono); font-size: 0.9em; color: var(--accent-2); }
.article-body .content pre { background: var(--bg-elev); padding: 16px; border-radius: 6px; overflow-x: auto; border: 1px solid var(--border); margin: 1.4em 0; }
.article-body .content pre code { background: transparent; padding: 0; color: var(--text); }
.article-body .content hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.article-body .content strong { color: var(--text); font-weight: 700; }
.article-body .content a { color: var(--accent); border-bottom: 1px dashed var(--accent); }
.article-body .content img { max-width: 100%; border-radius: 6px; margin: 1em 0; }
.article-body .content table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.article-body .content th, .article-body .content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.article-body .content th { background: var(--bg-elev); font-family: var(--mono); font-size: 13px; }

.nav-post { display: flex; justify-content: space-between; gap: 16px; padding-top: 40px; border-top: 1px solid var(--border); margin-top: 40px; font-family: var(--mono); font-size: 13px; }
.nav-post a { color: var(--text-dim); }
.nav-post a:hover { color: var(--accent); }

/* graph page */
.graph-layout { max-width: 1400px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
@media (max-width: 960px) { .graph-layout { grid-template-columns: 1fr; } }
.graph-main { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; position: relative; }
.graph-main svg { width: 100%; height: 680px; display: block; background: radial-gradient(ellipse at center, #121212 0%, #0a0a0a 100%); }
.graph-sidebar { display: flex; flex-direction: column; gap: 16px; }

.legend { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.legend h4 { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--text-mute); text-transform: uppercase; margin-bottom: 12px; }
.legend .item { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.legend .dot.product { background: var(--product); }
.legend .dot.founder { background: var(--founder); }
.legend .dot.vc { background: var(--vc); }
.legend .dot.company { background: var(--company); }

.leaderboard { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.leaderboard .tabs { display: flex; border-bottom: 1px solid var(--border); }
.leaderboard .tab { flex: 1; padding: 10px; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--text-dim); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; }
.leaderboard .tab:hover { color: var(--text); }
.leaderboard .tab.active { color: var(--accent); border-bottom-color: var(--accent); background: rgba(255,45,85,0.05); }
.leaderboard .tab .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.leaderboard ol { list-style: none; padding: 8px 0; max-height: 500px; overflow-y: auto; }
.leaderboard li { padding: 8px 16px; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; transition: background 0.1s; }
.leaderboard li:hover { background: var(--bg-elev); }
.leaderboard li .rk { font-family: var(--mono); color: var(--text-mute); font-size: 12px; }
.leaderboard li.top .rk { color: var(--accent); font-weight: 700; }
.leaderboard li .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard li .wt { font-family: var(--mono); font-size: 11px; color: var(--text-mute); }

.node-tooltip {
  position: absolute; pointer-events: none; background: var(--bg-elev); border: 1px solid var(--accent);
  padding: 12px 14px; border-radius: 6px; font-size: 13px; max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6); display: none; z-index: 10;
}
.node-tooltip .tt-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; color: var(--accent); }
.node-tooltip .tt-type { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.node-tooltip .tt-desc { color: var(--text-dim); font-size: 12px; line-height: 1.5; }
.node-tooltip .tt-stats { font-family: var(--mono); font-size: 11px; color: var(--text-mute); margin-top: 6px; display: flex; gap: 10px; }

.detail-panel { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 20px; display: none; max-height: 460px; overflow-y: auto; }
.detail-panel.open { display: block; }
.detail-panel h4 { font-size: 18px; margin-bottom: 4px; }
.detail-panel .type-tag { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 3px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.detail-panel .type-tag.product { background: rgba(255,45,85,0.15); color: var(--product); }
.detail-panel .type-tag.founder { background: rgba(79,195,247,0.15); color: var(--founder); }
.detail-panel .type-tag.vc { background: rgba(255,213,79,0.15); color: var(--vc); }
.detail-panel .type-tag.company { background: rgba(129,199,132,0.15); color: var(--company); }
.detail-panel .desc { color: var(--text-dim); font-size: 14px; margin-bottom: 14px; line-height: 1.6; }
.detail-panel .stats-row { font-family: var(--mono); font-size: 12px; color: var(--text-dim); display: flex; gap: 16px; margin-bottom: 14px; padding: 10px; background: var(--bg-elev); border-radius: 4px; }
.detail-panel .conns h5 { font-family: var(--mono); font-size: 11px; color: var(--text-mute); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.detail-panel .conns ul { list-style: none; }
.detail-panel .conns li { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.detail-panel .conns li:last-child { border-bottom: none; }
.detail-panel .conns .rel { color: var(--text-mute); font-size: 12px; font-family: var(--mono); }

.controls { position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; z-index: 5; }
.controls button { background: rgba(20,20,20,0.8); border: 1px solid var(--border); color: var(--text-dim); padding: 6px 12px; font-family: var(--mono); font-size: 12px; border-radius: 4px; cursor: pointer; backdrop-filter: blur(4px); }
.controls button:hover { color: var(--accent); border-color: var(--accent); }
.graph-hint { position: absolute; bottom: 12px; left: 12px; font-family: var(--mono); font-size: 11px; color: var(--text-mute); background: rgba(20,20,20,0.7); padding: 6px 10px; border-radius: 4px; }

footer { border-top: 1px solid var(--border); padding: 40px 24px; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--text-mute); }

/* loading */
.loading { text-align: center; padding: 80px 20px; color: var(--text-dim); font-family: var(--mono); }
.loading .spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 10px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

::selection { background: var(--accent); color: #000; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
