/* Enhanced Skill Tree Animation Section */

/* Add h2 styling to match projects section */
.skill-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
    color: #00aaff; /* Blue accent color from project detail pages */
    letter-spacing: -0.02em;
}

.enhanced-skills-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
    position: relative;
}

.enhanced-skill-module {
    position: relative;
    margin: 3rem;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.enhanced-skill-module.focused {
    z-index: 100;
    /* transform: scale(1.2); */ /* Scaling will be handled by hover now */
}

@keyframes pulse-glow {
    0% {
        transform: scale(1);
        box-shadow: 
            0 10px 30px rgba(0,0,0,0.3),
            0 0 20px rgba(0, 170, 255, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 15px 40px rgba(0,0,0,0.35), 
            0 0 30px rgba(0, 170, 255, 0.4),
            0 0 60px rgba(0, 170, 255, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 
            0 10px 30px rgba(0,0,0,0.3),
            0 0 20px rgba(0, 170, 255, 0.2);
    }
}

/* Add tech-inspired scanning effect */
@keyframes tech-scan {
    0% {
        background-position: -100px 0;
    }
    100% {
        background-position: 100px 0;
    }
}

/* Add subtle data flow animation */
@keyframes data-flow {
    0% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-2px);
    }
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }
}

.skill-section.user-has-interacted .enhanced-main-bubble {
    animation: none;
}

.enhanced-skills-container.user-has-interacted .enhanced-main-bubble {
    animation: none;
}

.enhanced-skill-module.faded {
    opacity: 0.2;
    transform: scale(0.85);
    filter: blur(2px);
}

.skill-guide-text {
    position: relative;
    top: 1rem;
    color: #cbd5e1; /* Light gray text for dark theme */
    font-size: 1.4rem;
    font-style: italic;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none; /* Make sure it doesn't interfere with clicks */
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.skill-guide-text.is-visible {
    opacity: 1;
}

/* Hover effect to scale individual bubbles */
.enhanced-main-bubble:hover,
.enhanced-skill-module.is-expanded .enhanced-child-bubble:hover,
.enhanced-skill-module.is-expanded .enhanced-grandchild-bubble:hover {
    transform: scale(1.2);
    z-index: 101; /* Bring to front to avoid being overlapped */
    animation: none;
}

.enhanced-main-bubble {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 10;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.3),
        0 4px 6px rgba(0,0,0,0.2),
        inset 0 1px 3px rgba(255,255,255,0.2);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff; /* Text inside bubbles should be white */
    backdrop-filter: blur(10px);
    animation: pulse-glow 3s infinite ease-in-out;
    letter-spacing: -0.01em;
}

.enhanced-skill-module.focused .enhanced-main-bubble {
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.4), 
        0 10px 25px rgba(0,0,0,0.2),
        inset 0 1px 3px rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Enhanced bubble colors with dark theme */
.enhanced-programming .enhanced-main-bubble { 
    background: linear-gradient(135deg, #00aaff 0%, #0088cc 100%);
    border: 3px solid rgba(0, 170, 255, 0.3);
    color: white;
}
.enhanced-cloud .enhanced-main-bubble { 
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: 3px solid rgba(139, 92, 246, 0.3);
    color: white;
}
.enhanced-ai .enhanced-main-bubble { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 3px solid rgba(16, 185, 129, 0.3);
    color: white;
}
.enhanced-analytics .enhanced-main-bubble { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: 3px solid rgba(245, 158, 11, 0.3);
    color: white;
}
.enhanced-industrial .enhanced-main-bubble { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 3px solid rgba(239, 68, 68, 0.3);
    color: white;
}

.enhanced-children-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.enhanced-child-bubble {
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff; /* Text inside bubbles should be white */
    opacity: 0;
    visibility: hidden;
    transform: scale(0) rotate(180deg);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(0,0,0,0.4),
        0 0 15px rgba(0, 170, 255, 0.2),
        inset 0 1px 2px rgba(255,255,255,0.2);
    border: 2px solid rgba(0, 170, 255, 0.4);
    z-index: 8;
    backdrop-filter: blur(5px);
    letter-spacing: -0.01em;
}

.enhanced-grandchild-bubble {
    position: absolute;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.7rem;
    color: #ffffff; /* Text inside bubbles should be white */
    opacity: 0;
    visibility: hidden;
    transform: scale(0) rotate(-90deg);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.35),
        0 0 10px rgba(0, 170, 255, 0.15),
        inset 0 1px 1px rgba(255,255,255,0.1);
    border: 1px solid rgba(0, 170, 255, 0.3);
    z-index: 6;
    backdrop-filter: blur(3px);
    font-weight: 500;
}

