* {
    box-sizing: border-box;
}

body {
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    --font-color: ghostwhite;
    --box-color: rgb(50, 50, 50);
    --shadow-color: gray;
    --border-color: rgb(185, 185, 185);
    overflow-x: hidden;
}

body, html, div, ul, li, span, label, a, h1, h2, h3, h4, h5, p, i, input, fieldset, legend, button {
    margin: 0;
    padding: 0;
}

html, body {
    scroll-behavior: smooth;
}

img {
    visibility: visible !important;
}


/* ----- HEADER SECTION ----- */

.header {
    background-color: #0008;
    width: 100%;
    height: auto;
    padding: .2rem 0;
    position: fixed;
    backdrop-filter: blur(2.5px);
    z-index: 200;
}

.button__container, .header__a, .header__li {
    z-index: 20;
}

.checkbox-button {
    font-size: 3.5rem;
    color: var(--font-color);
    cursor: pointer;
}

.checkbox {
    display: none;
}

.header__ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
}


.checkbox:checked ~ .header__ul {
    max-height: 500px;
    opacity: 1;
}

.header__li {
    list-style: none;
    width: fit-content;
    margin: .8rem;
}

.header__ul :first-child {
    margin-top: 0;
}

.header__a {
    text-decoration: none;
    color: var(--font-color);
}

.button__wrapper {
    display: flex;
    justify-content: end;
}

.button__container {
    margin-right: .6rem;
}



/* ----- ALL SECTIONS ----- */

section {
    margin-bottom: 8rem;
    scroll-margin-top: 4rem;
}


/* ----- PRESENTATION SECTION ----- */

.presentation__section {
    width: 100%;
    height: 100svh;
    margin-bottom: 0;
}

.background {
    max-width: 100%;
    height: 30%;
    z-index: -10;
    background-image: url(images/background.jpg);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    position: relative;
}

.profile-image {
    height: 60%;
    border-radius: 50%;
    position: absolute;
    top: 70%;
    animation: aparecer1 1.2s .4s both ease-in-out;
}

