/*
 * Portfolio page redesign.
 * A focused, visual showcase for client confidence and project discovery.
 */

.portfolio-hero {
    min-height: 88vh;
    padding-bottom: 5rem;
    background:
        linear-gradient(90deg, rgba(5, 9, 18, 0.94) 0%, rgba(5, 9, 18, 0.78) 48%, rgba(5, 9, 18, 0.52) 100%),
        radial-gradient(circle at 15% 22%, rgba(0, 212, 255, 0.18), transparent 26rem),
        radial-gradient(circle at 88% 20%, rgba(255, 107, 53, 0.13), transparent 28rem),
        var(--background-dark);
}

.portfolio-hero .hero-content {
    grid-template-columns: minmax(0, 0.88fr) minmax(360px, 0.72fr);
    gap: clamp(1.5rem, 5vw, 4.5rem);
}

.portfolio-hero .hero-text {
    max-width: 760px;
}

.portfolio-hero .hero-title {
    max-width: 760px;
    font-size: clamp(3.3rem, 7.5vw, 7.1rem);
    letter-spacing: 0;
}

.portfolio-hero .hero-subtitle {
    max-width: 700px;
    color: rgba(255, 255, 255, 0.76);
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    line-height: 1.75;
}

.portfolio-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.portfolio-hero-actions .btn {
    min-height: 50px;
    padding-inline: 1.2rem;
}

.portfolio-hero-showcase {
    align-self: center;
}

.portfolio-showcase-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
}

.portfolio-showcase-card::before {
    content: "";
    position: absolute;
    inset: 1rem 1rem auto auto;
    width: 8rem;
    height: 8rem;
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.16);
    filter: blur(38px);
    pointer-events: none;
}

.portfolio-showcase-image {
    position: relative;
    aspect-ratio: 1 / 0.82;
    min-height: 300px;
    overflow: hidden;
}

.portfolio-showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.portfolio-showcase-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 34%, rgba(5, 9, 18, 0.92));
}

.portfolio-showcase-badge {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.86rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(5, 9, 18, 0.72);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    backdrop-filter: blur(14px);
}

.portfolio-showcase-body {
    padding: clamp(1.25rem, 3vw, 1.8rem);
}

.portfolio-showcase-category,
.portfolio-card-category,
.portfolio-category,
.featured-category,
.project-detail-category {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 0.38rem 0.72rem;
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.08);
    color: #8beeff;
    -webkit-text-fill-color: #8beeff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.portfolio-showcase-body h2 {
    margin: 0.9rem 0 0.7rem;
    color: #ffffff;
    font-size: clamp(1.45rem, 2.4vw, 2.15rem);
    line-height: 1.05;
}

.portfolio-showcase-body p {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.65;
}

.portfolio-showcase-meta,
.project-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.05rem;
}

.portfolio-showcase-meta span,
.project-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.86rem;
}

.portfolio-discovery {
    padding: clamp(4rem, 7vw, 6rem) 0;
    background:
        linear-gradient(180deg, rgba(10, 10, 10, 0.96), rgba(14, 21, 36, 0.92)),
        var(--background-dark);
}

.portfolio-discovery-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(1.2rem, 4vw, 2.4rem);
    align-items: center;
    padding: clamp(1.35rem, 4vw, 2.35rem);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(0, 212, 255, 0.11), rgba(255, 255, 255, 0.035)),
        rgba(255, 255, 255, 0.035);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.portfolio-discovery-copy h2 {
    margin: 1rem 0 0.75rem;
    color: #ffffff;
    font-size: clamp(1.7rem, 3.2vw, 2.65rem);
    line-height: 1.05;
}

.portfolio-discovery-copy p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.7;
}

.portfolio-category-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.portfolio-category-tile {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
    color: #ffffff;
    text-align: left;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.portfolio-category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.48);
    background: rgba(0, 212, 255, 0.1);
}

.portfolio-category-tile span {
    font-weight: 800;
    line-height: 1.22;
}

.portfolio-category-tile strong {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--gradient-primary);
    color: #ffffff;
    font-size: 0.95rem;
}

.featured-projects {
    padding: clamp(4.5rem, 8vw, 7rem) 0;
    background:
        radial-gradient(circle at 82% 12%, rgba(0, 212, 255, 0.12), transparent 24rem),
        var(--background-dark);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.875fr 0.875fr;
    gap: 1rem;
}

.featured-card {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    border-radius: 26px;
}

.featured-card:first-child {
    grid-row: span 2;
}

.featured-card:first-child .featured-image {
    height: 430px;
}

