/* =============================================================================
   INTERACTIVE FEATURES CSS
   Project filtering system and interactive skills visualization
   ============================================================================= */

/* PROJECT FILTERING SYSTEM */
.project-filters {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.filter-search {
    position: relative;
    margin-bottom: 1.5rem;
}

.filter-search input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3rem;
    border: 2px solid rgba(124, 92, 255, 0.3);
    border-radius: 15px;
    background: linear-gradient(135deg, 
        rgba(124, 92, 255, 0.08) 0%, 
        rgba(0, 230, 168, 0.05) 100%);
    backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(124, 92, 255, 0.15),
        0 0 30px rgba(0, 230, 168, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 10px rgba(160, 245, 200, 0.3);
}

.filter-search input::placeholder {
    color: rgba(160, 245, 200, 0.6);
    font-weight: 400;
}

.filter-search input:focus {
    outline: none;
    border-color: rgba(124, 92, 255, 0.8);
    background: linear-gradient(135deg, 
        rgba(124, 92, 255, 0.12) 0%, 
        rgba(0, 230, 168, 0.08) 100%);
    box-shadow: 
        0 0 25px rgba(124, 92, 255, 0.4),
        0 0 40px rgba(0, 230, 168, 0.2),
        0 8px 32px rgba(124, 92, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.filter-search input:focus::placeholder {
    color: rgba(160, 245, 200, 0.8);
}

.filter-search input:hover {
    border-color: rgba(124, 92, 255, 0.5);
    box-shadow: 
        0 4px 25px rgba(124, 92, 255, 0.2),
        0 0 35px rgba(0, 230, 168, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.filter-search::before {
    content: "🔍";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.8;
    filter: drop-shadow(0 0 8px rgba(124, 92, 255, 0.6));
    transition: all 0.3s ease;
}

.filter-search:focus-within::before {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(0, 230, 168, 0.8));
    transform: translateY(-50%) scale(1.1);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(64, 123, 255, 0.3);
}

.filter-results {
    text-align: center;
    padding: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
    opacity: 0.8;
}

/* Project card filtering animations */
.project-card {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
}

.project-card.filtered-out {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    visibility: hidden;
    pointer-events: none;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading state for smooth transitions */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    transition: all 0.3s ease;
    align-content: start;
}

/* Mobile optimization for project grid */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        align-content: start;
    }
    
    .project-card.filtered-out {
        display: none !important; /* Instant removal on mobile for better UX */
    }
}

/* INTERACTIVE SKILLS VISUALIZATION */

/* Hero section skills enhancement */
.skills-inline.interactive-skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    max-width: 100%;
}

.skills-inline.interactive-skills li {
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.skills-inline.interactive-skills li:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.skill-name {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skill-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #4CAF50);
    width: 0;
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* CV Skills Section */
.interactive-skills-section {
    margin-top: 1rem;
}

.skill-category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.tab-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.tab-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.skill-category {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.skill-category.active {
    display: block;
}

.skill-category h5 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.skills-list {
    display: grid;
    gap: 0.75rem;
}

.skill-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-item:hover {
    background: var(--glass-bg);
    transform: translateX(5px);
}

.skill-item .skill-bar {
    width: 100px;
    height: 6px;
}

.skill-level {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 80px;
    text-align: right;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .project-filters {
        padding: 1rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .skills-inline.interactive-skills {
        grid-template-columns: 1fr;
    }
    
    .skill-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }
    
    .skill-item .skill-bar {
        width: 100%;
    }
    
    .skill-level {
        text-align: center;
        min-width: auto;
    }
}

/* Dark theme adjustments */
body.light-theme .filter-search input {
    background: white;
    border-color: #e0e0e0;
}

body.light-theme .skill-item {
    background: #f8f9fa;
}

body.light-theme .skill-item:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Focus accessibility */
.filter-btn:focus-visible,
.tab-btn:focus-visible,
.skill-item:focus-visible {
    outline: 3px solid rgba(64, 123, 255, 0.4);
    outline-offset: 2px;
}

.filter-search input:focus-visible {
    outline: 3px solid rgba(124, 92, 255, 0.6);
    outline-offset: 3px;
    box-shadow: 
        0 0 25px rgba(124, 92, 255, 0.4),
        0 0 40px rgba(0, 230, 168, 0.2),
        0 8px 32px rgba(124, 92, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}