@charset "UTF-8";
/* ── Design tokens ────────────────────────────────────────── */
:root { color-scheme: dark; /* Dark theme (default) */ --background: #02040a; --elevated: #070912; /* header / sidebar surface */ --hover: #0d1019; /* nav hover surface */ --heading: #e7eaf0; /* bright silver */ --foreground: #c2c7d0; /* silver body text */ --muted: #7b818c; /* secondary text */ --faint: #565b65; /* line numbers, hints */ --border: #171a22; --border-hover: #232732; --header-bg: rgba(2, 4, 10, 0.72); --selection: rgba(255, 255, 255, 0.16); --cc-ship: #f1c40f; --cc-green: #2ecc71; --cc-tldr: #2dd4bf; --radius: 0.5rem; --content-w: 720px; --sidebar-w: 250px; --header-h: 56px; --max-w: 1400px; }

/* Light theme — Thinking Machines palette: white paper, gruvbox ink + orange. Duplicated across the media query (follows the OS) and [data-theme="light"] (manual toggle) because CSS can't share a token block between the two — keep the two blocks in sync. */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { color-scheme: light; --background: #f4ecda; --elevated: #ece2cb; --hover: #e5d9bd; --heading: #0f005a; --foreground: #0f005a; --muted: #5c5680; --faint: #9a95b8; --border: #dccfb0; --border-hover: #cabf9a; --header-bg: rgba(244, 236, 218, 0.82); --selection: rgba(15, 0, 90, 0.12); --cc-ship: #c2740c; --cc-green: #1f9e57; --cc-tldr: #0d9488; } }
:root[data-theme="light"] { color-scheme: light; --background: #f4ecda; --elevated: #ece2cb; --hover: #e5d9bd; --heading: #0f005a; --foreground: #0f005a; --muted: #5c5680; --faint: #9a95b8; --border: #dccfb0; --border-hover: #cabf9a; --header-bg: rgba(244, 236, 218, 0.82); --selection: rgba(15, 0, 90, 0.12); --cc-ship: #c2740c; --cc-green: #1f9e57; --cc-tldr: #0d9488; }

/* ── Base ─────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }

body { margin: 0; background: var(--background); color: var(--foreground); font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

::selection { background: var(--selection); color: var(--heading); }

a { color: inherit; }

/* ── Header ───────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--header-bg); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }

.site-header-inner { max-width: none; margin: 0; height: var(--header-h); display: flex; align-items: center; gap: 0.75rem; padding: 0 1.25rem; }

.site-title { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--heading); text-decoration: none; font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em; }

.spacer { flex: 1; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease; }

.icon-btn:hover { color: var(--heading); background: var(--hover); border-color: var(--border); }

.icon { width: 18px; height: 18px; flex: none; }

/* Theme toggle: show the sun in dark mode (click → light), moon in light mode. Mirrors the token logic above so the right glyph shows with no JS flash. */
.theme-moon { display: none; }

@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-moon { display: block; } }
:root[data-theme="light"] .theme-sun { display: none; }

:root[data-theme="light"] .theme-moon { display: block; }

:root[data-theme="dark"] .theme-sun { display: block; }

:root[data-theme="dark"] .theme-moon { display: none; }

/* ── Layout shell ─────────────────────────────────────────── */
.layout { max-width: none; margin: 0; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); align-items: start; }

html[data-sidebar="closed"] .layout { grid-template-columns: minmax(0, 1fr); }

html[data-sidebar="closed"] .sidebar { display: none; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar { position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 1.75rem 0.75rem 2rem 1.25rem; border-right: 1px solid var(--border); }

.sidebar-nav { display: flex; flex-direction: column; gap: 0.1rem; }

.nav-link { display: block; padding: 0.4rem 0.7rem; border-radius: var(--radius); color: var(--muted); text-decoration: none; font-size: 0.9rem; line-height: 1.4; transition: color 0.15s ease, background 0.15s ease; }

.nav-link:hover { color: var(--heading); background: var(--hover); }

.nav-link.active { color: var(--heading); font-weight: 500; background: var(--hover); }

.nav-children { display: flex; flex-direction: column; gap: 0.1rem; margin: 0.1rem 0 0.4rem 0.7rem; padding-left: 0.6rem; border-left: 1px solid var(--border); }

.nav-sub { font-size: 0.85rem; padding: 0.32rem 0.7rem; }

.sidebar-backdrop { display: none; }

/* ── Content column ───────────────────────────────────────── */
.content { min-width: 0; padding: 0 1.25rem; }

main { max-width: var(--content-w); margin: 0 auto; padding: 3.5rem 0 2rem; overflow-wrap: break-word; /* keep long words from widening the page */ }

/* ── Prose typography ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { color: var(--heading); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; margin: 2.5rem 0 1rem; scroll-margin-top: calc(var(--header-h) + 1rem); }

h1 { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-optical-sizing: auto; font-weight: 460; /* stays elegant, not heavy, at large sizes */ /* Fluid instead of a flat size: at 2.7rem the title towered over the 16px body copy at every width, and had no mobile step-down at all. */ font-size: clamp(1.85rem, calc(1.5rem + 1.5vw), 2.35rem); line-height: 1.15; margin-top: 0; letter-spacing: -0.02em; }

h2 { font-size: 1.5rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--border); }

