@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@1,6..72,500&display=swap");

:root {
  --ink: #12231d;
  --muted: #65726b;
  --paper: #f4f1e9;
  --paper-deep: #e9e3d8;
  --card: #fbfaf6;
  --lime: #d7ff63;
  --orange: #ff6a3d;
  --blue: #7fc8ff;
  --line: rgba(18, 35, 29, 0.15);
  --mono: "DM Mono", ui-monospace, monospace;
  --sans: "Manrope", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}

.site-header {
  height: 82px;
  padding: 0 clamp(24px, 5vw, 80px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-mark {
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.brand-divider { height: 22px; width: 1px; background: var(--line); }
nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 44px); }
nav a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.github-link { display: flex; align-items: center; gap: 8px; }
.github-link svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.hero {
  min-height: 670px;
  padding: 74px clamp(24px, 7vw, 110px) 82px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 60px;
  overflow: hidden;
}
.eyebrow {
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
}
.eyebrow span { width: 26px; height: 2px; background: var(--orange); }
h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(62px, 7vw, 112px);
  line-height: 0.84;
  letter-spacing: -0.075em;
  font-weight: 600;
}
h1 em { font-family: var(--serif); font-weight: 500; color: var(--orange); }
.hero-intro {
  max-width: 520px;
  margin: 38px 0 32px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  padding: 16px 19px 16px 24px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease;
}
.primary-action:hover { transform: translateY(-2px); background: #263c34; }
.primary-action svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 540px;
  margin-inline: auto;
}
.orbit {
  position: absolute;
  border: 1px solid rgba(18, 35, 29, 0.22);
  border-radius: 50%;
  inset: 9%;
}
.orbit-one { transform: rotate(11deg) scaleY(0.72); }
.orbit-two { transform: rotate(-55deg) scaleY(0.68); border-style: dashed; }
.hero-stamp {
  position: absolute;
  inset: 23%;
  border-radius: 50%;
  background: var(--lime);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 22px 60px rgba(48, 74, 36, 0.17);
  transform: rotate(-5deg);
}
.hero-stamp span {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.hero-stamp strong { font-size: clamp(62px, 7vw, 96px); line-height: 0.95; letter-spacing: -0.08em; }
.avatar-stack img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--paper);
  position: absolute;
  box-shadow: 0 7px 20px rgba(18, 35, 29, 0.15);
}
.avatar-stack img:nth-child(1) { left: 5%; top: 19%; }
.avatar-stack img:nth-child(2) { right: 2%; top: 27%; width: 82px; height: 82px; }
.avatar-stack img:nth-child(3) { left: 16%; bottom: 4%; width: 62px; height: 62px; }
.avatar-stack img:nth-child(4) { right: 15%; bottom: 3%; width: 57px; height: 57px; }
.spark, .code-tag { position: absolute; font-family: var(--mono); }
.spark-one { left: 23%; top: 7%; color: var(--orange); font-size: 23px; }
.spark-two { right: 15%; bottom: 25%; font-size: 14px; }
.code-tag { background: var(--blue); padding: 7px 10px; border-radius: 4px; font-size: 12px; }
.code-tag-one { right: 11%; top: 10%; transform: rotate(8deg); }
.code-tag-two { left: 0; bottom: 25%; background: var(--orange); color: white; transform: rotate(-7deg); }

.stat-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 clamp(24px, 5vw, 80px);
}
.stat-strip article { position: relative; min-height: 180px; padding: 38px 30px; border-left: 1px solid var(--line); }
.stat-strip article:last-child { border-right: 1px solid var(--line); }
.stat-index { position: absolute; right: 16px; top: 14px; color: #9aa39e; font: 10px var(--mono); }
.stat-strip strong { display: block; font-size: clamp(38px, 4vw, 58px); letter-spacing: -0.06em; }
.stat-strip p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.leaders-section { padding: 110px clamp(24px, 6vw, 90px) 130px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 48px; }
h2 { margin: 0; font-size: clamp(46px, 5vw, 76px); line-height: 0.95; letter-spacing: -0.065em; }
.section-heading .eyebrow { margin-bottom: 20px; }
.updated { font: 11px var(--mono); color: var(--muted); }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; margin-bottom: 56px; }
.podium-card {
  position: relative;
  min-height: 310px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.podium-card:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(31, 42, 37, 0.09); }