.featured-image {
    height: 240px;
    border-radius: 26px 26px 0 0;
}

.featured-image img,
.portfolio-image img,
.portfolio-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.03);
}

.featured-content,
.portfolio-content {
    padding: 1.35rem;
}

.featured-content h3,
.portfolio-title,
.portfolio-card-title {
    color: #ffffff;
    line-height: 1.12;
}

.featured-summary,
.portfolio-summary,
.portfolio-card-summary {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.58;
}

.portfolio-proof {
    padding: 1.5rem 0 clamp(4rem, 7vw, 6rem);
    background: var(--background-dark);
}

.portfolio-proof-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.portfolio-proof-item {
    min-height: 146px;
    display: grid;
    align-content: center;
    gap: 0.45rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
}

.portfolio-proof-item i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

.portfolio-proof-item strong {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.portfolio-proof-item span {
    color: rgba(255, 255, 255, 0.64);
    font-weight: 700;
}

.all-projects {
    background:
        linear-gradient(180deg, rgba(14, 21, 36, 0.92), rgba(10, 10, 10, 0.98)),
        var(--background-dark);
}

.portfolio-controls {
    position: sticky;
    top: 86px;
    z-index: 12;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(18px);
}

.portfolio-filter {
    padding: 0;
}

.portfolio-filter .filter-btn {
    min-height: 42px;
    padding: 0.58rem 1rem;
    border-radius: 999px;
}

.portfolio-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
    padding: 0.7rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    font-weight: 750;
}

.portfolio-count-pill i {
    color: #00d4ff;
}

.portfolio-card-view,
.portfolio-view-toggle,
.portfolio-bottom-nav {
    display: none !important;
}

.portfolio-grid {
    width: min(1160px, calc(100% - 2rem));
    margin: 0 auto;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.portfolio-item {
    min-height: 100%;
    overflow: hidden;
    border-radius: 24px;
}

.portfolio-item:nth-child(5n + 1) {
    grid-row: span 2;
}

.portfolio-item:nth-child(5n + 1) .portfolio-image {
    height: 360px;
}

.portfolio-image {
    height: 235px;
    border-radius: 24px 24px 0 0;
}

.portfolio-content {
    min-height: 260px;
    display: flex;
    flex-direction: column;
}

.portfolio-title {
    margin-top: 0.65rem;
    font-size: clamp(1.2rem, 1.6vw, 1.5rem);
}

.portfolio-tech {
    max-height: 5.25rem;
    overflow: hidden;
}

.tech-tag {
    border-color: rgba(0, 212, 255, 0.25);
    background: rgba(0, 212, 255, 0.08);
    color: #8beeff;
}

.portfolio-status {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.featured-card,
.portfolio-item,
.testimonial-card,
.virtual-tour-card {
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.featured-card:hover,
.portfolio-item:hover,
.testimonial-card:hover,
.virtual-tour-card:hover {
    transform: translateY(-7px);
    border-color: rgba(0, 212, 255, 0.46);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.action-btn {
    box-shadow: 0 16px 34px rgba(0, 212, 255, 0.22);
}

.project-detail-modal[hidden] {
    display: none;
}

.project-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.project-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.74);
    backdrop-filter: blur(10px);
}

.project-detail-panel {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    max-height: min(86vh, 820px);
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 1.05fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: #0b1020;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.project-detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    cursor: pointer;
}

.project-detail-media {
    position: relative;
    min-height: 100%;
    background: rgba(255, 255, 255, 0.05);
}

.project-detail-media img {
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: cover;
}

.project-detail-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 44%, rgba(5, 9, 18, 0.78));
    pointer-events: none;
}

.project-detail-status {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 2;
}

.project-detail-content {
    overflow-y: auto;
    padding: clamp(1.35rem, 4vw, 2.25rem);
}

.project-detail-content h2 {
    margin: 1rem 0 0.85rem;
    color: #ffffff;
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    line-height: 1.02;
}

.project-detail-content p {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
}

.project-detail-tech,
.project-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.2rem;
}

.project-detail-actions {
    padding-top: 1rem;
}

.project-detail-actions .btn {
    flex: 1 1 190px;
    justify-content: center;
}

