:root {
  color-scheme: light dark;
  --fg: #1d1d1f; --muted: #6e6e73; --bg: #fbfbfd; --card: #f2f2f5;
  --line: #e3e3e8; --accent: #2f6fde; --code-bg: #f0f0f3;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --fg: #f5f5f7; --muted: #a1a1a6; --bg: #111113; --card: #1a1a1d;
          --line: #2a2a2e; --accent: #6ea0ff; --code-bg: #1c1c20; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.65 var(--sans); color: var(--fg); background: var(--bg); }
a { color: var(--accent); text-underline-offset: 2px; }
.wrap { max-width: 700px; margin: 0 auto; padding: 0 24px; }
.wide { max-width: 1040px; }

header.site { padding: 28px 0 0; }
header.site .wrap { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.brand { font-weight: 700; font-size: 1.05rem; color: var(--fg); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--muted); font-weight: 400; }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: .95rem; }
nav a:first-child { margin-left: 0; }
nav a:hover, nav a[aria-current] { color: var(--fg); }

main { padding: 56px 0 24px; }
h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; margin: 2.2em 0 .6em; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin: 1.8em 0 .5em; }
.sub { color: var(--muted); margin: 0 0 44px; }
.section-title { font-size: .85rem; margin: 48px 0 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { margin: 0 0 22px; }
.list a.t { color: var(--fg); font-weight: 600; text-decoration: none; }
.list a.t:hover { color: var(--accent); }
.list p { margin: 2px 0 0; color: var(--muted); }
time, .meta { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.tags a { color: var(--muted); font-size: .85rem; margin-right: 8px; text-decoration: none; }
.tags a:hover { color: var(--accent); }
.year { font-size: .95rem; color: var(--muted); margin: 36px 0 12px; font-weight: 600; }

article.post header { margin-bottom: 36px; }
article.post p, article.post li { hyphens: auto; }
article.post img { max-width: 100%; height: auto; border-radius: 6px; }
blockquote { margin: 1.2em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--line); color: var(--muted); }
code { font: .88em/1.5 var(--mono); background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 8px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; margin: 1em 0; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.postnav { display: flex; justify-content: space-between; gap: 24px; margin-top: 56px; font-size: .95rem; }

.cards { display: grid; gap: 16px; }
.card { background: var(--card); border-radius: 12px; padding: 18px 20px; }
.card h3 { margin: 0 0 4px; }
.card h3 a { color: var(--fg); text-decoration: none; }
.card p { margin: 4px 0 0; color: var(--muted); }
.badge { display: inline-block; font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; margin-left: 6px; vertical-align: 2px; }
.dl td:last-child, .dl th:last-child { text-align: right; }
.dl code { word-break: break-all; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.grid figure { margin: 0; }
.grid img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; display: block; background: var(--card); }
.grid figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.grid figcaption a { color: var(--muted); }

footer.site { padding: 40px 0 56px; color: var(--muted); font-size: .9rem; }
footer.site a { color: var(--muted); }
@media (max-width: 520px) { h1 { font-size: 1.7rem; } nav a { margin-left: 12px; } main { padding-top: 40px; } }
