/* =========================================
   Portfolio / visualization gallery styles
   ========================================= */

.gallery-project {
    margin-bottom: 2.5rem;
}

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

.gallery-project p.project-desc {
    margin-top: 0;
    margin-bottom: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.75rem;
    margin-top: 0.5rem;
}

.gallery-item {
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

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

.gallery-caption {
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
    color: #333;
}

/* Lightbox overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 4px;
}

.lightbox-caption {
    color: #fff;
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.lightbox-caption a {
    color: #9cd0ff;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.download-link {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
}