:root {
    --color-black: #121212;
    --color-black-light: #232323;
    --color-gray-dark: #333333;
    --color-gray: #888888;
    --color-gray-light: #CCCCCC;
    --color-white: #FFFFFF;
    --color-white-soft: #F5F5F5;
}

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

body {
    background-color: var(--color-white);
    color: var(--color-black-light);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

header {
    width: 100%;
    max-width: 900px;
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
}

header img {
    height: 50px;
    margin-right: 1rem;
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: 2rem;
    color: var(--color-black);
}

section {
    width: 100%;
    max-width: 900px;
    margin-bottom: 4rem;
}

h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--color-black);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-gray-dark);
    padding-bottom: 0.3rem;
}

a {
    color: var(--color-gray-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: underline;
    filter: drop-shadow(0 0 6px var(--color-black));
}

.logo {
    width: 100px;
    height: auto;
    margin-right: 1rem;
}

/* Estilo proyectos */

.proyectos-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.proyecto {
    background-color: var(--color-white-soft);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.proyecto img {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.proyecto h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--color-black);
}

.proyecto p {
    font-size: 0.95rem;
    color: var(--color-black-light);
    margin-bottom: 1rem;
}

.proyecto a {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.proyecto a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #00FFF7;
    z-index: -1;
    transition: width 0.4s ease;
}

.proyecto a:hover::before {
    width: 100%;
}

.proyecto a:hover {
    color: var(--color-black);
    box-shadow: 0 0 15px #00FFF7;
    border-radius: 20px;
    padding: 10px 10px 10px 10px;
    text-decoration: none;
}

.iconosTecnologias {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    justify-items: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

iconify-icon{
    font-size: 2rem;
}

/*Estilo navbar*/

.navbar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 900px;
    margin-bottom: 2rem;
}

.nav-arrow {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-black);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.nav-arrow:disabled {
    opacity: 0.2;
    cursor: default;
}

.navbar {
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
}

.navbar::-webkit-scrollbar {
    display: none;
}

.navbar ul {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0.5rem 0;
    white-space: nowrap;
}

.navbar a {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--color-black);
    text-decoration: none;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00FFF7;
}

.arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

a:hover .arrow {
    transform: translateX(5px);
}


/* Diseño para tecnologias, trabajos, etc*/

section ul {
    padding-left: 1rem;
    margin-bottom: 1rem;
}

section ul li {
    margin-bottom: 0.5rem;
}

.job {
    margin-bottom: 2rem;
}

.job h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

#cv a {
    display: inline-block;
    margin-top: 0.5rem;
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

#cv a:hover {
    background-color: var(--color-gray-dark);
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
    background: var(--color-white);
}


/** * Estilo para el texto de bienvenida
*/
.typing {
    overflow: hidden;
    border-right: .1em solid var(--color-black);
    white-space: nowrap;
    animation: typing 2.5s steps(25, end) forwards, blink-caret .75s step-end 3, hide-caret 0.01s 2.5s forwards;
    width: 0;
}

/*Animaciones para el texto de bienvenida*/

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--color-black);
    }
}

@keyframes hide-caret {
    to {
        border-right-color: transparent;
    }
}

/* 1) Etiquetas flotantes para habilidades */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.skill-tag {
    display: inline-block;
    background-color: var(--color-gray-light);
    color: var(--color-black);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Nuevos estilos para tecnologías con iconos */
.tech-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background-color: var(--color-white-soft);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tech-item iconify-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Iconos específicos que necesitan ajustes de color para modo oscuro */
.tech-item iconify-icon[icon="simple-icons:odoo"] {
    color: #875A7B;
}

.tech-item iconify-icon[icon="simple-icons:woocommerce"] {
    color: #96588A;
}

.tech-item iconify-icon[icon="simple-icons:dotnet"] {
    color: #512BD4;
}

/* Modo oscuro - mantener colores específicos de marca */
body.dark-mode .tech-item iconify-icon[icon="simple-icons:odoo"] {
    color: #A577B8;
}

body.dark-mode .tech-item iconify-icon[icon="simple-icons:woocommerce"] {
    color: #B577A8;
}

body.dark-mode .tech-item iconify-icon[icon="simple-icons:dotnet"] {
    color: #7B68EE;
}

.tech-item span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-black);
}

/* Estilos para la sección de idiomas */
.language-levels {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--color-white-soft);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-item iconify-icon {
    font-size: 2rem;
}

.language-item span {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-black);
}

/* 2) Igualar altura de imágenes en proyectos */
.proyecto .img-container {
    width: 100%;
    height: 200px;
    /* altura uniforme */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.proyecto .img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 3) Ajustes responsivos ya incluidos */

/* 4) Nuevos estilos para sección de proyectos en progreso */
#proyectos-en-progreso {
    margin-top: 2rem;
}

#proyectos-en-progreso .proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}



/*Modo oscuro*/


#toggle-dark-mode {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 999;
    background-color: var(--color-black);
    color: var(--color-white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

#toggle-language {
    position: fixed;
    top: 1rem;
    right: 10rem;
    z-index: 999;
    background-color: var(--color-gray-light);
    color: var(--color-black);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

#toggle-language:hover {
    background-color: var(--color-gray-dark);
    color: var(--color-white);
}

#gameOver {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 1.5rem 2rem;
    border: 2px solid #333;
    font-family: sans-serif;
    text-align: center;
    z-index: 1000;
    width: 90vw;
    max-width: 350px;
    box-sizing: border-box;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#gameOver h3 {
    margin: 0 0 1rem 0;
    color: #e74c3c;
    font-size: 1.4rem;
}

#gameOver p {
    margin: 0.5rem 0;
    color: #333;
}

