/* Skills Network Section */
.skills-section {
    padding: 6rem 5%;
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.skills-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 4rem;
}

.skills-title-area {
    width: 30%;
}

.skills-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.skills-network-area {
    width: 65%;
    position: relative;
    height: 600px;
    /* Fixed height for the network plot */
    display: flex;
    justify-content: center;
    align-items: center;
}

.network-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Let clicks pass through lines */
}

.connection-line {
    stroke: rgba(88, 166, 255, 0.3);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
}

.node {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: #0d1117;
    border: 2px solid #30363d;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    /* Center node on coordinates */
}

.node img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.node i {
    font-size: 1.5rem;
    color: #8b949e;
    transition: all 0.3s ease;
}

/* Hover Effects */
.node:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.6);
    transform: translate(-50%, -50%) scale(1.2);
    /* Maintain center + scale */
    z-index: 10;
}

.node:hover img {
    filter: grayscale(0%);
}

.node:hover i {
    color: var(--text-color);
}

/* Tooltip Card */
.skill-card {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.95), rgba(13, 17, 23, 0.98));
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.skill-card.active {
    opacity: 1;
    transform: translateX(0);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.skill-level-label {
    font-size: 0.9rem;
    color: #8b949e;
    margin-bottom: 0.5rem;
    display: block;
}

.level-bar-bg {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.level-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--highlight-color));
    border-radius: 4px;
    width: 0%;
    transition: width 0.6s ease-out;
}

/* Brain Node Positions (Percentages relative to container) */
/* Frontal Lobe (Logic/Code) */
.node-1 {
    top: 30%;
    left: 15%;
}

/* Python */
.node-2 {
    top: 15%;
    left: 25%;
}

/* Algorithms */
.node-3 {
    top: 45%;
    left: 25%;
}

/* Data Structures */

/* Parietal Lobe (Processing) */
.node-4 {
    top: 10%;
    left: 45%;
}

/* TensorFlow */
.node-5 {
    top: 30%;
    left: 45%;
}

/* PyTorch */
.node-6 {
    top: 50%;
    left: 40%;
}

/* Keras */

/* Occipital Lobe (Vision) */
.node-7 {
    top: 20%;
    left: 65%;
}

/* OpenCV */
.node-8 {
    top: 40%;
    left: 60%;
}

/* Computer Vision */

/* Temporal Lobe (Memory/Language) */
.node-9 {
    top: 65%;
    left: 30%;
}

/* NLP */
.node-10 {
    top: 60%;
    left: 55%;
}

/* LLMs */
.node-11 {
    top: 75%;
    left: 45%;
}

/* Data Analysis */

/* Cerebellum (Coordination/Tools) */
.node-12 {
    top: 85%;
    left: 35%;
}

/* Git */
.node-13 {
    top: 80%;
    left: 60%;
}

/* SQL */

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .skills-container {
        flex-direction: column;
        height: auto;
    }

    .skills-title-area {
        width: 100%;
        text-align: center;
    }

    .skills-network-area {
        width: 100%;
        max-width: 500px;
        height: auto;
        aspect-ratio: 800 / 600;
        margin: 0 auto;
        transform: none;
    }

    .node {
        width: 35px;
        height: 35px;
    }

    .node i {
        font-size: 1rem;
    }

    .skill-card {
        top: 0;
        left: 5%;
        width: 90%;
    }
}