/* Main section top Design =========================================== */

main {
    min-height: 100vh;
}

section {
    min-height: 30vh;
}

.main__top {
    display: flex;
    flex-direction: column;
}

.home__left {
    width: 100%;
    background-color: var(--color1);
}

.home__right {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--color2);
    align-items: center;
}

/* Left part ------------------------------------ */

.home__left__infos {
    padding: 8rem 0 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.cv {
    position: relative;
    top: 4.2rem;
    right: 8rem;
    border: solid 3px var(--color-white);
    border-radius: 50%;
    padding: 3vh;
    z-index: 1;
}

.cv__link {
    font-family: var(--text-font-title);
    font-size: 8.5vw;
    font-weight: 560;
}

.profil {
    background-image: url(../assets/photoProfil_0.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    height: 200px;
    width: 200px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 5;
}

.img__profil {
    height: 100%;  
    object-fit: cover;
    transition: transform .3s ease-in-out;
}

.home__social__media {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

#home__media {
    width: 40px;
    height: 40px;
    margin: 20px 5px 0;
}
#home__media svg {
    fill: var(--color4);

}
#home__media:hover svg {
    fill: var(--color-details);
}

/* Right part ------------------------------------ */

.home__right__infos {
    padding: 12rem 0;
}

.name {
    font-family: var(--text-font-title);
    font-size: 20vw;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 560;
}

.work {
    font-family: var(--text-font);
    font-size: 4.15vw;
    color: var(--text-color);
    margin-bottom: 2rem
}

/* Main section top__about Design =========================================== */

.main__top__about {
    min-height: 30vh;
    display: flex;
    align-items: center;
    padding: 12rem 4rem;
}

.about {
    width: 100%;
}

.about p {
    font-size: 3.5vw;
    line-height: 1.5;
    color: var(--text-color);
}

/* About paragraphe style */
.about p span {
    position: relative;
}

/* First */
.first::after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 1.5px;
    background: var(--color-details);
}

/* Second */
#about__circle {
    display: block;
    fill: none;
    stroke-miterlimit: 10;
    stroke-dasharray: 338;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    position: absolute;
    top: 60%;
    left: 50%;
    opacity: 1;
    width: calc(100% + 30px);
    transform: translate(-50%, -50%);
    transition: stroke-dashoffset 0s 0.2s, opacity 0.2s;
}

/* Third */
.third {
    background-color: var(--color1);
    z-index: -1;
}

/* Fourth */
#heart {
    display: block;
    fill: none;
    stroke-miterlimit: 10;
    stroke-dasharray: 338;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    position: absolute;
    rotate: 20deg;
    top: 95%;
    left: 20%;
    opacity: 1;
    width: calc(100% + 5px);
    transform: translate(-50%, -50%);
    transition: stroke-dashoffset 0s 0.2s, opacity 0.2s;
    z-index: -1;
}

/* Responsive mobile +768px ==================================== */
@media only screen and (min-width : 768px) {
    .main__top__about {
        padding: 9rem;
    }

    .profil {
        height: 280px;
        width: 280px;
    }

    #home__media {
        width: 60px;
        height: 60px;
        margin: 40px 10px 0;
    }
}

