.projects-hero {
    position: relative;
    background: var(--bg-primary);
    padding: 2rem 2rem 6rem;
    text-align: center;
    overflow: hidden;
}

.particles-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.15), transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.15), transparent 50%);
    pointer-events: none;
    z-index: 1;
}

[data-theme="light"] .projects-hero::before {
    background: radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.08), transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(147, 51, 234, 0.08), transparent 50%);
}

.projects-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.projects-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

[data-theme="light"] .projects-hero-title {
    background: linear-gradient(135deg, #2563eb 0%, #9333ea 50%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.projects-hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

.projects-page {
    min-height: 100vh;
    background: var(--bg-primary);
    padding-top: 2rem;
}

.projects-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 2rem 0 1.5rem;
    justify-content: center;
    align-items: center;
}

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

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .filter-btn:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

[data-theme="light"] .filter-btn.active {
    background: linear-gradient(135deg, #2563eb, #9333ea);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.search-filter-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.125rem;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: var(--bg-card);
}

[data-theme="light"] .search-input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.project-count {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-count i {
    color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

[data-theme="light"] .project-card::before {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(147, 51, 234, 0.03));
}

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

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
    border-color: var(--primary-color);
}

[data-theme="light"] .project-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1), 0 0 20px rgba(37, 99, 235, 0.15);
}

.project-image-container {
    position: relative;
    overflow: hidden;
    height: 14rem;
    background: var(--bg-secondary);
}

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

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

.image-count-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

[data-theme="light"] .image-count-badge {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.image-count-badge i {
    font-size: 1rem;
    color: #60a5fa;
}

[data-theme="light"] .image-count-badge i {
    color: #2563eb;
}

.project-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.project-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: var(--primary-color);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.see-more {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.see-more:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tag {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

[data-theme="light"] .project-tag {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.3);
}

.project-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

[data-theme="light"] .project-tag:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.5);
}

.project-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

[data-theme="light"] .project-github-btn::before {
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
}

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

.project-github-btn:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .project-github-btn:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.project-github-btn i {
    font-size: 1.25rem;
}

.project-no-source {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-style: italic;
    opacity: 0.7;
}

.project-no-source i {
    font-size: 1rem;
}

.no-results {
    text-align: center;
    padding: 4rem 1rem;
    display: none;
}

.no-results-icon {
    width: 5rem;
    height: 5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.no-results-icon i {
    font-size: 2.5rem;
    color: var(--text-secondary);
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.no-results-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.clear-filters-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-theme="light"] .clear-filters-btn {
    background: linear-gradient(135deg, #2563eb, #9333ea);
}

.clear-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

[data-theme="light"] .clear-filters-btn:hover {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-title {
        font-size: 2rem;
    }

    .projects-subtitle {
        font-size: 1rem;
    }

    .filter-container {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}
