:root {
  color-scheme: dark;
  --bg: #0d0c0a; --surface: #171511; --surface-2: #201d17;
  --text: #f3efe6; --soft: #d9d3c5; --muted: #a69f90; --border: #2e2a22;
  --accent: #e9c46a;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main { max-width: 960px; margin: 0 auto; padding: 56px 16px 80px; }
a { color: var(--accent); }

/* header */
.hero { display: flex; gap: 32px; align-items: center; margin-bottom: 40px; }
.logo { width: 140px; height: 140px; flex: none; border-radius: 50%; border: 3px solid var(--accent); }
.hero h1 { font-size: 2.6rem; line-height: 1.1; margin: 0 0 6px; letter-spacing: -0.02em; }
.tagline { margin: 0 0 14px; color: var(--soft); font-size: 1.05rem; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--muted); text-decoration: none; font-size: 0.88rem;
  transition: border-color .15s, color .15s;
}
.links a:hover { border-color: var(--accent); color: var(--text); }
.links svg { width: 14px; height: 14px; fill: currentColor; }
.links img { width: 16px; height: 16px; border-radius: 4px; }

/* sections */
section { margin-bottom: 48px; }
h2 {
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent);
  margin: 0 0 14px; display: flex; align-items: center; gap: 12px;
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
h3 { font-size: 1rem; margin: 24px 0 10px; }
.prose { max-width: 68ch; color: var(--soft); }
.prose p { margin: 0 0 12px; }
.note { margin: 14px 0 0; color: var(--muted); font-size: 0.85rem; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 10px 14px; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
tr + tr td { border-top: 1px solid var(--border); }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
td.name a { color: var(--text); }
.muted { color: var(--muted); }
.medal { font-size: 1.15rem; line-height: 1; }

/* lists */
.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: 10px 0; border-top: 1px solid var(--border); color: var(--soft); }
.list li:last-child { border-bottom: 1px solid var(--border); }
.list li span { color: var(--muted); }
.list a { color: inherit; text-decoration: none; }
.list a:hover { color: var(--accent); }

/* stack */
.tags { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tags div { padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.tags h3 { margin: 0 0 10px; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.tags ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.85rem; }

footer { color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); padding-top: 16px; }

@media (max-width: 600px) {
  .hero { flex-direction: column; text-align: center; gap: 20px; }
  .links { justify-content: center; }
  .logo { width: 112px; height: 112px; }
  .hero h1 { font-size: 2.1rem; }
}
code { font: 0.85em ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--soft); }

/* top-5 contest finishes */
table.contests { table-layout: fixed; min-width: 760px; }
.c-rank { width: 9%; } .c-name { width: 31%; } .c-plat { width: 15%; } .c-date { width: 13%; } .c-find { width: 22%; } .c-post { width: 10%; }
table.contests td { overflow: hidden; text-overflow: ellipsis; }
.rest tr:first-child td { border-top: 1px solid rgba(233, 196, 106, .25); }

/* selected findings */
.findings { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.finding {
  display: flex; flex-direction: column; gap: 8px; padding: 18px 20px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: inherit; text-decoration: none; transition: border-color .15s, background .15s;
}
.finding:hover { border-color: var(--accent); background: var(--surface-2); }
.finding-top { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--muted); }
.sev {
  padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2);
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--soft);
}
.finding h3 { margin: 0; font-size: 1.02rem; line-height: 1.35; }
.finding p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.finding-link { margin-top: auto; padding-top: 4px; font-size: 0.8rem; color: var(--accent); }
@media (max-width: 600px) { .findings { grid-template-columns: 1fr; } }
.pill-note { color: var(--muted); opacity: .75; }
td.firm img { width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; margin-right: 8px; }

/* stats strip */
.stats {
  display: flex; width: fit-content; margin: -8px 0 48px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden;
}
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 22px; color: inherit; text-decoration: none; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat b { font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.82rem; }
.stat.main b { color: var(--accent); }
a.stat:hover { background: var(--surface-2); }
@media (max-width: 600px) { .stats { margin-left: auto; margin-right: auto; } }
.rest td, .rest td.name a, .rest td a { color: var(--muted); }
.rest td a:hover { color: var(--accent); }
.rest .medal { opacity: .7; }
.tags li { display: inline-flex; align-items: center; gap: 6px; }
.tags svg { width: 13px; height: 13px; fill: currentColor; color: var(--muted); flex: none; }
