:root {
    --first-color: #1742a1;
    --second-color: #ffffff;

    --nav-typografia: "Montserrat", sans-serif;
    /* 400 */
    --text-tyupografia: "Roboto", sans-serif;
    /* 400 */

    --nav-size: 1.2rem;
    --nav-size-table: 1rem;
    --nav-size-horizontal-table: 1.2rem;
    --nav-size-desktops: 1rem;
    --title-size: 1.5rem;
    --text-size: 1rem;
    --card-size: 1.3rem;
    --botton-size: 1rem;

    --title-color: #000000;
    --title-first-color: #ffffff;

    --text-first-color: #100f0f;
    --text-second-color: #ffffff;
    --text-third-color: #1742a1;

    --form-ok-color: #4caf50;

}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

li,
a {
    list-style: none;
    text-decoration: none;
}

header {
    background-color: var(--first-color);
    position: sticky;
    top: 0;
    right: 0;
    width: 100%;
    display: flex;
    flex-direction: row-reverse;
    align-items: baseline;
    z-index: 2;
    border-bottom: 1px solid #0000002e;
}

img {
    object-fit: cover;
    height: auto;
}

/**NAVEGACIÓN**/
.open-menu {
    display: block;
    margin-left: auto;
    border: none;
    cursor: pointer;
}

.close-menu {
    border: none;
    cursor: pointer;
}

.fa-bars {
    font-size: 2rem;
    background-color: var(--first-color);
    color: var(--second-color);
    padding: 1rem 0.7rem;
}

.fa-xmark {
    background-color: var(--first-color);
    color: var(--second-color);
    font-size: 2rem;
    padding: 0.5rem 1rem;
}

.fa-xmark:hover {
    background-color: rgb(224, 48, 48);
}

.nav {
    background-color: var(--first-color);
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: end;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5);
    height: 100vh;
    width: 50%;
    border-left: 1px solid #000000;
    transition: opacity 1s, visibility 1s;
}

.nav-visible {
    opacity: 1;
    visibility: visible;
    transition: all 1s;
}

.no-scroll {
    overflow: hidden;
}

.nav__list {
    padding: 2rem;
}

.nav__item {
    font-family: var(--text-tyupografia);
    text-align: end;
    margin-top: 1.5rem;
}

.nav__profile {
    width: 5rem;
    max-width: 12.8rem;
    min-width: 3.125rem;
    border-radius: 50%;
    display: block;
    margin-left: auto;
}


.nav__item--download {
    margin: 1rem 0.7rem;
}

.nav__link,
.nav__link--button,
.nav__download {
    font-size: var(--nav-size);
    color: var(--text-second-color);
    font-family: var(--nav-typografia);
    letter-spacing: 1px;
}

.nav__link {
    width: 140px;
    height: 56px;
    overflow: hidden;
    border: none;
    color: #fff;
    background: none;
    position: relative;
    padding-bottom: 0.2rem;
}

.nav__link:before {
    content: "";
    position: absolute;
    height: 2px;
    bottom: 0;
    left: 0;
    width: 100%;
    transform: scaleX(0);
    transform-origin: bottom right;
    background: currentColor;
    transition: transform 0.25s ease-out;
}

.nav__link:hover:before {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* *Reactivar cuando se realiza la opción de ajustes */
.nav__link--button {
    background-color: var(--first-color);
    border: none;
    display: none;
}


.nav__download {
    font-weight: bold;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px white;
    background-image: linear-gradient(to left, white, rgb(226, 226, 226), blue, rgb(23, 66, 161));
    background-size: 200%;
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
    display: inline-block;
    animation: move 15s linear infinite;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 250vw 0;
    }
}

.nav__download:hover {
    color: white;
}


/**SOBRE MI**/
.profile {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    margin: 1rem 0.7rem;
}

.profile__title,
.ability__title,
.project__title,
.contact__title {
    font-size: var(--title-size);
    font-weight: 700;
    text-align: center;
    font-family: var(--text-tyupografia);
    color: var(--title-color);
}

.profile__description,
.ability__description {
    font-size: var(--text-size);
    font-weight: 400;
    text-align: center;
    font-family: var(--text-tyupografia);
    color: var(--text-first-color);
    margin-top: 1rem;
    line-height: 1.5;
}

.profile__image-container {
    width: 50%;
}

.profile__image {
    width: 100%;
    border-radius: 100%;
}

/* *HABILIDAD* */

.ability,
.contact {
    background-color: var(--first-color);
}

.ability__technology {
    margin: 1rem 0.7rem;
}

