nav a:hover {
  opacity: 0.5;
}

nav a {
  margin-bottom: 10px;
  padding: 0.5em;

  transition: opacity 0.5s;
  color: var(--a);
  text-decoration: none;
}

#nav-open {
  display: none;
  position: fixed;
  top: 0px;
  left: 10px;
  z-index: 2;
}

.sidebar {
  z-index: 1;
  /* don't add horizontal padding, makes navbar visible when width=0 */
  display: flex;
  flex-direction: column;
  grid-column: 1 / 3;

  margin-left: 2em;

  width: 200px;
  max-width: 200px;

  overflow-x: hidden;

  transition: margin-top 0.5s, width 0.5s;

  background-image: url("/squared-paper-texture.jpg");
  background-size: 800px;

  border-radius: .5em;
  box-shadow: 0 0 2em 0.8em var(--white-a);
}

.sidebar-inner {
  margin: 1em;
  display: flex;
  flex-direction: column;
  height: auto;
}

/* on screens betwwen 900-1400px */
@media screen and (min-width: 900px) and (max-width: 1200px) {
  .sidebar {
    position: fixed;
  }
}


/* on screens less than 700px */
@media screen and (max-width: 900px) {
  .sidebar {
    width: 0px;
    position: fixed;
    margin-left: 0;
  }

  #nav-open {
    display: block;
    position: fixed;
    margin: 5px;
  }
}
