:root {
  --paper: #fff;
  --ink: #171717;
  --muted: #666;
  --line: #dedede;
  --measure: 43rem;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; min-width: 320px; margin: 0; background: var(--paper); font-size: 17px; line-height: 1.55; }
a { color: inherit; text-underline-offset: .14em; text-decoration-thickness: 1px; }
a:hover { color: #555; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.shell { width: min(calc(100% - 2.5rem), var(--measure)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; top: -3rem; left: 1rem; padding: .45rem .7rem; color: white; background: var(--ink); }
.skip-link:focus { top: 1rem; }

main { flex: 1; }
.site-header { border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.75rem; }
.brand, .footer-name { font-size: 1.05rem; line-height: 1; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.nav-links, .footer-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; }
.nav-links a { text-decoration: none; }

.intro { padding: 2rem 0 1.75rem; }
.byline { margin: 0 0 .6rem; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.025em; }
h1 { max-width: 30ch; margin: 0 0 .75rem; font-size: clamp(1.45rem, 3.5vw, 1.85rem); line-height: 1.25; }
.intro > p:not(.byline) { max-width: 39rem; margin: .65rem 0 0; }

.writing { padding: 1.5rem 0 1.75rem; border-top: 1px solid var(--line); }
.writing h2 { margin: 0 0 .3rem; font-size: 1.2rem; }
.writing-page { padding: 2rem 0 1.75rem; }
.writing-page h1 { margin-bottom: .3rem; }
.writing-intro { margin: 0 0 1.35rem; color: var(--muted); }
.empty-state { margin: 0; padding: 1.15rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
.article-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.article-list li { padding: .95rem 0 1rem; border-bottom: 1px solid var(--line); }
.article-list h2, .article-list h3 { margin: 0 0 .15rem; font-size: 1.15rem; line-height: 1.3; }
.article-list h2 a, .article-list h3 a { text-decoration: none; }
.article-list p { margin: 0 0 .3rem; color: var(--muted); font-size: .96rem; line-height: 1.45; }
.metadata { display: flex; flex-wrap: wrap; gap: .3rem .65rem; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; }

.site-footer { border-top: 1px solid var(--line); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.75rem; padding: .9rem 0 1.25rem; }
.footer-name { margin: 0; font-weight: 700; }

.article { max-width: 43rem; padding: 2rem 0 4rem; }
.article h1 { max-width: 30ch; font-size: clamp(1.6rem, 4vw, 2.1rem); }
.article .description { margin: 1rem 0; color: var(--muted); font-size: 1.1rem; }
.article-content { margin-top: 2.5rem; }
.article-content h2, .article-content h3 { margin-top: 2.25em; line-height: 1.2; }
.article-content h2 { font-size: 1.55rem; }
.article-content h3 { font-size: 1.2rem; }
.article-content code { padding: .1em .25em; background: #f2f2f2; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84em; }
.article-content pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--line); font-size: .82rem; }
.article-content pre code { padding: 0; background: transparent; }
.article-content blockquote { margin-left: 0; padding-left: 1rem; border-left: 2px solid var(--ink); color: var(--muted); }

@media (max-width: 540px) {
  .shell { width: min(calc(100% - 2rem), var(--measure)); }
  .nav { min-height: auto; padding: .8rem 0; align-items: flex-start; flex-direction: column; gap: .3rem; }
  .footer-row { align-items: flex-start; flex-direction: column; }
  .intro { padding-top: 1.5rem; }
}
