nav {
  width: calc(100% - 10%);
  height: 100px;
  background-color: var(--dark-blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  position: fixed;
  z-index: 1;
}

nav img {
  width: 272px;
  height: 74px;
  cursor: pointer;
}

nav div:first-of-type a:first-of-type {
  padding: 0;
  height: 0;
}

nav a {
  padding: 0 20px;
  color: var(--white);
  font-size: 1.15rem;
  cursor: pointer;
  text-decoration: none;
  font-family: Raleway-Medium;
}

nav a:nth-of-type(2) {
  border-left: 1px solid var(--white);
  border-right: 1px solid var(--white);
}

.toggle-menu {
  display: block;
  position: relative;
  z-index: 1;
  
  -webkit-user-select: none;
  user-select: none;
}

.toggle-menu input {
  display: block;
  width: 40px;
  height: 32px;
  position: absolute;
  top: -7px;
  left: -5px;
  
  cursor: pointer;
  
  opacity: 0; 
  z-index: 2; 
  
  -webkit-touch-callout: none;
}

.toggle-menu span {
  display: block;
  width: 33px;
  height: 4px;
  margin-bottom: 5px;
  position: relative;
  
  background: var(--white);
  border-radius: 3px;
  
  z-index: 1;
  
  transform-origin: 4px 0px;
  
  transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
              background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
              opacity 0.55s ease;
}

.toggle-menu span:first-child {
  transform-origin: 0% 0%;
}

.toggle-menu span:nth-last-child(2) {
  transform-origin: 0% 100%;
}

.toggle-menu input:checked ~ span {
  opacity: 1;
  transform: rotate(45deg) translate(-2px, -1px);
  background: var(--white);
}

.toggle-menu input:checked ~ span:nth-last-child(3) {
  opacity: 0;
  transform: rotate(0deg) scale(0.2, 0.2);
}

.toggle-menu input:checked ~ span:nth-last-child(2) {
  transform: rotate(-45deg) translate(0, -1px);
}

#menu {
  position: absolute;
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 320px;
  margin: -100px 0 0 0;
  padding: 70px 24px 25px;
  right: -100px;
  
  background: var(--dark-blue);
  list-style-type: none;
  -webkit-font-smoothing: antialiased;
  /* to stop flickering of text in safari */
  
  transform-origin: 100% 0%;
  transform: translate(100%, 0);
  transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
}

#menu a {
  padding: 16px 0;
}

#menu a:nth-child(2) {
  border: none;
}


.toggle-menu input:checked ~ ul {
  transform: none;
  opacity: 1;
}
.toggle-menu input:checked ~ #menu {
  transform: translate(10%, 0);
}

@media (min-width: 768px) {
  .desktop-view {
    display: block;
  }
  .toggle-menu {
    display: none;
  }
}

@media (max-width: 768px) {
  .desktop-view {
    display: none;
  }
  .toggle-menu {
    display: block;
  }
}

@media (min-width: 1920px) {
  nav {
    width: calc(100% - 40%);
    padding: 0 20%;
  }
}
