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

* {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --neutral: #808080;
  --accent: #ff5733;

  --dark: #111111;
  --light: #eeeeee;

  --border: 1px solid var(--dark);

  --space-xs: 0.25rem;
  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 4rem;
  --space-xl: 6rem;

  font-family:
    InterVariable,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;

  font-feature-settings:
    "liga" 1,
    "calt" 1; /* fix for Chrome */
}

@supports (font-variation-settings: normal) {
  :root {
    font-family:
      InterVariable,
      system-ui,
      -apple-system,
      BlinkMacSystemFont,
      "Segoe UI",
      Roboto,
      Oxygen,
      Ubuntu,
      Cantarell,
      "Open Sans",
      "Helvetica Neue",
      sans-serif;
  }
}

html {
  background: var(--dark);
  color: var(--light);
}

body {
  min-height: 100vh;
  max-width: 40rem;
  margin: auto;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-l);
}

main {
  width: 100%;
  margin: auto;

  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}

.content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-s);

  a {
    color: inherit;
    text-decoration: underline;

    &:hover {
      text-decoration: none;
    }
  }

  h2,
  h3,
  h4 {
    font-size: 1.125rem;
    color: var(--neutral);
    margin-top: var(--space-m);
  }

  ul,
  ol {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  ol {
    list-style-type: decimal-leading-zero;
  }

  ul {
    list-style-type: "×   ";
  }

  li {
    list-style-position: inside;

    &::marker {
      color: var(--neutral);
    }

    p {
      font-size: var(--font-size-s);
      display: inline;
    }
  }

  sup {
    margin-left: var(--space-xs);
    color: var(--neutral);

    a {
      font-size: 0.75rem !important;
    }

    &::before {
      content: "[";
    }

    &::after {
      content: "]";
    }
  }

  .footnotes {
    margin-top: var(--space-m);
    padding-top: var(--space-m);
    border-top: 0.5px solid var(--neutral);
  }

  #footnote-label {
    display: none;
  }
}

.navigation,
.footer {
  background: var(--dark);
  padding: var(--space-xs) 0;
  width: 100%;
}

.navigation {
  display: flex;
  position: sticky;
  top: 0;
  justify-content: space-between;
  width: 100%;

  .navigation-section {
    display: flex;
    gap: 1rem;
  }
}

.footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);

  .footer-section {
    display: flex;
    justify-content: space-between;
    gap: var(--space-m);
  }
}

h1,
h2,
h3,
h4 {
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
a,
li {
  margin: 0;
  padding: 0;
  line-height: 1.5;
  word-break: break-word;
  font-weight: 400;
}

a {
  color: var(--neutral);
  text-decoration: none;
  text-underline-offset: var(--space-xs);

  &:hover {
    text-decoration: none;
    color: var(--light);
  }
}

p,
a,
span,
time,
li {
  font-size: 1.125rem;
}

.hero {
  .hero-title {
    font-size: 1.5rem;
  }

  .hero-description {
    color: var(--neutral);
  }
}

.external {
  &:after {
    content: " ↗︎";
  }
}

@media (max-width: 48rem) {
  body {
    padding: var(--space-s);
  }
}

@media (min-width: 48rem) {
  body {
    padding: 0;
  }
}