.ability__title {
    padding-top: 1rem;
    color: var(--title-first-color);
}

.ability__description {
    color: var(--text-second-color);
}

.ability__image-container {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
    padding-bottom: 1rem;
}

.ability__images {
    display: flex;
    width: 100%;
    animation: slide 25s linear infinite;
}

.ability__image {
    flex: 0 0 auto;
    width: 70px;
}

.ability__image img {
    width: 100%;
    padding: 0 0.5rem;
}

.ability__image--mysql,
.project__technologies--mysql {
    background-color: #ffffff;
    border-radius: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px;
}

.project__technologies--mysql {
    height: auto;
}

.ability__image--mysql img {
    width: 100%;
    padding: 0.5rem;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-70px * 15));
        /* Ajusta este cálculo según el número total de imágenes */
    }
}

/* *PROYECTOS* */
.project {
    margin: 1rem 0.7rem;
}

.project__card {
    background-color: var(--first-color);
    border-radius: 5px;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    /* Asegura que los elementos se apilen verticalmente */
    height: 100%;
    /* Para que las tarjetas tengan alturas uniformes */
}

.project__image {
    width: 100%;
    border-radius: 5px 5px 0 0;
}

.project__information {
    margin: 0 0.7rem;
}

.project__name {
    color: var(--title-first-color);
    font-family: var(--text-tyupografia);
    font-size: var(--card-size);
    margin: 0.5rem 0;
    /* Activar */
}

/*? AGREGAR MAS TEXTO EN DONDE FALTA LAS CARDS */
.project__description {
    color: var(--text-second-color);
    font-family: var(--text-tyupografia);
    font-size: var(--text-size);
    line-height: 1.5;
    height: 6rem;
    /* Fija la altura de la descripción  */
    overflow: hidden;
    /* Evita que el contenido sobrepase el contenedor
*/
    text-overflow: ellipsis;
    /* Trunca el texto con puntos suspensivos si es necesario */
    /* background-color: red; */
    margin-bottom: 1rem;

}

.contact__description {
    color: var(--text-second-color);
    font-family: var(--text-tyupografia);
    font-size: var(--text-size);
    line-height: 1.5;
    height: 15vh;
}

.project__technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    /* height: 1vh; */
    /*  */
}

.project__technologies img {
    width: 8vw;
}

.project__technologies>.sign {
    background-color: white;
}

.project__link {
    display: flex;
    justify-content: end;
    gap: 10px;
    padding: 2rem 0 0.4rem 0;
}

.project__a {
    color: var(--text-second-color);
    font-size: var(--text-size);
    font-family: var(--text-tyupografia);
    padding: 0.2rem 1rem;
    border: black 1px solid;
}

.project__a--disable {
    pointer-events: none;
    color: #808080;
    cursor: not-allowed;
    border: #808080 1px solid;
}

/* *CONTACTO* */
.contact {
    padding: 0.4rem;
}

.contact__container {
    margin: 1rem 0.7rem;
}

.contact__title {
    color: var(--title-first-color);
}

.contact__description {
    margin-top: 1rem;
    text-align: center;
}

.contact__form {
    background-color: var(--second-color);
    max-width: 100%;
    margin: 1rem 0.7rem;
    padding: 1rem 0;
    border-radius: 5px;
}

.contact__form-group {
    width: 90%;
    margin: 0.5rem auto;
}

.contact__input,
.contact__select {
    width: 100%;
    height: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--first-color);
    outline: none;
    padding: 0 0.6rem;
    font-family: var(--text-tyupografia);
    color: var(--text-first-color);
}

.contact__textarea {
    width: 100%;
    height: 20vh;
    resize: none;
    padding: 0.2rem 0.6rem;
    font-family: var(--text-tyupografia);
    border-radius: 10px;
    border: 1px solid var(--first-color);
    outline: none;
}

.contact__input[required]:valid,
.contact__select[required]:valid,
.contact__textarea[required]:valid {
    border: thin solid var(--form-ok-color);
    /*agrega borde verde al <input> o <textarea>*/
}

.contact__button {
    border: 1px solid var(--first-color);
    font-family: var(--text-tyupografia);
    border-radius: 5px;
    font-size: 0.8rem;
    padding: 0.2rem 1rem;
    cursor: pointer;
    background: #1742a1;
    color: #ffffff;
}

.contact__button:hover {
    background: #ffffff;
    color: #000000;
    transition: all 1s;
}

.contact__form-group--button {
    text-align: end;
}

.contact__form-response {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    font-family: var(--text-tyupografia);
}

.contact__form-group--loader {
    text-align: center;
}

