:root {
  --paper: #f7f4ee;
  --ink: #1e2722;
  --muted: #657066;
  --line: #d7d4cb;
  --accent: #ba4a2f;
  --accent-soft: #f1ded5;
  --card: #fffdf8;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root { --paper: #18201c; --ink: #edf1ea; --muted: #aab4aa; --line: #37433b; --accent: #f28a68; --accent-soft: #3a2923; --card: #202a24; }
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: var(--sans); }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
.shell { width: min(100% - 2.5rem, 760px); margin-inline: auto; }
.flow > * + * { margin-top: 1.4rem; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 4.8rem; display: flex; align-items: center; gap: 1rem; }
.profile-avatar { border: 1px solid var(--line); border-radius: 50%; display: block; flex: 0 0 auto; height: 2.45rem; overflow: hidden; width: 2.45rem; }
.profile-avatar img { display: block; height: 100%; object-fit: cover; width: 100%; }
nav { display: flex; flex-wrap: wrap; gap: .85rem; font-size: .86rem; }
nav a { text-decoration: none; }
.language-switch { margin-left: auto; color: var(--muted); font-size: .78rem; }
.language-switch a, .language-switch strong { text-decoration: none; padding: .25rem; }
main { padding-block: 5.5rem 6rem; }
h1, h2, h3, p { margin-block: 0; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: -.025em; line-height: 1.07; }
h1 { max-width: 13ch; font-size: clamp(2.8rem, 9vw, 5.4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: 1.3rem; }
p, li { line-height: 1.7; }
.eyebrow { color: var(--accent); font-size: .77rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.lede { color: var(--muted); font-family: var(--serif); font-size: clamp(1.22rem, 3vw, 1.6rem); line-height: 1.45; max-width: 38rem; }
.language-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.language-card { background: var(--card); border: 1px solid var(--line); display: grid; gap: .5rem; min-height: 13rem; padding: 1.4rem; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.language-card:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-3px); }
.language-card span { color: var(--accent); font-size: .8rem; font-weight: 800; letter-spacing: .1em; }
.language-card strong { font-family: var(--serif); font-size: 1.6rem; }
.language-card small { color: var(--muted); margin-top: auto; }
.listing header { margin-bottom: 3.5rem; }
.post-card { border-top: 1px solid var(--line); padding-block: 1.75rem; }
.post-card h2 { margin-top: .3rem; }
.post-card h2 a { text-decoration: none; }
.post-card p:not(.eyebrow) { color: var(--muted); margin-top: .75rem; }
.tag-list, .tag-cloud { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.tag-list a, .tag-cloud a { background: var(--accent-soft); border-radius: 999px; color: var(--ink); display: block; font-size: .78rem; padding: .25rem .58rem; text-decoration: none; }
.post-header { border-bottom: 1px solid var(--line); padding-bottom: 2rem; }
.post-header .lede { margin-top: 1.4rem; }
.post-body { font-family: var(--serif); font-size: 1.15rem; line-height: 1.75; margin-top: 2.5rem; }
.post-body > * + * { margin-top: 1.45rem; }
.post-body h2, .post-body h3 { margin-top: 2.5rem; }
.post-body pre { background: var(--ink); color: var(--paper); overflow-x: auto; padding: 1.2rem; }
.post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.about-identity { align-items: center; display: flex; gap: 1.1rem; }
.about-identity img { border: 1px solid var(--line); border-radius: 50%; height: 5.25rem; object-fit: cover; width: 5.25rem; }
.about-identity h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); max-width: none; }
.about-identity p { color: var(--muted); font-size: 1rem; line-height: 1.45; margin-top: .35rem; }
.about-links { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.25rem; padding-top: 1.25rem; font-family: var(--sans); font-size: .9rem; }
.post-body .mermaid { background: var(--card); border: 1px solid var(--line); margin-block: 1.8rem; overflow-x: auto; padding: 1rem; text-align: center; }
.post-body .mermaid svg { max-width: 100%; }
.post-body .katex-display { overflow-x: auto; overflow-y: hidden; padding-block: .2rem; }
.references { border-top: 1px solid var(--line); margin-top: 3.5rem; padding-top: 1.5rem; }
.references h2 { font-size: 1.25rem; }.references ul { padding-left: 1.2rem; }.references span { color: var(--muted); font-size: .85rem; }
.archive section + section { margin-top: 2.4rem; }.archive-list { list-style: none; margin: 1rem 0; padding: 0; }.archive-list li { align-items: baseline; border-top: 1px solid var(--line); display: flex; gap: 1.5rem; padding: .75rem 0; }.archive-list time { color: var(--muted); flex: 0 0 9rem; font-size: .85rem; }
.tag-cloud { margin-top: 1.5rem; }.tag-cloud a { font-size: 1rem; padding: .45rem .75rem; }
.search-page label { display: block; margin-top: 2rem; }.search-page input { background: var(--card); border: 1px solid var(--line); border-radius: 0; color: var(--ink); font: inherit; margin-top: .55rem; padding: .8rem; width: 100%; }.search-page input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }.search-results { margin-top: 1.5rem; }.search-result { border-top: 1px solid var(--line); padding: 1rem 0; }.search-result p { color: var(--muted); margin-top: .3rem; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }.footer-inner { align-items: flex-start; display: flex; gap: 1.5rem; justify-content: space-between; padding-block: 1.5rem; }.footer-copy { display: grid; gap: .7rem; }.license-link { background: var(--card); border: 1px solid var(--line); display: inline-flex; padding: .35rem .45rem; text-decoration: none; transition: border-color .15s ease, transform .15s ease; width: fit-content; }.license-link:hover { border-color: var(--accent); color: inherit; transform: translateY(-2px); }.license-link img { display: block; height: 31px; width: 88px; }
@media (max-width: 620px) { .shell { width: min(100% - 1.5rem, 760px); }.header-inner { min-height: auto; padding-block: .9rem; }.header-inner nav { order: 3; width: 100%; }.language-cards { grid-template-columns: 1fr; }.archive-list li { display: grid; gap: .15rem; }.archive-list time { flex: auto; } .about-identity { align-items: flex-start; }.about-identity img { height: 4rem; width: 4rem; } .footer-inner { align-items: flex-start; flex-direction: column; } main { padding-block: 3.5rem; } }
