@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-latin-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #fbfbf9;
  --ink: #1c2127;
  --muted: #5b6670;
  --accent: #2e5a73;
  --rule: #dfe3e6;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 680px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14181c;
    --ink: #e8eaec;
    --muted: #96a0a8;
    --accent: #8fb8ce;
    --rule: #2b3238;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

header, main > section, footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

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

/* Header */
header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 36px;
  padding-bottom: 8px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.005em;
}
.wordmark a {
  color: inherit;
  text-decoration: none;
}
nav {
  font-size: 14.5px;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
}
nav a:first-child { margin-left: 0; }
nav a:hover { color: var(--accent); }

/* Sections */
main > section {
  padding-top: 44px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
}
main > section:first-child {
  border-top: none;
  padding-top: 56px;
  padding-bottom: 60px;
}
h1 {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  max-width: 24ch;
  text-wrap: balance;
}
.lede {
  margin: 20px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 16.5px;
}
h2 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 22px;
}
h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
}

/* Products */
.product + .product {
  margin-top: 32px;
}
.product p {
  margin: 0 0 12px;
  max-width: 60ch;
}
.product-link {
  text-decoration: none;
  font-size: 15.5px;
}
.product-link:hover { text-decoration: underline; }
.other-work {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  font-style: italic;
  font-family: var(--serif);
}

/* Company */
dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 28px;
  font-size: 15.5px;
}
dt {
  color: var(--muted);
  white-space: nowrap;
}
dd { margin: 0; }
@media (max-width: 480px) {
  dl { grid-template-columns: 1fr; gap: 0; }
  dt { margin-top: 14px; }
  dl dt:first-child { margin-top: 0; }
}

/* Contact */
.contact-email {
  font-family: var(--serif);
  font-size: 19px;
  text-decoration: none;
}
.contact-email:hover { text-decoration: underline; }
.personal-site {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* Legal pages */
.legal p {
  max-width: 62ch;
  margin: 0 0 16px;
}
.legal p:last-child { margin-bottom: 0; }

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  padding-top: 26px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
}
footer a {
  color: var(--muted);
  margin-right: 16px;
}
footer a:last-child { margin-right: 0; }
footer a:hover { color: var(--accent); }
