:root {
  --paper: #f2efe7;
  --ink: #171915;
  --muted: #676a60;
  --line: #c9c5b9;
  --accent: #8e2d22;
  --code: #e7e2d6;
  --measure: 46rem;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  margin: 0 auto; padding: 0 1.2rem; max-width: 58rem; min-height: 100vh;
  color: var(--ink); background: var(--paper);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
  line-height: 1.64; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: .07em; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { color: var(--paper); background: var(--accent); }
.skip-link { position: absolute; top: -4rem; left: 1rem; z-index: 10; padding: .5rem .75rem; color: var(--paper); background: var(--ink); }
.skip-link:focus { top: 1rem; }
.site-header, .site-footer { font: .78rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .015em; }
.site-header { display: flex; justify-content: space-between; align-items: baseline; min-height: 7rem; padding: 2.2rem 0 1.2rem; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); font-weight: 700; text-decoration: none; }
.wordmark span { color: var(--accent); }
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { color: var(--ink); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
main { max-width: var(--measure); margin: 0 auto; }
.intro { padding: 6.4rem 0 5.5rem; }
.eyebrow, .meta, .post-list time, .plain-list span, .archive small {
  color: var(--muted); font: .7rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .055em; text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 42rem; margin-bottom: 1.6rem; font-size: clamp(2.15rem, 6.2vw, 4.35rem); font-weight: 500; line-height: 1.02; letter-spacing: -.045em; }
.intro-copy { max-width: 40rem; margin-bottom: .75rem; font-size: 1.12rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.8rem; }
.text-button { font: .76rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .04em; }
.index-section { padding: 2.2rem 0 3rem; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.6rem; }
.section-heading h2, .cv-grid h2 { margin: 0; font: 700 .74rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .055em; text-transform: uppercase; }
.section-heading > a { font-size: .85rem; }
.post-list { margin: 0; padding: 0; list-style: none; }
.post-list li { display: grid; grid-template-columns: 7.7rem 1fr; gap: 1rem; padding: .85rem 0 1rem; border-bottom: 1px dotted var(--line); }
.post-list li:last-child { border-bottom: 0; }
.post-list li > div > a { color: var(--ink); font-size: 1.15rem; font-weight: 600; text-decoration: none; }
.post-list li > div > a:hover { color: var(--accent); }
.post-list p { margin: .25rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { margin: .55rem 0; }
.plain-list span { display: inline-block; width: 7.4rem; color: var(--accent); }
.page-header { padding: 5.4rem 0 3rem; border-bottom: 1px solid var(--line); }
.page-header h1 { margin-bottom: .7rem; }
.page-header > p:not(.eyebrow):not(.actions) { max-width: 38rem; color: var(--muted); }
.archive { padding: 2rem 0 4rem; }
.archive small { display: block; margin-top: .35rem; }
.post { padding: 5rem 0 4rem; }
.post-header { padding-bottom: 2.4rem; border-bottom: 1px solid var(--line); }
.post-header h1 { max-width: 45rem; font-size: clamp(2.35rem, 7vw, 4.8rem); }
.lede { max-width: 40rem; color: var(--muted); font-size: 1.15rem; line-height: 1.5; }
.prose { padding: 2.5rem 0 1rem; }
.prose h2 { margin: 2.8rem 0 .9rem; font-size: 1.55rem; line-height: 1.2; }
.prose h3 { margin: 2rem 0 .6rem; font-size: 1.1rem; }
.prose p, .prose ul, .prose ol { max-width: 42rem; }
.prose li { margin: .42rem 0; }
.prose blockquote { margin: 1.8rem 0; padding: .1rem 0 .1rem 1.2rem; border-left: 2px solid var(--accent); color: var(--muted); font-style: italic; }
code { padding: .08em .28em; background: var(--code); font: .83em/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { max-width: 100%; overflow-x: auto; margin: 1.7rem 0; padding: 1rem; color: var(--paper); background: var(--ink); line-height: 1.45; }
pre code { padding: 0; color: inherit; background: transparent; }
hr { margin: 2.4rem 0; border: 0; border-top: 1px solid var(--line); }
.post-end { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); font: .75rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.post-end span { color: var(--accent); }
.cv-head .role { color: var(--ink) !important; font-size: 1.1rem; }
.cv-grid { display: grid; grid-template-columns: 12rem 1fr; gap: 3.2rem; padding: 3rem 0 4rem; }
.cv-grid aside section { margin-bottom: 2rem; }
.cv-grid aside p { margin-top: .7rem; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.cv-main > section { margin-bottom: 3.2rem; }
.cv-main > section > h2 { margin-bottom: 1.2rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.cv-entry { margin-bottom: 2.4rem; }
.cv-entry header { display: flex; justify-content: space-between; gap: 1rem; }
.cv-entry h3, .project-entry h3 { margin: 0; font-size: 1rem; }
.cv-entry header p, .cv-entry time { color: var(--muted); font: .76rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cv-entry ul { margin: .8rem 0 0; padding-left: 1.1rem; }
.cv-entry li { margin: .45rem 0; font-size: .91rem; line-height: 1.48; }
.project-entry { margin-bottom: 1.4rem; }
.project-entry h3 a { color: var(--ink); text-decoration: none; }
.project-entry p { margin-top: .3rem; color: var(--muted); font-size: .9rem; }
.error-page { min-height: 65vh; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 42rem) {
  html { font-size: 16px; }
  body { padding: 0 1rem; }
  .site-header { min-height: 5.5rem; padding-top: 1.6rem; }
  .intro { padding: 4.5rem 0 4rem; }
  .post-list li { grid-template-columns: 1fr; gap: .15rem; }
  .plain-list span { width: auto; margin-right: .7rem; }
  .cv-grid { grid-template-columns: 1fr; gap: 1rem; }
  .cv-grid aside { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .cv-grid aside section { margin-bottom: .5rem; }
}
@media (max-width: 25rem) {
  .site-header { align-items: flex-start; }
  .site-header nav { gap: .7rem; }
  .cv-grid aside { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #151613; --ink: #dedbd1; --muted: #9a9b91; --line: #393a34; --accent: #d46a55; --code: #252720; }
}
@media print {
  :root { --paper: #fff; --ink: #000; --muted: #444; --line: #aaa; --accent: #000; --code: #eee; }
  body { max-width: none; font-size: 10pt; }
  .site-header, .site-footer, .actions { display: none; }
  .page-header { padding: 0 0 1rem; }
  .cv-grid { grid-template-columns: 10rem 1fr; padding-top: 1.5rem; }
}
