* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin : 0;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    color: black;
    padding: 20px;
    width: 80px;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: width 0.7s linear;

}

h1 {
    margin-bottom: 50px;
}

nav.active {
    width: 350px;
}

ul {
    display: flex;
    list-style: none;
    transition: width 0.7s linear;
    padding: 0;
    margin: 0;
    width: 0   ;
}

nav.active ul {
    width: 100%;
}

nav ul li {
    transform: rotate(0deg);
    opacity: 0 ;
    transition: transform 0.6s linear, opacity 0.6s linear;
}

nav.active ul li {
    transform: rotate(0deg);
    opacity: 1;
}

nav ul a{
    position: relative;
    text-decoration: none;
    color: black;
    margin: 0 10px;
}

.icon {
    background: white;
    border : 0;
    padding: 0;
    cursor: pointer;
    position: relative;
    width: 30px;
    height: 30px;
    outline: none;
}

.icon .line {
    background: red;
    position: absolute;
    width: 20px;
    height: 2px;
    top: 10px;
    left: 5px;
    transition: transform 0.6s linear;
}

.icon .line2 {
    top: auto;
    bottom: 10px;
}

nav.active .icon .line {
    transform: rotate(-765deg) translateY( 5.5px);
}
nav.active .icon .line2 {
    transform: rotate(765deg) translateY( -5.5px);
}