/* Enhanced child bubble colors - each uses same color as its parent bubble */
.enhanced-programming .enhanced-child-bubble { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.enhanced-cloud .enhanced-child-bubble { 
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}
.enhanced-ai .enhanced-child-bubble { 
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}
.enhanced-analytics .enhanced-child-bubble { 
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.enhanced-industrial .enhanced-child-bubble { 
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

/* Enhanced grandchild bubble colors - each uses same color as its parent bubble */
.enhanced-programming .enhanced-grandchild-bubble { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.enhanced-cloud .enhanced-grandchild-bubble { 
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}
.enhanced-ai .enhanced-grandchild-bubble { 
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}
.enhanced-analytics .enhanced-grandchild-bubble { 
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.enhanced-industrial .enhanced-grandchild-bubble { 
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

/* Expanded state with staggered animations */
.enhanced-skill-module.is-expanded .enhanced-child-bubble {
    opacity: 1;
    visibility: visible;
    transform: scale(1) rotate(0deg);
    pointer-events: auto;
}

.enhanced-skill-module.is-expanded .enhanced-grandchild-bubble {
    opacity: 1;
    visibility: visible;
    transform: scale(1) rotate(0deg);
    pointer-events: auto;
}

/* Staggered animation delays for children */
.enhanced-skill-module.is-expanded .enhanced-child-bubble:nth-child(1) { transition-delay: 0.1s; }
.enhanced-skill-module.is-expanded .enhanced-child-bubble:nth-child(2) { transition-delay: 0.2s; }
.enhanced-skill-module.is-expanded .enhanced-child-bubble:nth-child(3) { transition-delay: 0.3s; }
.enhanced-skill-module.is-expanded .enhanced-child-bubble:nth-child(4) { transition-delay: 0.4s; }
.enhanced-skill-module.is-expanded .enhanced-child-bubble:nth-child(5) { transition-delay: 0.5s; }


/* Dynamic positioning for child bubbles */
.enhanced-skill-module .enhanced-child-bubble {
    /* Bubbles are positioned by JavaScript now */
}

/* Dynamic positioning for grandchild bubbles */
.enhanced-child-bubble .enhanced-grandchild-bubble {
    /* Bubbles are positioned by JavaScript now */
}


/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .enhanced-skills-container {
        flex-direction: column;
        padding: 1rem;
    }

    .enhanced-skill-module {
        margin: 2rem 0;
    }

    .enhanced-main-bubble {
        width: 120px;
        height: 120px;
        font-size: 0.8rem;
    }

    .enhanced-child-bubble {
        width: 80px;
        height: 80px;
        font-size: 0.7rem;
    }

    .enhanced-grandchild-bubble {
        width: 60px;
        height: 60px;
        font-size: 0.6rem;
    }

    /* Adjust distances for mobile */
    .enhanced-skill-module .enhanced-child-bubble:nth-child(1) { top: -120px; left: 20px; }
    .enhanced-skill-module .enhanced-child-bubble:nth-child(2) { top: -90px; right: -90px; }
    .enhanced-skill-module .enhanced-child-bubble:nth-child(3) { bottom: -90px; right: -90px; }
    .enhanced-skill-module .enhanced-child-bubble:nth-child(4) { bottom: -120px; left: 20px; }
    .enhanced-skill-module .enhanced-child-bubble:nth-child(5) { top: -90px; left: -90px; }
} 