/* Projects Section */
.projects-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.project {
    flex: 1 1 160px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: #FFFDF7;
    overflow: hidden;
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    /* stagger via parent reveal */
    opacity: 0;
    transform: translateY(12px);
}

.reveal.visible .project {
    opacity: 1;
    transform: translateY(0);
}

.project:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 0, 0, 0.15);
}

.project:active {
    transform: scale(0.98);
}

/* Project image */
.project-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background-color: #f0efe9;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.project-img:hover {
    opacity: 0.85;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

/* Project text area */
.project-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 14px 16px 4px;
    line-height: 1.3;
}

.project-summary {
    font-size: 0.8rem;
    font-weight: 400;
    color: #666;
    line-height: 1.45;
    margin: 0 16px 12px;
}

/* Project links */
.project-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 16px 14px;
    margin-top: auto;
}

.project-links a {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 5px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 100px;
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                color 0.25s ease,
                transform 0.2s ease;
}

.project-links a:hover {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
    color: #FFFDF7;
    transform: translateY(-1px);
}

.project-links a:active {
    transform: scale(0.97);
}

@media (max-width: 480px) {
    .projects-container {
        gap: 12px;
    }

    .project {
        flex: 1 1 140px;
    }

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

    .project-summary {
        font-size: 0.75rem;
    }
}