/* ===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');

/* ===== VARIABLES CSS =====*/
:root{
    --header-height: 3rem;
    --font-medium: 500;
}

/* ===== Colors =====*/
:root{
    --first-color: #0C5A85;
    --white-color: #FAFAFF;
    --dark-color: #2A3B47;
    --text-color: #697477;
}

/* ===== Sources & Fonts =====*/
:root{
    --body-font: 'Montserrat', sans-serif;
    --big-font-size: 12vh;
    --med-font-size: 3vh;
    --h2-font-size: 1.25rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
}
@media screen and (min-width: 768px){
    :root{
        --big-font-size: 12vh;
        --med-font-size: 4vh;
        --h2-font-size: 2rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
    }
}

/* ===== Margins =====*/
:root{
    --mb-1: .5rem;
    --mb-2: 1rem;
    --mb-3: 1.5rem;
    --mb-4: 2rem;
}

/* ===== z-index =====*/
:root{
    --z-fixed: 100;
}

/* ===== BASE =====*/
*,::before,::after{
    box-sizing: border-box;
}
html{
    scroll-behavior: smooth;
}
body{
    margin: var(--header-height) 0 0 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    color: var(--text-color);
    line-height: 1.6;
}
h1,h2,p{
    margin: 0;
}
ul{
    margin: 0;
    padding: 0;
    list-style: none;
}
a{
    text-decoration: none;
    color: var(--text-color);
}
img{
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== CLASS CSS ===== */
.section{
    padding: 3rem 0;
}
.section-title{
    position: relative;
    font-size: var(--h2-font-size);
    color: var(--dark-color);
    margin: var(--mb-4) 0;
    text-align: center;
}
.section-title::after{
    position: absolute;
    content: "";
    width: 32px;
    height: .18rem;
    left: 0;
    right: 0;
    margin: auto;
    top: 2rem;
    background-color: var(--first-color);
}

/* ===== LAYOUT =====*/
.bd-grid{
    max-width: 1024px;
    display: grid;
    grid-template-columns: 100%;
    grid-column-gap: 2rem;
    width: calc(100% - 2rem);
    margin-left: var(--mb-2);
    margin-right: var(--mb-2);
}
.l-header{
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--first-color);
}

