#menuToggle {
  display: inline-block;
  position: relative;
  /* top: 50px;
  left: 50px; */
  z-index: 1;
  -webkit-user-select: none;
  user-select: none;
  display:none;
}

#menuToggle a {
  text-decoration: none;
  color: #232323;
  transition: color 0.3s ease;
}

#menuToggle a:hover {
  color: tomato;
}

/* 1. Hide the Checkbox */
#menuToggle input {
  display: block;
  width: 40px;
  height: 32px;
  position: absolute;
  top: -7px;
  left: -5px;
  cursor: pointer;
  opacity: 0; /* Hide the checkbox */
  z-index: 2; /* Put it above the spans */
  -webkit-touch-callout: none;
}

/* 2. Hamburger Bars (The Spans) */
#menuToggle span {
  display: block;
  width: 33px;
  height: 4px;
  margin-bottom: 5px;
  position: relative;
  background: 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;
}

/* Adjust the middle bar for the 'X' transition */
#menuToggle span:first-child {
  transform-origin: 0% 0%;
}

#menuToggle span:nth-last-child(2) {
  transform-origin: 0% 100%;
}

/* 3. TRANSFORMATION (When Checkbox is Checked) */

/* a. Top bar becomes the top of the 'X' (rotates 45deg) */
#menuToggle input:checked ~ span:nth-of-type(1) {
  opacity: 1;
  transform: rotate(45deg) translate(0, 0);
}

/* b. Middle bar disappears */
#menuToggle input:checked ~ span:nth-of-type(2) {
  opacity: 0;
  transform: rotate(0deg) scale(0.2, 0.2);
}

/* c. Bottom bar becomes the bottom of the 'X' (rotates -45deg) */
#menuToggle input:checked ~ span:nth-of-type(3) {
  opacity: 1;
  transform: rotate(-45deg) translate(-2px, -2px);
}

/* 4. Menu List Styling and Slide Animation */
#menu {
  position: absolute;
  width: 300px;
  margin: -100px 0 0 -50px;
  padding: 50px;
  padding-top: 125px;
  background: #ededed;
  list-style-type: none;
  -webkit-font-smoothing: antialiased;
  /* Push menu off-screen to the left */
  transform: translate(-100%, 0);
  transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
}

#menu li {
  padding: 10px 0;
  font-size: 22px;
}

/* d. Menu slides into view */
#menuToggle input:checked ~ #menu {
  transform: none; /* Slide back to position (0, 0) */
}