#gameOver button {
    background-color: var(--color-black);
    color: var(--color-white);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 1rem;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

#gameOver button:hover {
    background-color: var(--color-gray-dark);
    transform: translateY(-1px);
}

/* ...existing code... */

/* Modo oscuro para el modal */
body.dark-mode #gameOver {
    background: var(--color-black-light);
    color: var(--color-white-soft);
    border-color: var(--color-white-soft);
}

body.dark-mode #gameOver h3 {
    color: #ff6b6b;
}

body.dark-mode #gameOver p {
    color: var(--color-white-soft);
}

body.dark-mode #gameOver button {
    background-color: var(--color-white-soft);
    color: var(--color-black);
}

body.dark-mode #gameOver button:hover {
    background-color: var(--color-gray-dark);
    color: var(--color-white);
}


body.dark-mode #toggle-language {
    background-color: var(--color-black-light);
    color: var(--color-white-soft);
}

body.dark-mode #toggle-language:hover {
    background-color: var(--color-gray-dark);
}

body.dark-mode {
    background-color: var(--color-black);
    color: var(--color-white-soft);
}

body.dark-mode header h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode a,
body.dark-mode .proyecto h3 {
    color: var(--color-white);
}

body.dark-mode section,
body.dark-mode .proyecto {
    background-color: var(--color-black-light);
    color: var(--color-white-soft);
}

body.dark-mode p,
body.dark-mode .proyecto p,
body.dark-mode li,
body.dark-mode span,
body.dark-mode .typing {
    color: var(--color-white-soft);
}

body.dark-mode .navbar a {
    color: var(--color-white-soft);
}

body.dark-mode .navbar a:hover {
    color: #00FFF7;
}

body.dark-mode #cv a {
    background-color: var(--color-white-soft);
    color: var(--color-black);
}

body.dark-mode #cv a:hover {
    background-color: var(--color-gray-dark);
    color: var(--color-white);
}

body.dark-mode #particles-js {
    background: var(--color-black);
}

body.dark-mode .nav-arrow {
    color: #00FFF7;
    background-color: var(--color-black-light);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,255,247,0.08);
}

body.dark-mode .nav-arrow:disabled {
    color: var(--color-gray);
    background-color: var(--color-gray-dark);
}

body.dark-mode .skill-tag {
    color: var(--color-black) !important;
}

/* Modo oscuro para tecnologías */
body.dark-mode .tech-item {
    background-color: var(--color-black-light);
    color: var(--color-white-soft);
}

body.dark-mode .tech-item span {
    color: var(--color-white-soft);
}

/* Modo oscuro para idiomas */
body.dark-mode .language-item {
    background-color: var(--color-black-light);
    color: var(--color-white-soft);
}

body.dark-mode .language-item span {
    color: var(--color-white-soft);
}

body.dark-mode #gameOver {
    background: var(--color-black-light);
    color: var(--color-white-soft);
    border-color: var(--color-white-soft);
}

/*Tablet design*/

@media (min-width: 600px) {
    body {
        padding: 3rem;
    }

    header {

        margin-bottom: 4rem;
        justify-content: center;
        text-align: center;
    }

    header h1 {
        flex: 1;
        text-align: center;
        font-size: 3.5rem;
    }

    .categoriaProyecto {
        margin-bottom: 30px;
    }

    section {
        padding: 1.5rem 2rem;
        border-radius: 14px;
    }

    #inicio p {
        font-size: 2.2rem;
    }

    .navbar-wrapper {
        margin-bottom: 3rem;
    }

    .navbar ul {
        gap: 2rem;
        font-size: 1.1rem;
    }

    .proyectos-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .proyecto {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0;
    }

    .job h3 {
        font-size: 1.15rem;
    }

    #cv a {
        font-size: 1.05rem;
        padding: 0.7rem 1.5rem;
    }

    .tech-icons-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1.5rem;
    }

    .tech-item {
        padding: 1.2rem;
    }

    .tech-item iconify-icon {
        font-size: 3rem;
    }

    .tech-item span {
        font-size: 1rem;
    }

    .language-levels {
        flex-direction: row;
        gap: 2rem;
    }

    .language-item {
        flex: 1;
        padding: 1.2rem;
    }

}


/* Desktop design */

@media (min-width: 1024px) {
    body {
        padding: 4rem;
        font-size: 1.05rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    header h1 {
        font-size: 4rem;
    }

    section {
        padding: 2rem 3rem;
        background-color: var(--color-white-soft);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    }

    h2 {
        font-size: 2rem;
    }

    .navbar-wrapper {
        justify-content: center;
    }

    .navbar ul a {
        gap: 2.5rem;
        font-size: 1.5rem;
    }

    .proyectos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .proyecto h3 {
        font-size: 1.4rem;
    }

    .proyecto p {
        font-size: 1rem;
    }

    .job h3 {
        font-size: 1.3rem;
    }

    #cv a {
        font-size: 1.1rem;
        padding: 0.8rem 2rem;
    }

    .typing {
        font-size: 2.5rem;
    }

    #inicio p {
        font-size: 2.5rem;
        margin-top: 1rem;
    }

    footer,
    #redes,
    #contacto {
        font-size: 1rem;
    }

    .nav-arrow {
        font-size: 2rem;
        padding: 0.8rem;
    }

    .tech-icons-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 2rem;
    }

    .tech-item {
        padding: 1.5rem;
    }

    .tech-item iconify-icon {
        font-size: 3.5rem;
    }

    .tech-item span {
        font-size: 1.1rem;
    }

    .language-item {
        padding: 1.5rem;
    }

    .language-item iconify-icon {
        font-size: 2.5rem;
    }

    .language-item span {
        font-size: 1.2rem;
    }
}