/* ===== NAV =====*/
.nav{
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
@media screen and (max-width: 767px){
    .nav__menu{
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 80%;
        height: 100%;
        padding: 2rem;
        background-color: rgba(255,255,255,.3);
        transition: .5s;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    @-moz-document url-prefix() {
        .nav__menu{
            position: fixed;
            top: var(--header-height);
            right: -100%;
            width: 80%;
            height: 100%;
            padding: 2rem;
            background-color: rgba(255,255,255,.9);
            transition: .5s;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }
    }
}
.nav__item{
    margin-bottom: var(--mb-4);
}
.nav__link{
    position: relative;
    color: var(--dark-color);
}
.nav__link:hover{
    color: var(--first-color);
}
.nav__logo{
    color: var(--white-color);
}
.nav__toggle{
    color: var(--white-color);
    font-size: 1.5rem;
    cursor: pointer;
}
.nav__lang{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 40px;
}

/* ===== Show menu =====*/
.show{
    right: 0;
}

/* ===== Active menu =====*/
.active::after{
    position: absolute;
    content: "";
    width: 100%;
    height: .18rem;
    left: 0;
    top: 2rem;
    background-color: var(--first-color);
}
.top{
    margin-top: var(--header-height);
}

.float{
    position:fixed;
    bottom: 20px;
    right: 20px;
    padding: 20px;
    background-color:#0C9;
    color:#FFF;
    border-radius:50px;
    text-align: center;
    justify-content: center;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
}
.my-float{
    font-size: 1.5rem;
    padding: 5px;
    text-align: center;
    justify-content: center;
}


.l-main{
    width: 100%;
    height: 100%;
}
/* ===== LOADING =====*/
.loader_bg{
    position: fixed;
    z-index: 999999;
    background: #0C5A85;
    width: 100%;
    height: 100%;
}
.loader{
    position: absolute;
    display: none;
    height: 120px;
    width: 300px;
    top: calc(50vh - 60px);
    left: calc(50vw - 150px);
}
.ball_one{
    position: absolute;
    border-radius: 15px;
    height: 30px;
    width: 30px;
    left: 90px;
    top: 0px;
    background-color: #ffffff;

    animation: pendular 1.5s linear infinite;
    
}

@keyframes pendular {
    0% { transform: rotate(0deg) translateX(-90px); }
    6.25% { transform: rotate(-10deg) translateX(-90px); }
    12.5% { transform: rotate(-30deg) translateX(-90px); }
    18.75% { transform: rotate(-55deg) translateX(-90px); }
    25% { transform: rotate(-90deg) translateX(-90px); }
    28% { transform: rotate(-87deg) translateX(-90px); }
    31% { transform: rotate(-90deg) translateX(-90px); }
    75% { transform: rotate(-90deg) translateX(-90px); }
    81.25% { transform: rotate(-55deg) translateX(-90px); }
    87.5% { transform: rotate(-30deg) translateX(-90px); }
    93.75% { transform: rotate(-10deg) translateX(-90px); }
    96.875% { transform: rotate(-6deg) translateX(-90px); }
    100% { transform: rotate(0deg) translateX(-90px); }
}
.ball_two{
    position: absolute;
    border-radius: 15px;
    height: 30px;
    width: 30px;
    left: 120px;
    top: 90px;
    background-color: #fcd837;
}
.ball_three{
    position: absolute;
    border-radius: 15px;
    height: 30px;
    width: 30px;
    left: 150px;
    top: 90px;
    background-color: #f9a11f;
}
.ball_four{
    position: absolute;
    border-radius: 15px;
    height: 30px;
    width: 30px;
    left: 180px;
    top: 0px;
    background-color: #f27c21;
    transform: rotate(90deg) translateX(90px);

    animation: pendularsec 1.5s linear infinite;
}
@keyframes pendularsec {
    0% { transform: rotate(90deg) translateX(90px); }
    25% { transform: rotate(90deg) translateX(90px); }
    31.25% { transform: rotate(55deg) translateX(90px); }
    37.5% { transform: rotate(30deg) translateX(90px); }
    43.75% { transform: rotate(10deg) translateX(90px); }
    46.875% { transform: rotate(6deg) translateX(90px); }
    50% { transform: rotate(0deg) translateX(90px); }
    56.25% { transform: rotate(10deg) translateX(90px); }
    62.5% { transform: rotate(30deg) translateX(90px); }
    68.75% { transform: rotate(55deg) translateX(90px); }
    75% { transform: rotate(90deg) translateX(90px); }
    78% { transform: rotate(87deg) translateX(90px); }
    81% { transform: rotate(90deg) translateX(90px); }
    100% { transform: rotate(90deg) translateX(90px); }
}
.loader_txt{
    position: absolute;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    text-align: center;
    width: 100%;
    top: 20px;
}
/* ===== HOME =====*/
.home{
    position: relative;
    background-color: var(--first-color);
    overflow: hidden;
}
.home__container{
    height: calc(100vh);
    padding-top: calc(2* var(--header-height));
    display: flex;
    flex-direction: column;
    align-items: center;
}
.home__scroll{
    max-width: 1024px;
    width: calc(100% - 2rem);
    margin-left: var(--mb-2);
    margin-right: var(--mb-2);
    align-self: flex-end;
    height: 9vh;
    display: flex;
    justify-content: center;
}
.home__scroll-link{
    writing-mode: vertical-lr;
    transform: rotate(-180deg);
    color: var(--white-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 6px -5px 12px rgba(0,0,0,.5);
}
.home__imgCont{
    height: 60vh;
    flex-grow: 1;
    background-image: url("../img/perfil.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    width: 60vw;
    margin-right: 20vw;
    margin-left: 20vw;
}
.home__title{
    flex-grow: 1;
    height: calc(40vh - var(--header-height));
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}
.home__titleMain{
    font-size: var(--big-font-size);
    color: var(--white-color);
    text-shadow: 0 20px 25px rgba(0,0,0,.5);
}
.home__titleSec{
    font-size: var(--med-font-size);
    text-align: center;
    color: var(--white-color);
    font-family: 'Source Sans Pro', sans-serif;
    letter-spacing: 0.4em;
    padding-top: 1vh;
}
.home__name{
    font-family: 'Permanent Marker', cursive;
    text-shadow: 0 10px 12px rgba(0,0,0,.5);
}
.particles{
    height: calc(100vh - var(--header-height));
    width: 100vw;
    margin-bottom: -100vh;
}

/* ===== ABOUT =====*/

.about__container{
    justify-items: center;
    row-gap: 2rem;
    text-align: center;
    margin-top: -80px;
}
.about__img{
    display: flex;
    justify-content: center;
    /*padding-top: 1rem;*/
    width: 120px;
    height: 120px;

}
.about__img img{
    width: 120px;

}
.about__subtitle{
    font-size: var(--h2-font-size);
    color: var(--first-color);
    margin-bottom: var(--mb-1);
}
.about__text{
    margin-bottom: var(--mb-4);
}
.about__profession{
    display: block;
    margin-bottom: var(--mb-4);
}
.about__social-icon{
    font-size: 1.4rem;
    margin: 0 var(--mb-1);
}
.about__social-icon:hover{
    color: var(--first-color);
}
.about-icon-txt{
    font-size: var(--small-font-size);
    vertical-align: 5px;
}

/* ===== TIMELINE =====*/

:root{
    --numDots: 20;
    --parentWidthBase: 0.8;
    --parentWidth: calc(0.8 * 100vw);
    --parentMaxWidth: 1000px;
    --dotWidth: 25px;
    --dotWidthSm: 17px;
    --active: #0C5A85;
    --inactive: #AEB6BF;
}

.flex-parent{
    margin-top: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
.input-flex-container{
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 80vw;
    height: 100px;
    max-width: 1000px;
    position: relative;
    z-index: 0;
}
.input{
    width: var(--dotWidth);
    height: var(--dotWidth);
    background-color: var(--active);
    position: relative;
    border-radius: 50%;
}
.input:hover{
    cursor: pointer;
}
.input::before{
    content: '';
    display: block;
    position: absolute;
    z-index: -1;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--active);
    width: calc(0.8*100vw / var(--numDots));
    height: 5px;
    max-width: calc(var(--parentMaxWidth) / var(--numDots));
    left: calc(-0.8*100vw / 20 + 12.5px);
}
.input::after{
    content: '';
    display: block;
    position: absolute;
    z-index: -1;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--active);
    width: calc(var(--parentWidth) / var(--numDots));
    height: 5px;
    max-width: calc(var(--parentMaxWidth) / var(--numDots));
    right: calc(-0.8*100vw / 20 + 12.5px);
}
.input.act{
    background-color: var(--active);
}
.input.act::before{
    background-color: var(--active);
}
.input.act::after{
    background-color: var(--inactive);
}
.input.act span{
    font-weight: 700;
}
.input.act span::before{
    font-size: 13px;
}
.input.act span::after{
    font-size: 15px;
}
.input.act ~ .input{
    background-color: var(--inactive);
}
.input.act ~ .input::before{
    background-color: var(--inactive);
}
.input.act ~ .input::after{
    background-color: var(--inactive);
}
.input span{
    width: 1px;
    height: 1px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    visibility: hidden;
}
.input span::before{
    visibility: visible;
    position: absolute;
    left: 50%;
    content: attr(data-info);
    top: -65px;
    width: 70px;
    transform: translateX(-5px) rotateZ(-45deg);
    font-size: 12px;
    text-indent: -10px;
}
.input span::after{
    visibility: visible;
    position: absolute;
    left: 50%;
    content: attr(data-year);
    top: 25px;
    transform: translateX(-50%);
    font-size: 14px;
}

.description-flex-container{
    width: calc(0.8*100vw);
    margin-top: 100px;
    max-width: 1000px;
}
.description-flex-container p{
    margin-top: 0;
    display: none;
}
.description-flex-container p.act{
    display: block;
}

@media (min-width: 1250px){
    .input::before{
        left: calc(-1000px / 20 + 12.5px);
    }
    .input::after{
        right: calc(-1000px / 20 + 12.5px);
    }
}
@media (max-width: 850px){
    .nav__logo{
        font-size: 0.8rem;
    }
    .nav__link{
        font-size: 0.9rem;
    }
    .input{
        width: var(--dotWidthSm);
        height: var(--dotWidthSm);
    }
    .input::before{
            height: 3px;
            left: calc(-0.8 * 100vw / 20 + 8.5px);
    }
    .input::after{
            height: 3px;
            right: calc(-0.8 * 100vw / 20 + 8.5px);
    }
}
@media (max-width: 600px){
    .flex-parent{
        justify-content: initial;
    }
    .input-flex-container{
        flex-wrap: wrap;
        justify-content: center;
        width: 80%;
        height: auto;
        margin-top: 70px;
    }
    .input{
        width: 60px;
        height: 60px;
        margin: 0 10px 70px;
        background-color: var(--inactive);
    }
    .input::before{
        content: none;
    }
    .input::after{
        content: none;
    }
    .input span{
        width: 100%;
        height: 100%;
        display: block;
    }
    .input span::after{
        color: white;
    }
    .input::before{
        top: calc(100% + 5px);
        transform: translateX(-50%);
        text-indent: 0;
        text-align: center;
        background-color: red;
    }
    .input::after{
        top: 50%;
        transform: translate(-50%, -50%);
        color: #ECF0F1;
    }
    .description-flex-container{
        margin-top: -30px;
        text-align: center;
    }
}

@media (max-width: 400px){
    body{
        min-height: 950px;
    }
}

/* ===== HOBBIES =====*/
.flex-hobb-parent{

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    margin-bottom: 30px;
    background-color: var(--first-color);
}
.input-hobb-flex-container{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    width: 80vw;
    min-height: 100px;
    max-width: 1000px;
    position: relative;
    z-index: 0;
    padding-top: var(--mb-3);
}


/* ===== SKILLS =====*/
.skills__container{
    row-gap: 2rem;
}
.skills__subtitle{
    color: var(--first-color);
    margin-bottom: var(--mb-3);
}
.skills__name{
    display: inline-block;
    font-size: var(--small-font-size);
    margin-right: var(--mb-2);
    margin-bottom: var(--mb-3);
    padding: .25rem .5rem;
    background-color: var(--white-color);
    border-radius: .25rem;
}
.skills__name:hover{
    background-color: var(--first-color);
    color: var(--white-color);
}
.skills__img img{
    width: 50vw;
    margin-left: -16px;
}
.skillsBack{
    position: relative;
    margin-left: -50vw;
    width: 50vw;
    height: 50vw;
}
.skill__parti{
    /*background-color: red;*/
    width: 50%;
    height: 50%;
    margin: auto;
    margin-top: 12.5vw;
    border-radius: 50%;
}
.skill__parent{
    display: none;
}
/* ===== PORTFOLIO =====*/

.portfolio__containerIphone{
    justify-items: center;
    row-gap: 2rem;
    margin-bottom: 2rem;
}
.portfolio__container{
    justify-items: center;
    row-gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    column-gap: 1rem;
}
.portfolio__containerBot{
    margin-top: 1rem;
    justify-items: center;
    row-gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(1, 1fr);
    column-gap: 1rem;
}
.portfolio__img{
    position: relative;
    overflow: hidden;
}
.portfolio__img img{
    border-radius: .5rem;
}
.portfolio__link{
    position: absolute;
    bottom: -100%;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255,255,255,.3);
    border-radius: .5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: .3s;
}

.portfolio__linkTipe{
    background-color: rgba(39,84,109,.7);
}

.portfolio__img:hover .portfolio__link{
    bottom: 0;
}

@media (pointer: none) {
    .portfolio__img .portfolio__link:hover{
        bottom: -100%;
    }
}
@media (pointer: coarse) {
    .portfolio__img .portfolio__link:hover{
        bottom: -100%;
    }
}

#portfolio__tipe__desktop{
    display: none;
}
#portfolio__tipe__mobile{
    display: inherit;
}

