
:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --paper: #fffefa;
  --ink: #191d19;
  --muted: #50584c;
  --line: #d1d4c9;
  --accent: #364d15;
  --lime: #e3fa91;
  --dark: #1b231a;
  --measure: 74rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

h1, h2, h3, p { margin: 0 0 .68em; }
h1, h2, h3 { line-height: 1.12; }
h1, h2 { letter-spacing: -.045em; }
h1 { font-size: clamp(2.65rem, 6vw, 5.1rem); font-weight: 780; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.65rem, 3.3vw, 2.7rem); font-weight: 740; }
h3 { font-size: 1.27rem; letter-spacing: -.028em; }
p { max-width: 65ch; }
small { font-size: .84rem; }
.wrap { width: min(var(--measure), calc(100% - 3.5rem)); margin-inline: auto; }
.quiet { color: var(--muted); font-size: .94rem; }
.lede { color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.31rem); max-width: 51ch; }

.skip { position: absolute; top: -7rem; z-index: 5; background: var(--paper); padding: .7rem; }
.skip:focus { top: .5rem; }
.site-header { border-bottom: 1px solid var(--line); }
.bar, .footer-body { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bar { min-height: 4.5rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 850;
  letter-spacing: .018em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { display: block; width: 2rem; height: 2rem; }
.nav, .footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem 1.3rem; }
.nav a { padding: .45rem .15rem; font-size: .94rem; font-weight: 690; color: var(--ink); text-decoration: none; }
.nav a[aria-current], .nav a:hover { text-decoration: underline; }
.nav a[aria-current] { text-decoration-thickness: 2px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-top: 1.35rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: .51rem .95rem;
  background: var(--dark);
  color: var(--paper);
  border: 1px solid var(--dark);
  font-size: .95rem;
  font-weight: 720;
  text-decoration: none;
}
.button:hover, .button:focus-visible { background: var(--accent); color: white; }
.button:focus-visible { outline-color: var(--ink); }
.button.secondary { color: var(--ink); background: transparent; border-color: #87917f; }
.button.secondary:hover { background: #e7ebde; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.actions + .quiet { margin-top: .7rem; }

.section { padding: clamp(1.6rem, 4vw, 2.8rem) 0; border-top: 1px solid var(--line); }
.section > h2 { margin-bottom: .65em; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { position: relative; height: 100%; min-height: 9rem; padding: clamp(.95rem, 2.4vw, 1.65rem); background: var(--paper); overflow-wrap: anywhere; }
.card:has(h3 a):hover, .card:focus-within { background: #f1f5e5; }
.card h3 a { color: var(--ink); text-decoration-thickness: 1px; }
.card h3 a::after { position: absolute; inset: 0; content: ""; }
.card p { color: var(--muted); }
.card .card-meta, .eyebrow {
  color: var(--accent);
  font-size: .73rem;
  font-weight: 780;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.card p:last-child { margin-bottom: 0; }
.directory-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  border: 0;
  margin: 1rem 0 clamp(2rem, 5vw, 4rem);
  padding: clamp(1.15rem, 3.5vw, 2.4rem);
  background: var(--lime);
}
.directory-section h2 { margin-bottom: .25em; }
.directory-section p { margin: 0; color: #334225; }
.directory-section .button { flex-shrink: 0; }

.page { padding: clamp(2.4rem, 6vw, 5rem) 0 4rem; min-height: 65vh; }
.page > header { margin-bottom: 2.05rem; }
.page h1 { margin-bottom: .25em; max-width: 18ch; }
.eyebrow { margin-bottom: .85rem; }
.prose { max-width: 47rem; }
.prose h2 { margin-top: 1.35em; font-size: clamp(1.45rem, 2.75vw, 2.1rem); }
.prose p { line-height: 1.72; }
.prose li { margin: .35rem 0; }
.back-link, .byline { color: var(--muted); font-size: .94rem; }
.back-link { margin-bottom: 1.35rem; }
[data-article] article { border-top: 1px solid var(--line); margin-top: 1.35rem; }
.profile-projects { margin-top: 2.45rem; }
.footer { border-top: 1px solid var(--line); padding: 1.8rem 0 2.5rem; }
.footer-body { flex-wrap: wrap; align-items: flex-start; }
.footer nav { gap: .55rem 1.1rem; font-size: .91rem; }
.footer nav a { color: var(--muted); }
.visit-total { margin: .2rem 0 0; color: var(--muted); font-size: .86rem; white-space: nowrap; }
.visit-total span { margin-left: .32rem; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 740; }

label { display: block; font-weight: 670; }
input, select, textarea {
  width: 100%;
  padding: .52rem .7rem;
  border: 1px solid #87917f;
  border-radius: 0;
  color: var(--ink);
  background: var(--paper);
}
.project-search { width: min(29rem, 100%); }
.project-search input { margin-top: .34rem; }
.project-nav { display: flex; flex-wrap: wrap; gap: .45rem .6rem; margin: .45rem 0 1.5rem; }
.project-nav a { border: 1px solid var(--line); padding: .3rem .6rem; text-decoration: none; font-size: .92rem; }
.project-nav a:hover { background: var(--paper); text-decoration: underline; }
.project-group { scroll-margin-top: 1rem; }
.panel { padding: 1.25rem; border: 1px solid var(--line); background: var(--paper); }
.status { min-height: 1.55rem; margin: .58rem 0; color: var(--accent); overflow-wrap: anywhere; }
.status[data-error] { color: #a32420; }
.guide { border-left: 3px solid var(--accent); padding: .12rem 0 .12rem .85rem; margin: 1.3rem 0; }

@media (max-width: 43rem) {
  .wrap { width: calc(100% - 2rem); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-section { align-items: flex-start; flex-direction: column; }
  .nav { gap: .3rem .65rem; }
}
@media (max-width: 28rem) {
  .bar { flex-wrap: wrap; gap: .25rem .55rem; padding: .65rem 0; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: auto; }
}

