:root {
  --paper: #f2f5f3;
  --ink: #12263a;
  --muted: #52667a;
  --line: #c9d3cf;
  --accent: #0b6e4f;
  --mark: #f4b942;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1c27;
    --ink: #e8eeea;
    --muted: #9db0bd;
    --line: #2b3d4b;
    --accent: #5fd0a4;
    --mark: #f4b942;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  max-width: var(--max); margin: 0 auto; padding: 1.5rem 1.5rem 0;
}
.wordmark { font-weight: 800; text-decoration: none; letter-spacing: -.01em; }
.site-header nav { display: flex; gap: 1.5rem; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 6px; }

main { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* Hero */
.hero { padding: clamp(4rem, 14vw, 9rem) 0 clamp(3rem, 8vw, 5rem); }
.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.75rem);
  line-height: 1.02; letter-spacing: -.035em; font-weight: 800;
  margin: 0 0 1.5rem; max-width: 14em;
}
.lede { color: var(--muted); max-width: 34em; margin: 0 0 2rem; }
.button {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 600;
  padding: .8rem 1.4rem; border-radius: .4rem; text-decoration: none;
}
@media (prefers-color-scheme: dark) { .button { color: #0f1c27; } }
.button:hover { filter: brightness(1.1); }

/* Sections */
.block { padding: 3rem 0; border-top: 1px solid var(--line); }
.block h2 { font-size: 1rem; font-weight: 600; color: var(--muted); margin: 0 0 1.5rem; }
.prose { max-width: 36em; }
.prose p { margin: 0 0 1rem; }

/* Work list */
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li + li { border-top: 1px solid var(--line); }
.work-list a, .work-list .item {
  display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem;
  padding: 1.25rem 0; text-decoration: none;
}
.work-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
.work-desc { grid-column: 1; color: var(--muted); }
.work-year { grid-column: 2; grid-row: 1; color: var(--muted); }
.work-list a:hover .work-title { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* Contact */
.big-link { font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 600; letter-spacing: -.02em; color: var(--accent); }
.elsewhere { color: var(--muted); }

/* Footer */
.site-footer { max-width: var(--max); margin: 0 auto; padding: 2rem 1.5rem 3rem; color: var(--muted); font-size: .95rem; }
.site-footer p { margin: 0; border-top: 1px solid var(--line); padding-top: 1.5rem; }

@media (max-width: 30rem) {
  .site-header nav { gap: 1rem; }
  .work-list a, .work-list .item { grid-template-columns: 1fr; }
  .work-year { grid-column: 1; grid-row: auto; }
}

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

/* Multi-page additions */
.site-header { flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.page { padding: clamp(3rem, 10vw, 6rem) 0 3rem; }
.page h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; margin: 0 0 1rem; }
.page .intro { color: var(--muted); max-width: 34em; margin: 0 0 2.5rem; }
