/* Portfolio / mosaic styles (moved from photography.html)
     - reduced vertical/horizontal gap for tighter packing
*/
:root {
    --portfolio-radius: 0px;
    --portfolio-row-height: 10px;
    --portfolio-gap: 6px;
}

#portfolio-grid {
    /* use CSS columns for a simple masonry layout (matches Gallery.tsx style)
       JS will only inject .portfolio-card items; CSS handles column-count responsively */
    display: block;
    column-count: 4;
    column-gap: var(--portfolio-gap);
    min-height: 420px;
    box-sizing: border-box;
}

.portfolio-card {
    position: relative;
    display: inline-block; /* required for column layout */
    width: 100%;
    overflow: hidden;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    border-radius: var(--portfolio-radius);
    background: #111;
    box-shadow: 0 18px 40px rgba(8, 10, 20, 0.12);
    margin: 0 0 var(--portfolio-gap) 0; /* vertical spacing between column items */
    box-sizing: border-box;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    margin: 0;
    box-sizing: border-box;
}

/* overlay revealed on hover to show title / caption */
.portfolio-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    transition: background 220ms ease, opacity 220ms ease, transform 220ms ease;
}
.portfolio-overlay-inner {
    width: 100%;
    padding: 12px 14px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 45%, rgba(0,0,0,0.65) 100%);
    color: #fff;
    transform: translateY(14px);
    opacity: 0;
    pointer-events: none;
}
.portfolio-card:hover .portfolio-overlay-inner,
.portfolio-card.loaded .portfolio-overlay-inner {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.portfolio-title { font-weight: 600; font-size: 14px; }

/* small interaction lift */
.portfolio-card:hover { transform: translateY(-6px); transition: transform 240ms ease; }

/* filter UI */
.filter-bar { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 6px; }
.filter-pill { background:#f1f5f9; border:none; padding:6px 12px; border-radius:8px; color:#0b1220; cursor:pointer; font-weight:600; box-shadow:0 2px 6px rgba(2,6,23,0.06); }
.filter-pill.active { background:#2b6cb0; color:#fff; box-shadow: 0 6px 18px rgba(43,108,176,0.18); }
.filter-pill:focus { outline: 2px solid rgba(59,130,246,0.3); }

/* sizes used by the gallery rendering (mirrors Gallery.tsx) */
.size-large { height: 400px; }
.size-small { height: 200px; }

@media (max-width:1023px) {
    #portfolio-grid {
        column-count: 3;
    }

    .size-large { height: 320px; }
    .size-small { height: 160px; }
}

@media (max-width:767px) {
    #portfolio-grid {
        column-count: 2;
        column-gap: calc(var(--portfolio-gap) * 0.95);
    }

    .size-large { height: 260px; }
    .size-small { height: 120px; }
}

.skeleton-card {
    margin: 0
}