:root {
  --paper: #f7f4ec;
  --ink: #24211d;
  --muted: #6f6659;
  --rule: #d7cebf;
  --card: #fffdf7;
  --green: #4f7f3a;
  --red: #a44838;
  --blue: #2f6673;
  --gold: #b7791f;
  --shadow: 0 18px 55px rgba(36, 33, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration-color: rgba(164, 72, 56, 0.45);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--red);
  text-decoration-color: currentColor;
}

.site-header,
.site-footer,
main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--rule);
}

.brand,
nav a,
.eyebrow,
.section-kicker {
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.brand {
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

nav a {
  text-decoration: none;
  color: var(--muted);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 880px);
  gap: 18px;
  padding: 42px 0 32px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 920px;
  margin-bottom: 0;
  font-size: clamp(3rem, 7.2vw, 5.1rem);
  line-height: 0.92;
  font-weight: 400;
}

.lede {
  max-width: 660px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.project-section {
  padding: 30px 0 64px;
  border-top: 1px solid var(--rule);
}

.section-heading {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: baseline;
  margin-bottom: 26px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.05;
  font-weight: 400;
}

.project-grid {
  display: grid;
  gap: 24px;
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.single-grid {
  grid-template-columns: minmax(0, 1fr);
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.project-card > a {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #161615;
  text-decoration: none;
}

.project-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease, opacity 180ms ease;
}

.project-card:hover img {
  transform: scale(1.025);
  opacity: 0.92;
}

.project-copy {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.project-card-featured .project-copy,
.project-card-wide .project-copy {
  padding: 24px;
}

h3 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.05;
  font-weight: 400;
}

.compact-grid h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.project-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.project-card:nth-child(3n + 1) h3 a {
  text-decoration-color: rgba(79, 127, 58, 0.5);
}

.project-card:nth-child(3n + 2) h3 a {
  text-decoration-color: rgba(47, 102, 115, 0.5);
}

.project-card:nth-child(3n + 3) h3 a {
  text-decoration-color: rgba(183, 121, 31, 0.55);
}

.site-footer {
  padding: 34px 0 48px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin-bottom: 0;
}

.load-error {
  padding: 24px 0 64px;
  color: var(--red);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .intro {
    padding: 46px 0 42px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .feature-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 28px, 1120px);
  }

  nav {
    gap: 12px;
    font-size: 0.76rem;
  }

  h1 {
    font-size: clamp(2.55rem, 15vw, 4rem);
  }

  .project-section {
    padding: 36px 0 48px;
  }

  .project-copy,
  .project-card-featured .project-copy,
  .project-card-wide .project-copy {
    padding: 18px;
  }
}
