/* =========================================================
   WORK PAGE REFRESH
   Matches homepage Featured Work styling
========================================================= */


/* =========================================================
   PAGE
========================================================= */

.work-page-new {
    background: var(--home-centered-paper);
    color: var(--home-centered-ink);
}


/* Give the floating nav plenty of breathing space */

.work-page-new .work-filter {
    padding-top: clamp(8rem, 14vh, 11rem);
    padding-bottom: clamp(3rem, 6vh, 5rem);
}


/* =========================================================
   FILTER — GLASS / iOS STYLE
========================================================= */

.work-filter-shell {
    position: relative;

    width: fit-content;
    margin-inline: auto;

    display: flex;
    align-items: center;

    gap: 4px;
    padding: 5px;

    border-radius: 18px;

    background: rgba(255, 255, 255, 0.55);

    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.7);

    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.filter-btn {
    position: relative;
    z-index: 2;

    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 16px;

    border: 0;
    border-radius: 13px;

    color: var(--home-centered-ink);
    background: transparent;

    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.82rem;
    font-weight: 500;

    cursor: pointer;

    transition:
        color 0.2s ease;
}

.filter-btn.active {
    color: var(--home-centered-ink) !important;
    background: transparent !important;
    border-color: transparent !important;
}

.filter-btn:hover {
    opacity: 0.8;
}

.filter-indicator {
    position: absolute;

    top: 5px;
    left: 5px;

    height: calc(100% - 10px);

    border-radius: 13px;

    background: rgba(255, 255, 255, 0.78);

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.35s cubic-bezier(0.22, 1, 0.36, 1);

    pointer-events: none;
    z-index: 1;
}

.filter-btn,
.filter-btn:hover,
.filter-btn:focus,
.filter-btn:active,
.filter-btn.active,
.filter-btn.active:hover {
    color: var(--home-centered-ink) !important;
    background: transparent !important;
    border-color: transparent !important;
}

/* =========================================================
   PROJECT LIST
========================================================= */

.work-page-new .work-grid-section {
    padding-top: 0 !important;
    padding-bottom: clamp(6rem, 10vw, 10rem) !important;
}


/*
   Your Bootstrap .col-md-6 currently makes each project
   half width.

   Override it so every project becomes one full-width
   Featured Work style card.
*/

.work-page-new .project-item {
    width: 100%;
}


/* Reduce Bootstrap's row gap because cards now control it */

.work-page-new .work-grid-section .row {
    --bs-gutter-y: clamp(3rem, 7vw, 6.5rem);
}


/* =========================================================
   PROJECT CARD
========================================================= */

.work-page-new .project-card {
    width: 100%;
    max-width: 1160px;

    margin-inline: auto;

    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(300px, 1fr);

    grid-template-areas:
        "media copy";

    min-height: clamp(440px, 42vw, 610px);

    overflow: hidden;

    border:
        1px solid
        rgba(11, 32, 48, 0.055);

    border-radius:
        clamp(22px, 3vw, 34px);

    background: #ffffff;

    box-shadow:
        0 18px 50px
        rgba(0, 0, 0, 0.025);
}


/* Alternate cards */

.work-page-new .project-item:nth-child(even) .project-card {
    grid-template-columns:
        minmax(300px, 1fr)
        minmax(0, 2fr);

    grid-template-areas:
        "copy media";
}


/* =========================================================
   PROJECT IMAGE
========================================================= */

.work-page-new .project-image-link {
    grid-area: media;

    min-width: 0;
    height: 100%;

    display: block;

    text-decoration: none;
}


.work-page-new .project-image-wrap {
    width: 100%;
    height: 100%;
    min-height: clamp(440px, 42vw, 610px);

    display: flex;
    align-items: flex-end;
    justify-content: center;

    padding:
        clamp(2.5rem, 5vw, 5rem)
        clamp(2rem, 4vw, 4rem)
        0;

    overflow: hidden;

    /*
       Important:
       the outer card now provides the rounded corners.
    */
    border-radius: 0;
}


.work-page-new .project-image {
    width: 94%;
    height: auto;

    max-width: 100%;
    max-height: 94%;

    object-fit: contain;
    object-position: center bottom;

    margin-top: auto;

    transition:
        transform 0.45s
        cubic-bezier(0.22, 1, 0.36, 1);
}


.work-page-new .project-card:hover .project-image {
    transform: scale(1.018);
}


/* =========================================================
   PROJECT COPY
========================================================= */

.work-page-new .project-content {
    grid-area: copy;

    min-width: 0;
    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding:
        clamp(2.2rem, 4.5vw, 4.5rem);

    background: #f5f5f5;
}


/* Tag */

