@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
}

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

.flex-body {
  display: flex;
}

body {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  background: white;
  color: black;

  @media (prefers-color-scheme: dark) {
    background: black;
    color: white;
  }
}

.sidebar {
  position: fixed;
  padding: 5px;
  top: 0;
  left: 0;
  width: 200px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e0e0e0;

  @media (prefers-color-scheme: dark) {
    border-right-color: #333;
  }

  h1 {
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: lowercase;
  }

  h2 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: lowercase;
    margin-bottom: 0.25em;
  }
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-body {
  display: flex;
  flex-direction: column;
  a {
    padding: 0.25em 0;
  }

  .active {
    background-color: yellow;

    @media (prefers-color-scheme: dark) {
      background-color: darkgoldenrod;
    }
  }
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: inherit;
  padding: 2px 4px;
}

main {
  margin-left: 200px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

@media (max-width: 540px) {
  .flex-body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    z-index: 10;
    background: white;

    @media (prefers-color-scheme: dark) {
      background: #111;
      border-bottom-color: #333;
    }
  }

  .hamburger {
    display: block;
  }

  .sidebar-body {
    display: none;
    padding-top: 4px;
  }

  .sidebar.open .sidebar-body {
    display: flex;
  }

  main {
    margin-left: 0;
    margin-top: 30px;
    height: calc(100vh - 30px);
  }
}

section {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  h2 {
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  h3 {
    font-weight: 400;
    text-transform: uppercase;
  }

  p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  li {
    list-style-type: "- ";
  }
}

@keyframes breathe {
  0%,
  100% {
    letter-spacing: 0em;
  }
  50% {
    letter-spacing: 0.05em;
  }
}

a {
  position: relative;

  color: black;
  @media (prefers-color-scheme: dark) {
    color: white;
  }
}

a.arena::after {
  content: "✶✶";
  display: inline-block;
  font-size: 0.55em;
  color: grey;
}

blockquote {
  border-left: 3px solid black;
  padding: 0.4em 0.75em;
  margin-left: 0.5em;
  font-style: italic;
  color: #555;

  @media (prefers-color-scheme: dark) {
    border-left-color: #888;
    color: #aaa;
  }
}

a:hover,
.sidebar-body a.hovered,
#home-content a.hovered {
  background-color: lightblue;
  @media (prefers-color-scheme: dark) {
    background-color: blue;
  }
}

#home-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 600px;
}

.toc {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 150px;
  font-size: 0.8rem;

  a {
    display: block;
    padding: 0.15em 0;
  }

  @media (min-width: 1000px) {
    display: block;
  }
}
