:root {
  --bg: #f8f6f1;
  --bg-soft: #f1eee6;
  --card: #fcfbf8;
  --fg: #22211e;
  --muted: #66635b;
  --rule: #dedacd;
  --accent: #9a4a22;
  --link: #2b4a6f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141418;
    --bg-soft: #1a1a1f;
    --card: #191920;
    --fg: #e8e5dc;
    --muted: #9a978c;
    --rule: #2a2a31;
    --accent: #e0a77c;
    --link: #94b4d8;
  }
}
* { box-sizing: border-box; }
html { font-size: clamp(18px, 0.6vw + 8px, 20px); scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--serif); line-height: 1.7; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--bg); }
a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* top bar */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.bar-in {
  max-width: 78rem; margin: 0 auto; padding: .8rem 1.5rem;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand { font-size: 1rem; font-weight: 600; color: var(--fg); text-decoration: none; letter-spacing: -.005em; }
nav { display: flex; gap: 1.4rem; font-family: var(--sans); font-size: .8rem; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
nav a:hover, nav a.on { color: var(--fg); border-bottom-color: var(--accent); }

.wrap { max-width: 78rem; margin: 0 auto; padding: 0 1.5rem; }

/* hero */
.hero {
  padding: 3.75rem 0 3rem;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 32rem);
  gap: 3rem; align-items: center;
}
.motif {
  order: 2; width: 100%; height: 21rem;
  color: var(--accent); opacity: .24; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28%);
  mask-image: linear-gradient(to right, transparent, #000 28%);
}
.motif path { vector-effect: non-scaling-stroke; }
.hero-in { max-width: 44rem; }
.eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.25rem; }
.eyebrow b { color: var(--accent); font-weight: 500; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 1.5rem; }
.lede { font-size: 1.35rem; line-height: 1.55; margin: 0 0 1.1rem; max-width: 42rem; }
.hero p.body { max-width: 42rem; margin: .65rem 0; }

/* sections */
section { padding: 2.5rem 0 2.75rem; border-top: 1px solid var(--rule); }
.label {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1.5rem; display: flex; align-items: center; gap: .75rem;
}
.label b { color: var(--accent); font-weight: 500; }
.label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.intro { max-width: 40rem; margin: 0 0 1.75rem; }

.grid { display: grid; gap: 1.25rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 6px;
  padding: 1.4rem 1.5rem 1.5rem; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); }
.card h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .15rem; line-height: 1.35; }
.card p { margin: .5rem 0 0; font-size: .95rem; line-height: 1.62; }
.tag { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 .6rem; }
.card .more { font-family: var(--sans); font-size: .8rem; margin-top: .9rem; display: inline-block; }

.question {
  margin: 0 0 1.5rem; padding: 1.5rem 1.75rem;
  background: var(--bg-soft); border-left: 2px solid var(--accent);
  font-style: italic; font-size: 1.2rem; line-height: 1.55;
}
.note { color: var(--muted); font-size: .92rem; margin: 1.5rem 0 0; max-width: 40rem; }

footer { border-top: 1px solid var(--rule); padding: 1.75rem 0 3rem; font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero-in, section { animation: rise .6s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 820px) {
  .g3 { grid-template-columns: 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 0 2rem; grid-template-columns: 1fr; gap: 1.5rem; }
  .motif { height: 6rem; }
}

/* ---- musings (homepage card) ---- */
.feature {
  display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 2rem; align-items: center;
  background: var(--card); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden;
  color: inherit; text-decoration: none; transition: border-color .2s;
}
.feature:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); color: inherit; }
.feature img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.feature-body { padding: 1.6rem 2rem 1.6rem 0; }
.feature-body h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 .5rem; font-weight: 600; }
.feature-body p { margin: .4rem 0 0; font-size: .97rem; line-height: 1.62; }
.feature .more { font-family: var(--sans); font-size: .8rem; color: var(--link); margin-top: .9rem; display: inline-block; }
.feature:hover .more { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  .sketch { filter: invert(1); }
  .feature img { background: #000; }
}
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 0; }
  .feature-body { padding: 1.25rem 1.5rem 1.5rem; }
}

/* ---- essay page ---- */
.article { max-width: 42rem; margin: 0 auto; padding: 3.5rem 1.5rem 4rem; }
.article .eyebrow { margin-bottom: 1rem; }
.article h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); line-height: 1.15; margin: 0 0 1.75rem; }
.article figure { margin: 0 0 2.25rem; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #fff; }
.article figure img { display: block; width: 100%; height: auto; }
.article p { font-size: 1.06rem; line-height: 1.78; margin: 1.1rem 0; }
.article .end {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule);
  font-family: var(--sans); font-size: .85rem; color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
}
@media (prefers-color-scheme: dark) { .article figure { background: #000; } }
.article .written { margin-top: 2rem; font-family: var(--sans); font-size: .82rem; font-style: italic; color: var(--muted); }

/* ---- accessibility ---- */
h2.label { font-weight: 400; line-height: inherit; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--fg); color: var(--bg); padding: .55rem .9rem; border-radius: 4px;
  font-family: var(--sans); font-size: .85rem; text-decoration: none;
}
.skip:focus { top: .75rem; color: var(--bg); }
.card .links { margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.card .links .more { margin-top: 0; }