@media (max-width: 1100px) {
    .portfolio-hero .hero-content,
    .portfolio-discovery-shell,
    .project-detail-panel {
        grid-template-columns: 1fr;
    }

    .portfolio-hero-showcase {
        max-width: 650px;
    }

    .featured-grid,
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-proof-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-detail-panel {
        overflow-y: auto;
    }

    .project-detail-media img {
        min-height: 280px;
        max-height: 360px;
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        min-height: auto;
        padding-top: 6.75rem;
    }

    .portfolio-hero .hero-content {
        width: min(100% - 1rem, 680px);
        gap: 1.25rem;
    }

    .portfolio-hero-actions,
    .portfolio-hero-actions .btn {
        width: 100%;
    }

    .portfolio-hero-actions .btn {
        justify-content: center;
    }

    .portfolio-showcase-card,
    .portfolio-discovery-shell,
    .project-detail-panel {
        border-radius: 20px;
    }

    .portfolio-showcase-image {
        min-height: 220px;
    }

    .portfolio-category-tiles,
    .portfolio-proof-grid,
    .featured-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item:nth-child(5n + 1) {
        grid-row: auto;
    }

    .portfolio-item:nth-child(5n + 1) .portfolio-image,
    .portfolio-image,
    .featured-card:first-child .featured-image,
    .featured-image {
        height: 230px;
    }

    .portfolio-controls {
        position: relative;
        top: auto;
        grid-template-columns: 1fr;
        width: min(100% - 1rem, 680px);
    }

    .portfolio-count-pill {
        justify-content: center;
    }

    .portfolio-grid {
        width: min(100% - 1rem, 680px);
    }

    .portfolio-content {
        min-height: auto;
    }

    .project-detail-modal {
        padding: 0.65rem;
    }

    .project-detail-panel {
        max-height: 90vh;
    }

    .project-detail-media img {
        min-height: 230px;
        max-height: 280px;
    }
}

/*
 * Portfolio gallery polish.
 * These refinements keep the page dark, visual, and easier for clients to scan.
 */
.portfolio-hero {
    isolation: isolate;
    overflow: hidden;
}

.portfolio-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(115deg, rgba(5, 9, 18, 0.92), rgba(5, 9, 18, 0.62)),
        radial-gradient(circle at 22% 24%, rgba(0, 212, 255, 0.2), transparent 28rem),
        radial-gradient(circle at 82% 18%, rgba(46, 229, 157, 0.12), transparent 24rem);
    opacity: 0.28;
    pointer-events: none;
}

.portfolio-hero .hero-content,
.portfolio-hero .scroll-indicator {
    position: relative;
    z-index: 1;
}

.portfolio-hero-top {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(0.75rem, 2vw, 1.35rem);
}

.portfolio-breadcrumb,
.portfolio-breadcrumb a {
    color: rgba(255, 255, 255, 0.68);
    font-weight: 750;
}

.portfolio-breadcrumb a:hover {
    color: #8beeff;
}

.portfolio-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.46rem;
    padding: 0.62rem 0.88rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.075);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.84rem;
    font-weight: 800;
    backdrop-filter: blur(14px);
}

.meta-pill i {
    color: #00d4ff;
}

.portfolio-hero .hero-title {
    text-wrap: balance;
}

.portfolio-hero .title-line.highlight {
    color: #00d4ff;
    -webkit-text-fill-color: transparent;
    background: linear-gradient(135deg, #ffffff 0%, #00d4ff 46%, #2ee59d 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.portfolio-showcase-card {
    transform: rotate(1.2deg);
}

.portfolio-showcase-card:hover {
    transform: translateY(-6px) rotate(0deg);
    transition: transform 240ms ease, box-shadow 240ms ease;
}

.portfolio-showcase-body {
    position: relative;
    margin-top: -4.2rem;
    background: linear-gradient(180deg, rgba(7, 12, 24, 0.82), rgba(7, 12, 24, 0.98));
}

.portfolio-discovery {
    padding-top: clamp(3rem, 6vw, 5rem);
}

.portfolio-discovery-shell,
.portfolio-proof-shell {
    position: relative;
    overflow: hidden;
}

.portfolio-discovery-shell::after,
.portfolio-proof-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 34%, rgba(0, 212, 255, 0.07));
    pointer-events: none;
}

.portfolio-category-tile {
    position: relative;
    overflow: hidden;
}

.portfolio-category-tile::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #2ee59d);
    opacity: 0;
    transition: opacity 180ms ease;
}

.portfolio-category-tile:hover::before {
    opacity: 1;
}

.featured-grid {
    align-items: stretch;
}

.featured-card,
.portfolio-item,
.testimonial-card,
.virtual-tour-card {
    border-color: rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
        #0b1020;
}

.featured-card::after,
.portfolio-item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.featured-content,
.portfolio-content {
    background:
        linear-gradient(180deg, rgba(8, 15, 30, 0.98), rgba(7, 10, 19, 0.98));
}

