:root {
  color-scheme: light;
  --paper: #f8f5ee;
  --ink: #202823;
  --muted: #4f5d54;
  --line: #bec8be;
  --sage: #dce7df;
  --moss: #345244;
  --pine: #203d32;
  --orange: #943827;
  --light: #f6f4eb;
  --light-muted: #ccd9d1;
  --portrait-line: #a8b7ab;
  --portrait-tint: #ccd9c7;
  --fact-line: #aab9ae;
  --credential-underline: #6c7b71;
  --story-line: #879b8e;
  --story-accent: #f4aa8b;
  --link-visited: #795770;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #191d1b;
    --ink: #f0eee6;
    --muted: #b9c5bc;
    --line: #4c5b52;
    --sage: #26322b;
    --moss: #b0c9ba;
    --pine: #2b463a;
    --orange: #f4aa8b;
    --portrait-line: #56685d;
    --portrait-tint: #acbfae;
    --fact-line: #5d7065;
    --credential-underline: #90a497;
    --link-visited: #b79cc4;
  }

  .site-links img, .credential-list img { filter: invert(1); }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 73rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  z-index: 1;
  top: -5rem;
  left: 1rem;
  padding: .65rem 1rem;
  background: var(--ink);
  color: var(--paper);
}

.skip:focus { top: 1rem; }

.home-page .skip {
  background: var(--pine);
  color: var(--light);
}

/* Site header and footer */

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

.site-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 2rem;
  min-height: 4.5rem;
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(.75rem, 3vw, 2.25rem);
}

.site-links a, .site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-links a { gap: .45rem; }
.site-links img { flex: none; }

.site-links a:hover, .site-footer a:hover { text-decoration: underline; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font: 700 .95rem/1 var(--mono);
  letter-spacing: .08em;
  text-decoration: none;
}

.wordmark::before, .story-mark::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("glider.svg") center no-repeat;
}

.wordmark::before { color: var(--orange); }
.article-page .wordmark { min-height: 2.75rem; }

.article-page .site-bar {
  gap: 0 .75rem;
  padding-block: .4rem;
}

.article-page .site-links { gap: 0 clamp(.65rem, 3vw, 2.25rem); }
.article-page .site-footer a { gap: .6rem; }

.article-page .site-footer {
  border-top: 1px solid var(--line);
  background: var(--sage);
}

.site-footer .site-bar { justify-content: flex-start; }

.home-page .site-footer .site-bar {
  min-height: 5.25rem;
  padding-block: .5rem;
}

/* Homepage */

:where(.home-page) :is(h1, h2, h3, p, figure, dl, dd) { margin: 0; }

.section-title {
  font-size: clamp(2.1rem, 4.5vw, 3.55rem);
  line-height: .99;
  letter-spacing: -.065em;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  align-items: start;
  gap: 1.6rem clamp(2rem, 5vw, 4rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  padding-block: clamp(3.25rem, 7vw, 6rem);
}

.overline {
  font: 700 1.5rem/1.5 var(--mono);
  letter-spacing: .095em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: .65rem;
  color: var(--moss);
}

.overline::before {
  content: "";
  flex: 0 0 1.55rem;
  height: 2px;
  background: var(--orange);
  transform: translateY(-.25em);
  transform: translateY(calc(1px - .5cap));
}

.hero h1 {
  margin-block: .2em .23em;
  font-size: clamp(5rem, 10.6vw, 10rem);
  line-height: .86;
  letter-spacing: -.087em;
}

.hero h1 b { color: var(--orange); }

.hero-description {
  max-width: 32ch;
  margin-block: 1.9rem 1.6rem;
  color: var(--muted);
  color: color-mix(in srgb, var(--muted) 75%, var(--ink));
  font-size: clamp(1.125rem, 2vw, 1.4rem);
}

.portrait {
  width: min(100%, 22rem);
  justify-self: end;
  position: relative;
  isolation: isolate;
  padding: 0 1rem 1rem 0;
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 1rem 0 0 1rem;
  z-index: -1;
  border: 1px solid var(--portrait-line);
  background: repeating-linear-gradient(135deg, transparent 0 6px, var(--portrait-line) 6px 7px);
}

.portrait-tint {
  overflow: hidden;
  aspect-ratio: 1.06;
  background: var(--portrait-tint);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: grayscale(1) contrast(1.05);
  mix-blend-mode: multiply;
}

.credentials {
  padding-block: 2.1rem clamp(3.5rem, 7vw, 5.25rem);
  border-top: 1px solid var(--line);
}

.credential-list {
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.credential-list > li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.25rem);
  padding-block: .9rem;
}