.portfolio__link-name{
    color: var(--dark-color);
    text-align: center;
}
.portfolio__link-nameIphone{
    color: white;
    text-align: center;
}

@-moz-document url-prefix() {
    .portfolio__link{
        position: absolute;
        bottom: -100%;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: rgba(255,255,255,.9);
        border-radius: .5rem;
        backdrop-filter: blur(10px);
        transition: .3s;
    }
    .portfolio__link-nameIphone{
        color: var(--dark-color);
    }
}
/* ===== FOOTER=====*/
.footer{
    background-color: var(--dark-color);
}
.footer__container{
    row-gap: 2rem;
}
.footer__title{
    font-size: var(--normal-font-size);
    color: var(--white-color);
    margin-bottom: var(--mb-2);
}
.footer__link{
    padding: .25rem 0;
}
.footer__link:hover{
    color: var(--first-color);
}
.footer__social{
    font-size: 1.4rem;
    margin-right: var(--mb-1);
}
.footer__social:hover{
    color: var(--first-color);
}

/* ===== MEDIA QUERIES =====*/
@media screen and (min-width: 767px){
    body{
        margin: 0;
    }
    .section{
        padding-top: 4rem;
    }
    .section-title{
        margin-bottom: 3rem;
    }
    .section-title::after{
        width: 64px;
        top: 3rem;
    }

    .nav{
        height: calc(var(--header-height) + 1rem);
    }
    .nav__list{
        display: flex;
    }
    .nav__item{
        margin-left: var(--mb-4);
        margin-bottom: 0;
    }
    .nav__toggle{
        display: none;
    }
    .nav__link{
        color: var(--white-color);
    }
    .nav__link:hover{
        color: var(--white-color);
    }
    .active::after{
        background-color: var(--white-color);
    }
    .home{
        padding-top: 0;
    }
    .home__container{
        height: calc(100vh + var(--header-height));
        grid-template-rows: 1.7fr 1fr;
        row-gap: 0;
    }
    .home__imgCont{
        margin-top: 10vh;
        margin-bottom: -10vh;
    }
    .home__scroll{
        display: inline;
    }
    .home__scroll-link{
        font-size: 3rem;
        margin-bottom: 0;
    }
    .about__container{
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
        text-align: initial;
        padding: 4rem 0;
    }
    .about__img{
        width: 220px;
        height: 220px;
    }
    .about__img img{
        width: 220px;
    }

    .skills__container{
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
    }

    .skill__parent{
        display: flex;
    }

    .portfolio__container{
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        column-gap: 2rem;
        row-gap: 2rem;
    }

    .portfolio__containerBot{
        margin-top: 2rem;
        row-gap: 2rem;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 2rem;
    }

    .contact__container{
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
    }
    .contact__form{
        width: 380px;
    }

    .footer__container{
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
    }

    #portfolio__tipe__desktop{
        display: inherit;
    }
    #portfolio__tipe__mobile{
        display: none;
    }
}

@media screen and (min-width: 1024px){
    .home__scroll{
        margin-left: auto;
        margin-right: auto;
    }
    .bd-grid{
        margin-left: auto;
        margin-right: auto;
    }
    .skills__img img{
        width: 512px;
    }
    .skillsBack{
        margin-left: -512px;
        width: 512px;
        height: 512px;
    }
    .skill__parti{
        margin-top: 128px;
    }
}
