/* Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.work-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* Square thumbnails */
    background-color: #f9f9f9;
    transition: transform 0.1s ease-out;
}

.work-item:active {
    transform: scale(0.98);
}


.img-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s ease;
    will-change: transform;
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.work-item:hover .work-overlay {
    opacity: 1;
}

.work-item:hover img {
    transform: scale(1.05);
}

.work-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.work-category {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* New Work Indication */
.work-item.locked {
    pointer-events: none;
}

.new-work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.new-work-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.new-work-heart {
    width: 30px;
    height: 30px;
    background-color: #ff69b4;
    position: relative;
    transform-origin: center center;
    transform: rotate(45deg) scale(0);
    animation: heartSequence 1.75s ease-in-out forwards;
    will-change: transform, opacity;
}

.new-work-heart::before,
.new-work-heart::after {
    content: "";
    width: 30px;
    height: 30px;
    background-color: #ff69b4;
    border-radius: 50%;
    position: absolute;
}

.new-work-heart::before {
    top: -15px;
    left: 0;
}

.new-work-heart::after {
    left: -15px;
    top: 0;
}