.featured-meta,
.portfolio-meta,
.portfolio-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 0.85rem;
    margin-top: auto;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.86rem;
}

.featured-meta span,
.portfolio-meta span,
.portfolio-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

.featured-meta i,
.portfolio-meta i,
.portfolio-card-meta i {
    color: #00d4ff;
}

.portfolio-proof {
    padding-top: clamp(3.5rem, 6vw, 5.5rem);
}

.portfolio-proof-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.76fr) minmax(0, 1.24fr);
    gap: clamp(1.15rem, 4vw, 2rem);
    align-items: stretch;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 255, 255, 0.035)),
        rgba(255, 255, 255, 0.035);
}

.portfolio-proof-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portfolio-proof-copy h2 {
    margin: 1rem 0 0.8rem;
    color: #ffffff;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.07;
}

.portfolio-proof-copy p {
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.7;
}

.portfolio-proof-grid {
    position: relative;
    z-index: 1;
}

.portfolio-proof-item {
    min-height: 156px;
}

.portfolio-projects-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    text-align: left;
}

.portfolio-projects-header .section-subtitle {
    margin-inline: 0;
}

.portfolio-projects-cta {
    flex: 0 0 auto;
    min-height: 48px;
    white-space: nowrap;
}

.portfolio-controls {
    margin: 0 auto clamp(1.35rem, 3vw, 2rem);
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 22px;
    background: rgba(7, 12, 24, 0.74);
}

.portfolio-filter-wrapper {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.portfolio-filter {
    display: flex;
    gap: 0.55rem;
    min-width: max-content;
}

.portfolio-filter .filter-btn {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.74);
}

.portfolio-filter .filter-btn.active,
.portfolio-filter .filter-btn:hover {
    border-color: rgba(0, 212, 255, 0.5);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.24), rgba(46, 229, 157, 0.16));
    color: #ffffff;
}

.portfolio-grid {
    align-items: stretch;
}

.portfolio-item {
    position: relative;
    display: flex;
    flex-direction: column;
}

.portfolio-image {
    position: relative;
    overflow: hidden;
}

.portfolio-image::after,
.featured-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(5, 9, 18, 0.74));
    pointer-events: none;
}

.portfolio-overlay,
.featured-overlay {
    z-index: 2;
}

.portfolio-content {
    flex: 1;
}

.portfolio-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portfolio-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}

.portfolio-link,
.portfolio-card-link {
    color: #8beeff;
    font-weight: 850;
}

.portfolio-testimonials .testimonials-grid {
    align-items: stretch;
}

.portfolio-testimonials .testimonial-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-detail-panel {
    outline: 1px solid rgba(0, 212, 255, 0.18);
}

@media (max-width: 1100px) {
    .portfolio-proof-shell {
        grid-template-columns: 1fr;
    }

    .portfolio-hero-top,
    .portfolio-projects-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .portfolio-hero-meta {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .portfolio-hero::before {
        opacity: 0.18;
    }

    .portfolio-hero-top {
        margin-bottom: 0;
    }

    .portfolio-breadcrumb {
        font-size: 0.82rem;
    }

    .meta-pill {
        padding: 0.52rem 0.7rem;
        font-size: 0.76rem;
    }

    .portfolio-hero .hero-title {
        font-size: clamp(2.45rem, 15vw, 3.55rem);
    }

    .portfolio-showcase-card {
        transform: none;
    }

    .portfolio-showcase-body {
        margin-top: -2.8rem;
    }

    .portfolio-discovery-shell,
    .portfolio-proof-shell {
        padding: 1rem;
    }

    .portfolio-category-tiles {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scroll-snap-type: x mandatory;
    }

    .portfolio-category-tile {
        min-width: 72%;
        min-height: 104px;
        scroll-snap-align: start;
    }

    .featured-grid {
        gap: 0.85rem;
    }

    .portfolio-proof-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .portfolio-proof-item {
        min-height: 126px;
        padding: 1rem;
    }

    .portfolio-proof-item strong {
        font-size: 2rem;
    }

    .portfolio-projects-cta {
        width: 100%;
        justify-content: center;
    }

    .portfolio-controls {
        border-radius: 18px;
        padding: 0.65rem;
    }

    .portfolio-count-pill {
        width: 100%;
    }

    .portfolio-grid {
        gap: 0.85rem;
    }

    .portfolio-status {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 430px) {
    .portfolio-proof-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-category-tile {
        min-width: 86%;
    }

    .portfolio-filter .filter-btn {
        min-height: 38px;
        padding-inline: 0.78rem;
        font-size: 0.78rem;
    }
}