h3 { font-size: 1.2rem; }

h4, h5, h6 { font-size: 1rem; }

p { margin: 0 0 1.25rem; }

main a { color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--border-hover); overflow-wrap: anywhere; /* long bare URLs must wrap on phones */ transition: text-decoration-color 0.15s ease, color 0.15s ease; }

main a:hover { color: var(--heading); text-decoration-color: var(--muted); }

strong, b { color: var(--heading); font-weight: 600; }

/* Inline arrows (auto-upgraded from "->" / "→" by a small script) */
.arrow { display: inline-block; width: 0.92em; height: 0.92em; vertical-align: -0.13em; margin: 0 0.1em; color: var(--muted); }

ul, ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }

li { margin: 0.4rem 0; }

li::marker { color: var(--muted); }

blockquote { margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1.1rem; border-left: 2px solid var(--border-hover); color: var(--muted); font-style: italic; }

hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }

img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ── Code ─────────────────────────────────────────────────── */
code, kbd, pre { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

code { font-size: 0.85em; background: var(--elevated); border: 1px solid var(--border); padding: 0.12em 0.4em; border-radius: 6px; }

/* Fenced blocks: the box lives on the wrapper so line-number tables read as one block, and the top strip holds the language label (left) + copy button (right) without ever overlapping the code. Scoped to div. so inline code (which Kramdown also tags .highlighter-rouge) keeps the plain pill above. */
div.highlighter-rouge { position: relative; margin: 1.5rem 0; padding-top: 2.4rem; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.82rem; line-height: 1.6; }

.highlight { overflow-x: auto; border-top: 1px solid var(--border); }

.highlight pre { margin: 0; background: none; border: 0; }

.highlight > pre, .highlight .rouge-code pre { padding: 1rem 1.1rem; }

.highlight .rouge-gutter pre { padding: 1rem 0 1rem 1.1rem; }

.highlight table { width: 100%; border-collapse: collapse; margin: 0; }

.highlight td { padding: 0; border: 0; vertical-align: top; }

.highlight .rouge-gutter, .highlight .lineno { color: var(--faint); text-align: right; padding-right: 1rem; user-select: none; -webkit-user-select: none; }

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

/* Keep highlighting quiet: only dim comments, everything else = code color. */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs { color: var(--faint); font-style: italic; }

/* Language label (CSS-only, no JS — add a line per language you actually use) */
div.highlighter-rouge::before { content: ""; position: absolute; top: 0; left: 0; display: flex; align-items: center; height: 2.4rem; padding-left: 1.1rem; font-family: "Geist Mono", monospace; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); pointer-events: none; }

div.highlighter-rouge.language-python::before { content: "python"; }

div.highlighter-rouge.language-bash::before, div.highlighter-rouge.language-shell::before, div.highlighter-rouge.language-sh::before { content: "bash"; }

div.highlighter-rouge.language-javascript::before, div.highlighter-rouge.language-js::before { content: "javascript"; }

