:root {
  color-scheme: light dark;
  --paper: #f3eee4;
  --paper-deep: #e9e1d3;
  --ink: #172522;
  --muted: #58635f;
  --line: #cfc6b7;
  --accent: #285f52;
  --accent-strong: #17493e;
  --rust: #a44d35;
  --card: #faf7f0;
  --focus: #0067c5;
  --shell: min(1120px, calc(100% - 48px));
  --serif: Iowan Old Style, Palatino Linotype, Book Antiqua, Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-strong);
}

a:focus-visible {
  border-radius: 0.15rem;
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  transform: translateY(-180%);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-layout,
.footer-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-layout {
  min-height: 6rem;
}

.site-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav ul,
.site-footer ul,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: var(--rust);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5rem;
}

.hero {
  display: grid;
  align-content: center;
  min-height: min(720px, calc(100vh - 6rem));
  padding-block: 7rem 8rem;
}

.eyebrow,
.project-label,
.archive-index,
.archive-count {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.eyebrow::before {
  width: 2rem;
  height: 2px;
  background: var(--rust);
  content: "";
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  max-width: 950px;
  margin-block: 1.4rem 1.8rem;
  font-size: clamp(3.2rem, 7.6vw, 6.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.15rem, 4vw, 3.65rem);
  font-weight: 550;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 1rem;
  font-size: clamp(1.65rem, 2.8vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.hero-copy,
.page-lede {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.45rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 100vmax;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
}

.button-primary:hover {
  background: var(--accent-strong);
  color: #fff;
}

.button-secondary:hover {
  background: var(--card);
}

.section {
  padding-block: clamp(5.5rem, 10vw, 9rem);
  border-top: 1px solid var(--line);
}

.section-tinted {
  background: var(--paper-deep);
}

.section-heading {
  display: grid;
  grid-template-columns: 4rem minmax(0, 700px);
  margin-bottom: 3.5rem;
}

.section-heading > div > p,
.large-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}

.section-number {
  margin: 0.35rem 0 0;
  color: var(--rust);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 365px;
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--card);
}

.project-card h3 {
  margin-top: 2.8rem;
}

.project-card > p:not(.project-label, .project-status) {
  max-width: 32rem;
  color: var(--muted);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.privacy-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.project-status,
.updated {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: auto;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
}

.project-status span,
.updated span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--rust);
}

.project-card .text-link {
  margin-top: 1.2rem;
  align-self: flex-start;
}

.text-link,
.source-link {
  color: var(--accent-strong);
  font-weight: 750;
  text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(200px, 0.65fr) minmax(0, 1.35fr);
  gap: 4rem;
}

.section-contact {
  background: var(--ink);
  color: var(--paper);
}

.section-contact .large-copy {
  color: #c8cec9;
}

.section-contact .section-number,
.section-contact a:hover {
  color: #e79a7e;
}

.contact-links {
  gap: 0.5rem 2rem;
  margin-top: 2rem;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 750;
}

.external-mark {
  margin-left: 0.35em;
  font-family: var(--sans);
  font-size: 0.8em;
  text-decoration: none;
}

.site-footer {
  padding-block: 2.3rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.interior-main {
  min-height: calc(100vh - 11rem);
}

.narrow-page,
.archive-page {
  padding-block: clamp(5.5rem, 10vw, 9rem);
}

.narrow-page {
  max-width: 900px;
}

.not-found-page {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 11rem);
}

.not-found-page h1 {
  margin-block: 1.2rem 1.4rem;
}

.page-intro {
  padding-bottom: clamp(4.5rem, 8vw, 7rem);
}

.page-intro h1 {
  margin-block: 1.2rem 1.4rem;
}

.updated {
  margin-top: 2rem;
}

.focus-list {
  border-top: 1px solid var(--line);
}

.focus-list section {
  display: grid;
  grid-template-columns: 3rem 13rem minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.focus-list h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.focus-list p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.back-link {
  margin: 3rem 0 0;
}

.archive-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 2rem;
  align-items: end;
}

.archive-intro .eyebrow,
.archive-intro h1,
.archive-intro .page-lede {
  grid-column: 1;
}

.archive-intro .archive-count {
  grid-column: 2;
  grid-row: 3;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.archive-list {
  border-top: 1px solid var(--line);
}

.archive-entry {
  display: grid;
  grid-template-columns: 4rem minmax(0, 780px);
  gap: 0;
  padding-block: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.archive-index {
  margin-top: 0.35rem;
  color: var(--rust);
}

.archive-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.archive-meta a {
  font-weight: 700;
}

.archive-entry h2 {
  margin-block: 0 1.3rem;
  font-size: clamp(1.75rem, 3.6vw, 2.65rem);
}

.archive-entry h2 a {
  text-decoration: none;
}

.archive-entry > div > p:not(.archive-meta) {
  max-width: 760px;
  color: var(--muted);
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.3rem;
  font-size: 0.88rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14211f;
    --paper-deep: #1b2b28;
    --ink: #f0eadf;
    --muted: #b9c0ba;
    --line: #40514d;
    --accent: #8cc8b5;
    --accent-strong: #9ed7c4;
    --rust: #ef9b7d;
    --card: #20312e;
    --focus: #70b7ff;
  }

  .button-primary {
    background: var(--ink);
    color: #14211f;
  }

  .section-contact {
    background: #0c1513;
  }
}

@media (max-width: 760px) {
  :root {
    --shell: min(100% - 32px, 1120px);
  }

  .header-layout {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
    min-height: auto;
    padding-block: 1.2rem 0.7rem;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    justify-content: space-between;
    gap: 0 0.55rem;
  }

  .site-nav a {
    min-height: 2.8rem;
  }

  .hero {
    min-height: auto;
    padding-block: 5rem 5.5rem;
  }

  h1 {
    font-size: clamp(2.85rem, 14vw, 4.8rem);
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
    min-height: 3.35rem;
  }

  .section-heading,
  .split-section,
  .project-grid,
  .archive-intro {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .split-section {
    gap: 1.2rem;
  }

  .project-card {
    min-height: 330px;
  }

  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }

  .archive-intro .archive-count {
    grid-column: 1;
    grid-row: auto;
    margin-top: 1.3rem;
  }

  .focus-list section {
    grid-template-columns: 2.5rem 1fr;
  }

  .focus-list section > p:last-child {
    grid-column: 2;
  }

  .archive-entry {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }
}

@media (max-width: 390px) {
  .site-nav a {
    font-size: 0.82rem;
  }

  .archive-entry {
    grid-template-columns: 1fr;
  }

  .archive-index {
    margin-bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
