/* ============================================
   LIGHTBOX — Shared fullscreen image viewer
   Reusable across all pages. Injected by lightbox.js.
   ============================================ */

.project-lightbox {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
}

.project-lightbox--open { display: flex; }

/* Native Apple nested-radius pattern:
   outer radius = inner radius + padding ⇒ 14 + 6 = 20. */
.project-lightbox__frame {
    padding: 6px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lbIn 0.3s var(--ease-out);
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
}

.project-lightbox__img {
    max-width: 100%;
    max-height: calc(85vh - 12px);
    object-fit: contain;
    border-radius: 14px;
    display: block;
}

@keyframes lbIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.project-lightbox__close {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-pure-white);
    font-size: var(--text-xl);
    cursor: pointer;
    transition: background var(--duration-fast);
    z-index: 10;
}

.project-lightbox__close:hover { background: rgba(255, 255, 255, 0.2); }

.project-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-pure-white);
    font-size: var(--text-base);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--duration-fast);
    z-index: 10;
}

.project-lightbox__nav:hover { background: rgba(255, 255, 255, 0.2); }
.project-lightbox__nav--prev { left: var(--space-6); }
.project-lightbox__nav--next { right: var(--space-6); }

.project-lightbox__counter {
    position: absolute;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: var(--tracking-wide);
}
