.menu {
  position: fixed;
  top: 30px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 50px;
  height: 50px;
  background-color: rgba(255,255,255,0.8);
  border-radius: 50%;
  transition: transform 250ms ease;
  cursor: pointer;
  z-index: 200;
}
.menu span {
  position: relative;
  display: block;
  width: 50%;
  height: 2px;
  background-color: #444;
  float: left;
  transform-origin: center center;
  transition: transform 250ms ease;
  z-index: 200;
}
.menu span:nth-of-type(1) {
  transform: translateY(-5px);
}
.menu span:nth-of-type(3) {
  transform: translateY(5px);
}

#menu {
  display: none;
}
#menu:checked ~ .menu {
  background-color: transparent;
  transform: rotate(360deg);
  transition: transform 250ms ease;
}
#menu:checked ~ .menu span {
  background-color: white;
  transition: transform 250ms ease;
}
#menu:checked ~ .menu span:nth-of-type(1) {
  transform: translateY(1px) rotate(45deg);
}
#menu:checked ~ .menu span:nth-of-type(2) {
  display: none;
}
#menu:checked ~ .menu span:nth-of-type(3) {
  transform: translateY(-1px) rotate(-45deg);
}
#menu:checked ~ .nav {
  right: 0px;
  transition: right 500ms ease;
}
#menu:checked ~ main {
  transform: translateX(250px);
  transition: transform 500ms ease;
}

.nav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #000;
  transition: right 500ms ease;
  z-index: 0;
}
.nav ul {
  position: relative;
  list-style-type: none;
  margin: 100px 0;
  padding: 0;
}
.nav ul li {
  position: relative;
  display: block !important;
  border-bottom: 1px solid white;
  width: 100%;
}
.nav ul li a {
  position: relative;
  display: block;
  margin: 0;
  padding: 20px 20px 13px 20px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 3px;
  text-decoration: none;
  text-transform: uppercase;
  line-height: 16px;
}
.nav ul li a:before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  transition: width 250ms ease;
  z-index: -1;
}
.nav ul li a:hover {
  color: #444;
}
.nav ul li a:hover:before {
  width: 100%;
  height: 100%;
  background-color: none;
  transition: width 250ms ease;
}

