:root {
  --menu-base-z-index: 10;
}

#page-menu-btn {
  position: fixed;
  top: 5px;
  left: 5px;

  width: 40px;
  height: 40px;
  background: none;
  border-radius: 5px;
  border: none;

  cursor: pointer;
  box-sizing: border-box;
  user-select: none;

  z-index: calc(var(--menu-base-z-index) + 1);
}

#page-menu-btn img {
  filter: invert(100%);
  max-width: 100%;
  max-height: 100%;
}

.slide-menu {
  animation: menu-slide-in 0.25s ease-in-out forwards;
}

#menu,
#menu * {
  box-sizing: border-box;
}

#menu {
  display: none;

  position: fixed;
  top: 0;
  left: 0;

  align-items: center;
  flex-direction: column;
  gap: 50px;

  font-family: Arial, Helvetica, sans-serif;

  padding: 50px 10px;

  height: 100vh;
  width: 33.333%;
  background: rgba(0, 0, 0, 0.75);
  margin: 0px;

  overflow: scroll;
  z-index: var(--menu-base-z-index);
}

.menu-link {
  text-decoration: none;
  color: aliceblue;
  font-size: 1.25em;
  transition: color 0.5s ease-in-out;
}

.menu-link:visited {
  color: aliceblue;
}

.menu-link:hover {
  /* color: rgb(118, 255, 180); */
  color: rgb(176, 229, 255, 0.75);
}

.menu-group > span {
  font-weight: bold;
  white-space: nowrap;

  color: rgba(0, 149, 255);
  text-shadow: 2px 3px 0px rgba(0, 149, 255, 0.14);
  font-size: 1.75em;

  margin-bottom: 5px;
}

.menu-group {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;

  width: 100%;
  padding-right: 15px;
  padding-left: 5px;

  z-index: var(--menu-base-z-index);
}

#menu-screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  background: rgb(0, 0, 0, 0.45);
  z-index: calc(var(--menu-base-z-index) - 1);
}

@keyframes menu-slide-in {
  0% {
    left: -25%;
  }

  100% {
    left: 0;
  }
}

@media (min-width: 1024px) {
  #menu {
    width: 25%;
  }
}

@media (min-width: 1200px) {
  #menu {
    width: 20%;
  }
}

@media (max-width: 850px) {
  /* -0.25em font size */
  .menu-group > span {
    font-size: 1.5em;
  }

  .menu-link {
    font-size: 1em;
  }
}

@media (max-width: 650px) {
  /* -0.5em font size */
  .menu-group > span {
    font-size: 1.25em;
  }

  .menu-link {
    font-size: 0.75em;
  }
}

@media (max-width: 600px) {
  /* Increase menu size */
  #menu {
    width: 40%;
  }
}

@media (max-width: 400px) {
  /* Increase menu size */
  #menu {
    width: 55%;
  }
}

@media (max-width: 300px) {
  /* -0.75 font size menu size */
  .menu-group > span {
    font-size: 1em;
  }

  .menu-link {
    font-size: 0.5em;
  }

  #menu {
    width: 75%;
  }
}
