@font-face {
    font-family: "Berkeley Mono";
    src: url("fonts/BerkeleyMono-Regular.ttf") format("ttf");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg:     #f9f9f9;
    --fg:     #111111;
    --dim:    #595959;
    --bright: #000000;
    --link:   #0055cc;
    --border: #dddddd;
    --hover:  #f8f8f8;
    --font:   "Berkeley Mono", monospace;
}

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 13.5px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.7;
    padding: 24px;
}

hr {
    height: 0.5px;
    background-color: var(--border);
    border: none;
}

/* ── Layout ── */
.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 0 80px;
}

/* ── Links ── */
a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Navigation ── */
nav {
    font-size: 0.85rem;
    color: var(--dim);
    margin-bottom: 40px;
}

/* ── Article title ── */
h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bright);
    line-height: 1.4;
    margin-bottom: 6px;
}

/* ── Date ── */
.date {
    font-size: 0.78rem;
    color: var(--dim);
    margin-bottom: 28px;
    font-variant-numeric: tabular-nums;
}

/* ── Prose h2 — section headings inside article ── */
h2 {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bright);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    margin-bottom: 16px;
}

/* ── Prose body ── */
p {
    font-size: 0.88rem;
    line-height: 1.8;
    margin-bottom: 14px;
}

ul {
    list-style: none;
    padding: 0;
    margin-bottom: 14px;
}

li {
    font-size: 0.88rem;
    line-height: 1.8;
    padding: 3px 0 3px 16px;
    position: relative;
}

li::before {
    content: '\00b7';
    position: absolute;
    left: 0;
    color: var(--dim);
}

img { max-width: 100%; }
img[alt*="half"] { max-width: 50%; }
img[alt*="third"] { max-width: 33%; }
img[alt*="full"] { max-width: 100%; }

/* ── Inline code ── */
code {
    background: #f0f0f0;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 1px 4px;
    font-family: var(--font);
    font-size: 0.82rem;
}

/* ── Code blocks ── */
pre {
    background: #f0f0f0;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 8px 12px;
    overflow-x: auto;
    margin: 4px 0 20px;
    font-size: 0.82rem;
    line-height: 1.6;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

/* ── Footer ── */
footer {
    margin-top: 56px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--dim);
    line-height: 1.9;
}

footer a {
    color: var(--dim);
}

footer a:hover {
    color: var(--link);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    html { font-size: 12.5px; }
    body { padding: 16px; }
}

/* ── Syntax highlighting — minimal, matches site palette ── */
.hljs { background: none; color: var(--fg); }
.hljs-keyword { color: #7a3e9d; }
.hljs-built_in { color: #7a3e9d; }
.hljs-type { color: #7a3e9d; }
.hljs-number { color: #0055cc; }
.hljs-string { color: #2a7a2a; }
.hljs-comment { color: var(--dim); font-style: italic; }
.hljs-title { color: var(--fg); }
.hljs-params { color: var(--fg); }
.hljs-literal { color: #0055cc; }
.hljs-operator { color: var(--fg); }
.hljs-punctuation { color: var(--fg); }