:root {
  --bg: #ffffff;
  --surface: #f2f4f7;
  --text: #24292f;
  --heading: #0d1117;
  --muted: #59636e;
  --border: #e4e7eb;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, .35);

  --f-body: Georgia, serif;
  --f-head: system-ui, sans-serif;
  --f-meta: system-ui, sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --size: 17px;
  --lh: 1.7;
  --measure: 760px;
  --h1: 38px;
  --h2: 26px;
  --h3: 22px;
  --h-weight: 600;
  --track: -.015em;
  --code-size: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--size);
  line-height: var(--lh);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.col, .site-nav { max-width: calc(var(--measure) + 32px); margin: 0 auto; padding: 0 16px; }
main.col { padding-bottom: 72px; }

.site-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; padding-top: 28px; font-family: var(--f-meta); font-size: 15px; position: relative; }
.site-nav .name { color: var(--heading); font-weight: 600; text-decoration: none; }
.site-nav nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.site-nav nav a { color: var(--muted); text-decoration: none; }
.site-nav nav a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 { font-family: var(--f-head); color: var(--heading); font-weight: var(--h-weight); letter-spacing: var(--track); }
h1 { font-size: var(--h1); line-height: 1.15; margin: 72px 0 14px; text-wrap: balance; }
.post-body h2 { font-size: var(--h2); line-height: 1.25; margin: 2em 0 .5em; }
.post-body h3 { font-size: var(--h3); line-height: 1.3; margin: 2em 0 .5em; }
.post-body h4, .post-body h5, .post-body h6 { font-size: 1em; margin: 1.8em 0 .4em; }
.post-body :is(h2, h3, h4, h5, h6) { scroll-margin-top: 24px; }

.heading-anchor { margin-left: .4rem; color: var(--border); text-decoration: none; font-weight: 500; opacity: 0; transition: opacity .15s, color .15s; }
:is(h1, h2, h3, h4, h5, h6):hover > .heading-anchor, .heading-anchor:focus-visible { opacity: 1; }
.heading-anchor:hover { color: var(--accent); }

.meta { font-family: var(--f-meta); font-size: 15px; color: var(--muted); margin-bottom: 48px; }
.meta .date { margin-right: 12px; }
.meta a { color: var(--muted); text-decoration: none; margin-right: 10px; }
.meta a:hover { color: var(--accent); }