@keyframes aparecer1 {
    from {
        opacity: 0;
        transform: translateY(-12%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.titles__wrapper {
    display: flex;
    width: 100%;
    height: 32%;
    flex-direction: column;
    justify-content: end;
    align-items: center;
}


.h2__title {
    font-size: 2.1rem;
    animation: aparecer1 1s 3.2s both ease-in-out;
}

h1 {
    font-size: 2.25rem;
    text-align: center;
    animation: aparecer-texto 3s 1.2s both cubic-bezier(0.25, 1, 0.5, 1)
}

.description__container {
    margin-top: 1rem;
    animation: aparecer2 1s 3.65s both ease-in-out;
}

@keyframes aparecer2 {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.secondary__title__container, .title__container {
    width: fit-content;
    height: fit-content;
    overflow: hidden;
}

@keyframes aparecer-texto {
    from {
        opacity: 0;
        transform: translateX(-105%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}



/* ----- ABOUT SECTION ----- */

.about__section {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.about__section__title {
    font-size: 3.2rem;
}

.about__section__description__container {
    width: fit-content;
    max-width: 95%;
    background-color: rgb(50, 50, 50);
    border-radius: 20px;
    margin: 2rem 0;
    padding: 1rem;
    color: var(--font-color);
    line-height: 1.45;
    box-shadow: 0 0 10px var(--shadow-color);
}

.html {
    color: rgb(255, 140, 98);
}

.css {
    color: rgb(184, 237, 255);
}

.js {
    color: rgb(255, 251, 135);
}



/* ----- SKILLS SECTION ----- */

.skills__section {
    max-width: 100dvw;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.html__container img, .css__container img, .js__container img {
    width: 40%;
}

.responsive-design__container img {
    width: 70%;
}

.html__container, .css__container, .js__container, .responsive-design__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 75%;
    margin: 2.5rem 0;
    background-color: var(--box-color);
    padding: 1.5rem;
    border-radius: 25px;
    box-shadow: 0 0 10px var(--shadow-color);
}

.skills__section__title {
    font-size: 3.2rem;
}

.html__container h2, .css__container h2, .js__container h2, .responsive-design__container h2 {
    font-size: 2.5rem;
    margin-top: .8rem;
    color: var(--font-color);
}

.responsive-design__container {
    text-align: center;
}

.responsive-design__container h2 {
    font-size: 2.3rem;
}

.html__container {
    margin-top: 5rem;
}



/* ----- PROJECTS SECTION ----- */

.projects__section {
    width: 100%;
    height: 150svh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project__container {
    width: 80%;
    height: 30%;
    background-image: url(images/projects/project1.png);
    background-position: center;
    background-size: cover;
    border-radius: 25px;
    margin-top: 2rem;

}

.project__wrapper, .project__wrapper2, .project__wrapper3 {
    width: 100%;
    height: 100%;
    background-color: #0008;
    display: flex;
    border-radius: 25px;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

:has(.project-checkbox:checked) {
    .project__wrapper {
        opacity: 1;
        visibility: visible;
    }
}



.view__code a, .view__page a {
    color: var(--font-color);
    margin: 0 1rem;
    border: 2px solid var(--font-color);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 0 20px var(--font-color);
}

.label-checkbox, .label-checkbox2, .label-checkbox3 {
    width: 100%;
    height: 100%;
    display:inline-block;
}

.project-checkbox, .project-checkbox2, .project-checkbox3 {
    display: none;
}


.project__container2 {
        width: 80%;
        height: 30%;
        background-image: url(images/projects/project2.png);
        background-position: center;
        background-size: cover;
        border-radius: 25px;
        margin-top: 8rem;
}

:has(.project-checkbox2:checked) {
    .project__wrapper2 {
        opacity: 1;
        visibility: visible;
    }
}

.project__container3 {
    width: 80%;
    height: 30%;
    background-image: url(images/projects/project3.png);
    background-position: center;
    background-size: cover;
    border-radius: 25px;
    margin-top: 8rem;
}

:has(.project-checkbox3:checked) {
    .project__wrapper3 {
        opacity: 1;
        visibility: visible;
    }
}

.projects__section__title {
    font-size: 3.2rem;
}



/* ----- CONTACT SECTION ----- */

.contact__section {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    margin-bottom: 16rem;
}

.contact__section__form {
    width: 100%;
    display: flex;
    justify-content: center;
}

fieldset {
    display: flex;
    width: 95%;
    flex-direction: column;
    border: 1px solid var(--border-color);
    padding: .2rem;
}

.form__container {
    display: flex;
    flex-direction: column;
    margin: .5rem .2rem;
}


.form__button {
    background-color: var(--box-color);
    padding: .4rem;
    width: 75%;
    border-radius: 10px;
    color: var(--font-color);
}

.button__container {
    align-items: center;
}

.lastname__container, .name__container, .email__container, .message__container {
    outline: none;
    position: relative;
}

.form__container label {
    font-size: .8rem;
    position: absolute;
    left: 2%;
    top: 50%;
    z-index: 300000000;
    transform: translateY(-50%);
    transition: .3s;
}

.name, .lastname, .email, .message {
    padding: .8rem;
    border: 2px solid black;
    border-radius: 10px;
    width: 100%;
}

#message {
    font-family: inherit;
    height: 120px;
}

.message__container {
    height: fit-content;
}

.message__container label {
    top: 8%;
    left: 2%;
    transform: translateY(0);
}

.name:focus ~ label, 
.lastname:focus ~ label, 
.email:focus ~ label, 
.name:valid ~ label, 
.lastname:valid ~ label, 
.email:focus ~ label, 
.email:not(:placeholder-shown) ~ label {
    top: 0;
    left: 3%;
    padding: 0 .5rem;
    background-color: white;
    font-size: .8rem;
}

.message:valid ~ label,
.message:focus ~ label {
    top: -7%;
    left: 3%;
    padding: 0 .5rem;
    background-color: white;
    font-size: .8rem;
}

.message__container:focus-within label {
    top: -7%;
    left: 3%;
    padding: 0 .5rem;
    background-color: white;
    font-size: .8rem;
}

.contact__section__h2 {
    font-size: 3.2rem;
    margin-bottom: 2rem;
}



/* ----- HEADER SECTION ----- */

.footer {
    width: 100%;
    height: fit-content;
    padding: 1rem;
    background-color: var(--box-color);
}

.footer__p {
    color: var(--font-color);
    font-size: .8rem;
}


/* ----- GSAP CSS ----- */

.about1, .about2, .about3, .about4, .about5, .about6, .about7, .about__section__title, .skills__section__title, .projects__section__title, .project__container, .project__container2, .contact__section__h2 {
    opacity: 0;
    transform: translateY(50px);
}

.js__container, .html__container {
    opacity: 0;
    transform: translateX(-120%);
}

.css__container, .responsive-design__container {
    opacity: 0;
    transform: translateX(120%);
    position: relative;
}

.contact__section__form {
    opacity: 0;
    transform: scale(.8) translateY(50px);

}


/* ----- SPECIAL MEDIA QUERIES ----- */

@media screen and (max-width: 310px) {

    .html__container h2, .css__container h2, .js__container h2, .responsive-design__container h2 {
        font-size: 1.5rem;
    }

}

@media screen and (max-width: 350px) {
    .h2__title {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.6rem;
    }
}


/* ----- TABLET MEDIA QUERIES ----- */

@media screen and (min-width: 601px) {

    /* ----- PRESENTATION QUERIES SECTION ----- */


    h1 {
        font-size: 3.8rem;
    }

    .h2__title {
        font-size: 3rem;
        animation: aparecer1 1s 3s both ease-in-out;
    }

    .p__title {
        font-size: 1.5rem;
    }

    .titles__wrapper {
        margin-top: 2rem;
    }

        /* ----- ABOUT QUERIES SECTION ----- */


    .about__section__description__container {
        max-width: 80%;
    }

    p {
        font-size: 1.4rem;
        letter-spacing: 1.1px;
    }

    /* ----- SKILLS QUERIES SECTION ----- */


    .html__container img, .css__container img, .js__container img {
        width: 40%;
    }
    
    .responsive-design__container img {
        width: 55%;
    }
    
    .html__container, .css__container, .js__container, .responsive-design__container {
        width: 50%;
    }

    .about__section__title, .skills__section__title, .contact__section__h2, .projects__section__title {
        font-size: 3.6rem;
    }

    /* ----- PROJECTS QUERIES SECTION ----- */


    .project__container, .project__container2, .project__container3 {
        width: 60%;
        height: 30%;
    }

    /* ----- CONTACT QUERIES SECTION ----- */


    .contact__section__form {
        width: 75%;
    }

    fieldset {
        padding: 1.5rem;
    }

    .form__container label {
        font-size: 1.2rem;
    }
}



/* ----- PC MEDIA QUERIES ----- */

@media screen and (min-width: 1025px) {

    /* ----- PRESENTATION QUERIES SECTION ----- */


    h1 {
        font-size: 3rem;
    }

    .h2__title {
        font-size: 2.2rem;
    }

    /* ----- GENERAL QUERIES ----- */

    .about__section__title, .skills__section__title, .contact__section__h2, .projects__section__title {
        font-size: 4.5rem;
    }

    /* ----- HEADER QUERIES ----- */


    .header {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .header__ul {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        width: 65%;
        max-height: 500px;
        opacity: 1;
    }

    .header__ul :first-child {
        margin-top: 1.3rem;
    }

    .button__wrapper {
        display: none
    }

    .header__a {
        font-size: 1.2rem;
    }

    .header__li {
        margin: 1.3rem .8rem;
    }

    /* ----- ABOUT QUERIES SECTION ----- */


    p {
        font-size: 1.3rem;
        letter-spacing: 1.3px;
    }

    .about__section__description__container {
        max-width: 50%;
    }

    /* ----- SKILLS QUERIES SECTION ----- */


    .html__container, .css__container, .js__container, .responsive-design__container {
        width: 40%;
    }
    
    .about__section__title, .skills__section__title, .contact__section__h2, .projects__section__title {
        font-size: 3.8rem;
    }


    /* ----- PROJECTS QUERIES SECTION ----- */


    .project__container, .project__container2, .project__container3 {
        width: 40%;
        height: 40%;
    }

    .html__container img, .css__container img, .js__container img {
        width: 30%;
    }
    
    .responsive-design__container img {
        width: 45%;
    }

    :has(.project-checkbox:hover) {
        .project__wrapper {
            opacity: 1;
            visibility: visible;
        }
    }

    :has(.project-checkbox2:hover) {
        .project__wrapper2 {
            opacity: 1;
            visibility: visible;
        }
    }

    :has(.project-checkbox3:hover) {
        .project__wrapper3 {
            opacity: 1;
            visibility: visible;
        }
    }

    /* ----- CONTACT QUERIES SECTION ----- */


    .contact__section__form {
        width: 40%;
    }

    fieldset {
        padding: 1.1rem;
    }

    .form__container label {
        font-size: 1.1rem;
    }

    .name, .lastname, .email, .message {
        padding: .7rem;
    }

    legend {
        font-size: 1.1rem;
    }

    .form__button {
        padding: .75rem;
        width: 60%;
        font-size: 1.3rem;
        cursor: pointer;
    }
}