.work-page-new .project-tag {
    align-self: flex-start;

    margin: 0 0 1.15rem;

    padding: 0.28rem 0.55rem;

    border-radius: 4px;

    background: #d7f3e9;

    color: var(--home-centered-ink);

    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1;

    text-transform: none;
}


/* Freelance */

.work-page-new
.project-item[data-category="freelance"]
.project-tag {
    background: #fff1bd;
}


/* Personal */

.work-page-new
.project-item[data-category="personal"]
.project-tag {
    background: #ffdbe5;
}


/* Title */

.work-page-new .project-title {
    margin: 0 0 1.2rem;

    color: var(--home-centered-ink);

    font-family: "Space Mono", monospace;

    font-size:
        clamp(1.45rem, 2vw, 2rem);

    font-weight: 400;

    line-height: 1.25;

    letter-spacing: -0.035em;
}


/* Description */

.work-page-new .project-subtitle {
    margin: 0 0 1.35rem;

    color: var(--home-centered-muted);

    font-size:
        clamp(0.95rem, 1vw, 1.08rem);

    line-height: 1.55;
}


/* Impact */

.work-page-new .project-impact {
    margin:
        0
        0
        1.5rem;

    color: var(--home-centered-muted);

    font-size: 0.88rem;
    line-height: 1.5;
}

.home-dark.work-page-new .project-impact{
    color: #0b2030;
}


/* =========================================================
   PROJECT LINK
========================================================= */

.work-page-new .project-button {
    align-self: flex-start;

    display: inline-flex;
    align-items: center;

    gap: 0.35rem;

    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;

    color: var(--home-centered-ink);

    font-size: 0.86rem;
    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 3px;
}


.work-page-new .project-button:hover {
    color: var(--home-centered-ink);
    background: transparent;
}


.work-page-new .project-button .arrow {
    font-size: 1rem;

    text-decoration: none;

    transition:
        transform 0.2s ease;
}


.work-page-new .project-button:hover .arrow {
    transform: translateX(4px);
}


/* =========================================================
   FILTERING
========================================================= */

.work-page-new .project-item.hide {
    display: none;
}


/* =========================================================
   REVEAL ANIMATION
========================================================= */

.work-page-new .project-item {
    opacity: 0;

    transform: translateY(42px);

    transition:
        opacity 0.75s ease,
        transform 0.75s
        cubic-bezier(0.22, 1, 0.36, 1);
}


.work-page-new .project-item.is-visible {
    opacity: 1;

    transform: translateY(0);
}


/*
   If something is filtered out and then shown again,
   retain its visible state.
*/

.work-page-new .project-item.hide {
    opacity: 0;
}


/* =========================================================
   DARK MODE
========================================================= */

.work-page-new.home-dark .work-filter-shell {
    background:
        rgba(25, 29, 32, 0.58);

    border-color:
        rgba(255, 255, 255, 0.1);

    box-shadow:
        0 8px 32px
        rgba(0, 0, 0, 0.25),

        inset 0 1px 0
        rgba(255, 255, 255, 0.08);
}


.work-page-new.home-dark .project-card {
    background:
        var(--home-centered-card);

    border-color:
        var(--home-centered-border);
}


.work-page-new.home-dark .project-content {
    background: #171c1f;
}

/* Active filter sits on a light indicator, so keep text dark */
.work-page-new.home-dark .filter-btn.active,
.work-page-new.home-dark .filter-btn.active:hover,
.work-page-new.home-dark .filter-btn.active:focus {
    color: #0b2030 !important;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991.98px) {

    .work-page-new .project-card,
    .work-page-new
    .project-item:nth-child(even)
    .project-card {

        grid-template-columns: 1fr;

        grid-template-areas:
            "media"
            "copy";
    }


    .work-page-new .project-image-wrap {
        min-height:
            min(65vw, 520px);
    }


    .work-page-new .project-content {
        padding:
            clamp(2rem, 5vw, 3rem);
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767.98px) {

    .work-page-new .work-filter {
        padding-top: 6.5rem;
        padding-bottom: 2.5rem;
    }


    .work-filter-shell {
        width: 100%;

        justify-content: flex-start;

        overflow-x: auto;
        flex-wrap: nowrap;

        padding: 5px;

        scrollbar-width: none;
    }


    .work-filter-shell::-webkit-scrollbar {
        display: none;
    }


    .work-page-new .filter-btn {
        flex: 0 0 auto;

        min-height: 40px;

        padding-inline: 13px;

        font-size: 0.76rem;
    }


    .work-page-new .project-card {
        border-radius: 24px;
    }


    .work-page-new .project-image-wrap {
        min-height:
            min(72vw, 430px);

        padding:
            2rem
            1.25rem
            0;
    }


    .work-page-new .project-content {
        padding: 2rem;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .work-page-new .project-item {
        opacity: 1;
        transform: none;
        transition: none;
    }

}