p { margin: 0 0 1.15em; text-wrap: pretty; }
strong, b { color: var(--heading); font-weight: 600; }
a { color: var(--accent); }
.post-body a { text-decoration: underline; text-decoration-color: var(--accent-soft); text-underline-offset: 3px; }
.post-body a:hover { text-decoration-color: var(--accent); }
.post-body a.heading-anchor { text-decoration: none; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.15em; }
li { margin-bottom: .35em; }
li::marker { color: var(--muted); }
img { max-width: 100%; height: auto; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 48px 0; }
blockquote { margin: 1.8em 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
blockquote p:last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .92em; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
th { font-family: var(--f-meta); color: var(--heading); font-weight: 600; }
::selection { background: var(--accent-soft); }

code { font-family: var(--f-mono); font-size: .84em; background: var(--surface); color: var(--text); padding: .12em .38em; border-radius: 4px; }
pre { font-family: var(--f-mono); font-size: var(--code-size); line-height: 1.6; background: var(--surface); color: var(--text); padding: 20px 24px; border-radius: 8px; overflow-x: auto; margin: 1.6em 0; }
pre code { background: none; padding: 0; font-size: inherit; border-radius: 0; }
.highlight { margin: 1.6em 0; }
.highlight pre { margin: 0; }
.chroma :is(.k, .kc, .kd, .kn, .kp, .kr, .kt, .nt, .ow) { color: var(--accent); font-weight: 500; }
.chroma :is(.s, .s1, .s2, .sb, .sc, .sd, .se, .sh, .si, .sx, .sr, .ss) { color: color-mix(in srgb, var(--accent) 55%, var(--heading)); }
.chroma :is(.c, .c1, .cm, .ch, .cs, .cp, .cpf) { color: var(--muted); font-style: italic; }
.chroma :is(.m, .mi, .mf, .mh, .mo, .mb, .il) { color: var(--accent); }
.chroma :is(.nf, .fm, .nc, .nd) { color: var(--heading); font-weight: 600; }
.chroma :is(.na, .nb, .bp) { color: color-mix(in srgb, var(--accent) 70%, var(--text)); }
.chroma .err { color: inherit; background: none; }
.chroma .gd { color: #b4483c; }
.chroma .gi { color: #4f7f4f; }
.chroma .hl { background: var(--border); display: block; }
.chroma .ln, .chroma .lnt { color: var(--muted); margin-right: .8em; }
pre.mermaid { background: none; text-align: center; }

a.footnote-ref, .post-body sup a { font-family: var(--f-meta); font-size: 12px; text-decoration: none; padding: 0 1px; }
.footnotes { margin-top: 48px; font-size: .88em; line-height: 1.6; color: var(--muted); }
.footnotes hr { margin: 0 0 24px; }
.footnotes ol { padding-left: 24px; }
.footnotes li p { margin-bottom: 10px; }
a.footnote-backref { text-decoration: none; }

.avatar { display: block; flex: none; width: 56px; height: 56px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--border); }

.profile { display: flex; align-items: center; gap: 20px; margin: 72px 0 56px; }
.profile .hello { font-family: var(--f-head); font-size: calc(var(--h1) * .72); color: var(--heading); font-weight: var(--h-weight); letter-spacing: var(--track); line-height: 1.25; margin: 0 0 4px; }
.profile .bio { color: var(--muted); margin: 0; }
.profile .bio p { margin: 0; }
.list-head h1 { margin-bottom: 40px; }
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { display: grid; grid-template-columns: 8.5em 1fr; gap: 4px 24px; padding: 22px 0; border-top: 1px solid var(--border); margin: 0; }
.posts .d { font-family: var(--f-meta); font-size: 14px; color: var(--muted); padding-top: .3em; }
.posts a { font-family: var(--f-head); color: var(--heading); text-decoration: none; font-weight: var(--h-weight); letter-spacing: var(--track); font-size: calc(var(--size) * 1.15); line-height: 1.35; }
.posts a:hover { color: var(--accent); }
.posts .s { grid-column: 2; color: var(--muted); font-size: calc(var(--size) * .9); line-height: 1.55; }
.posts .s p { margin: 0; }
.posts.compact li { padding: 12px 0; }
.posts.compact a { font-size: var(--size); }
.pagination { display: flex; justify-content: space-between; margin-top: 32px; font-family: var(--f-meta); font-size: 15px; }
.pagination a { text-decoration: none; }
.pagination .next { margin-left: auto; }

.author { display: flex; align-items: center; gap: 18px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--border); font-family: var(--f-meta); font-size: 15px; color: var(--muted); }
.author .avatar { width: 40px; height: 40px; }
.author p { margin: 0; }
.ml-form-embed { margin-top: 40px; }
.latest { margin-top: 64px; }
.latest h2 { font-size: calc(var(--size) * 1.1); margin: 0 0 12px; }

.site-footer { padding-top: 24px; padding-bottom: 48px; font-family: var(--f-meta); font-size: 14px; color: var(--muted); border-top: 1px solid var(--border); }
.site-footer p { margin: 0; }
.social { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.social a { color: var(--muted); text-decoration: none; }
.social a:hover { color: var(--accent); }

@media (max-width: 640px) {
  body { font-size: calc(var(--size) - 1px); }
  h1 { font-size: calc(var(--h1) * .74); margin-top: 44px; }
  .profile { margin: 44px 0 36px; }
  .posts li { grid-template-columns: 1fr; }
  .posts .s { grid-column: 1; }
  pre, .highlight { margin-left: -16px; margin-right: -16px; }
  pre, .highlight pre { border-radius: 0; padding: 16px; }
  .highlight pre { margin: 0; }
  .heading-anchor { opacity: 1; }
}
