/*
========================================
ESTILOS GENERALES DE HABILIDADES (SKILLS)
========================================
*/

/* 1. Wrapper principal (2 esferas) */
.dual-spheres-wrapper {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

/* 2. Wrapper individual de cada esfera */
.skills-sphere-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 3. Título */
.sphere-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-align: center;
    font-family: 'Lato', 'Open Sans', sans-serif;
}

/* 4. Globo / esfera (Contenedor Visual) */
.skill-sphere-globe {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;

    /* Efecto de cristal y brillo sutil */
    background: radial-gradient(
        circle at 30% 30%, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0) 70%
    );
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

/*
========================================
CONTROL DE TAMAÑO INDIVIDUAL
========================================
*/

.wrapper-skills,
.wrapper-tools {
    width: 50%;
}

.globe-skills,
.globe-tools {
    max-width: 1600px; /* Ajuste global (puede ser ajustado en media query) */
}

/*
========================================
GALERÍA CIRCULAR INTERNA (La pista de las "luciérnagas")
========================================
*/

#gallery-skills,
#gallery-tools {
    width: 95%;
    max-width: 95%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    position: relative;
    overflow: hidden; /* Esto mantiene los iconos dentro del límite de la esfera */
}

#gallery-skills a,
#gallery-tools a {
    box-sizing: border-box;
    position: absolute;
    width: 50px; /* Tamaño del círculo base del icono */
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    z-index: 10;

    background-color: rgba(40, 40, 40, 0.7);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.5);

    border: 4px solid transparent;

    transition: transform 0.3s ease-out, opacity 0.3s, background-color 0.3s, box-shadow 0.3s, border-color 0.3s;
}

/* Bordes de colores diferentes para identificar cada esfera */
#gallery-skills a { border-color: #07b62d3d; } /* Verde - Lenguajes */
#gallery-tools a { border-color: #ff080034; } /* Rojo - Herramientas */

/* Estilo del Icono Devicon (la "i") */
#gallery-skills a i,
#gallery-tools a i {
    width: 100%;
    height: 100%;
    font-size: 40px; /* Tamaño del icono real dentro del círculo */
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0.9;
    filter: none;
    transition: all 0.5s;
    border-radius: 50%;
}

/* --- REGLAS DE MEJORA DE ICONOS (Brillo y Color) --- */

/* Iconos oscuros/planos (sin color) se fuerzan a blanco/neón */
#gallery-skills a i.devicon-plain, #gallery-tools a i.devicon-plain,
#gallery-skills a i.devicon-original, #gallery-tools a i.devicon-original {
    filter: invert(1);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.7), 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Iconos de color (no invertir) */
#gallery-skills a i[class*="-color"], #gallery-tools a i[class*="-color"],
#gallery-skills a i[class*="-wordmark"], #gallery-tools a i[class*="-wordmark"] {
    filter: none;
    text-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
}

/* Efecto sombra neón general sutil */
#gallery-skills a i, #gallery-tools a i {
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.4)) drop-shadow(0 0 8px rgba(0, 255, 255, 0.2));
}

/* Hover principal: Escala, Sombra y Borde */
#gallery-skills a:hover,
#gallery-tools a:hover {
    z-index: 20;
    transform: scale(2.8);
    background-color: rgba(60, 60, 60, 0.9);
    
    /* Brillo al pasar el ratón */
    box-shadow: 
        0 0 35px rgba(0, 255, 255, 0.7), 
        0 0 15px rgba(255, 255, 255, 0.8), 
        inset 0 0 10px rgba(255, 255, 255, 0.4); 
    
    border-color: rgba(0, 255, 255, 0.5); /* Borde cian unificado */
    cursor: pointer;
}

/* Brillo del icono <i> al hacer hover */
#gallery-skills a:hover i,
#gallery-tools a:hover i {
    text-shadow: 
        0 0 10px currentColor, 
        0 0 20px currentColor, 
        0 0 30px currentColor;
    filter: drop-shadow(0 0 10px currentColor) drop-shadow(0 0 15px currentColor);
}

/* Atenuar el resto al pasar sobre uno (Usando :has) */
#gallery-skills:has(a:hover) a:not(:hover),
#gallery-tools:has(a:hover) a:not(:hover) {
    opacity: 0.2;
    transform: scale(0.9);
    background-color: rgba(40, 40, 40, 0.5);
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.3);
    border-color: transparent;
}

#gallery-skills:has(a:hover) a:not(:hover) i,
#gallery-tools:has(a:hover) a:not(:hover) i {
    text-shadow: none;
    filter: grayscale(1) brightness(0.7);
}


/*
========================================
MEDIA QUERY
========================================
*/

@media (max-width: 768px) {

    .dual-spheres-wrapper {
        flex-direction: column;
        gap: 3rem;
        padding: 0 1rem;
    }

    .wrapper-skills,
    .wrapper-tools {
        width: 100%;
        align-items: center;
    }

    .globe-skills,
    .globe-tools {
        max-width: 400px;
    }

    /* Reducir el tamaño de los iconos al hacer hover en móviles */
    #gallery-skills a:hover,
    #gallery-tools a:hover {
        transform: scale(2.0); /* Menos dramático que en escritorio */
    }
}