.contact__form-loader--send {
    font-size: 1.5rem;
    color: #000000;
    font-family: var(--text-tyupografia);
}

.contact__form-loader-punto {
    display: inline-block;
    animation: hop 1s infinite;
    font-size: 1.5rem;
}

.contact__form-loader-punto:nth-child(1) {
    animation-delay: 0s;
}

.contact__form-loader-punto:nth-child(2) {
    animation-delay: 0.2s;
}

.contact__form-loader-punto:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes hop {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.none {
    display: none;
}

.contact-form-error {
    margin-top: -1rem;
    font-size: 80%;
    background-color: var(--form-error-color);
    color: #fff;
    transition: all 1s ease;
}

.contact-form-error.is-active {
    display: block;
    /*Creando animación que se llama 'show-message', dura 1s, se ejecuta solo 1 vez de forma normal, tiene 0s de
    retardo, tiene el efecto de animación ease-out y el 'both' significa que va a conservar los estilos con la que
    la animación termine*/
    animation: show-message 15s 1 normal 0s ease-out both;

}

.message {
    font-size: 1.5rem;
    font-family: var(--text-tyupografia);
    color: white;
    background-color: var(--form-ok-color);
    text-align: center;
    width: 100%;
    padding: 0.5rem 0;
    border-radius: 5px
}

/* @keyframes permite a los autores controlar los pasos intermedios en una secuencia de animación CSS mediante 
el establecimiento de keyframes (o puntos de trayectoria) a lo largo de la secuencia de animación que debe 
ser alcanzado por determinados puntos durante la animación. */
@keyframes show-message {

    /*Controlando animación*/
    /* La animacion empezará siendo no visible */
    0% {
        visibility: hidden;
        opacity: 0;
    }

    /* La animacion terminará siendo visible */
    100% {
        visibility: visible;
        opacity: 1;
    }
}

.fa-whatsapp {
    font-size: 3rem;
    color: #ffffff;
    background-color: #0cba0c;
    position: fixed;
    bottom: 20px;
    right: 10px;
    width: 4rem;
    height: 4rem;
    line-height: 4rem;
    border-radius: 50%;
    text-align: center;
    cursor: pointer;
}

/* *PIE DE PAGÍNA */
.footer {
    background-color: var(--first-color);
    margin-top: 1rem;
}

.footer__container {
    margin: 0 0.7rem;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.footer__title {
    color: var(--text-second-color);
    margin: 0.5rem 0;
}

.footer__email,
.footer__tel {
    color: var(--text-second-color);
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
}

.footer__email span,
.footer__tel span {
    font-weight: bold;
}

.footer__span:hover {
    color: rgb(0, 0, 192);
    transition: all 0.6s;
    text-decoration: underline;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.fa-github,
.fa-linkedin,
.fa-square-instagram {
    font-size: 1.2rem;
    color: #ffffff;
}

.footer__group--rights {
    text-align: center;
    color: var(--text-second-color);
    font-size: 0.7rem;
    padding: 0.6rem 0;
    cursor: pointer;
}

/* Pantallas pequeñas en posición horizontal (celulares) */
@media screen and (min-width: 480px) and (max-width: 767px) and (orientation: landscape) {
    .profile__image {
        display: block;
        margin: auto;
        width: 50%;
        border-radius: 100%;
    }

    .project__technologies img {
        width: 5vw;
    }

}

/* * Tables* */
@media screen and (min-width: 768px) {

    /** SOBRE MI */
    .profile {
        margin: 4rem 4rem;
    }


    .profile__title,
    .profile__description {
        text-align: center;
    }

    .profile__image-container {
        width: 20%;
    }

    .profile__image {
        width: 100%;
        border-radius: 100%;
    }

    /* *PROYECTOS* */
    .project {
        margin: 2rem 4rem 2rem 4rem;
    }
    /* Atributos de AOS */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .project__title {
        text-align: start;
    }

    .project__card {
        max-width: 40vw;
    }

    .project__list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.2rem;
    }

    .project__list--modified {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.2rem;
    }

    .project__card.scroll-down {
        animation-name: inherit;
    }

    .project__image {
        object-fit: cover;
        height: 25vh;
    }

    .project__information {
        margin: 0 0.7rem;
    }

    .project__name {
        color: var(--title-first-color);
        font-family: var(--text-tyupografia);
        font-size: var(--card-size);
        margin: 0.5rem 0;
    }

    /* !REVISAR */
    .project__description {
        height: 7.5rem;
        /* Fija la altura de la descripción 10 rem en pc */
    }

    /* !REVISAR */
    .contact__description {
        height: 12vh;
    }

    .project__technologies img {
        width: 4vw;
    }



    /* *CONTACTO */
    .contact {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 2rem 4rem;
    }

    .contact__container {
        margin: 0;
    }

    .contact__description {
        text-align: center;
    }

    .contact__form {
        width: 100%;
    }

    /* *FOOTER* */
    .footer {
        margin-top: 4rem;
        padding: 1rem 4rem 0 4rem;
    }

    .footer__container {
        flex-direction: row;
        justify-content: space-between;

    }

    .footer__email,
    .footer__tel {
        justify-content: start;
    }

    .fa-github,
    .fa-linkedin,
    .fa-square-instagram {
        font-size: 1.6rem;
    }

    .footer__group--rights {
        margin-top: 3rem;
        font-size: 1rem;
    }
}

/** Desktops */
@media screen and (min-width: 1024px) {
    header {
        background-color: var(--first-color);
        width: auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem 3rem;
    }

    /* *NAVEGADOR */
    .open-menu,
    .close-menu {
        display: none;
    }

    .nav {
        opacity: 1;
        visibility: visible;
        position: initial;
        box-shadow: none;
        height: auto;
        width: auto;
        border-left: none;
    }

    .no-scroll {
        overflow: scroll;
    }

    .nav__list {
        display: flex;
        padding: 0;
    }

    .nav__item {
        margin: 0;
        margin: 0 1rem;
    }

    .nav__profile {
        display: none;
    }

    .nav__link--button {
        display: none;
    }

    .nav__link,
    .nav__link--button,
    .nav__download {
        font-size: var(--nav-size-desktops);
    }

    .nav__download {
        background-color: #ffffff;
        position: relative;
        display: flex;
        align-items: center;
        cursor: pointer;
        overflow: hidden;
        transition: color 0.3s 0.1s ease-out;
        text-align: center;
        color: #000000;
        padding: 0.5rem 1rem;
        border-radius: 50px;
        font-weight: bold;
        text-transform: initial;
        -webkit-text-stroke: initial;
        background-image: initial;
        background-size: initial;
        -webkit-background-clip: initial;
        background-clip: initial;
        animation: initial;
    }

    .nav__download span {
        position: relative;
        z-index: 1;
    }

    .nav__download::before {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        content: '';
        border-radius: 50%;
        display: block;
        width: 20em;
        height: 20em;
        left: -5em;
        text-align: center;
        transition: box-shadow 0.5s ease-out;
    }

    .nav__download:hover::before {
        box-shadow: inset 0 0 0 10em rgb(34, 179, 34);
    }

    /** SOBRE MI */
    .profile {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        margin: 4rem 4rem;
    }

    .profile__information {
        max-width: 50%;
    }

    .profile__title,
    .profile__description {
        text-align: start;
    }

    .profile__image-container {
        width: 20%;
    }

    .profile__image {
        max-width: 80%;
        border-radius: 100%;
    }


    .ability {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 2rem 4rem;
    }

    .ability__title,
    .ability__description {
        text-align: start;
        max-width: 30vw;
    }

    .ability__image-container {
        max-width: 400px;
        height: 12rem;
        overflow: hidden;
        position: relative;
    }

    .ability__images {
        display: flex;
        flex-wrap: wrap;
        height: 300%;
        animation: slide 5s linear infinite;
    }

    .ability__image {
        max-width: 20%;
        /* Tamaño de imagen para pantallas grandes */
    }

    .ability__image img {
        width: 100%;
        padding: 0.5rem;
    }

    @keyframes slide {
        0% {
            transform: translateY(0);
        }

        100% {
            transform: translateY(-50%);
        }
    }

    /* *PROYECTOS* */

    .project {
        margin: 2rem 4rem 2rem 4rem;
    }

    .project__card {
        max-width: auto;
    }

    .project__technologies img {
        width: 2vw;
    }

    .contact__description {
        height: 21vh;
    }

    .project__a:hover {
        font-size: var(--botton-size);
        color: var(--text-third-color);
        border: #000000 1px solid;
        background-color: #ffffff;
        transition: all 1s;
    }

    /* *CONTACTO */
    .contact {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        column-gap: 20px;
    }

    .contact__container {
        margin: 0;
        /* padding-right: 5rem; */
        max-width: 60%;
    }

    .contact__title,
    .contact__description {
        text-align: start;
        max-width: 30vw;
    }

    .contact__form {
        max-width: 40%;
    }
}

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

    /* *PROYECTOS* */
    .project__card {
        max-width: 21vw;
    }
}