/* jkbc.io — mind garden stylesheet v2
   CSS-only. System fonts only. No external dependencies.
   ──────────────────────────────────────────────────────── */

:root {
    --paper: #f3ebd8;
    --ink: #2a2620;
    --ink-soft: #5b5246;
    --ink-faint: #c4b89a;

    /* old-web blue, pulled back to ~80% saturation so it breathes on cream */
    --link: oklch(42% 0.14 258);
    --link-hover: oklch(32% 0.16 258);
    --link-bg: oklch(91% 0.03 258); /* very faint blue wash on hover */

    --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --measure: 62ch;
    --body-size: 18px;
    --leading: 1.68;
}

/* ── reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background: var(--paper);
}

body {
    margin: 0;
    padding: 52px 24px 140px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: var(--body-size);
    line-height: var(--leading);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern", "liga", "onum", "calt";
    hanging-punctuation: first last;
}

/* ── constrained column ── */
.page {
    max-width: var(--measure);
    margin: 0 auto;
}

/* ── back nav ── */
.back {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 0;
    margin-bottom: 52px;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.back:hover {
    opacity: 1;
    color: var(--ink-soft);
    background: transparent;
    border-bottom: 0;
}
.back::before {
    content: "← ";
}

/* ── note slug ── */
.note-slug {
    clear: both;
    display: block;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    margin-bottom: 0.5em;
    font-variant: small-caps;
    text-transform: lowercase;
}

/* ── headings ── */
h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 2.35em;
    line-height: 1.1;
    letter-spacing: -0.018em;
    margin: 0 0 1.4em;
    color: var(--ink);
    text-wrap: balance;
}

/* section dividers — typographic, not a rule */
h2 {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-faint);
    margin: 3em 0 1em;
    display: flex;
    align-items: center;
    gap: 0.8em;
}
h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ink-faint);
    opacity: 0.5;
}

/* ── body copy ── */
p {
    margin: 0 0 1.15em;
    text-wrap: pretty;
    hyphens: auto;
}

/* drop cap on the very first paragraph of a note */
.note-body > p.lede::first-letter,
.note-body > p:first-of-type::first-letter {
    float: left;
    font-size: 3.4em;
    line-height: 0.82;
    padding-right: 0.07em;
    padding-top: 0.05em;
    font-weight: 600;
    color: var(--ink);
}

/* ── blockquote / epigraph ── */
blockquote {
    margin: 0.5em 0 2.2em;
    padding: 0 0 0 0 !important;
    border: 0 !important;
    border-left: 0 !important;
    color: var(--ink-soft);
    font-size: 1.05em;
    font-style: italic;
    text-align: center !important;
    position: relative;
}
blockquote::before {
    content: "\201C";
    font-size: 3em;
    line-height: 0;
    vertical-align: -0.45em;
    color: var(--ink-faint);
    font-style: normal;
    margin-right: 0.05em;
}
blockquote p {
    display: inline;
    margin: 0;
}
blockquote .attr {
    display: block;
    font-size: 0.82em;
    font-style: normal;
    font-family: var(--mono);
    letter-spacing: 0.04em;
    color: var(--ink-faint);
    margin-top: 0.8em;
    font-variant: small-caps;
    text-transform: lowercase;
    text-align: center;
}

/* ── links — the core gesture ── */
a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 0;
    transition:
        color 0.12s ease,
        background 0.12s ease;
}
a:hover {
    color: var(--link-hover);
    background: var(--link-bg);
}

/* wiki links — [[bracketed]] in monospace */
a.wiki {
    font-family: var(--mono);
    font-size: 0.9em;
    color: var(--link);
    letter-spacing: 0.01em;
}
a.wiki::before {
    content: "[[";
    opacity: 0.45;
    font-size: 0.92em;
}
a.wiki::after {
    content: "]]";
    opacity: 0.45;
    font-size: 0.92em;
}
a.wiki:hover {
    color: var(--link-hover);
    background: var(--link-bg);
}

/* ── lists ── */
ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1em;
}
ul li {
    padding: 0.3em 0 0.3em 1.2em;
    position: relative;
    font-size: 0.96em;
    line-height: 1.45;
}
ul li::before {
    content: "·";
    position: absolute;
    left: 0.2em;
    color: var(--ink-faint);
    font-family: var(--serif);
    font-size: 1.1em;
    line-height: inherit;
}

/* ── footnote refs ── */
a.fn-ref {
    font-family: var(--mono);
    font-size: 9.5px;
    color: var(--link);
    vertical-align: super;
    line-height: 0;
    background: transparent !important;
    border-bottom: 0;
}
a.fn-ref:hover {
    color: var(--link-hover);
    background: var(--link-bg) !important;
}

/* ── footnotes ── */
.footnotes {
    margin-top: 3em;
}
.footnotes h2 {
    /* reuse the same section-header style */
}
.footnotes ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footnotes ol li {
    font-size: 0.86em;
    color: var(--ink-soft);
    margin-bottom: 0.55em;
    font-family: var(--mono);
    letter-spacing: 0.01em;
    padding-left: 1.8em;
    position: relative;
    line-height: 1.5;
}
.footnotes ol li::before {
    content: attr(data-n);
    position: absolute;
    left: 0;
    color: var(--link);
    font-family: var(--mono);
    font-size: 0.95em;
}

/* ── index: intro ── */
.intro {
    margin: 1.4em 0 3em;
    color: var(--ink);
}
.intro p {
    margin-bottom: 0.5em;
}

/* ── ornament divider (optional) ── */
.ornament {
    text-align: center;
    color: var(--ink-faint);
    font-size: 1.1em;
    letter-spacing: 0.5em;
    margin: 2.5em 0;
    user-select: none;
}
