@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fff;
  --fg: #000;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --fg: #fff;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  text-transform: uppercase;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
}

.page {
  width: min(1216px, calc(100% - 4rem));
  margin: clamp(3rem, 8vw, 7rem) auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(4rem, 6vw, 6rem);
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.5;
}

aside,
main {
  display: grid;
  gap: 2.25rem;
}

h1,
dt {
  font: inherit;
}

nav {
  display: grid;
  justify-items: start;
}

dl dd {
  margin-left: 1ch;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.16em;
  transition: text-decoration-color 150ms ease;
}

a:hover,
a:focus-visible {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@media (max-width: 780px) {
  .page {
    width: min(100% - 3rem, 40rem);
    margin: 3rem auto 5rem;
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  aside {
    gap: 1.75rem;
  }

  main {
    gap: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  a {
    transition: none;
  }
}
