:root {
  --paper: #f4f0e6;
  --paper-deep: #e9e2d2;
  --ink: #20251f;
  --muted: #656b61;
  --accent: #bd4f32;
  --accent-dark: #84351f;
  --line: #ccc4b3;
  --focus: #267a78;
  --measure: 44rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  line-height: 1.7;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}
a { color: var(--accent-dark); text-decoration-thickness: .09em; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 1px; }
.site-shell { width: min(calc(100% - 2rem), 62rem); margin: 0 auto; position: relative; }
.skip-link { position: absolute; top: -5rem; left: 1rem; z-index: 2; background: var(--ink); color: var(--paper); padding: .5rem .75rem; }
.skip-link:focus { top: 1rem; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2rem 0 1.25rem; border-bottom: 1px solid var(--line); }
.identity { display: flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; }
.identity-mark { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; color: var(--paper); background: var(--accent); border-radius: 50% 47% 43% 48%; font-weight: 800; letter-spacing: -.08em; transform: rotate(-3deg); }
.identity strong, .identity small { display: block; }
.identity strong { font-size: 1rem; letter-spacing: -.03em; }
.identity small { color: var(--muted); font-family: Georgia, serif; font-size: .82rem; line-height: 1.35; }
nav { display: flex; gap: 1.35rem; }
nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }
nav a[aria-current="page"]::before { content: "• "; color: var(--accent); }
main { min-height: calc(100vh - 14rem); }
.intro { max-width: 52rem; padding: clamp(4.5rem, 11vw, 8.5rem) 0 clamp(4rem, 9vw, 7rem); }
.eyebrow { margin: 0 0 .8rem; color: var(--accent); font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.intro h1, .page-heading h1, .not-found h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.045em; line-height: 1.08; }
.intro h1 { max-width: 17ch; font-size: clamp(2.7rem, 7vw, 5.3rem); }
.intro > p:last-child { max-width: 37rem; margin: 1.75rem 0 0; color: var(--muted); font-family: Georgia, serif; font-size: clamp(1.15rem, 2vw, 1.4rem); }
.post-section { padding-bottom: 5rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--ink); }
.section-heading h2 { margin: 0 0 .55rem; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; }
.section-heading > a { font-size: .8rem; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.post-list time { color: var(--muted); font-size: .8rem; }
.post-list h3 { margin: -.15rem 0 0; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 400; line-height: 1.35; }
.post-list h3 a { color: var(--ink); text-decoration: none; }
.post-list h3 a:hover { color: var(--accent-dark); }
.post-list p { margin: .3rem 0 0; color: var(--muted); font-family: Georgia, serif; font-size: .95rem; }
.page-heading { padding: 4.5rem 0 2rem; }
.page-heading h1, .not-found h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); text-transform: capitalize; }
.page { max-width: var(--measure); margin: 0 auto; padding: 4.5rem 0 5rem; }
.prose { font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; line-height: 1.25; }
.prose h2 { margin-top: 2.5rem; font-size: 1.35rem; }
.prose h3 { margin-top: 2rem; font-size: 1.05rem; }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--line); }
.prose blockquote { margin: 2rem 0; padding-left: 1.25rem; border-left: .25rem solid var(--accent); color: var(--muted); }
.prose pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--line); background: var(--paper-deep); font-size: .85rem; line-height: 1.5; }
.prose code { padding: .1em .25em; background: var(--paper-deep); font-family: ui-monospace, monospace; font-size: .88em; }
.prose pre code { padding: 0; background: transparent; }
.article-header { margin-bottom: 3rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.article-header h1 { margin: 1.2rem 0 .7rem; font-family: Georgia, serif; font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 400; letter-spacing: -.04em; }
.article-header time, .back-link { color: var(--muted); font-family: ui-monospace, monospace; font-size: .8rem; }
.not-found { padding: 8rem 0; }
.site-footer { display: flex; justify-content: space-between; gap: 2rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.site-footer p { margin: 0; }
.social-links { display: flex; gap: 1rem; }
.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; }

@media (max-width: 640px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
  nav { width: 100%; justify-content: space-between; gap: .75rem; }
  .identity small { max-width: 30ch; }
  .post-list li { grid-template-columns: 1fr; gap: .3rem; }
  .section-heading { align-items: flex-end; }
  .site-footer { flex-direction: column; gap: .75rem; }
  .page { padding-top: 3rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
