/* Projects Section - Main Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

/* ... existing styles ... */

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .project-card {
        margin: 0; /* Remove any default margins if set */
    }
    
    .project-content {
        padding: 1rem;
    }
    
    .project-links {
        flex-direction: column; /* Stack buttons on very small screens */
        gap: 1rem;
    }
}

/* Base Card Style (Placeholder Cards) */
.card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05); /* Subtle border */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-height: 400px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Advanced Project Card */
.project-card {
    background: var(--card-bg); /* Dark background */
    border-radius: 16px;
    overflow: hidden; /* Contains the image */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    /* group: project-card; removed invalid property */
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

/* Project Image Area */
.project-image {
    height: 220px;
    background: #0f172a; /* Fallback color */
    position: relative;
    overflow: hidden;
    /* Placeholder Gradient until image loads */
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

/* Overlay with Icon (visible on hover or always if no image) */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

.project-overlay i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1); /* Subtle icon */
    transition: all 0.4s ease;
}

.project-card:hover .project-overlay {
    background: rgba(56, 189, 248, 0.1); /* Light blue tint on hover */
}

.project-card:hover .project-overlay i {
    color: var(--accent);
    transform: scale(1.1) rotate(-10deg);
}

/* Content Area */
.project-content {
    padding: 1.5rem;
    flex: 1; /* Pushes footer (if any) or expands to fill height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.project-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    background: rgba(56, 189, 248, 0.1); /* Light blue bg */
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Links / Actions */
.project-links {
    display: flex;
    gap: 1.5rem;
    margin-top: auto; /* Pushes to bottom */
}

.project-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-links a:hover {
    color: var(--accent);
}

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

/* Project Tabs */
.project-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff; /* Assuming accent is bright, text should be white or check contrast */
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3); /* Adjust color if needed */
}

/* Project Categories */
.project-category {
    display: none;
}

.project-category.active {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

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