/* =====================================================
   Projects Page Styles
   ===================================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all var(--transition-fast);
}

.project-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.project-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-primary);
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--bg-tertiary);
    border-radius: 3px;
    color: var(--text-muted);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: gap var(--transition-fast);
}

.project-link:hover {
    gap: 0.5rem;
}

/* Featured Project */
.project-featured {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(34, 197, 94, 0.05) 100%);
}

.project-featured .project-title {
    color: var(--accent-primary);
}

/* Project Status Badge */
.project-status {
    display: inline-block;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-radius: 12px;
}

/* =====================================================
   Project Screenshot Gallery
   ===================================================== */

.project-gallery {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.project-gallery-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.project-gallery-trigger:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.project-gallery-trigger svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.project-gallery-popup {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.project-gallery-trigger:hover + .project-gallery-popup,
.project-gallery-popup:hover {
    display: block;
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

.project-gallery-item {
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
    text-align: center;
}

.project-gallery-item:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
}

.project-gallery-item img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    display: block;
}

.project-gallery-item span {
    display: block;
    font-size: 0.7rem;
    padding: 0.25rem;
    color: var(--text-muted);
    background: var(--bg-card);
}

/* Project Actions (gallery + link side by side) */
.project-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.project-actions .project-gallery {
    margin-top: 0;
}

.project-actions .project-link {
    margin-top: 0;
}

/* Project Gallery Button */
.project-gallery {
    margin-top: 1rem;
}

.project-gallery-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.project-gallery-btn:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
}

.project-gallery-btn svg {
    fill: currentColor;
    opacity: 0.8;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev {
    left: 1.5rem;
}

.lightbox-nav.next {
    right: 1.5rem;
}

.lightbox-nav:disabled {
    opacity: 0.2;
    cursor: default;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