/* Responsive mobile +1024px ==================================== */
@media only screen and (min-width : 1024px) {
    .main__top {
        display: flex;
        flex-direction: row;
    }

    /* Left part ------------------------------------ */

    .home__left {
        width: 100%;
        height: 100vh;
        padding-top: 6rem;    
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        justify-content: center;
    }

    .home__left__infos {
        padding: 0; 
    }

    .cv {
        padding: 4rem;
        right: 14rem;
        top: 4rem;
        border: solid 5px var(--color-white);
    }
    .cv:hover {
        background-color: var(--color-white);
        color: var(--color-details);
    }

    .cv__link {
        font-size: 5rem;
    }
    
    .profil {
        /* height: 310px;
        width: 310px; */
        position: relative;
        top: -5rem;
        background-image: url(../assets/PhotoOrange.jpg);
    }

    /* Animation profil picture */
    .profil::after {
        content: '';
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        background-color: var(--color2);
        background-size: cover;
        z-index: 1;
        mask-repeat: no-repeat no-repeat;
        mask-image: radial-gradient(var(--profil-img-size) at var(--profil-img-x) var(--profil-img-y), transparent 25%, black 70%);
        -webkit-mask-repeat: no-repeat no-repeat;
        -webkit-mask-image: radial-gradient(var(--profil-img-size) at var(--profil-img-x) var(--profil-img-y), transparent 25%, black 70%);   
    }

    #home__media {
        width: 50px;
        height: 50px;
        margin: -20px 5px 0;
    }

    /* Right part ------------------------------------ */

    .home__right {
        padding-top: 6rem;
    }

    .name {
        font-size: 10vw;
    }

    .work {
        font-size: 2.05vw;
    }

    /* Main section top__about Design =========================================== */

    .main__top__about {
        height: 110vh;
        padding: 0;
    }

    .about p {
        position: relative;
        font-size: 1.5vw;
        padding: 14rem;
        margin: 15rem 35rem;
    }

    .about p::before {
        content: '';
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        border: solid 6px var(--color-details);
        z-index: -2;
    }
    .about p:hover::before {
        animation: shake 0.9s ease-in-out alternate;
    }

    @keyframes shake {
        0% {
            transform: rotate(6deg);
        }

        10% {
            transform: rotate(-6deg);
        }
        20% {
            transform: rotate(6deg);
        }
        30% {
            transform: rotate(-6deg);
        }
        40% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(0deg);
        }
    }

    .about p::after {
        content: '';
        width: 101%;
        height: 103%;
        position: absolute;
        top: -1.5%;
        left: -0.5%;
        border: solid 6px var(--color4);
        rotate: -3.5deg;
        z-index: -1;
    }
    .about p:hover::after {
        animation: shakeSecond 0.9s ease-in-out alternate;
    }

    @keyframes shakeSecond {
        0% {
            transform: rotate(-6deg);
        }
        5% {
            transform: rotate(6deg);
        }
        10% {
            transform: rotate(-6deg);
        }
        15% {
            transform: rotate(6deg);
        }
        20% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(0deg);
        }
    }

    /* First */
    .first::after {
        width: 100%;
        height: 3px;
    }
    .about__text:hover .first::after {
        animation: underline 0.25s ease-in-out forwards;
    }

    @keyframes underline {
        0% {
            width: 0%;
        }
        100% {
            width: 100%;
        }
    }

    /* Second */
    #about__circle {
        stroke-dashoffset:338;
        opacity: 0;
        z-index: 1;
    }
    .about__text:hover #about__circle {
        stroke-dashoffset: 0;
        opacity: 1;
        transition: opacity 0s, stroke-dashoffset 0.5s cubic-bezier(0.245, 0.045, 0.355, 1);
        transition-delay: 0.6s;
    }

    /* Third */
    .third {
        color: inherit;
        text-decoration: none;
        background: linear-gradient(to top, var(--color1) 100%, var(--color1) 30px, transparent 5px) no-repeat;
        background-size: 100% 100%;
        z-index: 0;
    }
    .about__text:hover .third {
        animation: background-size 0.5s ease-in-out forwards;
        animation-delay: 1.4s;
    }

    @keyframes background-size {
        0% {
            background-size: 0% 100%;
        }
        100% {
            background-size: 100% 100%;
        }
    }

    /* Fourth */
    #heart {
        stroke-dashoffset:338;
        opacity: 0;
        z-index: 1;
        transition: stroke-dashoffset 0s 0.2s, opacity 0.2s;
    }
    .about__text:hover #heart {
        stroke-dashoffset: 0;
        opacity: 1;
        transition: opacity 0s, stroke-dashoffset 0.5s cubic-bezier(0.245, 0.045, 0.355, 1);
        transition-delay: 1.9s;
    }
}