body,
html {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.overlay-signature-preview {
    position: absolute;
    bottom: -62px;
    /* right: -160px; */
    margin-left: 5rem;
}

/*/ ------ PORTFOLIO PAGE ------ /*/

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1.5rem;
    padding: 14rem 8rem 8rem;
    background: #f5f5f5;
}

.portfolio-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .portfolio-grid {
        padding: 10rem 2rem 4rem;
    }
}

.thumbnail-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    border-radius: 6px;
    transition: box-shadow 0.3s ease;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-wrapper:hover {
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.33);
    cursor: pointer;
}

/*/ ------ PORTFOLIO PAGE SELECTED IMAGE OVERLAY ------ /*/

.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.image-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.overlay-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.overlay-close {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 2rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

.img-bounds {
    display: flex;
    width: 80%;
    height: 80%;
    justify-content: center;
    position: relative;
    align-items: center;
}