/* =========================================================
   PHEEGOH PORTFOLIO
   Page-specific styles for the portfolio listing and cases.
   ========================================================= */


/* ---------------------------------------------------------
   Portfolio listing introduction
   --------------------------------------------------------- */

.portfolio-page-hero {
    position: relative;
    overflow: hidden;
}

.portfolio-page-hero > .container {
    position: relative;
    z-index: 1;
}

.portfolio-page-hero h1 {
    max-width: 900px;
}

.portfolio-page-hero p {
    max-width: 720px;
}


/* ---------------------------------------------------------
   Search and category filtering
   --------------------------------------------------------- */

.portfolio-toolbar {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 25px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
}

.portfolio-search {
    flex: 1 1 320px;
    min-width: 0;
}

.portfolio-category-filter {
    flex: 0 1 220px;
    min-width: 180px;
}

.portfolio-toolbar label {
    display: block;
    margin-bottom: 7px;
    color: var(--navy);
    font-size: 12px;
    font-weight: 800;
}

.portfolio-toolbar input,
.portfolio-toolbar select {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid #e4e4ea;
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
    font: inherit;
    font-size: 13px;
    outline: none;
}

.portfolio-toolbar input:focus,
.portfolio-toolbar select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(139, 121, 201, 0.12);
}

.portfolio-search-button {
    flex-shrink: 0;
}

.portfolio-reset {
    align-self: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.portfolio-reset:hover {
    color: var(--orange);
}


/* ---------------------------------------------------------
   Results summary
   --------------------------------------------------------- */

.portfolio-results-summary {
    margin-bottom: 25px;
}

.portfolio-results-summary p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.portfolio-results-summary strong {
    color: var(--navy);
}


/* ---------------------------------------------------------
   Portfolio cards and actual cover images
   --------------------------------------------------------- */

.portfolio-card-image {
    position: relative;
    overflow: hidden;
    background: #f1f0f2;
}

.portfolio-card-image > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-card-image > img {
    transform: scale(1.04);
}

.portfolio-card-image .placeholder-art {
    width: 100%;
    height: 100%;
}

.portfolio-item .work-meta h2 {
    margin: 0 0 7px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.portfolio-client {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 13px;
}

.portfolio-item .work-meta > span {
    display: inline-block;
    color: #888b99;
    font-size: 11px;
}


/* ---------------------------------------------------------
   Empty state
   --------------------------------------------------------- */

.portfolio-empty-state {
    padding: 65px 25px;
    border: 1px dashed #dcd9e7;
    border-radius: 25px;
    background: #faf9fc;
    text-align: center;
}

.portfolio-empty-state h2 {
    font-size: 30px;
}

.portfolio-empty-state p {
    max-width: 520px;
    margin: 0 auto 25px;
    color: var(--muted);
}


/* ---------------------------------------------------------
   Pagination
   --------------------------------------------------------- */

.portfolio-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 55px;
}

.portfolio-page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
}

.portfolio-page-numbers a,
.portfolio-page-numbers span,
.portfolio-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.portfolio-page-numbers a:hover,
.portfolio-page-link:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.portfolio-page-numbers .current {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}

.portfolio-page-numbers > span:not(.current) {
    min-width: auto;
    padding: 0 5px;
    border-color: transparent;
    background: transparent;
}


/* ---------------------------------------------------------
   Individual case study: reduce vertical gap
   --------------------------------------------------------- */

.portfolio-case-hero {
    padding-bottom: 35px;
}

.portfolio-case-hero .container {
    position: relative;
    z-index: 1;
}

.portfolio-case-hero h1 {
    max-width: 950px;
}

.portfolio-case-hero > .container > p {
    max-width: 760px;
    margin-bottom: 0;
}

.portfolio-case-hero-media {
    padding: 0 0 55px;
}

.portfolio-case-hero-figure {
    margin: 0;
    overflow: hidden;
    border-radius: 30px;
    background: #f4f1ee;
}

.portfolio-case-hero-figure img {
    display: block;
    width: 100%;
    max-height: 720px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
}

.portfolio-case-placeholder {
    padding-top: 0;
}

.portfolio-case-placeholder .placeholder-art {
    min-height: 300px;
    border-radius: 30px;
}

.portfolio-case-content {
    padding-top: 45px;
}


