/* ═══ Лебедев-классика — Swiss grid, single accent, white space as architecture ═══ */
/* ══ Toolbar (search + sort) ══ */
.toolbar { display:flex; gap:10px; align-items:center; margin-bottom:20px; flex-wrap:wrap; }
#proj-search { flex:1; min-width:200px; padding:8px 14px; font-size:.78rem; font-family:inherit;
  border:1px solid var(--rule); border-radius:8px; background:var(--card); color:var(--fg);
  outline:none; transition:border-color .15s; }
#proj-search:focus { border-color:var(--accent); }
#proj-search::placeholder { color:var(--muted); }
.sort-btns { display:flex; gap:2px; }
.sort-btn { padding:6px 12px; font-size:.72rem; font-family:inherit; cursor:pointer;
  background:var(--card); color:var(--muted); border:1px solid var(--rule); border-radius:6px;
  transition:all .15s; }
.sort-btn:hover { border-color:var(--accent); color:var(--fg); }
.sort-btn.active { background:var(--accent); color:#fff; border-color:var(--accent); }

/* ══ Spotlight cards ══ */
.spotlight-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.spotlight-card { background:var(--card); border:1px solid var(--rule); border-radius:10px; padding:18px; display:flex; flex-direction:column; gap:6px; }
.spotlight-icon { font-size:1.4rem; }
.spotlight-title { font-family:var(--font-heading); font-size:.95rem; font-weight:600; }
.spotlight-stat { font-size:.75rem; color:var(--accent); font-weight:600; }
.spotlight-text { font-size:.72rem; color:var(--muted); line-height:1.5; }
@media (max-width:600px) { .spotlight-grid { grid-template-columns:1fr; } }

/* ══ Star Timeline ══ */
.timeline-wrap { width:100%; margin:12px 0; }
#timeline-chart { width:100%; height:auto; }
.chart-line { fill:none; stroke:var(--accent); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.chart-lang-line { fill:none; stroke-width:1.5; stroke-linejoin:round; stroke-linecap:round; opacity:.7; }
.chart-area { fill:var(--accent); opacity:.08; }
.chart-grid { stroke:var(--rule); stroke-width:.5; stroke-dasharray:4,4; }
.chart-label { font-size:10px; fill:var(--muted); font-family:inherit; }

/* ══ Add project CTA ══ */
.add-project-box { background:var(--card); border:1px solid var(--accent); border-radius:8px;
  padding:14px 18px; font-size:.8rem; margin:12px 0; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.add-project-box a { color:var(--accent); font-weight:600; text-decoration:none; white-space:nowrap; }
.add-project-box a:hover { text-decoration:underline; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

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

:root {
  --bg: #fafaf8;
  --fg: #1a1a1a;
  --muted: #8c8c8c;
  --accent: #d42020;
  --rule: #e5e5e0;
  --card: #fff;
  --card-border: #efefea;
  --max-width: 880px;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
}

html { font-size: 17px; line-height: 1.6; }
body { font-family: var(--font-body); background: var(--bg); color: var(--fg); }

.container { max-width: var(--max-width); margin:0 auto; padding:0 32px; }

/* Header */
.header { display:flex; justify-content:space-between; align-items:center; padding:36px 0 24px; border-bottom:1px solid var(--rule); }
.logo { font-family:var(--font-heading); font-size:.95rem; color:var(--muted); text-decoration:none; letter-spacing:.03em; text-transform:lowercase; }
.nav { display:flex; gap:28px; }
.nav a { font-size:.82rem; color:var(--fg); text-decoration:none; letter-spacing:.02em; }
.nav a:hover { color:var(--accent); text-decoration:underline; }

/* Hero */
.hero { padding:80px 0 52px; text-align:left; }
.hero-eyebrow { font-size:.65rem; text-transform:uppercase; letter-spacing:.18em; color:var(--accent); margin-bottom:12px; }
.hero-headline { font-family:var(--font-heading); font-size:2.8rem; line-height:1.12; font-weight:700; max-width:680px; }
.hero-headline em { font-style:italic; color:var(--accent); }
.hero-sub { font-size:.9rem; color:var(--muted); margin-top:18px; max-width:560px; line-height:1.7; }
.hero-sub code { font-family:var(--font-body); font-size:.8rem; background:var(--rule); padding:1px 6px; border-radius:3px; }

/* Stat row */
.stat-row { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; margin-bottom:60px; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.stat-card { background:var(--bg); padding:28px 0; text-align:center; }
.stat-value { font-family:var(--font-heading); font-size:2rem; font-weight:700; }
.stat-value.accent { color:var(--accent); }
.stat-label { font-size:.65rem; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); margin-top:4px; }

/* Sections */
.section { margin-bottom:52px; }
.section-header { display:flex; align-items:baseline; gap:12px; margin-bottom:24px; }
.section-title { font-family:var(--font-heading); font-size:1.35rem; font-weight:600; }
.section-title a { color:var(--fg); text-decoration:none; }
.section-title .anchor { font-size:.7rem; color:var(--muted); opacity:.3; margin-left:6px; }
.section-sub { font-size:.75rem; color:var(--muted); }

/* Method grid */
.method-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:1px; background:var(--rule); }
.method-card { background:var(--card); padding:24px; }
.method-source { font-size:.7rem; text-transform:uppercase; letter-spacing:.08em; color:var(--accent); margin-bottom:6px; }
.method-how { font-size:.82rem; color:var(--fg); line-height:1.6; }
.method-result { font-size:.8rem; color:var(--muted); margin-top:8px; }
.method-how code { font-family:var(--font-body); font-size:.75rem; background:var(--rule); padding:1px 5px; border-radius:2px; }

/* Top repos */
.top-row { display:flex; align-items:center; gap:12px; padding:8px 0; border-bottom:1px solid var(--rule); }
.top-rank { font-family:var(--font-heading); font-size:1.1rem; color:var(--muted); min-width:28px; }
.top-info { flex:1; }
.top-name a { font-weight:500; color:var(--fg); text-decoration:none; font-size:.92rem; }
.top-name a:hover { color:var(--accent); }
.top-org { font-size:.72rem; color:var(--muted); margin-left:8px; }
.top-desc { font-size:.78rem; color:var(--muted); }
.top-bar-wrap { flex:1; height:4px; background:var(--rule); border-radius:2px; overflow:hidden; }
.top-bar { height:100%; background:var(--accent); border-radius:2px; }
.top-stars { font-size:.8rem; font-weight:600; min-width:48px; text-align:right; }

/* Category headers */
.cat-header { display:flex; align-items:center; gap:8px; padding:20px 0 10px; border-top:1px solid var(--rule); font-family:var(--font-heading); font-size:1.1rem; }
.cat-count { font-size:.75rem; color:var(--muted); margin-left:auto; }
.cat-line { flex:1; height:1px; background:var(--rule); margin-left:8px; }

/* Project rows */
.proj-list { display:flex; flex-direction:column; }
.proj-row { display:flex; align-items:center; gap:12px; padding:10px 0; text-decoration:none; color:var(--fg); border-bottom:1px solid var(--rule); font-size:.85rem; }
.proj-row:hover { background:var(--card); }
.proj-row.feat { border-left:3px solid var(--accent); padding-left:9px; }
.pname { font-weight:500; min-width:200px; }
.pdesc { color:var(--muted); flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.plang { font-size:.7rem; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; min-width:100px; }
.pstars { font-size:.8rem; font-weight:500; min-width:60px; text-align:right; }

/* Organizations */
.org-list { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--rule); }
.org-card { background:var(--card); padding:20px; }
.org-head { display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; margin-bottom:4px; }
.org-logo { width:38px; height:38px; border-radius:9px; object-fit:cover; flex-shrink:0; background:var(--rule); }
.org-name { font-weight:600; font-size:.9rem; }
.org-handle { font-size:.7rem; color:var(--muted); }
.org-desc { font-size:.78rem; color:var(--muted); margin-top:4px; }
.org-focus { font-size:.65rem; text-transform:uppercase; letter-spacing:.06em; color:var(--accent); margin-top:6px; display:block; }

/* People */
.person-row { display:flex; align-items:center; gap:12px; padding:10px 0; text-decoration:none; color:var(--fg); border-bottom:1px solid var(--rule); }
.person-row:hover { background:var(--card); }
.p-rank { font-family:var(--font-heading); font-size:1rem; color:var(--muted); min-width:28px; text-align:center; }
.p-avatar img { width:44px; height:44px; border-radius:50%; object-fit:cover; }
.p-info { flex:1; }
.p-name-line { font-weight:500; font-size:.88rem; }
.p-role { font-size:.7rem; color:var(--muted); }
.p-note { font-size:.75rem; color:var(--muted); }
.p-followers { font-size:.82rem; font-weight:500; }
.followers-icon { vertical-align:-.15em; margin-right:3px; flex-shrink:0; }
.dl-icon { vertical-align:-.15em; margin-right:3px; flex-shrink:0; }

/* Packages */
.pkg-list { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--rule); }
.pkg-card { background:var(--card); padding:16px; text-decoration:none; color:var(--fg); display:flex; align-items:center; gap:10px; }
.pkg-icon { font-size:1.3rem; }
.pkg-info { flex:1; }
.pkg-name { font-weight:500; font-size:.82rem; }
.pkg-desc { font-size:.72rem; color:var(--muted); }
.pkg-dl { font-size:.78rem; font-weight:600; text-align:right; }
.pkg-dl-label { font-size:.65rem; color:var(--muted); font-weight:400; }

/* HF cards */
.hf-list { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--rule); }
.hf-card { background:var(--card); padding:16px; text-decoration:none; color:var(--fg); display:flex; align-items:flex-start; gap:10px; }
.hf-card-body { flex:1; min-width:0; }
.hf-name { font-weight:500; font-size:.82rem; }
.hf-org { font-size:.7rem; color:var(--muted); }
.hf-meta { margin-top:8px; font-size:.75rem; color:var(--muted); display:flex; gap:12px; }
.hf-task { text-transform:uppercase; letter-spacing:.04em; }

/* Datasets */
.ds-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--rule); }
.ds-card { background:var(--card); padding:18px; }
.ds-name { font-weight:600; font-size:.88rem; }
.ds-size { font-size:.7rem; text-transform:uppercase; letter-spacing:.05em; color:var(--accent); margin:4px 0; }
.ds-desc { font-size:.78rem; color:var(--muted); }

