:root {
  color-scheme: dark;
  --bg: #050505;
  --fg: #f5f5f5;
  --muted: #9b9b9b;
  --line: #242424;
  --panel: #0b0b0b;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .72; }
::selection { background: #fff; color: #000; }

.site-header,
main,
footer {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}
.site-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; letter-spacing: -.04em; font-size: 1.25rem; }
nav { display: flex; gap: 24px; color: var(--muted); font-size: .92rem; }
nav [aria-current="page"] { color: var(--fg); }

.hero { padding: clamp(80px, 12vw, 160px) 0 clamp(64px, 9vw, 110px); }
.eyebrow {
  margin: 0 0 22px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .72rem;
}
h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(3rem, 8.5vw, 7.5rem);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 700;
}
.intro {
  max-width: 670px;
  margin: 34px 0 0;
  color: #bdbdbd;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
input, select {
  width: 100%;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 13px 14px;
  font: inherit;
  outline: none;
}
input:focus, select:focus { border-color: #656565; }
select { min-width: 190px; cursor: pointer; }
option { background: #111; }

.blog-list { padding: 46px 0 100px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.section-heading h2 { margin: 0; font-size: 1rem; font-weight: 500; }
#post-count { color: var(--muted); font-size: .85rem; }
.post-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.post-card:last-child { border-bottom: 1px solid var(--line); }
.post-date, .post-meta, .post-description { color: var(--muted); }
.post-date { font-size: .82rem; white-space: nowrap; }
.post-title {
  margin: 0 0 9px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.14;
  letter-spacing: -.035em;
}
.post-description { max-width: 760px; margin: 0 0 14px; }
.post-meta { font-size: .8rem; }
.post-arrow { font-size: 1.25rem; padding-top: 4px; }
.empty, .loading, .error { color: var(--muted); padding: 36px 0; }

footer {
  min-height: 110px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: .84rem;
}

.article-shell {
  width: min(calc(100% - 40px), 820px);
  margin-inline: auto;
  padding: 90px 0 120px;
}
.article-back { color: var(--muted); font-size: .9rem; }
.article-kicker { margin: 70px 0 18px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.article-title { font-size: clamp(2.7rem, 7vw, 5.7rem); line-height: .98; letter-spacing: -.055em; margin: 0; }
.article-lead { font-size: 1.25rem; color: #bdbdbd; margin: 30px 0 18px; }
.article-byline { color: var(--muted); font-size: .85rem; padding-bottom: 42px; border-bottom: 1px solid var(--line); }
.article-content { padding-top: 28px; }
.article-content h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -.035em; line-height: 1.1; margin: 64px 0 18px; }
.article-content h3 { margin-top: 40px; font-size: 1.25rem; }
.article-content p, .article-content li { color: #d1d1d1; }
.article-content a { text-decoration: underline; text-underline-offset: 3px; }
.article-content ul { padding-left: 1.25rem; }
.article-content code { background: #111; border: 1px solid var(--line); padding: .08em .35em; }
.article-note { margin: 42px 0; padding: 22px; border: 1px solid var(--line); background: var(--panel); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 60px; }
.article-tags span { border: 1px solid var(--line); padding: 6px 10px; color: var(--muted); font-size: .78rem; }

.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: 760px) {
  .site-header, main, footer, .article-shell { width: min(calc(100% - 28px), var(--max)); }
  .controls { grid-template-columns: 1fr; }
  select { min-width: 0; }
  .post-card { grid-template-columns: 1fr auto; gap: 14px 20px; }
  .post-date { grid-column: 1 / -1; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}
