/* --- Core Skills Section Container Layout --- */
.skills-content {
    width: 100%;
    margin: 0 auto;
    padding: 30px 15px;
    box-sizing: border-box;
}

.skills-layout-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Headline Headers Structure --- */
.skills-headline {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main, #ffffff);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.skills-headline span.gradient-name-span {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skills-sub-para {
    font-size: 0.95rem;
    color: var(--text-alt, #94a3b8);
    margin: 0 0 2rem 0;
    line-height: 1.5;
}

/* --- Control Filtering & Search Layout Hub Block --- */
.skills-control-hub {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
    padding: 1.25rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* Search bar design */
.skills-search-wrapper {
    position: relative;
    width: 100%;
}

.search-hub-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1rem;
}

#skills-search-field {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px 12px 46px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

#skills-search-field:focus {
    border-color: var(--accent-prime, #f59e0b);
}

/* Filter buttons row */
.skills-filter-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-ribbon-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-alt, #94a3b8);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-ribbon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.filter-ribbon-btn.active {
    background: var(--accent-prime, #f59e0b);
    color: #000000;
    font-weight: 700;
    border-color: transparent;
}

/* --- Dynamic Bento Layout Adaptive Cards Grid --- */
.skills-grid-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.skill-group-plate {
    background: var(--card-surface, rgba(15, 23, 42, 0.4));
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
}

.skill-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.5rem;
}

.skill-category-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main, #ffffff);
}

.category-count-badge {
    font-size: 0.75rem;
    color: #64748b;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 20px;
}

/* --- Badge Grid Alignment Settings --- */
.skill-items-rack {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
}

.skill-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.75rem 0.25rem;
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Target Container Block: Absolutely NO coloring filters applied to support native colors */
.icon-box-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.icon-box-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Preserves pixel ratios cleanly */
    display: block;
}

.badge-item-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-alt, #e2e8f0);
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Interactive Hover States */
.skill-badge-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--accent-prime, #f59e0b);
    transform: translateY(-2px);
}

/* Search empty fallback notice item styling */
.skills-empty-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}
.skills-empty-notice i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* --- Fluid Breakpoint Responders --- */
@media (max-width: 1024px) {
    .skills-grid-matrix { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    .skills-grid-matrix { grid-template-columns: 1fr; }
    .skills-headline { font-size: 2rem; }
}



/* ============================================================
   ULTIMATE LIGHT MODE FIX
   Targets backgrounds + text for visibility in light theme
   ============================================================ */
.light-mode, .light-theme, [data-theme="light"] {
    /* 1. Base Variables for Light Mode */
    --text-main: #111827 !important; 
    --text-alt: #4b5563 !important;
    --card-surface: #f8fafc !important; /* Light grayish-white for cards */
    --card-border: rgba(0, 0, 0, 0.1) !important;
}

/* 2. Fix the Main Search/Filter Box Background */
.light-mode .skills-control-hub, 
.light-theme .skills-control-hub {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* 3. Fix Filter Buttons Visibility (The text links) */
.light-mode .filter-ribbon-btn, 
.light-theme .filter-ribbon-btn {
    color: #374151 !important; 
    background: rgba(0, 0, 0, 0.04) !important;
}

.light-mode .filter-ribbon-btn:hover, 
.light-theme .filter-ribbon-btn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #000000 !important;
}

/* 4. Fix Individual Skill Card Backgrounds */
.light-mode .skill-group-plate, 
.light-theme .skill-group-plate {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* 5. Fix Skill Badge Labels (under icons) */
.light-mode .badge-item-label, 
.light-theme .badge-item-label {
    color: #1f2937 !important;
}

/* 6. Fix Search Bar Input and Placeholder */
.light-mode #skills-search-field, 
.light-theme #skills-search-field {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

/* Ensure placeholder text is visible */
.light-mode #skills-search-field::placeholder, 
.light-theme #skills-search-field::placeholder {
    color: #64748b !important;
}

/* 7. Fix Empty Result Message at Bottom */
.light-mode .skills-empty-notice, 
.light-theme .skills-empty-notice {
    color: #64748b !important;
}