/* Footer */
footer { display:flex; flex-direction:column; gap:6px; padding:40px 0; border-top:1px solid var(--rule); font-size:.75rem; color:var(--muted); }
footer a { color:var(--muted); text-decoration:none; }
footer a:hover { color:var(--accent); text-decoration:underline; }
.footer-line { margin:0; }

@media (max-width:720px) {
  .container { padding:0 16px; }
  .header { padding:20px 0 12px; }
  .nav { gap:16px; }
  .nav a { font-size:.75rem; }
  .hero { padding:48px 0 32px; }
  .hero-headline { font-size:1.8rem; }
  .stat-row { grid-template-columns:repeat(2,1fr); }
  .method-grid { grid-template-columns:1fr; }
  .org-list, .pkg-list, .hf-list, .ds-grid { grid-template-columns:1fr; }
  .proj-row { flex-wrap:wrap; }
  .pdesc { display:none; }
}

.gh { color:inherit; text-decoration:none; } .gh:hover code { text-decoration:underline; }
/* ══ Top grid (3-column cards) ══ */
.top-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:4px; }
.top-card { background:var(--surface, #1c1e22); border-radius:8px; padding:14px; text-decoration:none; color:var(--fg); border:1px solid var(--ghost, #3a3d44); display:flex; flex-direction:column; gap:6px; }
.top-card:hover { border-color:var(--accent); }
.top-rank { font-size:.65rem; color:var(--muted); }
.top-card-body { flex:1; }
.top-card-name { font-weight:600; font-size:.85rem; color:var(--bright, #f0f1f3); }
.top-card-org { font-size:.68rem; margin-top:2px; }
.top-card-org .gh { color:var(--muted); font-size:.68rem; }
.top-card-org .gh:hover { color:var(--accent); }
.top-card-desc { font-size:.7rem; color:var(--muted); margin-top:4px; line-height:1.4; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.top-card-stats { font-size:.68rem; color:var(--muted); display:flex; gap:8px; align-items:center; margin-top:4px; }
.top-card-stars { color:var(--accent); font-weight:600; }

/* ══ Project grid (3-column cards) ══ */
.proj-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.proj-card { background:var(--surface, #1c1e22); border-radius:8px; padding:12px; text-decoration:none; color:var(--fg); border:1px solid var(--ghost, #3a3d44); display:flex; flex-direction:column; gap:4px; }
.proj-card:hover { border-color:var(--accent); }
.proj-card-name { font-weight:600; font-size:.8rem; color:var(--bright, #f0f1f3); }
.proj-card-org { font-size:.65rem; }
.proj-card-org .gh { color:var(--muted); }
.proj-card-org .gh:hover { color:var(--accent); }
.proj-card-desc { font-size:.68rem; color:var(--muted); line-height:1.4; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.proj-card-meta { font-size:.65rem; color:var(--muted); display:flex; gap:8px; align-items:center; margin-top:4px; }
.proj-card-stars { color:var(--accent); font-weight:600; margin-left:auto; }

@media (max-width:900px) { .top-grid, .proj-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px) { .top-grid, .proj-grid { grid-template-columns:1fr; } }



/* ══ Density fix: Top is a list, projects are compact cards ══ */
.top-list { display:flex; flex-direction:column; gap:0; }
.top-row { display:grid; grid-template-columns:2rem minmax(0,1fr) 54px; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--ghost, var(--rule, #333)); }
.top-rank { font-size:.72rem; color:var(--muted); text-align:right; min-width:0; }
.top-info { min-width:0; }
.top-name { display:flex; align-items:baseline; gap:8px; min-width:0; }
.top-name > a:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--bright, var(--fg)); text-decoration:none; }
.top-name > a:first-child:hover { color:var(--accent); }
.top-org { flex:0 0 auto; font-size:.68rem; color:var(--muted); text-decoration:none; }
.top-org:hover { color:var(--accent); }
.top-desc { margin-top:1px; font-size:.68rem; line-height:1.35; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.top-bar-wrap,.top-bar { display:none; }
.top-stars { font-size:.74rem; font-weight:600; color:var(--accent); text-align:right; white-space:nowrap; }

.proj-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.proj-card { min-width:0; padding:10px; border:1px solid var(--ghost, var(--rule, #ddd)); border-radius:7px; background:var(--surface, var(--card, #fff)); display:flex; flex-direction:column; gap:3px; }
.proj-card-name a { display:block; color:var(--bright, var(--fg)); text-decoration:none; font-weight:600; font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proj-card-name a:hover { color:var(--accent); }
.proj-card-org .gh { display:block; color:var(--muted); text-decoration:none; font-size:.63rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proj-card-org .gh:hover { color:var(--accent); }
.proj-card-desc { color:var(--muted); font-size:.66rem; line-height:1.32; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.proj-card-meta { margin-top:auto; padding-top:4px; display:flex; gap:8px; align-items:center; color:var(--muted); font-size:.62rem; }
.proj-card-stars { margin-left:auto; color:var(--accent); font-weight:600; }
.mention { color:var(--accent); text-decoration:none; }
.mention:hover { text-decoration:underline; }

@media (max-width:900px) {
  .top-row { grid-template-columns:1.8rem minmax(0,1fr) 48px; }
  .top-bar-wrap { display:none; }
  .proj-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  .top-row { grid-template-columns:1.6rem minmax(0,1fr) 44px; gap:7px; }
  .top-org { display:none; }
  .proj-grid { grid-template-columns:1fr; }
}
.top-star-icon { vertical-align:-.12em; margin-left:3px; flex-shrink:0; }

/* ══ Density fix: Top is a list, projects are compact cards ══ */
.top-list { display:flex; flex-direction:column; gap:0; }
.top-row { display:grid; grid-template-columns:2rem minmax(0,1fr) 54px; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--ghost, var(--rule, #333)); }
.top-rank { font-size:.72rem; color:var(--muted); text-align:right; min-width:0; }
.top-info { min-width:0; }
.top-name { display:flex; align-items:baseline; gap:8px; min-width:0; }
.top-name > a:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--bright, var(--fg)); text-decoration:none; }
.top-name > a:first-child:hover { color:var(--accent); }
.top-org { flex:0 0 auto; font-size:.68rem; color:var(--muted); text-decoration:none; }
.top-org:hover { color:var(--accent); }
.top-desc { margin-top:1px; font-size:.68rem; line-height:1.35; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.top-bar-wrap,.top-bar { display:none; }
.top-stars { font-size:.74rem; font-weight:600; color:var(--accent); text-align:right; white-space:nowrap; }

.proj-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.proj-card { min-width:0; padding:10px; border:1px solid var(--ghost, var(--rule, #ddd)); border-radius:7px; background:var(--surface, var(--card, #fff)); display:flex; flex-direction:column; gap:3px; }
.proj-card-name a { display:block; color:var(--bright, var(--fg)); text-decoration:none; font-weight:600; font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proj-card-name a:hover { color:var(--accent); }
.proj-card-org .gh { display:block; color:var(--muted); text-decoration:none; font-size:.63rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proj-card-org .gh:hover { color:var(--accent); }
.proj-card-desc { color:var(--muted); font-size:.66rem; line-height:1.32; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.proj-card-meta { margin-top:auto; padding-top:4px; display:flex; gap:8px; align-items:center; color:var(--muted); font-size:.62rem; }
.proj-card-stars { margin-left:auto; color:var(--accent); font-weight:600; }
.mention { color:var(--accent); text-decoration:none; }
.mention:hover { text-decoration:underline; }

@media (max-width:900px) {
  .top-row { grid-template-columns:1.8rem minmax(0,1fr) 48px; }
  .top-bar-wrap { display:none; }
  .proj-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  .top-row { grid-template-columns:1.6rem minmax(0,1fr) 44px; gap:7px; }
  .top-org { display:none; }
  .proj-grid { grid-template-columns:1fr; }
}
.top-star-icon { vertical-align:-.12em; margin-left:3px; flex-shrink:0; }
.gh-icon { vertical-align:-.15em; margin-right:2px; flex-shrink:0; opacity:.7; }

/* ══ Density fix: Top is a list, projects are compact cards ══ */
.top-list { display:flex; flex-direction:column; gap:0; }
.top-row { display:grid; grid-template-columns:2rem minmax(0,1fr) 54px; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--ghost, var(--rule, #333)); }
.top-rank { font-size:.72rem; color:var(--muted); text-align:right; min-width:0; }
.top-info { min-width:0; }
.top-name { display:flex; align-items:baseline; gap:8px; min-width:0; }
.top-name > a:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--bright, var(--fg)); text-decoration:none; }
.top-name > a:first-child:hover { color:var(--accent); }
.top-org { flex:0 0 auto; font-size:.68rem; color:var(--muted); text-decoration:none; }
.top-org:hover { color:var(--accent); }
.top-desc { margin-top:1px; font-size:.68rem; line-height:1.35; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.top-bar-wrap,.top-bar { display:none; }
.top-stars { font-size:.74rem; font-weight:600; color:var(--accent); text-align:right; white-space:nowrap; }

.proj-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.proj-card { min-width:0; padding:10px; border:1px solid var(--ghost, var(--rule, #ddd)); border-radius:7px; background:var(--surface, var(--card, #fff)); display:flex; flex-direction:column; gap:3px; }
.proj-card-name a { display:block; color:var(--bright, var(--fg)); text-decoration:none; font-weight:600; font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proj-card-name a:hover { color:var(--accent); }
.proj-card-org .gh { display:block; color:var(--muted); text-decoration:none; font-size:.63rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proj-card-org .gh:hover { color:var(--accent); }
.proj-card-desc { color:var(--muted); font-size:.66rem; line-height:1.32; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.proj-card-meta { margin-top:auto; padding-top:4px; display:flex; gap:8px; align-items:center; color:var(--muted); font-size:.62rem; }
.proj-card-stars { margin-left:auto; color:var(--accent); font-weight:600; }
.mention { color:var(--accent); text-decoration:none; }
.mention:hover { text-decoration:underline; }

@media (max-width:900px) {
  .top-row { grid-template-columns:1.8rem minmax(0,1fr) 48px; }
  .top-bar-wrap { display:none; }
  .proj-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  .top-row { grid-template-columns:1.6rem minmax(0,1fr) 44px; gap:7px; }
  .top-org { display:none; }
  .proj-grid { grid-template-columns:1fr; }
}
.top-star-icon { vertical-align:-.12em; margin-left:3px; flex-shrink:0; }
.gh-avatar { vertical-align:middle; margin-right:3px; border-radius:3px; flex-shrink:0; }

/* ══ Density fix: Top is a list, projects are compact cards ══ */
.top-list { display:flex; flex-direction:column; gap:0; }
.top-row { display:grid; grid-template-columns:2rem minmax(0,1fr) 54px; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--ghost, var(--rule, #333)); }
.top-rank { font-size:.72rem; color:var(--muted); text-align:right; min-width:0; }
.top-info { min-width:0; }
.top-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; font-size:.88rem; }
.top-name a { color:var(--bright, var(--fg)); text-decoration:none; }
.top-name a:hover { color:var(--accent); }
.top-org-line { margin-top:1px; font-size:.65rem; }
.top-org-line .gh { color:var(--muted); text-decoration:none; display:inline-flex; align-items:center; gap:3px; }
.top-org-line .gh:hover { color:var(--accent); }
.top-desc { margin-top:1px; font-size:.68rem; line-height:1.35; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.top-bar-wrap,.top-bar { display:none; }
.top-stars { font-size:.74rem; font-weight:600; color:var(--accent); text-align:right; white-space:nowrap; }

.proj-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.proj-card { min-width:0; padding:10px; border:1px solid var(--ghost, var(--rule, #ddd)); border-radius:7px; background:var(--surface, var(--card, #fff)); display:flex; flex-direction:column; gap:3px; }
.proj-card-name a { display:block; color:var(--bright, var(--fg)); text-decoration:none; font-weight:600; font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proj-card-name a:hover { color:var(--accent); }
.proj-card-org .gh { display:block; color:var(--muted); text-decoration:none; font-size:.63rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proj-card-org .gh:hover { color:var(--accent); }
.proj-card-desc { color:var(--muted); font-size:.66rem; line-height:1.32; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.proj-card-meta { margin-top:auto; padding-top:4px; display:flex; gap:8px; align-items:center; color:var(--muted); font-size:.62rem; }
.proj-card-stars { margin-left:auto; color:var(--accent); font-weight:600; }
.mention { color:var(--accent); text-decoration:none; }
.mention:hover { text-decoration:underline; }

@media (max-width:900px) {
  .top-row { grid-template-columns:1.8rem minmax(0,1fr) 48px; }
  .top-bar-wrap { display:none; }
  .proj-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  .top-row { grid-template-columns:1.6rem minmax(0,1fr) 44px; gap:7px; }
  .top-org-line { display:none; }
  .proj-grid { grid-template-columns:1fr; }
}
.top-star-icon { vertical-align:-.12em; margin-left:3px; flex-shrink:0; }
.gh-avatar { vertical-align:middle; margin-right:3px; border-radius:3px; flex-shrink:0; }

[data-theme="dark"] {
  /* ═══ Терминал — Monospace brutalism, green-on-black, pure data ═══ */

  --bg: #0a0c0f;
  --surface: #111418;
  --fg: #b8c5c8;
  --muted: #5a6870;
  --bright: #e8eef2;
  --accent: #2ecc40;
  --warn: #f1c40f;
  --error: #e74c3c;
  --rule: #1c2228;
  --font: 'JetBrains Mono', 'SF Mono', monospace;

  * { margin:0; padding:0; box-sizing:border-box; }
  font-size: 14px; line-height: 1.7;
  body { font-family:var(--font); background:var(--bg); color:var(--fg); font-weight:400; }
  
  .container { max-width:920px; margin:0 auto; padding:0 32px; }
  
  /* Header */
  .header { display:flex; justify-content:space-between; padding:28px 0 18px; border-bottom:1px solid var(--rule); }
  .logo { color:var(--accent); text-decoration:none; font-size:.9rem; font-weight:700; }
  .nav { display:flex; gap:24px; }
  .nav a { font-size:.82rem; color:var(--muted); text-decoration:none; }
  .nav a:hover { color:var(--accent); text-decoration:underline; }
  
  /* Hero — terminal prompt */
  .hero { padding:60px 0 40px; }
  .hero-eyebrow { color:var(--accent); font-size:.75rem; margin-bottom:16px; }
  .hero-eyebrow::before { content:'$ '; }
  .hero-headline { font-size:1.7rem; color:var(--bright); font-weight:700; line-height:1.3; max-width:700px; }
  .hero-headline em { color:var(--accent); font-style:normal; }
  .hero-headline em::before { content:'«'; }
  .hero-headline em::after { content:'»'; }
  .hero-sub { font-size:.85rem; color:var(--muted); margin-top:16px; max-width:600px; }
  .hero-sub code { background:var(--surface); color:var(--accent); padding:1px 6px; font-family:var(--font); font-size:.8rem; }
  
  /* Stats — table rows */
  .stat-row { display:grid; grid-template-columns:repeat(4,1fr); margin-bottom:48px; border:1px solid var(--rule); }
  .stat-card { padding:20px 0; text-align:center; border-right:1px solid var(--rule); }
  .stat-card:last-child { border-right:none; }
  .stat-value { font-size:2rem; font-weight:700; color:var(--bright); }
  .stat-value.accent { color:var(--accent); }
  .stat-label { font-size:.7rem; color:var(--muted); text-transform:uppercase; margin-top:4px; }
  
  /* Sections */
  .section { margin-bottom:48px; }
  .section-header { display:flex; align-items:baseline; gap:12px; margin-bottom:20px; }
  .section-title { font-size:1.1rem; color:var(--accent); font-weight:700; }
  .section-title a { color:inherit; text-decoration:none; }
  .section-title .anchor { opacity:.3; font-size:.7rem; }
  .section-sub { color:var(--muted); font-size:.75rem; }
  
  /* Method grid — terminal output style */
  .method-grid { display:flex; flex-direction:column; gap:0; }
  .method-card { padding:14px 0; border-bottom:1px solid var(--rule); font-size:.8rem; }
  .method-source { color:var(--accent); display:inline; }
  .method-source::after { content:': '; }
  .method-how { color:var(--fg); display:inline; }
  .method-result { color:var(--warn); display:inline; margin-left:8px; }
  .method-how code { color:var(--bright); background:var(--surface); padding:0 4px; }
  
  /* Top repos */
  .top-row { display:flex; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--rule); }
  .top-rank { color:var(--muted); font-size:.9rem; min-width:24px; }
  .top-info { flex:1; }
  .top-name a { color:var(--bright); text-decoration:none; }
  .top-name a:hover { color:var(--accent); }
  .top-org { color:var(--muted); font-size:.7rem; margin-left:6px; }
  .top-org::before { content:'/'; margin-right:4px; }
  .top-desc { color:var(--muted); font-size:.72rem; }
  .top-bar-wrap { flex:1; height:3px; background:var(--rule); }
  .top-bar { height:100%; background:var(--accent); }
  .top-stars { color:var(--bright); font-size:.8rem; min-width:52px; text-align:right; }
  
  /* Categories */
  .cat-header { display:flex; align-items:center; gap:8px; padding:24px 0 10px; color:var(--bright); font-size:1rem; }
  .cat-count { font-size:.75rem; color:var(--muted); margin-left:auto; }
  .cat-line { flex:1; height:1px; background:var(--rule); margin-left:8px; }
  
  /* Projects — compact table */
  .proj-list { }
  .proj-row { display:flex; align-items:center; gap:12px; padding:7px 0; text-decoration:none; color:var(--fg); border-bottom:1px solid var(--rule); font-size:.8rem; }
  .proj-row:hover { background:var(--surface); }
  .proj-row.feat { background:rgba(46,204,64,.03); border-left:2px solid var(--accent); padding-left:10px; }
  .pname { color:var(--bright); min-width:200px; }
  .pdesc { color:var(--muted); flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .plang { color:var(--muted); font-size:.68rem; min-width:90px; }
  .pstars { color:var(--accent); min-width:55px; text-align:right; }
  
  /* Orgs */
  .org-list { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--rule); }
  .org-card { background:var(--surface); padding:16px; }
  .org-head { display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; margin-bottom:4px; }
  .org-logo { width:38px; height:38px; border-radius:0; object-fit:cover; flex-shrink:0; background:var(--rule); }
  .org-name { color:var(--bright); font-size:.85rem; }
  .org-handle { font-size:.68rem; color:var(--muted); }
  .org-desc { color:var(--muted); font-size:.72rem; margin-top:4px; }
  .org-focus { font-size:.65rem; color:var(--warn); margin-top:6px; display:block; text-transform:uppercase; }
  
  /* People */
  .person-row { display:flex; align-items:center; gap:10px; padding:8px 0; text-decoration:none; color:var(--fg); border-bottom:1px solid var(--rule); }
  .person-row:hover { background:var(--surface); }
  .p-rank { color:var(--muted); min-width:24px; text-align:center; }
  .p-avatar img { width:36px; height:36px; border-radius:0; }
  .p-info { flex:1; }
  .p-name-line { color:var(--bright); font-size:.82rem; }
  .p-role { color:var(--muted); font-size:.68rem; }
  .p-note { color:var(--muted); font-size:.68rem; }
  .p-followers { color:var(--accent); font-size:.78rem; }
  
  /* Packages */
  .pkg-list { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--rule); }
  .pkg-card { background:var(--surface); padding:14px; text-decoration:none; color:var(--fg); display:flex; align-items:center; gap:8px; }
  .pkg-icon { font-size:1.1rem; }
  .pkg-info { flex:1; }
  .pkg-name { color:var(--bright); font-size:.78rem; }
  .pkg-desc { color:var(--muted); font-size:.68rem; }
  .pkg-dl { color:var(--accent); font-size:.75rem; text-align:right; }
  .pkg-dl-label { color:var(--muted); font-size:.62rem; }
  
  /* HF cards */
  .hf-list { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--rule); }
  .hf-card { background:var(--surface); padding:14px; text-decoration:none; color:var(--fg); display:flex; align-items:flex-start; gap:10px; }
  .hf-name { color:var(--bright); font-size:.8rem; }
  .hf-org { color:var(--muted); font-size:.68rem; }
  .hf-meta { margin-top:8px; display:flex; gap:12px; font-size:.72rem; color:var(--muted); }
  .hf-meta span { color:var(--accent); }
  
  /* Datasets */
  .ds-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--rule); }
  .ds-card { background:var(--surface); padding:16px; }
  .ds-name { color:var(--bright); font-size:.85rem; }
  .ds-size { color:var(--warn); font-size:.65rem; text-transform:uppercase; margin:4px 0; }
  .ds-desc { color:var(--muted); font-size:.72rem; }
  
  /* Footer */
  footer { display:flex; flex-direction:column; gap:6px; padding:40px 0; border-top:1px solid var(--rule); font-size:.72rem; color:var(--muted); }
  footer a { color:var(--muted); text-decoration:none; }
  footer a:hover { color:var(--accent); text-decoration:underline; }
  
  @media (max-width:720px) {
    .container { padding:0 16px; }
    .header { padding:20px 0 12px; }
    .nav { gap:14px; }
    .nav a { font-size:.75rem; }
    .hero { padding:40px 0 28px; }
    .hero-headline { font-size:1.3rem; }
    .stat-row { grid-template-columns:repeat(2,1fr); }
    .org-list, .pkg-list, .hf-list, .ds-grid { grid-template-columns:1fr; }
    .proj-row { flex-wrap:wrap; }
    .pdesc { display:none; }
  }
  
  .gh { color:inherit; text-decoration:none; } .gh:hover code { text-decoration:underline; }
  /* ══ Top grid (3-column cards) ══ */
  .top-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:4px; }
  .top-card { background:var(--surface, #1c1e22); border-radius:8px; padding:14px; text-decoration:none; color:var(--fg); border:1px solid var(--ghost, #3a3d44); display:flex; flex-direction:column; gap:6px; }
  .top-card:hover { border-color:var(--accent); }
  .top-rank { font-size:.65rem; color:var(--muted); }
  .top-card-body { flex:1; }
  .top-card-name { font-weight:600; font-size:.85rem; color:var(--bright, #f0f1f3); }
  .top-card-org { font-size:.68rem; margin-top:2px; }
  .top-card-org .gh { color:var(--muted); font-size:.68rem; }
  .top-card-org .gh:hover { color:var(--accent); }
  .top-card-desc { font-size:.7rem; color:var(--muted); margin-top:4px; line-height:1.4; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .top-card-stats { font-size:.68rem; color:var(--muted); display:flex; gap:8px; align-items:center; margin-top:4px; }
  .top-card-stars { color:var(--accent); font-weight:600; }
  
  /* ══ Project grid (3-column cards) ══ */
  .proj-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
  .proj-card { background:var(--surface, #1c1e22); border-radius:8px; padding:12px; text-decoration:none; color:var(--fg); border:1px solid var(--ghost, #3a3d44); display:flex; flex-direction:column; gap:4px; }
  .proj-card:hover { border-color:var(--accent); }
  .proj-card-name { font-weight:600; font-size:.8rem; color:var(--bright, #f0f1f3); }
  .proj-card-org { font-size:.65rem; }
  .proj-card-org .gh { color:var(--muted); }
  .proj-card-org .gh:hover { color:var(--accent); }
  .proj-card-desc { font-size:.68rem; color:var(--muted); line-height:1.4; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .proj-card-meta { font-size:.65rem; color:var(--muted); display:flex; gap:8px; align-items:center; margin-top:4px; }
  .proj-card-stars { color:var(--accent); font-weight:600; margin-left:auto; }
  
  @media (max-width:900px) { .top-grid, .proj-grid { grid-template-columns:repeat(2,1fr); } }
  @media (max-width:600px) { .top-grid, .proj-grid { grid-template-columns:1fr; } }
  
  
  
  /* ══ Density fix: Top is a list, projects are compact cards ══ */
  .top-list { display:flex; flex-direction:column; gap:0; }
  .top-row { display:grid; grid-template-columns:2rem minmax(0,1fr) 54px; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--ghost, var(--rule, #333)); }
  .top-rank { font-size:.72rem; color:var(--muted); text-align:right; min-width:0; }
  .top-info { min-width:0; }
  .top-name { display:flex; align-items:baseline; gap:8px; min-width:0; }
  .top-name > a:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--bright, var(--fg)); text-decoration:none; }
  .top-name > a:first-child:hover { color:var(--accent); }
  .top-org { flex:0 0 auto; font-size:.68rem; color:var(--muted); text-decoration:none; }
  .top-org:hover { color:var(--accent); }
  .top-desc { margin-top:1px; font-size:.68rem; line-height:1.35; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .top-bar-wrap,.top-bar { display:none; }
  .top-stars { font-size:.74rem; font-weight:600; color:var(--accent); text-align:right; white-space:nowrap; }
  
  .proj-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .proj-card { min-width:0; padding:10px; border:1px solid var(--ghost, var(--rule, #ddd)); border-radius:7px; background:var(--surface, var(--card, #fff)); display:flex; flex-direction:column; gap:3px; }
  .proj-card-name a { display:block; color:var(--bright, var(--fg)); text-decoration:none; font-weight:600; font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .proj-card-name a:hover { color:var(--accent); }
  .proj-card-org .gh { display:block; color:var(--muted); text-decoration:none; font-size:.63rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .proj-card-org .gh:hover { color:var(--accent); }
  .proj-card-desc { color:var(--muted); font-size:.66rem; line-height:1.32; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .proj-card-meta { margin-top:auto; padding-top:4px; display:flex; gap:8px; align-items:center; color:var(--muted); font-size:.62rem; }
  .proj-card-stars { margin-left:auto; color:var(--accent); font-weight:600; }
  .mention { color:var(--accent); text-decoration:none; }
  .mention:hover { text-decoration:underline; }
  
  @media (max-width:900px) {
    .top-row { grid-template-columns:1.8rem minmax(0,1fr) 48px; }
    .top-bar-wrap { display:none; }
    .proj-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  }
  @media (max-width:600px) {
    .top-row { grid-template-columns:1.6rem minmax(0,1fr) 44px; gap:7px; }
    .top-org { display:none; }
    .proj-grid { grid-template-columns:1fr; }
  }
  .top-star-icon { vertical-align:-.12em; margin-left:3px; flex-shrink:0; }
  
  /* ══ Density fix: Top is a list, projects are compact cards ══ */
  .top-list { display:flex; flex-direction:column; gap:0; }
  .top-row { display:grid; grid-template-columns:2rem minmax(0,1fr) 54px; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--ghost, var(--rule, #333)); }
  .top-rank { font-size:.72rem; color:var(--muted); text-align:right; min-width:0; }
  .top-info { min-width:0; }
  .top-name { display:flex; align-items:baseline; gap:8px; min-width:0; }
  .top-name > a:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--bright, var(--fg)); text-decoration:none; }
  .top-name > a:first-child:hover { color:var(--accent); }
  .top-org { flex:0 0 auto; font-size:.68rem; color:var(--muted); text-decoration:none; }
  .top-org:hover { color:var(--accent); }
  .top-desc { margin-top:1px; font-size:.68rem; line-height:1.35; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .top-bar-wrap,.top-bar { display:none; }
  .top-stars { font-size:.74rem; font-weight:600; color:var(--accent); text-align:right; white-space:nowrap; }
  
  .proj-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .proj-card { min-width:0; padding:10px; border:1px solid var(--ghost, var(--rule, #ddd)); border-radius:7px; background:var(--surface, var(--card, #fff)); display:flex; flex-direction:column; gap:3px; }
  .proj-card-name a { display:block; color:var(--bright, var(--fg)); text-decoration:none; font-weight:600; font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .proj-card-name a:hover { color:var(--accent); }
  .proj-card-org .gh { display:block; color:var(--muted); text-decoration:none; font-size:.63rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .proj-card-org .gh:hover { color:var(--accent); }
  .proj-card-desc { color:var(--muted); font-size:.66rem; line-height:1.32; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .proj-card-meta { margin-top:auto; padding-top:4px; display:flex; gap:8px; align-items:center; color:var(--muted); font-size:.62rem; }
  .proj-card-stars { margin-left:auto; color:var(--accent); font-weight:600; }
  .mention { color:var(--accent); text-decoration:none; }
  .mention:hover { text-decoration:underline; }
  
  @media (max-width:900px) {
    .top-row { grid-template-columns:1.8rem minmax(0,1fr) 48px; }
    .top-bar-wrap { display:none; }
    .proj-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  }
  @media (max-width:600px) {
    .top-row { grid-template-columns:1.6rem minmax(0,1fr) 44px; gap:7px; }
    .top-org { display:none; }
    .proj-grid { grid-template-columns:1fr; }
  }
  .top-star-icon { vertical-align:-.12em; margin-left:3px; flex-shrink:0; }
  .gh-icon { vertical-align:-.15em; margin-right:2px; flex-shrink:0; opacity:.7; }
  
  /* ══ Density fix: Top is a list, projects are compact cards ══ */
  .top-list { display:flex; flex-direction:column; gap:0; }
  .top-row { display:grid; grid-template-columns:2rem minmax(0,1fr) 54px; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--ghost, var(--rule, #333)); }
  .top-rank { font-size:.72rem; color:var(--muted); text-align:right; min-width:0; }
  .top-info { min-width:0; }
  .top-name { display:flex; align-items:baseline; gap:8px; min-width:0; }
  .top-name > a:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--bright, var(--fg)); text-decoration:none; }
  .top-name > a:first-child:hover { color:var(--accent); }
  .top-org { flex:0 0 auto; font-size:.68rem; color:var(--muted); text-decoration:none; }
  .top-org:hover { color:var(--accent); }
  .top-desc { margin-top:1px; font-size:.68rem; line-height:1.35; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .top-bar-wrap,.top-bar { display:none; }
  .top-stars { font-size:.74rem; font-weight:600; color:var(--accent); text-align:right; white-space:nowrap; }
  
  .proj-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .proj-card { min-width:0; padding:10px; border:1px solid var(--ghost, var(--rule, #ddd)); border-radius:7px; background:var(--surface, var(--card, #fff)); display:flex; flex-direction:column; gap:3px; }
  .proj-card-name a { display:block; color:var(--bright, var(--fg)); text-decoration:none; font-weight:600; font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .proj-card-name a:hover { color:var(--accent); }
  .proj-card-org .gh { display:block; color:var(--muted); text-decoration:none; font-size:.63rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .proj-card-org .gh:hover { color:var(--accent); }
  .proj-card-desc { color:var(--muted); font-size:.66rem; line-height:1.32; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .proj-card-meta { margin-top:auto; padding-top:4px; display:flex; gap:8px; align-items:center; color:var(--muted); font-size:.62rem; }
  .proj-card-stars { margin-left:auto; color:var(--accent); font-weight:600; }
  .mention { color:var(--accent); text-decoration:none; }
  .mention:hover { text-decoration:underline; }
  
  @media (max-width:900px) {
    .top-row { grid-template-columns:1.8rem minmax(0,1fr) 48px; }
    .top-bar-wrap { display:none; }
    .proj-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  }
  @media (max-width:600px) {
    .top-row { grid-template-columns:1.6rem minmax(0,1fr) 44px; gap:7px; }
    .top-org { display:none; }
    .proj-grid { grid-template-columns:1fr; }
  }
  .top-star-icon { vertical-align:-.12em; margin-left:3px; flex-shrink:0; }
  .gh-avatar { vertical-align:middle; margin-right:3px; border-radius:3px; flex-shrink:0; }
  
  /* ══ Density fix: Top is a list, projects are compact cards ══ */
  .top-list { display:flex; flex-direction:column; gap:0; }
  .top-row { display:grid; grid-template-columns:2rem minmax(0,1fr) 54px; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--ghost, var(--rule, #333)); }
  .top-rank { font-size:.72rem; color:var(--muted); text-align:right; min-width:0; }
  .top-info { min-width:0; }
  .top-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; font-size:.88rem; }
  .top-name a { color:var(--bright, var(--fg)); text-decoration:none; }
  .top-name a:hover { color:var(--accent); }
  .top-org-line { margin-top:1px; font-size:.65rem; }
  .top-org-line .gh { color:var(--muted); text-decoration:none; display:inline-flex; align-items:center; gap:3px; }
  .top-org-line .gh:hover { color:var(--accent); }
  .top-desc { margin-top:1px; font-size:.68rem; line-height:1.35; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .top-bar-wrap,.top-bar { display:none; }
  .top-stars { font-size:.74rem; font-weight:600; color:var(--accent); text-align:right; white-space:nowrap; }
  
  .proj-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .proj-card { min-width:0; padding:10px; border:1px solid var(--ghost, var(--rule, #ddd)); border-radius:7px; background:var(--surface, var(--card, #fff)); display:flex; flex-direction:column; gap:3px; }
  .proj-card-name a { display:block; color:var(--bright, var(--fg)); text-decoration:none; font-weight:600; font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .proj-card-name a:hover { color:var(--accent); }
  .proj-card-org .gh { display:block; color:var(--muted); text-decoration:none; font-size:.63rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .proj-card-org .gh:hover { color:var(--accent); }
  .proj-card-desc { color:var(--muted); font-size:.66rem; line-height:1.32; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .proj-card-meta { margin-top:auto; padding-top:4px; display:flex; gap:8px; align-items:center; color:var(--muted); font-size:.62rem; }
  .proj-card-stars { margin-left:auto; color:var(--accent); font-weight:600; }
  .mention { color:var(--accent); text-decoration:none; }
  .mention:hover { text-decoration:underline; }
  
  @media (max-width:900px) {
    .top-row { grid-template-columns:1.8rem minmax(0,1fr) 48px; }
    .top-bar-wrap { display:none; }
    .proj-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  }
  @media (max-width:600px) {
    .top-row { grid-template-columns:1.6rem minmax(0,1fr) 44px; gap:7px; }
    .top-org-line { display:none; }
    .proj-grid { grid-template-columns:1fr; }
  }
  .top-star-icon { vertical-align:-.12em; margin-left:3px; flex-shrink:0; }
  .gh-avatar { vertical-align:middle; margin-right:3px; border-radius:3px; flex-shrink:0; }
}
#theme-toggle{background:none;border:1px solid var(--muted,#8c8c8c);border-radius:8px;color:var(--muted,#8c8c8c);cursor:pointer;font-size:1rem;padding:4px 10px;margin-left:12px;min-width:44px;min-height:44px;}
#theme-toggle:hover{border-color:var(--accent);color:var(--accent);}
.theme-icon-light{display:inline;}.theme-icon-dark{display:none;}
[data-theme="dark"] .theme-icon-light{display:none;}
[data-theme="dark"] .theme-icon-dark{display:inline;}

/* Perf: offscreen sections skip rendering */
.section { content-visibility:auto; contain-intrinsic-size:500px; }

/* A11y: respect reduced motion */
@media (prefers-reduced-motion:reduce) {
  #timeline-chart *, #lang-evo-chart * { animation:none; transition:none; }
}

/* A11y: visible focus ring */
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

a.top-row { text-decoration:none; color:inherit; display:grid; }
.top-handle { font-weight:600; font-size:.82rem; color:var(--accent); flex-shrink:0; }
.top-sep { color:var(--muted); font-size:.7rem; flex-shrink:0; }
.top-repo { font-weight:500; font-size:.9rem; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.org-leaderboard { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin-top:4px; }
.leader-card { background:var(--surface,var(--card,#fff)); border:1px solid var(--rule,#ddd); border-radius:8px; padding:14px; text-decoration:none; color:var(--fg); display:flex; align-items:center; gap:12px; }
.leader-card:hover { border-color:var(--accent); }
.leader-logo { width:36px; height:36px; border-radius:8px; object-fit:cover; flex-shrink:0; background:var(--rule); }
.leader-info { flex:1; min-width:0; }
.leader-name { font-weight:600; font-size:.85rem; line-height:1.2; }
.leader-handle { font-size:.68rem; color:var(--muted); }
.leader-focus { font-size:.62rem; color:var(--accent); text-transform:uppercase; letter-spacing:.04em; margin-top:2px; }
.leader-stats { text-align:right; flex-shrink:0; }
.leader-stars { font-weight:600; font-size:.9rem; }
.leader-count { font-size:.62rem; color:var(--muted); }

.hf-avatar { width:28px; height:28px; border-radius:6px; object-fit:cover; flex-shrink:0; }
.hf-initial { width:28px; height:28px; border-radius:6px; flex-shrink:0; background:var(--accent); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:600; text-transform:uppercase; vertical-align:middle; }
.hf-avatar-wrap { display:inline-flex; position:relative; flex-shrink:0; vertical-align:middle; margin-right:8px; }
.hf-avatar-wrap img { position:absolute; top:0; left:0; z-index:1; }
.hf-avatar-wrap .hf-initial { z-index:0; }

@media (max-width:600px) { .org-leaderboard { grid-template-columns:1fr; } }

