@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 500;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-style: normal;
  font-weight: 501 900;
  font-display: swap;
}
/* The entire visual system lives here. No CSS framework or generated classes. */
:root {
  color-scheme: light dark;
  --paper: light-dark(#ffffff, #0d1117);
  --ink: light-dark(#1f2328, #e6edf3);
  --muted: light-dark(#57606a, #b1bac4);
  --accent: light-dark(#0969da, #58a6ff);
  --line: light-dark(#d1d9e0, #30363d);
  --wash: light-dark(#f6f8fa, #161b22);
  --selection-paper: light-dark(#ffffff, #0d1117);
  --selection-ink: light-dark(#1f2328, #e6edf3);
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.75;
  background: var(--paper);
  color: var(--ink);
}
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding-bottom: 95px; }
::selection { background: var(--selection-ink); color: var(--selection-paper); }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: .24em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
main:focus { outline: none; }
.site-shell { width: min(100% - 64px, 800px); margin-inline: auto; }
.site-header { position: relative; display: flex; align-items: center; gap: 25px; padding: 34px 0 28px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; font-size: 18px; font-weight: 700; letter-spacing: -.7px; text-decoration: none; margin-right: auto; white-space: nowrap; }
.wordmark-dot, .footer-signature span, .section-dot, .intro h1 > span { color: var(--accent); }
.brand-pixel { width: 22px; height: 22px; margin-right: 10px; color: var(--accent); }
.brand-pixel svg { display: block; width: 100%; height: 100%; }
.site-header nav { display: flex; gap: 25px; font-size: 13px; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 7px; }
.site-header nav a:hover { color: var(--accent); }
.theme-toggle { display: grid; place-items: center; border: 1px solid var(--line); background: none; border-radius: 50%; width: 34px; height: 34px; padding: 0; flex-shrink: 0; }
.theme-toggle:hover { background: var(--wash); }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 10; padding: 8px 16px; background: var(--paper); border: 1px solid var(--accent); }
.skip-link:focus { top: 12px; }
h1, h2, h3 { line-height: 1.2; font-weight: 500; }
h1, h2 { font-family: var(--mono); }
h1 { font-size: clamp(28px, 4.5vw, 44px); letter-spacing: -1.8px; margin: 0 0 24px; overflow-wrap: anywhere; text-wrap: balance; }
h2 { font-size: 25px; letter-spacing: -.7px; }
h3 { font-size: 21px; }
p { margin: 0 0 20px; }
.eyebrow { font-family: var(--mono); font-size: 10px; font-weight: 400; line-height: 1.6; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.intro { display: grid; grid-template-columns: 1fr 240px; align-items: center; gap: 16px; padding: 66px 0 32px; }
.intro .eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 22px; }
.status-dot { display: inline-block; width: 6px; height: 6px; background: var(--accent); box-shadow: 0 0 0 3px var(--wash); flex-shrink: 0; }
.intro h1 { font-size: 40px; letter-spacing: -2px; margin-bottom: 18px; white-space: nowrap; }
.intro-lede { font-family: var(--mono); font-size: 18px; line-height: 1.7; color: var(--muted); margin: 0; }
.about-copy { max-width: 670px; color: var(--muted); }
.about-copy p { margin-bottom: 16px; }
.social-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; font-family: var(--mono); font-size: 11px; }
.social-links a, .footer-links a { text-decoration: none; }
.social-links span { color: var(--muted); margin-left: 3px; }
.social-links a:hover, .footer-links a:hover { text-decoration: underline; }
.writing-section { margin-top: 62px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 25px; }
.section-heading > a { font: 10px var(--mono); text-decoration: none; color: var(--muted); }
.postlist { list-style: none; padding: 0; margin: 0; }
.postlist > li { display: grid; grid-template-columns: 112px 1fr; gap: 23px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.postlist time { color: var(--muted); font: 10px/1.8 var(--mono); padding-top: 4px; white-space: nowrap; }
.postlist-title { display: block; font-size: 16px; line-height: 1.5; font-weight: 550; text-decoration: none; padding-right: 26px; position: relative; }
.postlist-arrow { position: absolute; right: 0; color: var(--muted); font-weight: 400; transition: transform .15s; }
.postlist-title:hover .postlist-arrow { transform: translate(2px, -2px); color: var(--accent); }
.postlist li p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 6px 0 0; }
.site-footer { border-top: 1px solid var(--line); margin-top: 70px; padding: 28px 0 34px; display: grid; grid-template-columns: 1fr auto; gap: 20px; }
.footer-signature { font-size: 13px; font-weight: 650; text-decoration: none; }
.site-footer p { font-size: 11px; margin: 4px 0 0; color: var(--muted); }
.footer-links { display: flex; gap: 22px; font-size: 11px; align-items: start; padding-top: 3px; }
.site-footer .footer-code { grid-column: 1 / -1; font: 10px var(--mono); }
.footer-code span { color: var(--accent); }
/* The pixel art is editable SVG; all its motion is plain CSS. */
.pixel-desk { width: 142px; margin: 0; align-self: center; }
.avatar-sprite { display: block; width: 128px; height: 128px; margin: 0 auto; background-image: url('/img/avatar-sprite-sheet-v3.png'); background-size: 400% 200%; background-position: 0 0; background-repeat: no-repeat; image-rendering: pixelated; }
.pixel-desk figcaption { display: flex; justify-content: center; align-items: center; min-height: 26px; margin-top: 8px; gap: 5px; font: 8px/1.5 var(--mono); color: var(--muted); text-align: center; }
@keyframes blink { 0%, 43%, 47%, 100% { transform: scaleY(1); } 44%, 46% { transform: scaleY(.2); } }
@keyframes steam { 0% { transform: translateY(0); opacity: .5; } 75% { transform: translateY(-6px); opacity: .25; } 100% { transform: translateY(-8px); opacity: 0; } }
@keyframes sparkle { 0%, 60%, 100% { opacity: .2; } 30%, 80% { opacity: .7; } }
/* Content pages and long-form reading. */
.content-page, .post { padding-top: 58px; }
.page-heading { padding-bottom: 27px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.page-heading .eyebrow { margin-bottom: 18px; }
.page-heading h1 { margin-bottom: 15px; }
.page-heading > p:last-child { color: var(--muted); font-size: 16px; margin-bottom: 0; }
.prose { max-width: 68ch; overflow-wrap: anywhere; font-family: var(--mono); font-size: clamp(17px, 1.5vw, 18px); line-height: 1.85; color: var(--muted); }
.prose p, .prose li { line-height: 1.85; }
.prose h2 { margin-top: 52px; margin-bottom: 18px; padding-bottom: 9px; border-bottom: 1px solid var(--line); scroll-margin-top: 30px; font-family: var(--mono); font-size: 28px; font-weight: 700; line-height: 1.3; letter-spacing: -1px; color: var(--ink); }
.prose h3 { margin-top: 34px; margin-bottom: 12px; scroll-margin-top: 30px; font-family: var(--mono); font-size: 21px; font-weight: 700; color: var(--accent); }
.prose ul, .prose ol { padding-left: 23px; }
.prose li { margin-block: 5px; }
.prose a { color: var(--accent); }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--line); }
.prose blockquote { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 6px 6px 0; background: var(--wash); margin: 28px 0; padding: 20px 24px; color: var(--ink); }
.prose blockquote strong:first-child { color: var(--accent); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 35px 0; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; }
code, pre { font-family: var(--mono); }
:not(pre) > code { font-size: .86em; background: var(--wash); color: var(--ink); padding: .15em .35em; border-radius: 3px; }
pre { font-size: 13px; line-height: 1.75; padding: 20px; border: 1px solid var(--line); background: var(--wash); border-radius: 3px; overflow-x: auto; tab-size: 2; white-space: pre; overflow-wrap: normal; }
pre code { font: inherit; }
.back-link { display: inline-block; font: 12px var(--mono); color: var(--muted); text-decoration: none; margin-bottom: 30px; }
.post-header { margin-bottom: 36px; border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.post-header h1 { max-width: 730px; }
.post-metadata { display: flex; flex-wrap: wrap; gap: 12px; font: 12px/1.8 var(--mono); color: var(--muted); }
.post-topics { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 20px; margin-top: 48px; font-size: 12px; }
.post-pagination { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 26px; display: flex; gap: 35px; justify-content: space-between; }
.post-pagination a { max-width: 47%; font-size: 14px; text-decoration: none; }
.post-pagination a:last-child { margin-left: auto; text-align: right; }
.post-pagination .eyebrow { display: block; margin-bottom: 10px; }
.topic-list { list-style: none; padding: 0 !important; }
.topic-list li { border-bottom: 1px solid var(--line); padding: 13px 0; }
.prose .postlist { padding: 0; }
.prose .postlist > li { margin: 0; }
.prose .postlist-title { color: var(--ink); }
.prose .postlist-title:hover { color: var(--accent); }
.prose > ul:not(.topic-list) > li { margin-bottom: 22px; }
.prose > ul:not(.topic-list) > li > a:first-child { font-weight: 600; }
.prose > ul > li > ul { font-size: 14px; color: var(--muted); margin-top: 6px; }
@media (max-width: 700px) {
  .site-shell { width: min(100% - 40px, 800px); }
  .site-header { gap: 16px; }
  .site-header nav { gap: 16px; font-size: 12px; }
  .wordmark { font-size: 16px; }
  .intro { grid-template-columns: 1fr 180px; gap: 8px; padding-top: 45px; }
  .intro h1 { font-size: 31px; letter-spacing: -1.6px; white-space: normal; }
  .intro .eyebrow { font-size: 8px; }
  .intro-lede { font-size: 16px; }
  .pixel-desk { width: 132px; }
  .pixel-desk figcaption { font-size: 8px; }
}
@media (max-width: 500px) {
  :root { font-size: 14px; }
  .site-header { flex-wrap: wrap; padding: 24px 0 20px; gap: 18px; }
  .wordmark { width: calc(100% - 55px); }
  .site-header nav { order: 3; width: 100%; gap: 25px; }
  .theme-toggle { margin-left: auto; }
  .intro { grid-template-columns: 1fr; padding-top: 37px; gap: 17px; }
  .intro h1 { font-size: clamp(27px, 8.5vw, 36px); white-space: normal; }
  .intro .eyebrow { font-size: 9px; margin-bottom: 18px; }
  .pixel-desk { justify-self: center; width: 132px; margin-top: 0; }
  .intro-lede { font-size: 17px; }
  .about-copy { margin-top: 0; }
  .social-links { gap: 20px; font-size: 10px; }
  .writing-section { margin-top: 44px; }
  .section-heading h2 { font-size: 21px; }
  .postlist > li { grid-template-columns: 1fr; gap: 6px; padding: 19px 0; }
  .postlist time { padding: 0; }
  .postlist-title { font-size: 16px; }
  .site-footer { margin-top: 48px; grid-template-columns: 1fr; }
  .footer-links { gap: 24px; }
  .content-page, .post { padding-top: 37px; }
  .post-pagination { gap: 20px; }
  pre { margin-inline: -10px; padding: 14px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  :root { color-scheme: light; font-size: 12pt; }
  .site-shell { width: 100%; }
  .site-header nav, .theme-toggle, .pixel-desk, .site-footer, .post-pagination, .skip-link, .code-toolbar { display: none; }
  body { padding-bottom: 0; }
  .site-header { padding-top: 0; }
  pre { white-space: pre-wrap; }
  a { text-decoration: underline; }
}

/* Code tools are added only when JavaScript is available. */
.code-block { min-width: 0; margin: 24px 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--wash); }
.code-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); font: 10px/1.5 var(--mono); color: var(--muted); }
.copy-code { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); color: var(--ink); padding: 5px 9px; font: inherit; min-height: 28px; }
.copy-code:hover { border-color: var(--accent); color: var(--accent); }
.copy-code[data-copied='true'] { color: var(--accent); }
.copy-code svg { width: 13px; height: 13px; }
.code-block pre { border: 0; margin: 0; border-radius: 0; padding: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* The avatar stays anchored while its guitar and typing frames change. */
.avatar-sprite { animation: avatar-routine 6s steps(1, end) infinite; }
@keyframes avatar-routine {
  0%, 4% { background-position: 0 0; }
  8% { background-position: 33.333% 0; }
  12% { background-position: 66.667% 0; }
  16% { background-position: 100% 0; }
  20% { background-position: 0 0; }
  24% { background-position: 33.333% 0; }
  28% { background-position: 66.667% 0; }
  32%, 44% { background-position: 100% 0; }
  48% { background-position: 0 100%; }
  52% { background-position: 33.333% 100%; }
  56% { background-position: 66.667% 100%; }
  60% { background-position: 100% 100%; }
  64% { background-position: 0 100%; }
  68% { background-position: 33.333% 100%; }
  72% { background-position: 66.667% 100%; }
  76%, 100% { background-position: 100% 100%; }
}
@media (max-width: 500px) {
  .code-block pre { padding: 14px; }
  .prose blockquote { padding: 16px; }
  .wordmark { font-size: 14px; }
  .intro { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .avatar-sprite { animation: none; } }
@media print { .code-toolbar { display: none !important; } }
