
:root {
  --bg: #FAF8F4; --ink: #1C1915; --muted: #6F675A; --accent: #B85A12;
  --hair: #E7E1D6; --card: #FFFFFF;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #171310; --ink: #EDE7DC; --muted: #9C9280; --accent: #E58A3E; --hair: #2C261E; --card: #201B16; }
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.65;
  font-size: 1.0625rem; -webkit-font-smoothing: antialiased; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--accent); color: #fff; padding: .5rem 1rem; z-index: 10; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; border-radius: 6px; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: 42rem; }

/* header */
header.site { border-bottom: 1px solid var(--hair); }
header.site .wrap { display: flex; align-items: baseline; gap: 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; flex-wrap: wrap; }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; letter-spacing: .01em;
  color: var(--ink); text-decoration: none; }
nav.primary { margin-left: auto; display: flex; gap: 1.4rem; align-items: baseline; }
nav.primary a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav.primary a[aria-current="page"], nav.primary a:hover { color: var(--ink); }
nav.primary a.btn { color: var(--bg); }
nav.primary a.btn:hover { color: #fff; }
@media (max-width: 640px) {
  header.site .wrap { padding-top: .9rem; padding-bottom: .9rem; row-gap: .8rem; }
  nav.primary { margin-left: 0; width: 100%; gap: .5rem 1.1rem; align-items: center; flex-wrap: wrap; }
  nav.primary a.btn { padding: .45rem .95rem; font-size: .9rem; }
}
.btn { display: inline-block; background: var(--ink); color: var(--bg); border-radius: 999px;
  padding: .55rem 1.15rem; font-size: .95rem; text-decoration: none; border: 1px solid var(--ink);
  white-space: nowrap; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }

/* hero */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.kicker { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
h1 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -0.015em;
  font-size: clamp(2.4rem, 6vw, 4.25rem); margin: .75rem 0 1.25rem; text-wrap: balance; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 38rem; }
.cta-row { display: flex; gap: .8rem; margin-top: 2rem; flex-wrap: wrap; }

/* sections */
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
section + section { border-top: 1px solid var(--hair); }
h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.01em; margin-bottom: 1.25rem; text-wrap: balance; }
h3 { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head a { font-size: .95rem; white-space: nowrap; }
p + p { margin-top: 1rem; }

/* systems list */
ol.systems { list-style: none; counter-reset: sys; padding: 0; max-width: 46rem; }
ol.systems li { counter-increment: sys; display: grid; grid-template-columns: 3rem 1fr;
  gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--hair); }
ol.systems li::before { content: counter(sys, decimal-leading-zero); font-family: var(--serif);
  color: var(--accent); font-size: 1.1rem; padding-top: .1rem; }
ol.systems li:last-child { border-bottom: 1px solid var(--hair); }
ol.systems strong { display: block; font-weight: 600; }
ol.systems span { color: var(--muted); font-size: .97rem; }

/* project list */
.plist { display: grid; gap: 2.25rem; }
.pitem { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr); gap: 1.5rem; align-items: start;
  text-decoration: none; color: inherit; }
.pitem img { aspect-ratio: 3/2; object-fit: cover; }
.pitem .tag { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pitem h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin: .3rem 0 .4rem; }
.pitem p { color: var(--muted); }
.pitem:hover h3 { color: var(--accent); }
@media (max-width: 640px) { .pitem { grid-template-columns: 1fr; } }

/* testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.25rem; }
.quotes figure { background: var(--card); border: 1px solid var(--hair); border-radius: 8px; padding: 1.4rem; }
.quotes blockquote { font-size: .98rem; }
.quotes blockquote::before { content: "“"; font-family: var(--serif); font-size: 2rem;
  line-height: 0; color: var(--accent); display: block; margin: .6rem 0 .2rem; }
.quotes figcaption { margin-top: .9rem; font-size: .9rem; display: flex; align-items: center; gap: .7rem; }
.quotes figcaption b { display: block; }
.quotes figcaption span { color: var(--muted); }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* article */
article.post { padding: clamp(3rem, 7vw, 5rem) 0; }
article.post .meta { color: var(--muted); font-size: .95rem; margin-bottom: 2rem; }
article.post h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 2.25rem 0 .75rem; }
article.post ul { padding-left: 1.2rem; margin: 1rem 0; }
article.post li + li { margin-top: .4rem; }
article.post figure { margin: 2rem 0; }
article.post figcaption { font-size: .88rem; color: var(--muted); margin-top: .5rem; }
.cover { aspect-ratio: 16/8; object-fit: cover; margin-bottom: 2.25rem; }

/* index lists */
.postlist { list-style: none; padding: 0; max-width: 46rem; }
.postlist li { border-top: 1px solid var(--hair); }
.postlist li:last-child { border-bottom: 1px solid var(--hair); }
.postlist a { display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline;
  padding: 1.2rem 0; text-decoration: none; color: inherit; }
.postlist a:hover h3 { color: var(--accent); }
.postlist time { color: var(--muted); font-size: .9rem; white-space: nowrap; }

ol.books { columns: 2; column-gap: 3rem; padding-left: 1.4rem; max-width: 60rem; }
ol.books li { margin-bottom: .55rem; break-inside: avoid; }
@media (max-width: 640px) { ol.books { columns: 1; } }
.shelf { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2.5rem; max-width: 60rem; }
@media (max-width: 640px) { .shelf { grid-template-columns: 1fr; } }

/* intro grid */
.intro-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr); gap: 2.5rem; align-items: center; }
.intro-grid img { aspect-ratio: 4/5; object-fit: cover; }
@media (max-width: 700px) { .intro-grid { grid-template-columns: 1fr; } }

/* cta band */
.band { border-top: 1px solid var(--hair); background: var(--card); }
.band .wrap { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }

/* footer */
footer.site { border-top: 1px solid var(--hair); margin-top: 3rem; }
footer.site .wrap { padding: 2.5rem 1.25rem; display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
footer.site nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
footer.site a { color: var(--muted); text-decoration: none; font-size: .95rem; }
footer.site a:hover { color: var(--ink); }
footer.site .fine { color: var(--muted); font-size: .85rem; width: 100%; }