.podium-card.first { min-height: 348px; background: var(--ink); color: white; order: 2; }
.podium-card.second { order: 1; }
.podium-card.third { order: 3; }
.podium-rank { position: absolute; right: 22px; top: 12px; font-size: 90px; line-height: 1; letter-spacing: -0.1em; color: rgba(18, 35, 29, 0.06); }
.first .podium-rank { color: rgba(255,255,255,.08); }
.podium-person { display: flex; gap: 15px; align-items: center; margin-top: auto; position: relative; z-index: 1; }
.podium-person img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; background: var(--paper-deep); }
.podium-person strong { display: block; font-size: 18px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.podium-person span { font: 10px var(--mono); opacity: .62; }
.podium-score { margin: 28px 0 0; border-top: 1px solid currentColor; border-color: rgba(101,114,107,.24); padding-top: 18px; display: flex; justify-content: space-between; }
.podium-score strong { font-size: 30px; letter-spacing: -.05em; }
.podium-score span { font: 9px var(--mono); opacity: .62; text-transform: uppercase; }
.loading-card { grid-column: 1 / -1; padding: 80px; text-align: center; color: var(--muted); }

.table-shell { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(251,250,246,.52); }
.table-tools { padding: 18px; display: flex; gap: 14px; justify-content: space-between; border-bottom: 1px solid var(--line); }
.search { min-width: min(390px, 50%); display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); padding: 10px 12px; border-radius: 8px; }
.search svg { width: 17px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
kbd { color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; font: 10px var(--mono); }
.filters { display: flex; gap: 8px; }
select { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 10px 34px 10px 12px; color: var(--ink); font-size: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th { color: var(--muted); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .11em; text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); }
td { padding: 16px 20px; border-bottom: 1px solid rgba(18,35,29,.09); font-size: 12px; }
tbody tr { transition: background 120ms ease; }
tbody tr:hover { background: rgba(215,255,99,.16); }
.rank-cell { font: 12px var(--mono); color: var(--muted); width: 70px; }
.contributor { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.contributor img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--paper-deep); }
.contributor a { font-weight: 700; text-decoration: none; }
.contributor a:hover { text-decoration: underline; }
.contributor small { display: block; color: var(--muted); font: 9px var(--mono); margin-top: 3px; }
.impact { font-weight: 700; }
.impact small { display: block; color: var(--muted); font: 8px var(--mono); text-transform: uppercase; margin-top: 2px; }
.repo-list { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; }
.chip { display: inline-block; background: var(--paper-deep); border-radius: 999px; padding: 5px 8px; font: 9px var(--mono); white-space: nowrap; }
.chip.more { background: var(--ink); color: white; }
.load-more {
  display: block;
  margin: 20px auto;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  padding: 5px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.empty-state { padding: 60px; color: var(--muted); text-align: center; }

.method-section {
  background: var(--ink);
  color: #f7f4eb;
  padding: 110px clamp(24px, 7vw, 110px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(60px, 12vw, 180px);
}
.eyebrow.light { color: rgba(255,255,255,.54); }
.method-copy > p { margin: 0 0 42px; color: rgba(255,255,255,.65); font-size: 16px; line-height: 1.75; }
.formula { border-top: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); padding: 22px 0; display: flex; align-items: center; justify-content: space-between; }
.formula span { font: 10px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.formula strong { color: var(--lime); font: 20px var(--mono); }
.method-copy dl { margin: 0; }
.method-copy dl div { display: grid; grid-template-columns: 42px 1fr; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.method-copy dt { font: 13px var(--mono); color: var(--orange); }
.method-copy dd { margin: 0; font-size: 12px; color: rgba(255,255,255,.75); }
.method-copy .caveat { margin: 25px 0 0; font: 9px/1.7 var(--mono); color: rgba(255,255,255,.4); }

footer { min-height: 190px; padding: 50px clamp(24px, 5vw, 80px); display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 40px; color: var(--muted); }
footer p { margin: 0; font: 9px var(--mono); }
.footer-mark { font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -.06em; }
.footer-mark span { color: var(--orange); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  nav a:not(.github-link) { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 60px; gap: 30px; }
  .hero-visual { width: min(100%, 480px); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip article:nth-child(3) { border-top: 1px solid var(--line); }
  .stat-strip article:nth-child(4) { border-top: 1px solid var(--line); }
  .podium { grid-template-columns: 1fr; }
  .podium-card, .podium-card.first { order: initial; min-height: 235px; }
  .podium-card.first { order: -1; }
  .method-section { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 620px) {
  .site-header { height: 70px; }
  .brand > span:last-child { display: none; }
  .brand-divider { display: none; }
  .hero { min-height: auto; }
  h1 { font-size: clamp(54px, 17vw, 82px); }
  .hero-intro { font-size: 15px; }
  .hero-visual { margin-top: 10px; }
  .avatar-stack img { transform: scale(.8); }
  .stat-strip { padding: 0; }
  .stat-strip article { min-height: 140px; padding: 30px 20px; }
  .leaders-section { padding-top: 78px; }
  .section-heading { align-items: flex-start; gap: 20px; flex-direction: column; }
  .table-tools { flex-direction: column; }
  .search { min-width: 100%; }
  .filters { width: 100%; }
  .filters label { flex: 1; }
  select { width: 100%; }
  .method-section { padding-top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
