@keyframes slide-in-from-top-toggle {
    from { top: -90px }
    to { top: 36px }
}

#menuToggle
{
  display: none;
  /* You can also use relative/absolute here if you want to stay on the top */
  position: fixed;
  top: 36px;
  right: calc( 50% - 40px );
  
  z-index: 1;
  
  -webkit-user-select: none;
  user-select: none;

    animation: slide-in-from-top-toggle;
    animation-timing-function:cubic-bezier(0.23, 1, 0.320, 1);
    animation-duration: .5s;
}

#menuToggle a
{
  text-decoration: none;
  font-family: 'Handel Gothic';
  color: #fff;
  
  transition: color 0.3s ease;
}

#menuToggle a:hover
{
  color: tomato;
}


#menuToggle input
{
  display: block;
  width: 40px;
  height: 32px;
  position: absolute;
  top: -7px;
  left: -5px;
  
  cursor: pointer;
  
  opacity: 0; /* hide this */
  z-index: 2; /* and place it over the hamburger */
  
  -webkit-touch-callout: none;
}

.mobile-hamburger {
  display: none;
  right: 0px;
  position: absolute;
}

/*
 * Just a quick hamburger
 */
.mobile-hamburger span
{
  display: block;
  width: 33px;
  height: 4px;
  /* left: 40px; */
  top: 2px;
  margin-bottom: 5px;
  position: relative;
  
  background: #fff;
  border-radius: 3px;
  
  z-index: 1;
  
  transform-origin: 4px 0px;
  
  transition: transform 0.2s cubic-bezier(0.77,0.2,0.05,1.0),
              background 0.2s cubic-bezier(0.77,0.2,0.05,1.0),
              opacity 0.2s ease;
}

.mobile-hamburger span:first-child
{
  transform-origin: 50% 0%;
}

.mobile-hamburger span:nth-last-child(2)
{
  transform-origin: 50% 50%;
}

.mobile-hamburger span:nth-last-child(1)
{
  transform-origin: 50% 50%;
}

/* 
 * Transform all the slices of hamburger
 * into a crossmark.
 */
.mobile-hamburger.open span
{
  opacity: 1;
  transform: rotate(45deg) translate(-10px, -4px);
}

/*
 * But let's hide the middle one.
 */
.mobile-hamburger.open span:nth-last-child(3)
{
  opacity: 0;
  transform: rotate(0deg) scale(0.2, 0.2);
}

/*
 * Ohyeah and the last one should go the other direction
 */
.mobile-hamburger.open span:nth-last-child(2)
{
  transform: rotate(-45deg) translate(-2px, -3px);
}

/*
 * Make this absolute positioned
 * at the top left of the screen
 */
#menu
{
  position: absolute;
  width: 101vw;
  max-height: 100vh;
  margin: -100px 0 0 0;
  padding: 50px;
  padding-top: 150px;
  padding-bottom: 200px;
  box-sizing: border-box;
  overflow-y: auto;
  background: #0f0f0f;
  list-style-type: none;
  -webkit-font-smoothing: antialiased;
  /* to stop flickering of text in safari */
  
  transform-origin: 0% 0%;
  transform: translate(50%, 0);
  
  transition: transform 0.25s cubic-bezier(0.77,0.2,0.05,1.0);
}

#menu li
{
  padding: 10px 0;
  font-size: 22px;
}

#menu li label
{
  cursor: pointer;
}

/*
 * And let's slide it in from the left
 */

#menuToggle input:checked ~ ul
{
  transform: translate(calc(-50% - 6px), 0);
}

@media (max-width: 600px) {
  .mobile-hamburger {
    display: block;
  }
    #menuToggle {
        display: block;
    }
}




/*  */

#mobile-menu {
    display: flex;
    position: fixed;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 2em;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    scale: 0;

    background: #000;

    transition: cubic-bezier(0.215, 0.610, 0.355, 1) 0.1s;
}

#mobile-menu.open {
    scale: 1;
}

#mobile-menu a {
    font-family: 'Handel Gothic';
    color: #fff;
    font-size: 1em;
    text-decoration: none;
    text-shadow: #aaa 0px 0px 2px;
    transition: cubic-bezier(0.215, 0.610, 0.355, 1) 0.1s;
}