:root {
    /* Colores principales */
    --color-primario: #ffffff;
    --color-secundario: #9febb6;
    --color-terciario: #0b8f33;
    --color-texto: #000000;

    /* Colores mail y tarjeta proyectos */
    --color-email-bg: #dcdcdd;
    --color-email-button-bg: #000000;
    --color-email-button-hover-bg: rgb(132, 132, 132);
    --color-tarjeta-bg: #fbfafa;

    /* Colores de modo oscuro */
    --color-dark-background: #121212;
    --color-dark-navbar: #1f1f1f;
    --color-dark-text: #e0e0e0;
    --color-dark-tarjeta-bg: #1f1f1f;
    --color-dark-email-bg: #333;
    --color-dark-button-bg: #3a3a3a;
}



*{
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

.navbar{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px;
    background: var(--color-primario);
}

.menu{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.menu a{
    border-radius: 5px;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 13px;
    padding: 15px;
    color: var(--color-texto);
}

.menu a span{
    border-radius: 5px;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 13px;
    position: relative;
    display: inline-block;
    transition: transform 0.5s ease 0s;
    transform-origin: 50% 0px 0px;
    transform-style: preserve-3d;
    padding: 15px;
    border-radius: 8px;
    }

.menu a span::before{
    position: absolute;
    top: 100%;
    left: 0px;
    background: var(--color-secundario);
    content: attr(data-title);
    transition: #000 0.3s ease 0s;
    transform: rotateX(-90deg);
    transform-origin: 50% 0px 0px;
    padding: 15px;
    border-radius: 8px;
}

.menu a:hover span {
    transform: rotateX(90deg) translateY(-22px);
}

.menu a:hover span::before{
    padding: 15px;
    background:  0% 0% var(--color-secundario);
}

.menu button:hover{
    cursor: pointer;
    background-color: var(--color-secundario);
    transition: 1s;
}

.menu .idioma{
    color: var(--color-texto);
    text-decoration: none;
}

.menu .oscuro,
.menu .claro{
    text-decoration: none;
    border: none;
    border-radius: 5px;
    background-color: inherit;
    padding: 9px;
}

.menu .oscuro:hover,
.menu .claro:hover{
    cursor: pointer;
}

.menu .oscuro img,
.menu .claro img{
    width: 25px;
}

.logo-img{
    height: 60px;
}

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

.inicio{
    width: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 150px;
    padding-bottom: 50px;
    border-bottom: 2px solid var(--color-terciario);
}

.foto .foto-personal{
    object-fit: cover;
    height: 150px;
    width: 100px;
    border-radius: 0%;
    /* border: 3px solid #a0a0a059; */
    clip-path:inset(0 0 0 0 round 50%); 
    margin-right: 30px;
}

.presentacion{
    max-width: 600px;
}

.enlaces{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding-top: 10px;
}

.enlaces img{
    width: 40px;
    height: 40px;
}

.CV-button{
    background-color: var(--color-secundario);
    border: 2px solid var(--color-terciario);
    padding: 5px 10px;
    color: var(--color-texto);
    border-radius: 5px;
    cursor: pointer;
}

.CV-button:hover{
    transition: 0.2s;
    background-color: var(--color-terciario);
    color: var(--color-primario);
}

.sobre-mi{
    width: 600px;
    display: block;
    padding-top: 60px;
}

.sobre-mi h1{
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    gap: 15px;
}

.sobre-mi h1 img {
    width: 25px;
}

.sobre-mi p{
    padding-bottom: 20px;
}

.proyectos {
    width: 600px;
    display: block;
    padding-top: 60px;
}

.proyectos h1 {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    gap: 15px;
}

.proyectos h1 img {
    width: 25px;
}

.proyectos-grid {
    display: block;
    width: 600px;
}

.tarjeta {
    display: flex; /* Utilizamos Flexbox para crear las dos columnas */
    width: 600px;
    height: 280px;
    background-color: var(--color-tarjeta-bg);
    margin-bottom: 20px;
    border-radius: 15px;
    transition: .5s;
}

@media only screen and (min-width: 620px) {
    .tarjeta:hover{
        width: 610px;
        height: 290px;
        transform:translate(-10px)
    }
}

.titulo-tarjeta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 20px;
}

.titulo-tarjeta h2 {
    font-size: 1.8rem;
    padding-bottom: 10px;
}

.titulo-tarjeta h3 {
    font-size: 1.4rem;
    padding: 10px 0 ;
}

.texto-tarjeta {
    display: flex;
    flex-direction: column;
    align-items:flex-start;
    width: 50%; /* El texto ocupa la mitad del ancho */
    padding: 20px;
}

.tecnologias {
    display: flex;
    gap: 10px;
}

.texto-tarjeta img {
    /* width: 30px; */
    height: 30px;
}

.tarjeta-img {
    width: 50%; /* La imagen ocupa la otra mitad */

}

.tarjeta-img img {
    width: 100%;
    height: 100%;
    border-radius: 15px;  
}

.links-proyectos {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.links-proyectos button {
    transition: 0.5s;
    width: 81px;
    height: 30px;
    border: 2px solid var(--color-terciario);
    border-radius: 5px;
    cursor: pointer;
    padding: 0px 5px;
    background-color: var(--color-secundario);
    font-weight: bold;
    text-decoration: none;
}

.links-proyectos a button:hover {
    transition: 0.2s;
    background-color: var(--color-terciario);
    color: var(--color-primario);
}

.links-proyectos a button img {
    transition: 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    padding: 0 0 0 5px;
}

.links-proyectos a button:hover img{
    transition: 0.2s;
    filter: invert(1);
}

.links-proyectos a .live {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
 
.contacto {
    width: 600px;
    display: block;
    padding-top: 100px;
    padding-bottom: 50px;
}

.contacto h1{
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    gap: 15px;
}

.contacto h1 img {
    width: 25px;
}

.contacto .email-container img {
    width: 20px;
}

.email-container {
    border-radius: 10px;
    display: flex;
    align-items: center;
    height: 70px;
}

.email {
    background-color: var(--color-email-bg);
    border: none;
    padding: 10px;
    border-radius: 5px;
    color: rgb(0, 0, 0);
    width: 100%;
    height: 10px;
    margin-right: 10px;
}

.email-container .button {
    border: none;
    padding: 5px;
    background-color: var(--color-email-button-bg);
    border-radius: 5px;
    cursor: pointer;
    margin-left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.email-container .button:hover {
    background-color: var(--color-email-button-hover-bg);
}

html {
    scroll-behavior: smooth;
}

.scroll-button-container {
    padding: 0 0 50px 0;
    text-align: center;
}

.scroll-button {
    margin-top: 20px 0 50px 0;
    background-color: var(--color-secundario);
    border: 2px solid var(--color-terciario);
    padding: 5px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.scroll-button img {
    width: 20px;
    transform: rotate(-90deg);
}

.scroll-button:hover {
    background-color: var(--color-terciario);
    color: #fff;
}

.whatsApp{
    display: flex;
    justify-content: center;
}

.whatsApp a{
    text-decoration: none;
}

.whatsApp-button{
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.5s;
    font-weight: 800;
    background-color: var(--color-secundario);
    border: 2px solid var(--color-terciario);
    padding: 5px 10px;
    color: var(--color-texto);
    border-radius: 5px;
    cursor: pointer;
}

.whatsApp-button:hover{
    transition: 0.2s;
    background-color: var(--color-terciario);
    color: var(--color-primario);
}

.whatsApp-button img {
    transition: 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    padding: 0 0 0 10px;
}

.whatsApp-button:hover img {
    transition: 0.2s;
    filter: invert(1);
}

.ocultar{
    display: none;
}

/* Modo oscuro */

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .navbar {
    background-color: #1f1f1f;
}

body.dark-mode .menu a {
    transition: 1s;
    color: var(--color-primario);
}

body.dark-mode .menu a:hover {
    color: var(--color-texto);
    transition: all 1s;
}

body.dark-mode .menu img {
    filter: invert(1);
}

body.dark-mode .enlaces img {
    filter: invert(1);
}

body.dark-mode .CV-button {
    background-color: #333;
    border: 2px solid var(--color-terciario);
    color: #e0e0e0;
}

body.dark-mode .CV-button:hover {
    transition: 0.2s;
    background-color: var(--color-terciario);
    color: var(--color-primario);

}


body.dark-mode .sobre-mi h1 img{
    filter: invert(1);
}

body.dark-mode .proyectos h1 img{
    filter: invert(1);

}

body.dark-mode .contacto h1 img{
    filter: invert(1);
}


body.dark-mode .proyectos .tarjeta {
    background-color: #1f1f1f;
}

body.dark-mode .contacto .email {
    background-color: #333;
    color: #e0e0e0;
}

body.dark-mode .email-container .button {
    background-color: #3a3a3a;
}

body.dark-mode .invert{
    filter: invert(100%) sepia(0%) saturate(7492%) hue-rotate(158deg) brightness(103%) contrast(102%);
}


/* Estilos generales para dispositivos con un ancho máximo de 375px */
@media only screen and (max-width: 620px) {
    /* Ajustes para la barra de navegación */
    .navbar {
        flex-direction: column;
        padding: 15px;
    }

    .menu {
        display: flex;
        flex-wrap: wrap;
        text-align: center;
        justify-content: space-evenly
    }

    .menu a {
        font-size: 12px;
        padding: 10px;
    }

    .logo-img {
        height: 50px;
    }

    /* Ajustes para la sección de inicio */
    .inicio {
        width: 320px;
        flex-direction: column;
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .foto .foto-personal {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .presentacion {
        width: 100%;
        text-align: center;
    }

    .enlaces {
        padding-top: 20px;
    }

    .enlaces img {
        width: 30px;
        height: 30px;
    }

    .CV-button {
        width: 100px;
    }

    /* Ajustes para la sección de 'Sobre mí' */
    .sobre-mi {
        width: 320px;
        flex-direction: column;

        padding: 20px;
    }

    .sobre-mi h1 {
        font-size: 1.5rem;
        gap: 10px;
    }

    .sobre-mi p {
        font-size: 1rem;
    }

    /* Ajustes para la sección de 'Proyectos' */
    .proyectos {
        width: 320px;
        padding: 20px;
    }

    .proyectos h1 {
        font-size: 1.5rem;
        gap: 10px;
    }

    .proyectos-grid {
        width: 100%;
    }

    .tarjeta {
        width: 100%;
        height: auto;
        flex-direction: column;
        margin-bottom: 20px;
    }

    .tarjeta-img {
        width: 100%;
    }

    .tarjeta-img img {
        height: auto;
        border-radius: 15px;
    }

    .texto-tarjeta {
        width: 100%;
        padding: 10px;
        align-items: center;
        text-align: center;
    }

    .titulo-tarjeta h2 {
        font-size: 1.5rem;
    }

    .titulo-tarjeta h3 {
        font-size: 1.2rem;
    }

    .tecnologias img {
        width: 25px;
        height: 25px;
    }

    .links-proyectos {
        gap: 5px;
    }

    .links-proyectos button {
        width: 100px;
    }

    /* Ajustes para la sección de 'Contacto' */
    .contacto {
        width: 320px;
        padding: 20px 20px 50px 20px;
    }

    .contacto h1 {
        font-size: 1.5rem;
        gap: 10px;
    }

    .email-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .email {
        width: 80%;
        font-size: 0.9rem;
    }

    .email-container .button {
        width: 14%;
        font-size: 0.9rem;
    }
}
