/* Klisé's narrow reading column, author block, and post rows, adapted for this site. */
:root {
  color-scheme: light;
  --bg: #fff;
  --text: #434648;
  --heading: #0d122b;
  --muted: #566270;
  --link: #0036c7;
  --line: #d5d8dc;
  --surface: #f4f5f6;
  --comment: #516157;
  --keyword: #6738a0;
  --string: #176746;
  --number: #954419;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131418;
    --text: #d2caca;
    --heading: #eaeaea;
    --muted: #abaeb8;
    --link: #ff7996;
    --line: #4a4d56;
    --surface: #1b1d25;
    --comment: #afbbb1;
    --keyword: #d6b0f7;
    --string: #a5d8b3;
    --number: #f1ba8d;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131418;
  --text: #d2caca;
  --heading: #eaeaea;
  --muted: #abaeb8;
  --link: #ff7996;
  --line: #4a4d56;
  --surface: #1b1d25;
  --comment: #afbbb1;
  --keyword: #d6b0f7;
  --string: #a5d8b3;
  --number: #f1ba8d;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.75 system-ui, sans-serif; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; }
h1 { font-size: clamp(1.9rem, 5vw, 2.4rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
.container { width: calc(100% - 2.5rem); max-width: 720px; margin-inline: auto; }
.skip-link { position: absolute; inset: .75rem auto auto .75rem; padding: .5rem .75rem; background: var(--bg); z-index: 1; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

.navbar, .site-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1.2rem;
}
.navbar { padding-block: .75rem; border-bottom: 1px solid var(--line); }
.nav-list, .site-footer nav, .topic-list, .pagination { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.nav-list, .topic-list, .post-list { list-style: none; margin: 0; padding: 0; }
.nav-list a, .site-footer a { display: inline-flex; align-items: center; min-height: 28px; color: var(--heading); }
.nav-list a { font-size: .9rem; text-decoration: none; }
.nav-list a[aria-current], .nav-list a:hover { text-decoration: underline; }
.theme-control { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .85rem; }
.theme-control select { min-height: 32px; padding: .1rem .35rem; font: inherit; color: var(--heading); background: var(--surface); border: 1px solid var(--muted); border-radius: 4px; }
.site-footer { margin-top: 4rem; padding-block: 1rem 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-footer p { margin: 0; }

.author { margin-block: 2.5rem 3rem; text-align: center; }
.author-avatar { display: block; width: 70px; height: 70px; margin: 0 auto; border-radius: 50%; object-fit: cover; background: var(--surface); }
.author-name { margin: .55rem 0 .15rem; font-size: 1.7rem; }
.author-bio { max-width: 393px; margin: 0 auto; color: var(--muted); }
.post-item { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .1rem .85rem; padding-block: .8rem; border-bottom: 1px solid var(--line); }
.post-item-date, .post-meta, .muted { color: var(--muted); font-size: .88rem; }
.post-item-title { margin: 0; font-size: 1.05rem; }
.post-item p { margin: .25rem 0 0; color: var(--muted); }
.pagination { margin-top: 1.4rem; align-items: center; }
.topic-list a { display: inline-block; min-height: 24px; }
.page-content, .post-content { margin-block: 2.5rem; }
.article-header { margin-bottom: 1.8rem; }
.article-header h1 { margin: 0 0 .7rem; }
.post-meta { margin: .3rem 0; }
.article-header .topic-list { margin-top: .65rem; }
.project + .project { margin-top: 1.7rem; border-top: 1px solid var(--line); }
.project h2 { margin-bottom: .25rem; }
.project .muted { margin: 0; }

.prose { line-height: 1.85; }
.prose h2, .prose h3, .prose h4 { margin: 2rem 0 .75rem; }
.prose blockquote { margin-inline: 0; padding-inline-start: 1rem; border-inline-start: 3px solid var(--line); }
.prose pre { margin: 1.25rem 0; padding: .85rem; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-size: .875rem; tab-size: 2; }
.prose code { font-family: ui-monospace, Consolas, monospace; }
.prose :not(pre) > code { padding: .1em .25em; background: var(--surface); font-size: .9em; }
.prose pre code { white-space: pre; overflow-wrap: normal; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: 1.5rem; font-size: .92rem; overflow-wrap: normal; }
.prose caption { text-align: start; margin-bottom: .4rem; }
.prose th, .prose td { text-align: start; padding: .5rem .75rem; border: 1px solid var(--line); }
.prose th { background: var(--surface); }
.prose details { padding: .45rem .85rem; border-inline-start: 3px solid var(--line); }
.prose summary { cursor: pointer; font-weight: 600; }
.post-navigation { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }

.highlight :is(.c, .c1, .cm, .cp, .cs) { color: var(--comment); font-style: italic; }
.highlight :is(.k, .kd, .kn, .kp, .kr, .kt, .kc, .ow) { color: var(--keyword); }
.highlight :is(.s, .s1, .s2, .sb, .sc, .sd, .se, .sh, .si, .sr, .ss, .sx, .gi) { color: var(--string); }
.highlight :is(.m, .mi, .mf, .mh, .mo, .il, .gd) { color: var(--number); }
.highlight :is(.nf, .nb, .nc, .nt, .na) { color: var(--link); }

@media (max-width: 480px) {
  .post-item { grid-template-columns: minmax(0, 1fr); }
  .nav-list { column-gap: .85rem; }
}
@media print {
  :root, :root[data-theme] { color-scheme: light; --bg: #fff; --text: #000; --heading: #000; --muted: #333; --link: #000; --surface: #fff; }
  .site-header, .site-footer, .skip-link, .post-navigation { display: none; }
  .container { width: 100%; max-width: none; }
  .prose pre { white-space: pre-wrap; }
}
