:root {
  color-scheme: light;
  --paper: #f3f1eb;
  --surface: #fffefa;
  --ink: #1b1d1a;
  --muted: #666b65;
  --line: #d9d7cf;
  --accent: #b65d3d;
  --green: #315b48;
  --dark: #17201b;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 400 13px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.site-header,
main,
.site-footer {
  width: min(100% - 64px, 1180px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 5;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  color: white;
  background: var(--dark);
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.site-header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: grid;
  text-decoration: none;
}

.brand b {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.07em;
}

.brand b span,
.site-footer > a:first-child span { color: var(--accent); }

.brand small {
  color: var(--muted);
  font: 8px var(--mono);
  letter-spacing: .1em;
}

.site-header nav {
  display: flex;
  gap: 30px;
  color: var(--muted);
  font: 10px var(--mono);
}

.site-header nav a,
.site-footer a { text-decoration: none; }

.site-header nav a:hover,
.site-footer a:hover { color: var(--accent); }

.hero {
  padding: clamp(74px, 10vw, 126px) 0 76px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.eyebrow-index,
.hero-meta,
.project-card-meta,
.project-level,
.project-group-count,
.site-footer > span,
.site-footer > a:last-child {
  font-family: var(--mono);
  letter-spacing: .08em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.hero h1 {
  margin: 22px 0 0;
  font-size: clamp(58px, 8.5vw, 104px);
  line-height: .94;
  letter-spacing: -.09em;
  overflow-wrap: anywhere;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-copy {
  max-width: 580px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.hero-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  color: white;
  background: var(--ink);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.hero-link:hover {
  color: var(--ink);
  background: transparent;
  transform: translateY(-2px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 8px;
}

.hero-meta span + span::before {
  content: "/";
  margin-right: 22px;
  color: var(--accent);
}

.projects { padding: 76px 0 86px; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 36px;
}

.eyebrow-index {
  margin: 0;
  color: var(--accent);
  font-size: 8px;
}

.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1.08;
  letter-spacing: -.075em;
}

.section-head > p {
  max-width: 350px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
}

.project-groups {
  display: grid;
  gap: 42px;
}

.project-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.project-group-heading h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.045em;
}

.project-group-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.project-group-count {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 8px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  position: relative;
  display: flex;
  min-height: 204px;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.project-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transition: opacity .18s ease;
}

.project-card:hover {
  border-color: #c9b2a4;
  box-shadow: 0 10px 26px #2b261d0d;
  transform: translateY(-3px);
}

.project-card:hover::before { opacity: 1; }

.project-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 7px;
}

.project-level {
  padding: 3px 6px;
  border: 1px solid #d7ded7;
  color: var(--green);
  font-size: 7px;
}

.project-card h3 {
  margin: 18px 0 7px;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -.045em;
}

.project-description {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
}

.project-action {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid transparent;
  font-size: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.project-action-guide {
  border-color: var(--accent);
  color: white;
  background: var(--accent);
}

.project-action-guide:hover {
  color: var(--accent);
  background: transparent;
}

.project-action-source {
  border-color: var(--line);
  color: var(--green);
  background: transparent;
}

.project-action-source:hover {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

.loading-message {
  color: var(--muted);
  font-size: 11px;
}

.site-footer {
  display: grid;
  min-height: 68px;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  border-top: 1px solid var(--line);
}

.site-footer > a:first-child {
  width: max-content;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.06em;
}

.site-footer > span,
.site-footer > a:last-child {
  color: var(--muted);
  font-size: 7px;
}

.site-footer > span { text-align: center; }
.site-footer > a:last-child { justify-self: end; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header,
  main,
  .site-footer { width: calc(100% - 36px); }

  .site-header { min-height: 68px; }
  .site-header nav { gap: 16px; font-size: 8px; }
  .hero { padding: 66px 0 58px; }
  .hero h1 { font-size: clamp(52px, 14vw, 74px); }
  .hero-copy { font-size: 12px; }
  .hero-meta { gap: 9px 14px; font-size: 7px; }
  .hero-meta span + span::before { margin-right: 14px; }
  .projects { padding: 58px 0 66px; }
  .section-head { align-items: start; flex-direction: column; gap: 10px; }
  .section-head h2 { font-size: 38px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 180px; }
  .site-footer { grid-template-columns: 1fr auto; min-height: 62px; }
  .site-footer > span { display: none; }
}

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