:root{--bg:#fff;--fg:#1a1a1a;--muted:#6b6b6b;--line:#e6e6e6;--accent:#2b5fd9;--code:#f5f5f5}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#141414;--fg:#e8e8e8;--muted:#9a9a9a;--line:#2a2a2a;--accent:#7aa2ff;--code:#1e1e1e}}
:root[data-theme=dark]{--bg:#141414;--fg:#e8e8e8;--muted:#9a9a9a;--line:#2a2a2a;--accent:#7aa2ff;--code:#1e1e1e}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font:18px/1.7 Georgia,"Times New Roman",serif}
header,main,footer{max-width:680px;margin:0 auto;padding:0 20px}
header{display:flex;justify-content:space-between;align-items:baseline;padding-top:32px;padding-bottom:20px;border-bottom:1px solid var(--line);font-family:system-ui,sans-serif}
header .site{font-weight:700;color:var(--fg);text-decoration:none;font-size:1.1rem}
nav a{margin-left:18px;color:var(--muted);text-decoration:none;font-size:.95rem}
nav a:hover{color:var(--fg)}
main{padding-top:32px;padding-bottom:48px}
footer{color:var(--muted);font:14px system-ui,sans-serif;padding-bottom:40px}
a{color:var(--accent)}
h1{font-size:2rem;line-height:1.25;margin:.3em 0 1em}
.tagline{color:var(--muted);margin-top:0}
.meta{font:14px system-ui,sans-serif;color:var(--muted);margin:0}
.tag{text-transform:uppercase;letter-spacing:.06em;font-size:11px;font-weight:600;border:1px solid var(--line);border-radius:4px;padding:1px 6px;margin-right:6px}
.posts{list-style:none;padding:0}
.posts li{padding:20px 0;border-bottom:1px solid var(--line)}
.posts li[hidden]{display:none}
.posts h2{margin:.2em 0;font-size:1.35rem;line-height:1.3}
.posts h2 a{color:var(--fg);text-decoration:none}
.posts h2 a:hover{color:var(--accent)}
.posts p{margin:.3em 0}
.filters{margin:16px 0 0;font-family:system-ui,sans-serif}
.filters button{background:none;border:1px solid var(--line);color:var(--muted);border-radius:99px;padding:4px 14px;margin-right:8px;font:inherit;font-size:14px;cursor:pointer;text-transform:capitalize}
.filters button.on{background:var(--fg);color:var(--bg);border-color:var(--fg)}
.prose img{max-width:100%;height:auto}
.prose pre{background:var(--code);padding:14px;border-radius:6px;overflow-x:auto;font-size:.85rem;line-height:1.5}
.prose code{background:var(--code);padding:1px 5px;border-radius:4px;font-size:.88em}
.prose pre code{background:none;padding:0}
.prose blockquote{margin:1.2em 0;padding-left:16px;border-left:3px solid var(--line);color:var(--muted)}
.prose table{border-collapse:collapse;width:100%;font-size:.9rem;display:block;overflow-x:auto}
.prose th,.prose td{border:1px solid var(--line);padding:6px 10px;text-align:left}
.prose h2{margin-top:2em}
.intro{padding-bottom:12px;border-bottom:1px solid var(--line)}
.intro h1{font-size:2.4rem;margin:0 0 .4em}
.section{font:600 13px system-ui,sans-serif;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:32px 0 0}
.prose figure{margin:1.5em 0}.prose figcaption{font:14px system-ui,sans-serif;color:var(--muted);text-align:center;margin-top:6px}
.prose .refs{font-size:.6em;overflow-wrap:anywhere}

.theme{background:none;border:1px solid var(--line);border-radius:99px;width:38px;height:38px;font-size:18px;line-height:1;cursor:pointer;transition:border-color .2s}
.theme:hover{border-color:var(--accent)}
.prose img{cursor:zoom-in}
.lightbox{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;padding:24px;cursor:zoom-out}
.lightbox[hidden]{display:none}
.lightbox img{max-width:100%;max-height:100%;width:auto;height:auto;background:#fff;border-radius:4px;cursor:zoom-out}
.prose figure.wide,.prose figure.full{width:min(860px,calc(100vw - 40px));position:relative;left:50%;transform:translateX(-50%)}
.prose figure.full{width:min(1100px,calc(100vw - 40px))}
