:root {
  --ink: #181815;
  --muted: #6d6d66;
  --line: #d5d5ce;
  --sans: 'Space Grotesk', sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fafaf8;
  color: var(--ink);
  font: .9rem/1.45 var(--serif);
}

a {
  color: inherit;
  text-underline-offset: .2em;
}

blockquote {
  font-style: italic;
}

a:hover {
  color: #535f80;
}

a:focus-visible {
  outline: 2px solid #344c9b;
  outline-offset: 4px;
}

.skip {
  position: absolute;
  top: -5rem;
  left: 1rem;
  background: white;
  padding: .5rem;
}

.skip:focus {
  top: 1rem;
}

.site-header,
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  font: .7rem var(--sans);
}

.site-header {
  padding: 1.7rem 3vw;
  border-bottom: 1px solid var(--line);
}

.site-backdrop {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.site-header-light {
  color: white;
  border-bottom-color: rgb(255 255 255 / 35%);
  text-shadow: 0 1px 3px rgb(0 0 0 / 55%);
}

.site-header-light .brand span {
  color: rgb(255 255 255 / 85%);
}

.site-header-light nav a:hover {
  color: white;
}

.brand {
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
}

.brand span {
  display: block;
  font-size: .6rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: .35rem;
}

.site-header nav {
  display: flex;
  gap: 2rem;
}

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

.home-copy h1,
.home-copy .h1 {
  font-size: clamp(4rem, 4.4vw, 5.2rem);
}

.intro,
.work,
.contact-page {
  margin: 0 3vw;
}

.intro {
  min-height: clamp(20rem, 43vw, 36rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0;
}

.eyebrow,
.section-heading,
.project-heading,
.sample-note,
figcaption {
  font-family: var(--sans);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .6rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

h1,
h2,
h3,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
p {
  margin-top: 0;
}

h1,
.h1 {
  font-family: var(--sans);
  font-size: clamp(2.08rem, 4.4vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  font-weight: 500;
  margin-bottom: 2rem;
}

h1 em,
.h1 em {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.045em;
}

.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: var(--sans);
  line-height: 1.2;
  font-weight: 500;
  margin-bottom: 1rem;
}

.h2 {
  font-size: 1.5em;
}

.h3 {
  font-size: 1.17em;
}

.h4 {
  font-size: 1em;
}

.h5 {
  font-size: .83em;
}

.h6 {
  font-size: .67em;
}

.intro-note {
  font-size: .8rem;
  margin: 0;
}

.section-heading {
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0 3rem;
  font-size: .64rem;
  color: var(--muted);
}

.site-backdrop-image + main #work .section-heading {
  border-top: 0;
}

.section-heading h2 {
  font-size: .8rem;
  color: var(--ink);
  font-weight: 500;
  margin: 0;
}

.project {
  padding-bottom: 6rem;
}

.project-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.project-heading h3 {
  font-size: clamp(1.12rem, 1.6vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -.04em;
}

.project-heading p {
  text-align: right;
  font-size: .64rem;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.project-media {
  --media-gap: 1.05rem;
  min-width: 0;
  grid-column: 2 / -1;
  grid-row: 1;
  column-count: 3;
  column-gap: var(--media-gap);
}

.project-media > figure {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: var(--media-gap);
  vertical-align: top;
}

.project-copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: flow-root;
  overflow-wrap: anywhere;
}

.project-grid > .project-copy:only-child {
  grid-column: 1 / -1;
}

.project-intro {
  font-style: italic;
}

.project-credits h5 {
  margin-bottom: 0;
}

.project-credits p {
  font-size: .9em;
  margin-top: 0;
}

.project-copy .prose {
  max-width: none;
}

.project-grid > [hidden] {
  display: none;
}

@media (min-width: 750px) {
  .project-media {
    column-gap: 1.5rem;
  }

  .project-flow-column {
    min-width: 0;
  }

  .project-media-stack {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
    padding-bottom: 1.05rem;
  }

  .project-media-stack:empty {
    display: none;
  }

  .project-media-stack > figure {
    margin: 0;
    min-width: 0;
  }

  .project-media-stack:not(:empty) + .project-copy > :first-child,
  .project-media-stack:not(:empty) + .project-copy > .prose > :first-child {
    margin-top: 0;
  }
}

@media (min-width: 601px) {
  .project-grid > .project-overflow {
    grid-column: 1 / -1;
    grid-row: 2;
    column-count: 2;
    column-gap: 1.5rem;
  }

  .project-copy .project-credits,
  .project-overflow :is(ul, ol, blockquote, pre, table) {
    break-inside: avoid;
  }

  .project-copy :is(h1, h2, h3, h4, h5, h6) {
    break-after: avoid;
  }
}

.project-copy p {
  orphans: 3;
  widows: 3;
}

.project-copy .text-fragment-start {
  margin-bottom: 0;
}

.project-copy .text-fragment-end {
  margin-top: 0;
}

.project-overflow[hidden] {
  display: none;
}

.sample-note {
  font-size: .6rem;
  color: var(--muted);
  margin-top: 2rem;
}

figure {
  margin: 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  font-size: .64rem;
  line-height: 1.35;
  margin-top: .7rem;
  color: #4e4e49;
}

.contact-page {
  min-height: 70vh;
  padding: 6rem 0;
}

.contact-page h1 {
  max-width: 12ch;
}

.prose {
  max-width: 34rem;
}

.prose h2 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  margin-top: 4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 3vw 3rem;
  color: var(--muted);
}

@media (750px <= width <= 1050px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-media {
    column-count: 2;
  }
}

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

  .project-media {
    column-count: 1;
  }
}

@media (max-width: 600px) {
  body {
    font-size: .8rem;
  }
  .site-header {
    padding: 1.25rem;
  }
  .site-header nav {
    gap: 1rem;
    font-size: .6rem;
  }
  .intro,
  .work,
  .contact-page {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
  }
  .intro {
    min-height: 24rem;
  }
  .intro h1,
  .intro .h1 {
    font-size: clamp(2rem, 8vw, 3.2rem);
  }
  .project-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
  }
  .project-media {
    display: contents;
    float: none;
    width: auto;
    margin: 0;
  }
  .project-media > figure {
    order: 2;
    margin: 0;
    min-width: 0;
  }
  .project-media > figure:first-child {
    order: 0;
  }
  .project-copy {
    order: 1;
    min-width: 0;
  }
  .project {
    padding-bottom: 4rem;
  }
  .site-footer {
    padding: 2rem 1.25rem;
  }
}
