nav {
  background-color: #2d2e36;
  box-shadow: 0 5px 10px #1c1d24;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 20px;
  right: 20px;
  border-radius: 15px;
  line-height: normal;
}

nav div {
  display: flex;
  align-items: center;
  margin: 0 15px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 15px;
  transition: background-color 250ms;
}

.navbar-list a:hover {
  background-color: #424251;
}

.navbar-list a:active {
  background-color: #42425162;
  color: #5f6172c5;
  transition: 200ms;
}

.mobile-icon {
  width: 25px;
  height: 14px;
  position: relative;
  cursor: pointer;
}

.mobile-icon:after,
.mobile-icon:before,
.middle-line {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: #fff;
  transition: all 0.4s;
  transform-origin: center;
}

.mobile-icon:before,
.middle-line {
  top: 0;
}

.mobile-icon:after,
.middle-line {
  bottom: 0;
}

.mobile-icon:before {
  width: 66%;
}

.mobile-icon:after {
  width: 33%;
}

.middle-line {
  margin: auto;
}

.mobile-icon:hover:before,
.mobile-icon:hover:after,
.mobile-icon.active:before,
.mobile-icon.active:after,
.mobile-icon.active .middle-line {
  width: 100%;
}

.mobile-icon.active:before,
.mobile-icon.active:after {
  top: 50%;
  transform: rotate(-45deg);
}

.mobile-icon.active .middle-line {
  transform: rotate(45deg);
}

.navbar-list {
  display: none;
}

.navbar-list.active {
  background-color: #1c1d24;
  box-shadow: 2px 0 5px #1c1d24;
  position: fixed;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 40vw;
  top: -20px;
  bottom: 0;
  left: -30px;
  padding: 35px;
  animation: navLinkFade 0.3s ease forwards;
}

.navbar-list.active a {
  width: 90%;
}

@keyframes navLinkFade {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media only screen and (min-width: 690px) {
  .mobile-icon {
    display: none;
  }

  .navbar-list {
    display: unset;
  }
}

@media only screen and (max-width: 690px) {
  nav {
    position: fixed;
    left: 0;
    right: 0;
    top: -1px;
    border-radius: 0;
  }
}
