@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap");

* {
  box-sizing: border-box;
}

body {
  background-color: rgb(198, 255, 243);
  background-image: linear-gradient(
    to bottom,
    rgb(218, 255, 200) 0%,
    rgb(148, 177, 120) 50%,
    #305faf 50%,
    #5290f9 100%
  );
  font-family: "Roboto", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  margin: 0;
}

nav {
  background-color: rgb(255, 255, 247);
  padding: 2rem;
  width: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5rem;
  box-shadow: 0 0.2rem 0.5rem grey;
  transition: width 0.6s linear;
}

nav.active {
  width: 32rem;
}

nav ul {
  display: flex;
  list-style-type: none;
  padding: 0;
  margin: 0;
  width: 0;
  transition: width 0.6s linear;
}

nav.active ul {
  width: 100%;
}

nav ul li {
  transform: rotateY(0deg);
  opacity: 0;
  transition: all 0.6s ease-in;
  font-size: 1.25rem;
  font-weight: bold;
}
nav.active ul li {
  opacity: 1;
  transform: rotateY(360deg);
}

nav ul li a {
  position: relative;
  color: #000;
  text-decoration: none;
  margin: 0 1rem;
}

.icon {
  border-color: white;
  border: 0;
  cursor: pointer;
  padding: 0;
  position: relative;
  height: 3rem;
  width: 3rem;
  background-color: transparent;
}

.icon:focus {
  outline: 0;
}

.icon .line {
  background-color: #5290f9;
  height: 0.25rem;
  width: 2rem;
  position: absolute;
  top: 1rem;
  left: 0.5rem;
  transition: all 0.6s linear;
}

.icon .line2 {
  top: auto;
  bottom: 1rem;
  width: 2rem;
  height: 0.25rem;
}

nav.active .icon .line1 {
  transform: rotate(-765deg) translateY(0.55rem);
}

nav.active .icon .line2 {
  transform: rotate(765deg) translateY(-0.55rem);
}
