@font-face {
  font-family: 'Pocket Archivo';
  src: url('/fonts/archivo-latin-wght-normal.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --project-color: #1b96ba;
  --project-ink: #232221;
  color: var(--project-ink);
  background: var(--project-color);
  font-family: 'Pocket Archivo', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

::selection { color: var(--project-color); background: var(--project-ink); }

.project-page {
  width: min(100% - 3rem, 70rem);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(4rem, 9vw, 8rem);
}

html.project-entering .project-page { opacity: 0; }

a { color: inherit; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; }

.project-header {
  max-width: 70ch;
  margin-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
  margin-inline: auto;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 6rem);
  font-weight: 840;
  font-variation-settings: 'wght' 840;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.project-intro { max-width: 52ch; margin-block: 1.5rem 0; font-size: 1.2em; }
h2 { margin-block: 0 1rem; font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -0.02em; }
p { margin-block: 0 1.25rem; }

/* Each section contains its own floated images; the next section starts below. */
.project-section { display: flow-root; margin-block: clamp(2.5rem, 6vw, 5rem); }
.project-section--text { max-width: 70ch; margin-inline: auto; }
figure { margin: 0; }
img, video { display: block; width: 100%; height: auto; border-radius: 0.62rem; }
figcaption { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.5; }

.media-left, .media-right { width: 47%; margin-bottom: 1.5rem; }
.media-left { float: left; margin-right: clamp(1.5rem, 4vw, 3rem); }
.media-right { float: right; margin-left: clamp(1.5rem, 4vw, 3rem); }
.media-full { clear: both; width: 100%; margin-block: 2rem 0; }

@media (max-width: 42rem) {
  .project-page { width: calc(100% - 2.5rem); }
  .media-left, .media-right { float: none; width: 100%; margin: 0 0 1.5rem; }
}