/* ---------------------------------------------------------
   Project gallery
   --------------------------------------------------------- */

.portfolio-gallery-section {
    background: #faf9f7;
}

.portfolio-gallery-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 35px;
    margin-bottom: 35px;
}

.portfolio-gallery-heading h2 {
    margin: 15px 0 0;
}

.portfolio-gallery-heading > p {
    max-width: 370px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.portfolio-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.portfolio-gallery-item {
    display: block;
    position: relative;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    cursor: zoom-in;
    text-align: left;
}

.portfolio-gallery-item img {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease;
}

.portfolio-gallery-item:hover img,
.portfolio-gallery-item:focus-visible img {
    transform: scale(1.035);
}

.portfolio-gallery-item:focus-visible {
    outline: 3px solid var(--purple);
    outline-offset: 4px;
}

.portfolio-gallery-caption {
    display: block;
    padding: 15px 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   Full-screen image lightbox
   --------------------------------------------------------- */

.portfolio-lightbox[hidden] {
    display: none !important;
}

.portfolio-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 70px 60px;
    background: rgba(13, 16, 35, 0.96);
}

body.portfolio-lightbox-open {
    overflow: hidden;
}

.portfolio-lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
}

.portfolio-lightbox-figure img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.portfolio-lightbox-figure figcaption {
    max-width: 760px;
    margin-top: 15px;
    color: #e7e8ee;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.portfolio-lightbox-close,
.portfolio-lightbox-prev,
.portfolio-lightbox-next {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.portfolio-lightbox-close:hover,
.portfolio-lightbox-prev:hover,
.portfolio-lightbox-next:hover {
    background: #fff;
    color: var(--navy);
}

.portfolio-lightbox-close {
    position: absolute;
    top: 22px;
    right: 25px;
    font-size: 30px;
}

.portfolio-lightbox-prev,
.portfolio-lightbox-next {
    position: relative;
    z-index: 2;
}

.portfolio-lightbox-counter {
    position: absolute;
    right: 25px;
    bottom: 22px;
    color: #c5c7d4;
    font-size: 12px;
}

.portfolio-lightbox button:disabled {
    opacity: 0.35;
    cursor: default;
}


/* ---------------------------------------------------------
   Responsive adjustments
   --------------------------------------------------------- */

@media (max-width: 1000px) {
    .portfolio-gallery-item img {
        height: 290px;
    }

    .portfolio-case-hero-media {
        padding-bottom: 40px;
    }
}

@media (max-width: 760px) {
    .portfolio-toolbar {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .portfolio-search,
    .portfolio-category-filter {
        flex-basis: auto;
        width: 100%;
    }

    .portfolio-search-button {
        width: 100%;
    }

    .portfolio-reset {
        align-self: flex-start;
    }

    .portfolio-item .work-meta h2 {
        font-size: 19px;
    }

    .portfolio-pagination {
        gap: 12px;
    }

    .portfolio-page-link {
        min-height: 40px;
    }

    .portfolio-case-hero {
        padding-bottom: 25px;
    }

    .portfolio-case-hero-media {
        padding-bottom: 30px;
    }

    .portfolio-case-hero-figure {
        border-radius: 20px;
    }

    .portfolio-case-hero-figure img {
        aspect-ratio: 4 / 3;
        max-height: 520px;
    }

    .portfolio-case-content {
        padding-top: 30px;
    }

    .portfolio-gallery-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .portfolio-gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portfolio-gallery-item img {
        height: auto;
        max-height: 450px;
        aspect-ratio: 4 / 3;
    }

    .portfolio-lightbox {
        gap: 10px;
        padding: 70px 12px;
    }

    .portfolio-lightbox-prev,
    .portfolio-lightbox-next {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .portfolio-lightbox-figure {
        flex: 1;
    }

    .portfolio-lightbox-figure img {
        max-height: calc(100vh - 170px);
    }

    .portfolio-lightbox-close {
        top: 14px;
        right: 14px;
    }
}

@media (max-width: 480px) {
    .portfolio-pagination {
        flex-direction: column;
    }

    .portfolio-page-numbers {
        gap: 4px;
    }

    .portfolio-page-numbers a,
    .portfolio-page-numbers span,
    .portfolio-page-link {
        min-width: 36px;
        min-height: 36px;
        padding: 0 9px;
    }

    .portfolio-case-hero-figure {
        border-radius: 15px;
    }

    .portfolio-lightbox {
        gap: 5px;
        padding: 65px 6px 50px;
    }

    .portfolio-lightbox-prev,
    .portfolio-lightbox-next {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .portfolio-lightbox-counter {
        right: 15px;
        bottom: 14px;
    }
}


/* ---------------------------------------------------------
   Reduced motion accessibility
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .portfolio-card-image > img,
    .portfolio-gallery-item img {
        transition: none;
    }
}

/* =========================================================
   PORTFOLIO LISTING — INTRODUCTION SPACING
   ========================================================= */

/* Reduce the space beneath the portfolio introduction. */
.portfolio-page-hero {
    padding-bottom: 35px;
}

/* Bring the search toolbar closer to the introduction. */
.portfolio-listing {
    padding-top: 30px;
}

/* =========================================================
   PORTFOLIO SEARCH TOOLBAR
   ========================================================= */

.portfolio-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    align-items: end;
    gap: 16px;

    padding: 24px;
    border: 1px solid #ececf1;
    border-radius: 24px;

    /* Subtle contrast against the white page background. */
    background: #faf9f7;
}

.portfolio-search,
.portfolio-category-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.portfolio-toolbar label {
    color: var(--navy);
    font-size: 12px;
    font-weight: 800;
}

.portfolio-toolbar input,
.portfolio-toolbar select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;

    border: 1px solid #e1e1e9;
    border-radius: 12px;

    background: #fff;
    color: var(--navy);
    font: inherit;
    font-size: 13px;
}

.portfolio-toolbar input:focus,
.portfolio-toolbar select:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(139, 121, 201, 0.12);
}

.portfolio-search-button {
    white-space: nowrap;
}

.portfolio-reset {
    grid-column: 1 / -1;
    justify-self: start;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.portfolio-reset:hover {
    color: var(--orange);
}

/* Tablet and mobile layout */
@media (max-width: 760px) {
    .portfolio-toolbar {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
    }

    .portfolio-search-button {
        width: 100%;
    }

    .portfolio-reset {
        grid-column: auto;
    }
}

/* =========================================================
   PORTFOLIO CARD METADATA
   ========================================================= */

.portfolio-project-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 12px;
}

/* Category badge */
.portfolio-project-category {
    display: inline-flex;
    align-items: center;

    padding: 5px 10px;

    border: 1px solid rgba(139, 121, 201, 0.18);
    border-radius: 6px;

    background: #f3f0fa;
    color: #7562a8;

    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* Project year */
.portfolio-project-year {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border: 1px solid #ececf1;
    border-radius: 6px;

    background: #faf9f7;
    color: #777b8d;

    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

/* Mobile adjustments */
@media (max-width: 760px) {
    .portfolio-project-meta {
        gap: 7px;
        margin-top: 10px;
    }

    .portfolio-project-category,
    .portfolio-project-year {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* =========================================================
   PORTFOLIO CASE STUDY — RICH-TEXT DESCRIPTION
   ========================================================= */

.prose-content {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.prose-content > :first-child {
    margin-top: 0;
}

.prose-content > :last-child {
    margin-bottom: 0;
}

.prose-content p {
    margin: 0 0 18px;
}

.prose-content h2,
.prose-content h3,
.prose-content h4 {
    margin: 30px 0 12px;
    color: var(--navy);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.prose-content h2 {
    font-size: 26px;
}

.prose-content h3 {
    font-size: 21px;
}

.prose-content h4 {
    font-size: 17px;
}

.prose-content strong,
.prose-content b {
    color: var(--navy);
    font-weight: 800;
}

.prose-content ul,
.prose-content ol {
    margin: 0 0 22px;
    padding-left: 24px;
}

.prose-content li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.prose-content a {
    color: var(--orange);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose-content blockquote {
    margin: 24px 0;
    padding: 16px 22px;
    border-left: 4px solid var(--orange);
    border-radius: 0 12px 12px 0;
    background: #faf9f7;
    color: var(--navy);
}

@media (max-width: 760px) {
    .prose-content {
        font-size: 14px;
        line-height: 1.8;
    }

    .prose-content h2 {
        font-size: 23px;
    }

    .prose-content h3 {
        font-size: 19px;
    }
}

/* =========================================================
   PORTFOLIO CASE STUDY
   Project story + deliverables layout
   ========================================================= */

.portfolio-case-content {
    padding-top: 65px;
    padding-bottom: 75px;
}

.portfolio-case-details {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.8fr);
    align-items: start;
    gap: clamp(35px, 6vw, 85px);
}

/* ---------------------------------------------------------
   Project story
   --------------------------------------------------------- */

.portfolio-case-story {
    min-width: 0;
}

.portfolio-case-story > .eyebrow {
    display: inline-block;
    margin-bottom: 13px;
}

.portfolio-case-story-title {
    margin: 0 0 28px;
    color: var(--navy);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(27px, 3vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.045em;
}

.portfolio-story-empty {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

/* ---------------------------------------------------------
   Rich-text content
   --------------------------------------------------------- */

.prose-content {
    min-width: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.prose-content > :first-child {
    margin-top: 0;
}

.prose-content > :last-child {
    margin-bottom: 0;
}

.prose-content p {
    margin: 0 0 19px;
}

.prose-content h2,
.prose-content h3,
.prose-content h4 {
    margin: 30px 0 12px;
    color: var(--navy);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.025em;
}

.prose-content h2 {
    font-size: 27px;
}

.prose-content h3 {
    font-size: 22px;
}

.prose-content h4 {
    font-size: 18px;
}

.prose-content strong,
.prose-content b {
    color: var(--navy);
    font-weight: 800;
}

.prose-content ul,
.prose-content ol {
    margin: 0 0 24px;
    padding-left: 24px;
}

.prose-content li {
    margin-bottom: 9px;
    padding-left: 4px;
}

.prose-content a {
    color: var(--orange);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose-content blockquote {
    margin: 26px 0;
    padding: 18px 22px;
    border-left: 4px solid var(--orange);
    border-radius: 0 12px 12px 0;
    background: #faf9f7;
    color: var(--navy);
}

/* ---------------------------------------------------------
   Deliverables card
   --------------------------------------------------------- */

.portfolio-deliverables-card {
    position: sticky;
    top: 100px;
    min-width: 0;
    padding: clamp(24px, 3vw, 34px);
    border: 1px solid #eeedf2;
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(255, 138, 42, 0.09),
            transparent 42%
        ),
        #faf9f7;
}

.portfolio-deliverables-card > .eyebrow {
    display: inline-block;
    margin-bottom: 12px;
}

.portfolio-deliverables-card h2 {
    margin: 0 0 25px;
    color: var(--navy);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.035em;
}

.portfolio-deliverables-list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.portfolio-deliverables-list li {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.portfolio-deliverable-check {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 138, 42, 0.13);
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
}

.portfolio-deliverables-empty {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

/* ---------------------------------------------------------
   Metadata within the deliverables card
   --------------------------------------------------------- */

.portfolio-deliverables-meta {
    display: grid;
    gap: 15px;
    margin-top: 30px;
    padding-top: 23px;
    border-top: 1px solid #e8e6ed;
}

.portfolio-deliverables-meta > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.portfolio-deliverables-meta span {
    color: #898b9b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portfolio-deliverables-meta strong {
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

/* ---------------------------------------------------------
   Responsive layout
   --------------------------------------------------------- */

@media (max-width: 900px) {
    .portfolio-case-content {
        padding-top: 45px;
        padding-bottom: 55px;
    }

    .portfolio-case-details {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 30px;
    }

    .portfolio-deliverables-card {
        top: 25px;
        padding: 23px;
    }
}

@media (max-width: 700px) {
    .portfolio-case-content {
        padding-top: 30px;
        padding-bottom: 40px;
    }

    .portfolio-case-details {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .portfolio-case-story-title {
        margin-bottom: 20px;
        font-size: 30px;
    }

    .prose-content {
        font-size: 14px;
        line-height: 1.85;
    }

    .prose-content h2 {
        font-size: 24px;
    }

    .prose-content h3 {
        font-size: 20px;
    }

    .portfolio-deliverables-card {
        position: static;
        padding: 25px;
        border-radius: 18px;
    }

    .portfolio-deliverables-card h2 {
        font-size: 23px;
    }
}