/* Updated Skills Card Grid - CSS */

/* Skills grid - wider cards */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Skill card - wider and taller */
.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 20px;
    cursor: default;
    text-align: center;
    min-height: 220px;
    position: relative;
}

/* Skill icon */
.skill-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto; /* Center horizontally with bottom margin */
    color: var(--accent-primary);
}

/* Handle both images and icons properly */
.skill-icon i {
    font-size: 32px; /* Larger size for font awesome icons */
}

.skill-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Improve adaptive-icon styling */
.skill-icon adaptive-icon {
    width: 45px !important; /* Override default adaptive-icon width */
    height: 45px !important; /* Override default adaptive-icon height */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important; /* Center horizontally */
}

.skill-icon adaptive-icon i {
    font-size: 32px; /* Match font size for font awesome icons */
}

.skill-icon adaptive-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Skill name */
.skill-name {
    margin: 0 0 18px 0;
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-primary);
}

/* Improved skill dots for proficiency with partial progress */
.skill-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
}

.mb-3 {
    margin-bottom: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(0, 0, 0, 0.1); /* Subtle border for inactive dots */
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dot.active {
    background-color: var(--accent-primary);
    border-color: transparent;
}

/* Partial dot filling for more precise progress */
.dot.partial::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--accent-primary);
    border-radius: 50% 0 0 50%;
}

/* Different partial fills based on percentage */
.dot.partial-25::before {
    width: 25%;
}

.dot.partial-50::before {
    width: 50%;
}

.dot.partial-75::before {
    width: 75%;
}


/* Improve dot visibility in dark theme */
.dark-theme .dot {
    background-color: rgba(255, 255, 255, 0.15); /* Lighter background for inactive dots */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Lighter border for visibility */
}

.dark-theme .dot.active {
    background-color: var(--accent-primary);
    border-color: transparent;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .skill-card {
        padding: 20px 15px;
        min-height: 190px; /* Changed from fixed height to min-height */
    }

    .skill-icon {
        width: 50px;
        height: 50px;
    }

    .skill-icon i {
        font-size: 28px;
    }

    .skill-icon adaptive-icon {
        width: 56px !important;
        height: 56px !important;
    }
}

@media (max-width: 768px) {

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .skill-name {
        font-size: var(--font-size-sm);
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .skill-card {
        min-height: 170px; /* Changed from fixed height to min-height */
        padding: 15px 10px; /* Reduce padding further */
    }
}

@media (max-width: 576px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px; /* Reduce gap further */
    }

    .skill-card {
        min-height: auto; /* Allow cards to grow based on content */
        height: auto; /* Ensure height is not fixed */
        padding: 12px 8px; /* Further reduce padding */
    }

    .skill-icon {
        width: 40px; /* Smaller icon */
        height: 40px;
        margin-bottom: 10px; /* Less space */
    }

    .skill-icon adaptive-icon {
        width: 36px !important;
        height: 36px !important;
    }

    .skill-name {
        font-size: calc(var(--font-size-sm) - 1px); /* Slightly smaller font */
        margin-bottom: 12px; /* Less space */
    }

    .skill-dots {
        gap: 4px; /* Smaller gap */
        margin-bottom: 10px;
    }

    .dot {
        width: 6px; /* Smaller dots */
        height: 6px;
    }

    .chip {
        padding: 4px 8px; /* Smaller chip */
        font-size: calc(var(--font-size-sm) - 2px); /* Smaller text */
    }

    .chip adaptive-icon {
        width: 14px !important;
        height: 14px !important;
    }
}