:root {
  --bg: #fbfaf8;
  --fg: #1f2328;
  --muted: #69707a;
  --line: #e7e3dd;
  --accent: #b4532a;
  --code-bg: #f2efea;
  --card: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181b;
    --fg: #e4e4e1;
    --muted: #9aa0a7;
    --line: #2b2f34;
    --accent: #e08a5b;
    --code-bg: #1f2227;
    --card: #1b1e22;
  }
}
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.68 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-weight: 700; font-size: 1.05rem; color: var(--fg); text-decoration: none;
}
.logo span { color: var(--accent); }
nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: .95rem; }
nav a:hover, nav a[aria-current] { color: var(--fg); }

main { padding: 44px 20px 72px; }
h1 { font-size: 1.95rem; line-height: 1.25; margin: 0 0 .45em; letter-spacing: -.012em; }
h2 { font-size: 1.32rem; line-height: 1.3; margin: 2em 0 .6em; }
h3 { font-size: 1.08rem; margin: 1.5em 0 .4em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.3em; }
li { margin: .25em 0; }
.lead { font-size: 1.1rem; color: var(--muted); }
.hero { margin-bottom: 8px; }
h2.section { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 40px 0 0; }

.posts { list-style: none; padding: 0; margin: 0; }
.posts li { padding: 20px 0; border-bottom: 1px solid var(--line); margin: 0; }
.posts li p { margin: .3em 0 0; color: var(--muted); font-size: .95rem; }
.posts a.t { font-weight: 600; font-size: 1.1rem; color: var(--fg); text-decoration: none; }
.posts a.t:hover { color: var(--accent); }
.meta { color: var(--muted); font-size: .85rem; }
.posts .meta { font-size: .82rem; }
.tag {
  display: inline-block; font-size: .76rem; line-height: 1.6; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; margin-right: 4px;
}

article h1 { margin-bottom: .3em; }
article > .meta { margin-bottom: 2em; }
pre {
  background: var(--code-bg); padding: 14px 16px; border-radius: 8px; overflow-x: auto;
  font-size: .84rem; line-height: 1.55; tab-size: 4; margin: 0 0 1.2em;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .88em; }
:not(pre) > code { background: var(--code-bg); padding: .12em .36em; border-radius: 4px; }
blockquote { margin: 1.2em 0; padding: .1em 1em; border-left: 3px solid var(--accent); color: var(--muted); }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .92rem; }
.pager a { text-decoration: none; max-width: 48%; }
.pager .next { text-align: right; margin-left: auto; }

.cards { display: grid; gap: 16px; margin: 28px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px 8px; }
.card h3 { margin: 0 0 .4em; }
.card .lang { font-size: .75rem; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 22px; padding-bottom: 40px; }
footer.site a { color: var(--muted); }

@media (max-width: 560px) {
  html { font-size: 16px; }
  nav a { margin-left: 14px; }
  main { padding-top: 32px; }
  h1 { font-size: 1.65rem; }
}
