/* ===== SKILLS MODAL BASE ===== */
.skills-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skills-modal.show {
    opacity: 1;
}

.skills-modal.hide {
    opacity: 0;
}

/* ===== SKILLS CONTAINER ===== */
.skills-container {
    width: 90%;
    max-width: 1200px;
    height: 80%;
    background: #1a1a1a;
    border-radius: 15px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

/* ===== SKILLS SIDEBAR ===== */
.skills-sidebar {
    width: 250px;
    background: #0f0f0f;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
}

.skills-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skills-title {
    color: #fff;
    font-size: 1.2em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-skills {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-skills:hover {
    color: #fff;
    background: #333;
}

/* ===== SKILL CATEGORY SECTIONS ===== */
.skill-category-header {
    padding: 15px 20px;
    color: #888;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #222;
}

/* ===== SKILL CATEGORY LIST & BUTTONS ===== */
.skill-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.skill-category-item {
    margin-bottom: 2px;
}

.skill-category-btn {
    width: 100%;
    background: none;
    border: none;
    color: #888;
    padding: 12px 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95em;
}

.skill-category-btn.active {
    background: #647b8a;
    color: #fff;
}

.skill-category-btn i {
    width: 20px;
    text-align: center;
}

/* ===== SKILLS CONTENT AREA ===== */
.skills-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    position: relative;
}

.skills-content-header {
    padding: 20px;
    border-bottom: 1px solid #333;
}

.skills-content-title {
    color: #fff;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== SKILLS GRID - FIXED 3 COLUMNS ===== */
.skills-grid {
    flex: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100% - 80px);
    align-content: start;
}

.skill-item {
    background: #222;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(100, 123, 138, 0.3);
    border-color: #647b8a;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #647b8a, #4a5a66);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-item:hover::before {
    opacity: 1;
}

/* ===== SKILL ITEM CONTENT ===== */
.skill-icon-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.skill-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #647b8a, #4a5a66);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(100, 123, 138, 0.3);
    flex-shrink: 0;
}

.skill-icon i {
    font-size: 1.8em;
    color: #fff;
}

.skill-main-info {
    flex: 1;
    min-width: 0;
}

.skill-name {
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    line-height: 1.3;
    hyphens: auto;
}

.skill-level {
    color: #647b8a;
    display: flex;
    align-items: start;
    font-size: 0.9em;
    font-weight: 500;
    margin-top: 2px
}

/* ===== SKILL PROGRESS BAR ===== */
.skill-progress-container {
    margin-bottom: 15px;
    margin-top: auto;
}

.skill-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.skill-progress-text {
    color: #aaa;
    font-size: 0.85em;
}

.skill-progress-percentage {
    color: #647b8a;
    font-size: 0.85em;
    font-weight: 600;
}

.skill-progress-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #647b8a, #4a5a66);
    border-radius: 10px;
    transition: width 1.5s ease-in-out;
    position: relative;
    overflow: hidden;
}

.skill-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: skillShine 2s infinite;
}

@keyframes skillShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== EMPTY STATE ===== */
.skills-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.skills-empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.skills-empty-text {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #888;
}

.skills-empty-subtext {
    font-size: 0.9em;
    color: #666;
}

/* ===== SCROLLBAR STYLES ===== */
.skills-grid::-webkit-scrollbar {
    width: 8px;
}

.skills-grid::-webkit-scrollbar-track {
    background: #0f0f0f;
    border-radius: 10px;
}

.skills-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #647b8a, #4a5a66);
    border-radius: 10px;
    border: 2px solid #0f0f0f;
}

.skills-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4a5a66, #3a4a56);
}

.skill-category-list::-webkit-scrollbar {
    width: 6px;
}

.skill-category-list::-webkit-scrollbar-track {
    background: #0f0f0f;
    border-radius: 10px;
}

.skill-category-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #647b8a, #4a5a66);
    border-radius: 10px;
}

.skill-category-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4a5a66, #3a4a56);
}

.skills-grid {
    scrollbar-width: thin;
    scrollbar-color: #647b8a #0f0f0f;
    scroll-behavior: smooth;
}   

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .skills-container {
        width: 95%;
        height: 85%;
    }
    
    .skills-grid {
        gap: 15px;
        padding: 15px;
    }
    
    .skill-item {
        min-height: 220px;
        padding: 15px;
    }
    
    .skill-name {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    .skills-container {
        width: 95%;
        height: 90%;
        flex-direction: column;
    }

    .skills-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #333;
    }

    .skill-category-list {
        display: flex;
        overflow-x: auto;
        padding: 10px 20px;
    }

    .skill-category-item {
        margin-right: 10px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .skill-category-btn {
        white-space: nowrap;
        padding: 10px 15px;
        border-radius: 20px;
        border: 1px solid #333;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }

    .skill-icon-container {
        gap: 12px;
    }

    .skill-icon {
        width: 45px;
        height: 45px;
    }

    .skill-icon i {
        font-size: 1.6em;
    }

    .skill-name {
        font-size: 1em; 
    }
    
    .skill-item {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .skills-container {
        width: 98%;
        height: 95%;
    }

    .skills-header,
    .skills-content-header {
        padding: 15px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .skill-item {
        padding: 15px;
        min-height: 180px;
    }
    
    .skill-name {
        font-size: 0.95em;
    }
}

/* ===== FADE EFFECT AT BOTTOM ===== */
.skills-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, #1a1a1a);
    pointer-events: none;
    z-index: 1;
}