.projects-section {
    min-height: 100vh;
    padding: 100px 5%;
    background: rgba(15, 23, 42, 0.7);
    position: relative;
}

/* Filter System Styles */
.filter-container {
    display: flex;
    justify-content: center;
    margin: 2rem auto;
    max-width: 1400px;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    color: #fff;
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.filter-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

/* Project card filtering animations */
.project-card.hidden {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    pointer-events: none;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 3rem auto 0;
    padding: 0 1rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(50px);
    opacity: 0;
    animation: slideUp 0.6s forwards;
    cursor: pointer;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(139, 92, 246, 0.1);
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 25px 50px -12px rgba(139, 92, 246, 0.25),
        0 0 0 1px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.project-card:active {
    transform: translateY(-8px) scale(1.01);
    transition: all 0.1s ease;
}

.project-image {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.project-image::after {
    content: 'View Details';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(99, 102, 241, 0.8));
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 1.2rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.project-card:hover .project-image::after {
    opacity: 1;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-content {
    padding: 2rem;
}

.project-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.project-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-title::after {
    width: 100%;
    background: linear-gradient(90deg, #8b5cf6, #6366f1, #8b5cf6);
}

.project-description {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
    font-weight: 400;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.project-tag {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.project-tag:hover {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.project-links {
    display: flex;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b5cf6;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.project-link:hover {
    color: white;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.project-link i {
    font-size: 1.1rem;
}

/* Enhanced staggered animation */
.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.3s;
}

.project-card:nth-child(4) {
    animation-delay: 0.4s;
}

.project-card:nth-child(5) {
    animation-delay: 0.5s;
}

.project-card:nth-child(6) {
    animation-delay: 0.6s;
}

.project-card:nth-child(7) {
    animation-delay: 0.7s;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .filter-container {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

    .filter-tabs {
        gap: 0.25rem;
        padding: 0.25rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.4rem;
    }

    .project-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .project-tags {
        gap: 0.5rem;
    }

    .project-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .project-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Stop propagation for project links to avoid navigation conflict */
.project-links a {
    position: relative;
    z-index: 10;
}