.vpg-root {
    --vpg-gap-x: 18px;
    --vpg-gap-y: 18px;
    --vpg-card-height: 460px;
    --vpg-grid-cols: 3;
    --vpg-masonry-cols: 3;
    --vpg-hover-scale: 1.035;
    --vpg-transition-ms: 420ms;
    --vpg-tag-line-start: .18;
    width: 100%;
    min-width: 0;
}

.vpg-root *,
.vpg-root *::before,
.vpg-root *::after {
    box-sizing: border-box;
}

.vpg-results,
.vpg-row-builder,
.vpg-grid,
.vpg-masonry {
    width: 100%;
    min-width: 0;
}

/* FILTER */
.vpg-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 8px;
    column-gap: 18px;
    margin: 0 0 24px;
    padding: 0 0 14px;
    border: 0;
    border-bottom: 1px solid rgba(17, 17, 17, .18);
}

.vpg-filter-button {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: 0 0 auto;
    border: 0;
    border-radius: 0;
    outline: 0;
    padding: 4px 0 7px;
    background: transparent;
    color: #666;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    line-height: 1;
    text-transform: none;
    letter-spacing: .02em;
    box-shadow: none;
    transition: color 180ms ease;
}

.vpg-filter-button::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 180ms ease;
}

.vpg-filter-button:hover,
.vpg-filter-button:focus-visible,
.vpg-filter-button[aria-pressed="true"] {
    color: #111;
    background: transparent;
}

.vpg-filter-button:hover::after,
.vpg-filter-button:focus-visible::after,
.vpg-filter-button[aria-pressed="true"]::after {
    transform: scaleX(1);
}

.vpg-filter-count {
    position: relative;
    top: -.22em;
    margin-left: 4px;
    font-size: .72em;
    opacity: .55;
}

/* LAYOUT */
.vpg-row-builder {
    display: grid;
    row-gap: var(--vpg-gap-y);
}

.vpg-row {
    display: grid;
    grid-template-columns: repeat(var(--vpg-row-cols, 1), minmax(0, 1fr));
    column-gap: var(--vpg-gap-x);
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.vpg-row .vpg-card {
    height: var(--vpg-row-height-d, var(--vpg-card-height));
}

.vpg-grid {
    display: grid;
    grid-template-columns: repeat(var(--vpg-grid-cols, 3), minmax(0, 1fr));
    gap: var(--vpg-gap-y) var(--vpg-gap-x);
}

.vpg-grid .vpg-card {
    height: var(--vpg-card-height);
}

.vpg-masonry {
    column-count: var(--vpg-masonry-cols, 3);
    column-gap: var(--vpg-gap-x);
}

.vpg-masonry .vpg-unit {
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--vpg-gap-y);
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

.vpg-unit {
    position: relative;
    min-width: 0;
}

.vpg-card {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    isolation: isolate;
    background: #d8d6d0;
}

.vpg-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.vpg-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    transform: scale(1);
    transition: transform var(--vpg-transition-ms) cubic-bezier(.2, .75, .25, 1), filter var(--vpg-transition-ms) cubic-bezier(.2, .75, .25, 1);
}

.vpg-unit:hover .vpg-image,
.vpg-unit:focus-within .vpg-image {
    transform: scale(var(--vpg-hover-scale));
}

.vpg-image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    color: #666;
    background: #eee;
    font-size: 12px;
    text-align: center;
}

.vpg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-color: #000;
    opacity: .32;
    transition: opacity var(--vpg-transition-ms) cubic-bezier(.2, .75, .25, 1);
}

.vpg-content--below .vpg-overlay {
    opacity: 0 !important;
}

/* TOP LEFT TAGS */
.vpg-tags {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    max-width: calc(100% - 48px);
    color: #fff;
    font-size: 12px;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
    pointer-events: none;
    transition: color var(--vpg-transition-ms) ease;
}

.vpg-tag {
    position: relative;
    display: inline-block;
    padding-bottom: 3px;
    white-space: nowrap;
}

.vpg-tag::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(var(--vpg-tag-line-start));
    transform-origin: left center;
    opacity: .92;
    transition: transform var(--vpg-transition-ms) cubic-bezier(.2, .75, .25, 1);
}

.vpg-unit:hover .vpg-tag::after,
.vpg-unit:focus-within .vpg-tag::after {
    transform: scaleX(1);
}

.vpg-tag-separator {
    display: inline-block;
    white-space: pre;
}

/* COPY */
.vpg-overlay-copy {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    padding: 24px;
    pointer-events: none;
}

.vpg-below-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: start;
    padding: 24px;
}

.vpg-title {
    margin: 0;
    color: #fff;
    font-size: clamp(18px, 1.55vw, 28px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.025em;
    transition: color var(--vpg-transition-ms) ease;
}

.vpg-below-copy .vpg-title {
    color: #111;
}

.vpg-subtitle {
    margin-top: 7px;
    max-width: 54ch;
    color: rgba(255, 255, 255, .88);
    font-size: 12px;
    line-height: 1.35;
    transition: color var(--vpg-transition-ms) ease;
}

.vpg-below-copy .vpg-subtitle {
    color: #666;
}

.vpg-metric {
    align-self: end;
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
}

.vpg-below-copy .vpg-metric {
    color: #111;
}

.vpg-card-link {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: block;
}

.vpg-card-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -4px;
}

/* MASONRY: natural image ratio from the portfolio preview itself. */
.vpg-layout--masonry .vpg-card {
    height: auto;
}

.vpg-layout--masonry .vpg-media {
    position: relative;
    inset: auto;
}

.vpg-layout--masonry .vpg-image {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    max-width: 100%;
}

.vpg-layout--masonry .vpg-image-placeholder {
    min-height: 320px;
}

/* FILTERING */
.vpg-is-hidden {
    display: none !important;
}

.vpg-no-results {
    padding: 28px 0;
    color: #666;
    font-size: 13px;
}

.vpg-editor-notice {
    padding: 18px;
    border: 1px dashed #bbb;
    background: #fafafa;
    color: #555;
    font-size: 13px;
}

/* TABLET */
@media (max-width: 1024px) {
    .vpg-row .vpg-card {
        height: var(--vpg-row-height-t, var(--vpg-card-height));
    }
}

/* MOBILE */
@media (max-width: 767px) {
    .vpg-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .vpg-filter::-webkit-scrollbar {
        display: none;
    }

    .vpg-row {
        grid-template-columns: 1fr;
        row-gap: var(--vpg-gap-y);
    }

    .vpg-row .vpg-card {
        height: var(--vpg-row-height-m, var(--vpg-card-height));
    }

    .vpg-mobile-two .vpg-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vpg-mobile-two .vpg-row .vpg-unit:only-child {
        grid-column: 1 / -1;
    }

    .vpg-overlay-copy,
    .vpg-below-copy {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .vpg-metric {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vpg-root *,
    .vpg-root *::before,
    .vpg-root *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}