div.highlighter-rouge.language-typescript::before, div.highlighter-rouge.language-ts::before { content: "typescript"; }

div.highlighter-rouge.language-json::before { content: "json"; }

div.highlighter-rouge.language-yaml::before, div.highlighter-rouge.language-yml::before { content: "yaml"; }

div.highlighter-rouge.language-html::before { content: "html"; }

div.highlighter-rouge.language-css::before { content: "css"; }

div.highlighter-rouge.language-scss::before { content: "scss"; }

div.highlighter-rouge.language-markdown::before { content: "markdown"; }

/* Copy button (added by JS; echoes .icon-btn) */
.copy-btn { position: absolute; top: 0.45rem; right: 0.5rem; display: inline-flex; align-items: center; gap: 0.3rem; height: 28px; padding: 0 0.5rem; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--muted); font-family: "Geist Mono", monospace; font-size: 0.72rem; line-height: 1; cursor: pointer; transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease; }

.copy-btn:hover, .copy-btn:focus-visible { color: var(--heading); background: var(--hover); border-color: var(--border); }

.copy-btn .icon { width: 14px; height: 14px; }

.copy-btn.copied { color: #2ecc71; background: color-mix(in srgb, #2ecc71 12%, transparent); border-color: color-mix(in srgb, #2ecc71 40%, transparent); }

/* ── Callouts ─────────────────────────────────────────────── */
/* Author with Obsidian syntax:  > [!note] Optional title > body text A script tags the blockquote with .callout + data-callout="<type>" and a Lucide icon. Untagged blockquotes keep the plain blockquote styling above. Per-type accent is one token: --callout-color (border + icon + faint tint). */
.callout { --callout-color: var(--muted); margin: 1.5rem 0; padding: 0.85rem 1.1rem; border: 1px solid color-mix(in srgb, var(--callout-color) 45%, transparent); border-radius: var(--radius); background: color-mix(in srgb, var(--callout-color) 7%, var(--elevated)); /* body text = a readable tint of the callout color: mixing with --foreground keeps it light on dark and dark on white automatically. */ color: color-mix(in srgb, var(--callout-color) 50%, var(--foreground)); font-style: normal; /* override the plain blockquote italic */ }

.callout > :first-child { margin-top: 0; }

.callout > :last-child { margin-bottom: 0; }

.callout p, .callout li { font-style: normal; color: inherit; }

.callout-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; color: var(--callout-color); font-weight: 600; }

.callout-title .callout-icon { flex: none; width: 1.15em; height: 1.15em; }

/* Standard types (token-derived so both themes hold up) */
.callout[data-callout="note"] { --callout-color: var(--muted); }

