@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}

/* Only legal page headings use it, so browsers download it only there */
@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/geist-mono-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

body {
  margin: 0;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.page {
  padding: 5vh 10vw;
}

.page__name {
  margin: 0.67em 0 1em;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.page__text {
  max-width: var(--width-text);
  margin: 2em 0;
  font-size: 1.2em;
  font-weight: 300;
  line-height: 1.4;
}

.page__heading {
  max-width: var(--width-text);
  margin: 2.5em 0 0;
  font-size: 1.2em;
  font-weight: 500;
  color: var(--color-link);
}

/* Keep a section's text close to its heading */
.page__heading + .page__text {
  margin-top: 0.5em;
}

.footer {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-md) 10vw 5vh;
  font-size: 0.95rem;
  font-weight: 300;
}

.link {
  position: relative;
  color: var(--color-link);
  text-decoration: none;
  white-space: nowrap;
}

/* Highlight grows from underline to full background on hover/focus */
.link::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 66%;
  left: -0.1em;
  right: -0.1em;
  bottom: 0;
  background-color: var(--color-highlight);
  transition: top 200ms cubic-bezier(0, 0.8, 0.13, 1);
}

.link:hover,
.link:focus-visible {
  color: var(--color-link-hover);
}

.link:hover::after,
.link:focus-visible::after {
  top: 0;
}

@media (max-width: 1280px) {
  .page__text,
  .page__heading {
    font-size: 1.1em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .link::after {
    transition: none;
  }
}
