.projects-hero {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
    margin-bottom: 2.5rem !important;
}

.projects-hero .hero-content {
    text-align: center;
    z-index: 1;
}

.projects-hero h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #007bff, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.projects-hero p {
    margin: 0;
    margin-bottom: 0 !important;
}

.projects-filter {
    padding: 0;
    text-align: center;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid #007bff;
    border-radius: 25px;
    background: transparent;
    color: #007bff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #007bff;
    color: white;
}

.projects-grid {
    display: grid;
    /* Fixed 3-column layout - always 3 cards per row */
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 2rem 2rem 2rem !important;
    max-width: 1400px;
    margin: 0 auto !important;
    margin-top: 0 !important;
    /* Center the grid if fewer than 3 items */
    justify-items: center;
}

/* Override global project-card styles for projects page */
.projects-grid .project-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    /* Reset flex properties from style.css */
    flex: none;
    min-width: auto;
    max-width: 100%;
    width: 100%;
    /* Start hidden for scroll animation */
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: transform 420ms cubic-bezier(.2,.9,.2,1), opacity 360ms ease;
}

/* Visible state when scrolled into view */
.projects-grid .project-card.in-view {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.projects-grid .project-card:hover {
    transform: translateY(-10px) !important;
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #007bff;
    margin-bottom: 0.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 15px;
    font-size: 0.9rem;
    color: #007bff;
}

.project-link {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(45deg, #007bff, #00d4ff);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 1rem;
    transition: transform 0.3s ease;
}

.project-link:hover {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .projects-hero h1 {
        font-size: 2.5rem;
    }
    
    /* 2 columns on tablets */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    /* 1 column on mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}