@charset "utf-8";

:root {
  color-scheme: dark;
  --bg: #07080b;
  --ink: #f3f5f4;
  --soft: #9da1ab;
  --faint: #82858e;
  --line: #191b21;
  --line2: #23252c;
  --accent: #57d0ff;
  --surface: #101218;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: radial-gradient(130% 520px at 78% 0, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%), var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  letter-spacing: -.01em;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.post { max-width: 808px; margin: 0 auto; padding: 48px 36px 32px; }
.post-back { display: inline-block; color: var(--soft); font-size: 14px; text-decoration: none; padding: 8px 0; }
.post-back:hover { color: var(--accent); }
.post-meta { margin: 32px 0 14px; color: var(--faint); font: 12px/1.6 var(--mono); }
.post-title { margin: 0 0 24px; font-size: clamp(30px, 4.4vw, 46px); font-weight: 600; line-height: 1.12; letter-spacing: -.04em; text-wrap: balance; }
.post-lede { margin: 0 0 30px; color: var(--soft); font-size: 18px; line-height: 1.65; }
.post-body { color: #c9cbd1; font-size: 17px; line-height: 1.85; overflow-wrap: break-word; }
.post-body p { margin: 0 0 22px; }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body h1, .post-body h2, .post-body h3 { color: var(--ink); font-family: var(--sans); font-weight: 600; line-height: 1.35; scroll-margin-top: 24px; }
.post-body h1 { margin: 56px 0 20px; padding-top: 30px; border-top: 1px solid var(--line2); font-size: 29px; letter-spacing: -.025em; }
.post-body h2 { margin: 40px 0 16px; font-size: 24px; letter-spacing: -.02em; }
.post-body h3 { margin: 30px 0 12px; font-size: 19px; letter-spacing: -.01em; }
.post-body a { color: #d7d9de; text-decoration-color: var(--accent); }
.post-body a:hover { color: var(--ink); text-decoration-thickness: 2px; }
.post-body a.xref { text-decoration-style: dotted; }
.post-body a.xref:hover { text-decoration-style: solid; }
.post-body code { padding: 2px 5px; background: var(--surface); border: 1px solid var(--line2); border-radius: 5px; color: var(--ink); font: .85em var(--mono); }
.post-body pre { padding: 18px; margin: 0 0 24px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line2); border-radius: 9px; }
.post-body pre code { padding: 0; border: 0; line-height: 1.7; }
.post-body blockquote { margin: 0 0 24px; padding: 0 0 0 20px; border-left: 2px solid var(--accent); color: var(--soft); }
.post-body ul, .post-body ol { margin: 0 0 22px; padding-left: 24px; }
.post-body li { margin-bottom: 8px; }
.post-body img { max-width: 100%; height: auto; border: 1px solid var(--line2); border-radius: 9px; }
.post-body p > img { display: block; margin: 26px auto 0; }
.post-body img[src$=".svg"] { padding: 20px; background: #fbfbf8; border-color: #e6e6e0; }
.post-body p > img + em { display: block; max-width: 94%; margin: 12px auto 28px; color: var(--soft); font-size: 14px; font-style: normal; line-height: 1.6; text-align: center; }
.post-body table { display: block; width: 100%; margin: 0 0 26px; border-collapse: collapse; overflow-x: auto; font-size: 14px; }
.post-body th { padding: 10px 14px; border-bottom: 1px solid var(--line2); color: var(--ink); font-weight: 600; text-align: left; white-space: nowrap; }
.post-body td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body th:first-child, .post-body td:first-child { padding-left: 2px; }
.post-body hr { margin: 40px 0; border: 0; border-top: 1px solid var(--line2); }
.post-body .MathJax_Display, .post-body .MJXc-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.post-body script[type^="math/tex"] { display: none; }

.post-toc { margin: 0 0 28px; padding: 0; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.post-toc summary { padding: 16px 0; color: var(--soft); font-size: 14px; cursor: pointer; }
.post-toc summary::marker { color: var(--accent); }
.post-toc summary:hover { color: var(--ink); }
.post-toc ul { margin: 0 0 20px; padding: 0; list-style: none; column-gap: 28px; }
.post-toc li { margin: 6px 0; line-height: 1.5; break-inside: avoid; }
.post-toc .toc-part { margin-top: 16px; font-size: 14px; font-weight: 500; }
.post-toc .toc-part a { color: #d7d9de; }
.post-toc .toc-sec { padding-left: 12px; font-size: 13px; }
.post-toc a { color: var(--soft); text-decoration: none; }
.post-toc a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.article-footer { max-width: 736px; margin: 0 auto; padding: 24px 0 48px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--faint); font: 12px/1.7 var(--mono); }
.article-footer a { text-decoration: none; }

@media (min-width: 700px) { .post-toc ul { column-count: 2; } }
@media (max-width: 808px) { .article-footer { margin: 0 36px; } }
@media (max-width: 600px) {
  .post { padding: 24px 22px; }
  .post-meta { margin-top: 24px; }
  .post-lede { font-size: 17px; }
  .post-body { font-size: 16px; }
  .post-body h1 { font-size: 25px; }
  .post-body h2 { font-size: 21px; }
  .post-body img[src$=".svg"] { padding: 8px; }
  .article-footer { margin: 0 22px; }
}
