@import url('https://fonts.googleapis.com/css?family=Muli&display=swap');

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
body {
    height: 100vh;
    background-color: #eafbff;
    background-image: linear-gradient(
        to bottom,
        rgb(234, 250, 255) 0%,
        rgb(164, 234, 255) 50%,
        rgb(11, 121, 177) 50%,
        rgb(18, 123, 175) 100%
        );
        font-family: 'Muli', sans-serif;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
}
nav {
    background-color: #fff;
    padding: 20px;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: width .6s linear;
    overflow-x: hidden;
}
nav.active {
    width: 350px;
}
nav ul {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 0;
    transition: width .6s linear;
}
nav.active ul {
    width: 100%;
}

nav ul li {
    transform: rotateY(30deg);
    opacity: 0;
    transition: transform .6s linear, opacity .6s linear;
}
nav.active ul li {
    opacity: 1;
    transform: rotateY(360deg);
}
nav ul a {
    position: relative;
    text-decoration: none;
    color: #000;
    margin: 0 10px;
}

.icon {
    background-color: #ffffff;
    border: 0;
    cursor: pointer;
    padding: 0;
    position: relative;
    height: 30px;
    width: 30px;
}
.icon .line {
    background-color: #1072bd;
    height: 2px;
    width: 20px;
    position: absolute;
    top: 10px;
    left: 5px;
    transition: transform 0.6s linear;
  }

.icon:focus {
    outline: 0;
}
.line2 {
    top: auto;
    margin-top: 10px;
    bottom: 10px;
}
nav.active .icon .line1 {
    transform: rotate(-765deg) translateY(6.7px);
}
nav.active .icon .line2 {
    transform: rotate(765deg) translateY(-6.7px);
}