.credential-list img { justify-self: center; }

.credential-list h3 {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.25;
  letter-spacing: -.025em;
}

.credential-list a {
  text-decoration-line: underline;
  text-decoration-color: var(--credential-underline);
  text-underline-offset: .16em;
}

.credential-list a:is(:hover, :focus-visible) {
  color: var(--orange);
  text-decoration-color: currentColor;
  text-decoration-thickness: .13em;
}

.credential-list p {
  margin-top: .2rem;
  color: var(--muted);
  font-size: .9rem;
}

.about, .more { padding-block: clamp(3.35rem, 7vw, 5.5rem); }

.about { background: var(--sage); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem 1rem;
}

.facts > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: .25rem;
  padding-top: .75rem;
  border-top: 1px solid var(--fact-line);
}

.facts dt {
  color: var(--muted);
  font-size: .9rem;
}

.facts dd {
  font-size: clamp(1.7rem, 3.3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
}

.more {
  background: var(--pine);
  color: var(--light);
}

.more a:focus-visible { outline-color: var(--light); }

.stories { border-top: 1px solid var(--story-line); }

.story-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .25rem 1rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--story-line);
  text-decoration: none;
}

.story-title {
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -.035em;
  text-underline-offset: .16em;
}

.story-link:is(:hover, :focus-visible) .story-title { text-decoration: underline; }

.story-description {
  /* Keep both text rows in one column when print hides the mark. */
  grid-column: 1;
  color: var(--light-muted);
  font-size: .95rem;
}

.story-mark {
  display: grid;
  place-items: center;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--story-line);
  border-radius: 50%;
  color: var(--story-accent);
}

.story-link:is(:hover, :focus-visible) .story-mark {
  border-color: var(--light);
  background: var(--light);
  color: var(--pine);
}

/* Articles */

.article-content {
  max-width: 43rem;
  padding-block: clamp(2.75rem, 8vw, 6rem);
  overflow-wrap: anywhere;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin: 0;
  font-size: clamp(2.65rem, 7vw, 5rem);
  line-height: .99;
  letter-spacing: -.065em;
}

.article-header p {
  margin: .9rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.25vw, 1.2rem);
}

.prose {
  font: clamp(1.1rem, 2.4vw, 1.23rem)/1.65 Georgia, "Times New Roman", serif;
}

.prose :is(h2, h3) {
  margin: 1.7em 0 .45em;
  font-family: var(--sans);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.prose h2 { font-size: clamp(1.45rem, 3.5vw, 1.95rem); }
.prose h3 { font-size: 1.25rem; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose :is(ul, ol) { padding-inline-start: 1.4em; }
.prose li + li { margin-top: .4em; }

.prose a {
  color: var(--orange);
  text-decoration-line: underline;
  text-underline-offset: .18em;
}

.prose a:visited { color: var(--link-visited); }
.prose a:is(:hover, :focus-visible) { text-decoration-thickness: .13em; }

.prose hr {
  margin-block: 2rem;
  border: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 53rem) {
  .hero { gap: 2rem; }
  .hero h1 { font-size: clamp(4.6rem, 11.8vw, 7rem); }
  .section-grid { grid-template-columns: 1fr; }
}

@media (max-width: 38rem) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(4.3rem, 15vw, 6rem); }
  .portrait {
    width: min(100%, 20rem);
    justify-self: start;
  }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 28rem) {
  .home-page .site-header .site-bar { column-gap: .65rem; }
  .home-page .site-links { gap: .65rem; }
}

@media (forced-colors: active) {
  .story-title { text-decoration: underline; }

  /* Keep the masked gliders visible in the user's palette. */
  .wordmark::before, .story-mark::before {
    forced-color-adjust: none;
    background-color: LinkText;
  }
}

@media print {
  .home-page {
    --paper: white;
    --ink: black;
    --muted: #333;
    --sage: white;
    --pine: white;
    --light: black;
    --light-muted: #333;
  }

  .article-page { background: white; color: black; }
  .site-header, .skip, .story-mark, .article-page .site-footer { display: none; }
  .hero, .about, .more { padding-block: 1rem; }
  .hero h1 { font-size: 4.5rem; }
  .article-content { padding-block: 0; }
  .prose a, .prose a:visited { color: inherit; }
  .credential-list a { text-decoration-color: currentColor; }
}
