@import url("https://fonts.googleapis.com/css2?family=Prosto+One&display=swap");

#menu-container {
  margin: 0;
  padding: 0;

  /* make it look decent enough */

  color: #cdcdcd;
  font-family: "Avenir Next", "Avenir", sans-serif;
}

#menu .category a {
  text-decoration: none;
  color: #000;
  transition: color 0.3s;
}
#menu .category a:hover {
  color: tomato;
}

#menu .category {
  font-family: "Rubik Marker Hatch", cursive;
  font-size: 1.5rem;
  padding: 5px 0;
}

#menu .category-contact {
  padding: 3px 0;
}

#menu .category-contact a {
  color: rgb(121, 121, 121);
  font-size: 1.1rem;
}

#menu .category-contact a:hover {
  text-decoration: none;
}

#menuToggle {
  display: block;
  position: relative;

  right: 50px;

  z-index: 10;

  -webkit-user-select: none;
  user-select: none;
}

#menuToggle input {
  display: block;
  width: 40px;
  height: 32px;
  position: absolute;

  cursor: pointer;

  opacity: 0; /* hide this */
  z-index: 2; /* and place it over the hamburger */

  -webkit-touch-callout: none;
}

/*
 * Just a quick hamburger
 */
#menuToggle span {
  display: block;
  width: 33px;
  height: 4px;
  margin-bottom: 5px;
  position: relative;

  background: #fff;
  color: #000;
  border-radius: 3px;

  z-index: 1;

  transform-origin: 4px 0px;

  transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1),
    background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease;
}

#menuToggle span:first-child {
  transform-origin: 0% 0%;
}

#menuToggle span:nth-last-child(2) {
  transform-origin: 0% 100%;
}

/* 
 * Transform all the slices of hamburger
 * into a crossmark.
 */
#menuToggle input:checked ~ span {
  opacity: 1;
  transform: rotate(45deg) translate(-2px, -1px);
  background: rgb(43, 42, 42);
}

/*
 * But let's hide the middle one.
 */
#menuToggle input:checked ~ 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
 */
#menuToggle input:checked ~ span:nth-last-child(2) {
  transform: rotate(-45deg) translate(0, -1px);
}

/*
 * Make this absolute positioned
 * at the top left of the screen
 */
#menu {
  position: absolute;
  width: 320px;
  margin: -55px 0 0 -220px;
  padding: 60px 40px 40px;
  background-color: #fff;

  border-radius: 15px;
  list-style-type: none;
  -webkit-font-smoothing: antialiased;
  /* to stop flickering of text in safari */

  transform-origin: 0% 0%;
  transform: translate(100%, 0);
  transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);

  box-shadow: inset 0 0 70px black;
}

@media (max-width: 768px) {
  #menu {
    padding: 60px 0 20px 30px;
    margin: -55px 0 0 -130px;
    width: 250px;
  }
  #menu .category a {
    font-size: 18px;
  }
  #menu .category-contact a {
    font-size: 14px;
  }
  #menuToggle {
    right: 20px;
  }
}

/* * And let's slide it in from the left */
#menuToggle input:checked ~ ul {
  transform: none;
}

#menu #download-cv {
  font-family: math;
  background-color: tomato;
  padding: 7px;
  text-decoration: none;
  color: #fff;
  border: 2px inset;
}

#menu #download-cv:hover {
  background-color: #000;
  transition: 1s;
}

@media (min-width: 768px) {
  #menu #download-cv {
    display: flex;
    justify-content: center;
    margin-right: 1rem;
    border: 3px inset;
  }
}
