/* Skills Section Redesign - Modern Single Grid Layout */

/* Override parent container to allow full width */
.skills-section {
    max-width: 100% !important;
    padding: 60px 0 !important;
    margin-top: 5rem !important;
}

.skills-categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    justify-items: center;
}

/* Remove category containers - flat structure */
.skill-category {
    display: contents;
}

.category-title {
    display: none;
}

.category-grid {
    display: contents;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 1.5rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Staggered animation delay */
.skill-card:nth-child(1) {
    animation-delay: 0.05s;
}

.skill-card:nth-child(2) {
    animation-delay: 0.1s;
}

.skill-card:nth-child(3) {
    animation-delay: 0.15s;
}

.skill-card:nth-child(4) {
    animation-delay: 0.2s;
}

.skill-card:nth-child(5) {
    animation-delay: 0.25s;
}

.skill-card:nth-child(6) {
    animation-delay: 0.3s;
}

.skill-card:nth-child(7) {
    animation-delay: 0.35s;
}

.skill-card:nth-child(8) {
    animation-delay: 0.4s;
}

.skill-card:nth-child(9) {
    animation-delay: 0.45s;
}

.skill-card:nth-child(10) {
    animation-delay: 0.5s;
}

.skill-card:nth-child(11) {
    animation-delay: 0.55s;
}

.skill-card:nth-child(12) {
    animation-delay: 0.6s;
}

.skill-card:nth-child(13) {
    animation-delay: 0.65s;
}

.skill-card:nth-child(14) {
    animation-delay: 0.7s;
}

.skill-card:nth-child(15) {
    animation-delay: 0.75s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(20, 157, 221, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-card:hover {
    background: rgba(20, 157, 221, 0.08);
    border-color: rgba(20, 157, 221, 0.4);
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(20, 157, 221, 0.2),
        0 0 40px rgba(20, 157, 221, 0.1);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: brightness(0.9);
    transition: all 0.3s ease;
}

.skill-card:hover img {
    filter: brightness(1.1) drop-shadow(0 0 8px rgba(20, 157, 221, 0.5));
    transform: scale(1.1);
}

.skill-card span {
    font-size: 0.85rem;
    text-align: center;
    font-weight: 600;
    color: #b0b0b0;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.skill-card:hover span {
    color: #149ddd;
}

/* Light theme compatibility */
.light-theme .skill-card {
    background: rgba(20, 157, 221, 0.05);
    border-color: rgba(20, 157, 221, 0.15);
}

.light-theme .skill-card:hover {
    background: rgba(20, 157, 221, 0.12);
    border-color: rgba(20, 157, 221, 0.4);
}

.light-theme .skill-card span {
    color: #555;
}

.light-theme .skill-card:hover span {
    color: #149ddd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .skills-categories-container {
        grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
        gap: 1rem;
    }

    .skill-card {
        padding: 1.2rem 0.8rem;
    }

    .skill-card img {
        width: 40px;
        height: 40px;
    }

    .skill-card span {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .skills-categories-container {
        grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
        gap: 0.8rem;
    }

    .skill-card {
        padding: 1rem 0.6rem;
    }

    .skill-card img {
        width: 35px;
        height: 35px;
    }
}