@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650&family=DM+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #2b2e29;
  --muted: #656961;
  --quiet: #73776f;
  --line: #e4e5de;
  --accent: #546044;
  --surface: #efeee8;
  --tag: #eeeee8;
  --selection: #dfe6d5;
  --link-line: #bfc4b6;
  --quote-line: #a2ae90;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #191b18;
  --ink: #e6e8e0;
  --muted: #b3b8ad;
  --quiet: #979f91;
  --line: #33372f;
  --accent: #c2d2ad;
  --surface: #252923;
  --tag: #2a2f26;
  --selection: #414e35;
  --link-line: #7b896b;
  --quote-line: #879675;
}
* { box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--selection); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
.shell { width: min(100% - 48px, 688px); margin: 0 auto; }
.skip-link { position: absolute; top: -80px; left: 24px; padding: 10px 16px; background: var(--ink); color: var(--paper); z-index: 10; }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding-top: 38px; }
.wordmark { font-family: var(--serif); font-size: 31px; line-height: 1; text-decoration: none; letter-spacing: -1.5px; }
nav { display: flex; gap: 20px; align-items: center; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--surface); color: var(--ink); }
.theme-icon { width: 17px; height: 17px; }
.theme-icon-sun { display: none; }
[data-theme='dark'] .theme-icon-moon { display: none; }
[data-theme='dark'] .theme-icon-sun { display: block; }
nav a { font-size: 13px; color: var(--muted); text-decoration: none; }
nav a[aria-current='page'], nav a:hover { color: var(--ink); }
.intro { padding: 112px 0 82px; max-width: 590px; }
.eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 1.7px; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 7vw, 64px); line-height: 1.04; letter-spacing: -1.25px; margin: 0; }
.bio { font-size: 16px; line-height: 1.85; color: var(--muted); max-width: 500px; margin: 25px 0 24px; }
.bio a { color: var(--ink); text-decoration-color: var(--link-line); }
.socials { display: flex; flex-wrap: wrap; gap: 25px; align-items: center; }
.socials a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 13px; }
.socials a:hover { color: var(--accent); }
.external-arrow { width: 12px; height: 12px; color: var(--quiet); transition: transform .15s; }
.socials a:hover .external-arrow { transform: translate(1px, -1px); }
.writing { padding-bottom: 100px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.section-heading h2 { font-size: 15px; font-weight: 550; margin: 0; letter-spacing: -.2px; }
.section-note { color: var(--quiet); font-size: 11px; font-family: var(--mono); }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-item { border-bottom: 1px solid var(--line); }
.post-link { display: grid; grid-template-columns: 1fr 20px; gap: 20px; align-items: center; padding: 26px 0 27px; text-decoration: none; }
.post-meta { color: var(--quiet); font-family: var(--mono); font-size: 10px; line-height: 1.8; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.post-title { font-size: 17px; font-weight: 550; margin: 9px 0 6px; letter-spacing: -.2px; }
.post-description { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0; }
.post-arrow { width: 17px; height: 17px; color: var(--quiet); transition: transform .18s; }
.post-link:hover .post-title { color: var(--accent); }
.post-link:hover .post-arrow { transform: translateX(3px); color: var(--accent); }
.meta-dot { font-size: 10px; }
.sample-tag { color: var(--muted); background: var(--tag); padding: 1px 6px; border-radius: 3px; font-family: var(--sans); font-size: 10px; }
.site-footer { display: flex; gap: 20px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 24px 0 32px; font-size: 11px; color: var(--quiet); }
.footer-note { display: inline-flex; align-items: center; gap: 7px; }
.tiny-dot { width: 5px; height: 5px; background: #869771; border-radius: 50%; }
.back-link { margin-top: 79px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--ink); }
.article-header { margin-top: 36px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.article-header h1 { font-size: clamp(42px, 6vw, 54px); line-height: 1.12; margin: 17px 0 20px; }
.article-description { font-size: 16px; line-height: 1.75; color: var(--muted); margin: 0; max-width: 610px; }
.prose { font-size: 16px; line-height: 1.9; padding: 23px 0 65px; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 24px 0; }
.prose h2, .prose h3, .prose h4 { line-height: 1.4; font-weight: 550; letter-spacing: -.4px; margin: 36px 0 14px; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 20px; }
.prose a { text-decoration-color: var(--link-line); }
.prose blockquote { border-left: 2px solid var(--quote-line); padding-left: 24px; margin: 30px 0; color: var(--muted); font-style: italic; }
.prose code { font-family: var(--mono); font-size: .83em; background: var(--surface); padding: 3px 5px; border-radius: 3px; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 20px; overflow-x: auto; line-height: 1.7; }
.prose pre code { padding: 0; background: transparent; }
.code-block { margin: 24px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.code-language { padding: 9px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.prose .code-block pre { margin: 0; border: 0; border-radius: 0; }
.prose pre:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.prose .shiki, .prose .shiki span { color: var(--shiki-light); }
:root[data-theme='dark'] .prose .shiki, :root[data-theme='dark'] .prose .shiki span { color: var(--shiki-dark); }
.prose ul, .prose ol { padding-left: 25px; }
.prose li { margin-bottom: 8px; }
.prose img { max-width: 100%; height: auto; border-radius: 4px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 24px 0; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border: 1px solid var(--line); }
.prose th { background: var(--surface); font-weight: 550; }
.prose input[type='checkbox'] { accent-color: var(--accent); }
.article-end { border-top: 1px solid var(--line); padding: 24px 0 80px; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.article-end a { text-decoration: none; }
.empty-state { padding: 36px 0; color: var(--muted); font-size: 14px; }
.not-found { padding: 110px 0; }
.not-found p { color: var(--muted); line-height: 1.8; }
@media (max-width: 600px) {
  .shell { width: calc(100% - 40px); }
  .site-header { padding-top: 27px; }
  .theme-toggle { width: 40px; height: 40px; }
  .intro { padding: 82px 0 63px; }
  .bio { font-size: 15px; margin-top: 22px; }
  .writing { padding-bottom: 75px; }
  .back-link { margin-top: 58px; }
  .article-header { margin-top: 28px; }
  .prose { font-size: 15px; }
  .site-footer { flex-wrap: wrap; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