.callout[data-callout="info"] { --callout-color: #3498db; }

.callout[data-callout="tip"], .callout[data-callout="hint"], .callout[data-callout="important"] { --callout-color: #12b5a8; }

.callout[data-callout="warning"], .callout[data-callout="caution"] { --callout-color: #e0902b; }

.callout[data-callout="danger"], .callout[data-callout="error"], .callout[data-callout="bug"] { --callout-color: #e5484d; }

.callout[data-callout="success"], .callout[data-callout="check"], .callout[data-callout="done"] { --callout-color: var(--cc-green); }

.callout[data-callout="question"], .callout[data-callout="help"], .callout[data-callout="quote"] { --callout-color: var(--border-hover); }

.callout[data-callout="example"] { --callout-color: #8b5cf6; }

/* Custom types */
.callout[data-callout="heart"] { --callout-color: #ff8ff7; }

.callout[data-callout="def"] { --callout-color: var(--cc-green); }

.callout[data-callout="target"] { --callout-color: #3498db; }

.callout[data-callout="ship"] { --callout-color: var(--cc-ship); }

.callout[data-callout="confetti"] { --callout-color: #b266ff; }

.callout[data-callout="tldr"] { --callout-color: var(--cc-tldr); }

.callout[data-callout="grill"] { --callout-color: #b23b32; }

/* ── AI-assist disclaimer (reusable: <p class="ai-disclaimer"> <svg fill="currentColor" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>OpenAI</title><path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg> <span>GPT 5.6 Sol was used to assist me in writing this post.</span>
</p>
) ─ */
.ai-disclaimer { display: flex; align-items: center; gap: 0.45rem; margin: 1.75rem 0; color: var(--muted); font-size: 0.8rem; font-style: italic; }

.ai-disclaimer svg { flex: none; width: 15px; height: 15px; }

/* ── Tags + "Copy as Markdown" row (note header) ──────────── */
.note-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; }

.md-copy { flex: none; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--elevated); color: var(--muted); font-family: "Geist Mono", monospace; font-size: 0.78rem; cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease; }

.md-copy:hover { border-color: var(--border-hover); color: var(--heading); }

.md-copy .md-copy-mark { flex: none; width: 19px; height: auto; }

.md-copy.copied { color: var(--cc-green); border-color: color-mix(in srgb, var(--cc-green) 45%, transparent); }

/* ── Table of contents ────────────────────────────────────── */
/* Auto-generated: a script (default.html) builds <ul id="markdown-toc"> from each post's h2/h3 on load and drops it in the left rail, so authors never hand-maintain a TOC. A legacy inline "* TOC / {:toc}" block is still honored if present. These rules also style that fallback inline TOC. */
.post-toc-title { margin: 2rem 0 0.6rem; padding: 0; border: 0; /* drop the default h2 underline */ color: var(--muted); font-family: "Geist Mono", monospace; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

#markdown-toc { margin: 0 0 2rem; padding: 0.9rem 1.2rem 0.9rem 2.1rem; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; }

#markdown-toc ul { margin: 0.2rem 0 0; padding-left: 1.1rem; }

#markdown-toc li { margin: 0.2rem 0; }

#markdown-toc li::marker { color: var(--faint); }

#markdown-toc a { color: var(--muted); text-decoration: none; }

#markdown-toc a:hover { color: var(--heading); text-decoration: underline; }

/* ── Post layout: sticky TOC (left) + source sidenotes (right) ─ */
/* note.html builds three rails; a script (default.html) relocates #markdown-toc into the left rail and the Kramdown .footnotes into the right rail as sidenotes aligned to their references. Falls back to inline TOC + footnotes with no JS. Posts get a wider shell so the rails have room. */
body.is-post { --max-w: 1680px; --toc-w: 230px; --notes-w: 230px; }

body.is-post main { max-width: none; padding-top: 2.75rem; }

.post { position: relative; display: grid; grid-template-columns: var(--toc-w) minmax(0, var(--content-w)) var(--notes-w); justify-content: center; /* center the reading column */ column-gap: 4.5rem; }

.post-main { min-width: 0; }

/* Left rail — sticky contents */
.post-toc-rail { position: sticky; top: calc(var(--header-h) + 1.75rem); align-self: start; max-height: calc(100vh - var(--header-h) - 3rem); overflow-y: auto; font-size: 0.82rem; line-height: 1.5; }

.post-toc-rail:empty { display: none; }

.post-toc-rail:not(:empty) { padding: 1.1rem 1.2rem; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius); }

.post-toc-rail .post-toc-title { margin: 0 0 0.7rem; }

/* Collapsible TOC: a caret toggle on the title; collapsed hides the list. */
.post-toc-title.toc-toggle { cursor: pointer; display: flex; align-items: center; gap: 0.45rem; }

.post-toc-title.toc-toggle::before { content: ""; flex: none; width: 0; height: 0; border-left: 4px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent; transition: transform 0.15s ease; }

.post-toc-rail:not(.toc-collapsed) .post-toc-title.toc-toggle::before { transform: rotate(90deg); }

.post-toc-rail.toc-collapsed #markdown-toc { display: none; }

.post-toc-rail #markdown-toc { margin: 0; padding: 0; background: none; border: 0; list-style: none; font-size: inherit; }

.post-toc-rail #markdown-toc ul { list-style: none; margin: 0.3rem 0 0; padding-left: 0.85rem; }

.post-toc-rail #markdown-toc li { margin: 0.35rem 0; }

.post-toc-rail #markdown-toc li::marker { content: ""; }

.post-toc-rail #markdown-toc a { display: block; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; margin-left: -0.85rem; padding-left: 0.85rem; transition: color 0.15s ease, border-color 0.15s ease; }

.post-toc-rail #markdown-toc a:hover { color: var(--heading); }

.post-toc-rail #markdown-toc a.is-active { color: var(--heading); border-left-color: var(--heading); }

/* Right rail — source sidenotes */
.post-sources { position: relative; }

.sidenote { position: absolute; left: 0; width: 100%; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }

.sidenote p { margin: 0; font-size: inherit; color: inherit; }

.sidenote a { overflow-wrap: anywhere; }

.sidenote-num { color: var(--muted); font-weight: 600; font-size: 0.72rem; margin-right: 0.35rem; }

/* Footnote reference markers in the prose */
.post-body sup[id^="fnref"] a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.72em; padding: 0 0.15em; }

.post-body sup[id^="fnref"] a:hover { color: var(--heading); }

.sidenote a:hover { color: var(--heading); }

/* Collapse to a single column: TOC boxed on top, sources stacked at the bottom */
@media (max-width: 1180px) { body.is-post { --max-w: 1400px; }
  .post { display: block; }
  .post-toc-rail { position: static; max-height: none; overflow: visible; margin-bottom: 2rem; }
  .post-toc-rail:not(:empty) { padding: 0.9rem 1.2rem; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius); }
  .post-sources { position: static; margin-top: 2.5rem; }
  .post-sources:not(:empty) { border-top: 1px solid var(--border); padding-top: 1.25rem; }
  .sidenote { position: static; width: auto; margin: 0 0 1rem; } }
/* ── Mermaid diagrams ─────────────────────────────────────── */
.mermaid { margin: 1.5rem 0; padding: 1.2rem; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; text-align: center; }

.mermaid svg { max-width: 100%; }

/* ── Tables ───────────────────────────────────────────────── */
/* display:block turns the <table> itself into the scrollable box (the browser still generates an anonymous table box around thead/tbody for the grid), so a wide table scrolls in place instead of widening the page. */
table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.92rem; }

th, td { border: 1px solid var(--border); padding: 0.55rem 0.8rem; text-align: left; }

th { color: var(--heading); font-weight: 600; }

/* ── Home / section post list ─────────────────────────────── */
.post-list { list-style: none; margin: 2rem 0 0; padding: 0; }

.post-list li { margin: 0 0 1.9rem; }

.post-link { font-weight: 600; color: var(--heading); text-decoration: none; letter-spacing: -0.01em; }

.post-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.post-meta { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; margin-top: 0.2rem; }

.post-desc { color: var(--muted); margin: 0.4rem 0 0; }

/* ── Note header ──────────────────────────────────────────── */
.note-header { margin-bottom: 2.5rem; }

.note-date { color: var(--muted); font-size: 0.82rem; /* same font + size as .note-meta */ margin: 0 0 0.6rem; }

.note-title { margin: 0 0 0.4rem; }

.note-description { color: var(--muted); font-style: italic; margin: 0.5rem 0 0; }

.note-meta { color: var(--muted); font-size: 0.82rem; margin: 0.85rem 0 0; }

/* Legacy badge */
/* Topic tags — color-coded per section/label; no single site accent. Add a modifier per topic; unknown topics fall back to muted. */
.tag { --tag: var(--muted); display: inline-block; vertical-align: middle; margin-left: 0.5rem; padding: 0.15em 0.6em; border: 1px solid color-mix(in srgb, var(--tag) 45%, transparent); border-radius: 1em; background: color-mix(in srgb, var(--tag) 12%, transparent); color: var(--tag); font-family: "Geist Mono", monospace; font-size: 0.7rem; /* always small — independent of heading size */ font-weight: 500; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; }

.tag--tech { --tag: #3b82f6; }

/* blue */
.tag--legacy { --tag: #e0902b; }

/* yellow-orange */
.tag--philosophy { --tag: #3aa35a; }

/* green */
.tag--psychology { --tag: #a78bfa; }

/* lavender */
.tag--essays { --tag: #ec6f8e; }

/* rose */
.note-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0; }

.note-tags .tag { margin-left: 0; }

/* ── About page ───────────────────────────────────────────── */
/* Icons are inlined SVGs (via include_relative) that use stroke/fill currentColor, so they adapt to light/dark. Sizing is set here. */
.human-badge { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0.25rem 0 1.5rem; padding: 0.4rem 0.9rem; border: 1px solid var(--border); border-radius: 2em; background: var(--elevated); color: var(--heading); font-size: 0.85rem; font-weight: 500; }

.badge-ic { display: inline-flex; }

.human-badge svg { width: 18px; height: 18px; }

.stack { list-style: none; margin: 1.5rem 0; padding: 0 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--elevated); }

.stack-item { display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }

.stack-item:last-child { border-bottom: 0; }

.stack-role { flex: none; width: 8.5rem; color: var(--heading); font-weight: 600; font-size: 0.95rem; }

.stack-tool { color: var(--foreground); }

.tool-ic { display: inline-flex; vertical-align: -0.22em; margin-right: 0.35rem; }

.tool-ic svg { width: 18px; height: 18px; }

.tool-ic--claude { color: #d97757; }

.tool-ic--obsidian { color: #7c3aed; }

.tool-ic--md { color: #3b82f6; }

.stack-notes { margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--muted); line-height: 1.55; }

.stack-notes p { margin: 0 0 0.45rem; }

.stack-notes p:last-child { margin-bottom: 0; }

.stack-notes-label { color: inherit; }

@media (max-width: 520px) { .stack-item { flex-wrap: wrap; }
  .stack-role { width: auto; } }
/* Skills: cards edited via _data/skills.yml */
.skills-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.skills-all { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); text-decoration: none; white-space: nowrap; }

.skills-all:hover { color: var(--heading); }

.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.85rem; margin: 1.25rem 0; }

.skill-card { position: relative; display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--elevated); transition: border-color 0.15s ease, transform 0.15s ease; }

/* Stretched link: covers the whole card so the card stays clickable, while leaving room for independently-clickable links (e.g. credit). */
.skill-card__main { position: absolute; inset: 0; z-index: 0; border-radius: inherit; }

.skill-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }

.skill-name { color: var(--heading); font-weight: 600; font-size: 0.98rem; }

.skill-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.skill-credit { color: var(--muted); font-size: 0.8rem; }

.skill-credit a { position: relative; z-index: 1; color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; }

.skill-credit a:hover { color: var(--heading); }

.skill-link { margin-top: 0.35rem; color: var(--foreground); font-size: 0.8rem; font-family: "Geist Mono", monospace; }

.skill-card:hover .skill-link { color: var(--heading); }

/* ── Wikilinks ────────────────────────────────────────────── */
/* [[Note]] links, resolved client-side against the build-time link map. */
.wikilink { color: var(--heading); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }

.wikilink:hover { text-decoration-style: solid; }

.wikilink--missing { color: var(--muted); cursor: help; text-decoration-color: var(--faint); }

/* ── Graph ────────────────────────────────────────────────── */
.graph-hint { color: var(--muted); font-size: 0.9rem; margin-top: 0; }

.graph { position: relative; /* contain force-graph's absolute canvas */ width: 100%; height: 70vh; min-height: 420px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--elevated); overflow: hidden; }

.graph-msg { padding: 1.5rem; color: var(--muted); font-size: 0.9rem; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { max-width: var(--content-w); margin: 0 auto; padding: 2rem 0 4rem; border-top: 1px solid var(--border); }

.site-footer ul { list-style: none; margin: 0; padding: 0; }

.site-footer li { margin: 0.55rem 0; }

.site-footer a { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.15s ease; }

.site-footer a:hover { color: var(--heading); }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 899px) { .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; top: var(--header-h); left: 0; z-index: 50; width: 260px; height: calc(100vh - var(--header-h)); background: var(--elevated); transform: translateX(-100%); transition: transform 0.2s ease; }
  html[data-sidebar="open"] .sidebar { display: block; transform: translateX(0); }
  html[data-sidebar="open"] .sidebar-backdrop { display: block; position: fixed; inset: var(--header-h) 0 0 0; z-index: 45; background: rgba(0, 0, 0, 0.5); }
  main { padding-top: 2.5rem; } }
