
/* ==========================================
   PAVIONX PORTFOLIO HERO
   Background Image + Modern Showcase
========================================== */

.portfolio-hero,
.portfolio-hero * {
    box-sizing: border-box;
    font-family: inherit;
}

.portfolio-hero {
    --portfolio-blue: #2563eb;
    --portfolio-dark: #10284b;
    --portfolio-text: #526783;

    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 690px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 90px clamp(24px, 5vw, 78px) 100px;
    background: #f4f8ff;
}

/* ==========================================
   BACKGROUND IMAGE
========================================== */

.portfolio-hero .portfolio-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
}

.portfolio-hero .portfolio-hero-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Light blue overlay */

.portfolio-hero .portfolio-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;

    background: linear-gradient(
        90deg,
        rgba(248, 251, 255, 0.98) 0%,
        rgba(248, 251, 255, 0.94) 42%,
        rgba(248, 251, 255, 0.78) 72%,
        rgba(248, 251, 255, 0.86) 100%
    );
}

/* Decorative grid */

.portfolio-hero .portfolio-hero-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;

    background-image:
        linear-gradient(
            rgba(37, 99, 235, 0.07) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(37, 99, 235, 0.07) 1px,
            transparent 1px
        );

    background-size: 48px 48px;

    mask-image: linear-gradient(
        90deg,
        black 0%,
        transparent 95%
    );

    -webkit-mask-image: linear-gradient(
        90deg,
        black 0%,
        transparent 95%
    );
}

/* ==========================================
   MAIN CONTAINER
========================================== */

.portfolio-hero .portfolio-hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;

    display: grid;
    grid-template-columns:
        minmax(0, 1.02fr)
        minmax(0, 0.98fr);

    align-items: center;
    gap: clamp(40px, 5vw, 80px);
}

/* ==========================================
   LEFT CONTENT
========================================== */

.portfolio-hero .portfolio-hero-content {
    min-width: 0;
    width: 100%;
}

.portfolio-hero .portfolio-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 25px;

    color: var(--portfolio-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.5px;
    line-height: 1.6;
}

.portfolio-hero .portfolio-eyebrow-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: var(--portfolio-blue);

    box-shadow:
        0 0 0 5px rgba(37, 99, 235, 0.1);
}

/* Main heading */

.portfolio-hero .portfolio-hero-content h1 {
    max-width: 680px;
    margin: 0 0 25px;

    color: var(--portfolio-dark);
    font-size: clamp(42px, 4.5vw, 65px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.8px;

    overflow-wrap: break-word;
}

.portfolio-hero .portfolio-gradient-text {
    display: block;
    margin-top: 8px;

    color: var(--portfolio-blue);

    background: linear-gradient(
        100deg,
        #2563eb 0%,
        #168bff 55%,
        #06a6cf 100%
    );

    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Description */

.portfolio-hero .portfolio-hero-description {
    max-width: 590px;
    margin: 0;

    color: var(--portfolio-text);
    font-size: 15px;
    line-height: 1.95;
}

/* ==========================================
   BUTTONS
========================================== */

.portfolio-hero .portfolio-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.portfolio-hero .portfolio-btn {
    min-height: 50px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    padding: 14px 22px;

    border-radius: 5px;
    text-decoration: none;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

/* Primary button */

.portfolio-hero .portfolio-btn-primary {
    color: #ffffff;
    background: var(--portfolio-blue);
    border: 1px solid var(--portfolio-blue);

    box-shadow:
        0 8px 22px rgba(37, 99, 235, 0.18);
}

.portfolio-hero .portfolio-btn-primary:hover {
    color: #ffffff;
    background: #1748b8;
    border-color: #1748b8;

    transform: translateY(-3px);

    box-shadow:
        0 12px 26px rgba(37, 99, 235, 0.23);
}

.portfolio-hero .portfolio-btn-primary i {
    transition: transform 0.3s ease;
}

.portfolio-hero .portfolio-btn-primary:hover i {
    transform: translateX(4px);
}

/* Secondary button */

.portfolio-hero .portfolio-btn-secondary {
    color: var(--portfolio-dark);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.portfolio-hero .portfolio-btn-secondary:hover {
    color: var(--portfolio-blue);
    background: #ffffff;
    border-color: var(--portfolio-blue);

    transform: translateY(-3px);
}

/* ==========================================
   TRUST HIGHLIGHTS
========================================== */

.portfolio-hero .portfolio-hero-highlights {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 28px;
}

.portfolio-hero .portfolio-hero-highlights span {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #526783;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
}

.portfolio-hero .portfolio-hero-highlights i {
    color: #059669;
    font-size: 13px;
}

/* ==========================================
   RIGHT VISUAL
========================================== */

.portfolio-hero .portfolio-hero-visual {
    position: relative;
    min-width: 0;
    width: 100%;
    padding: 24px 10px 30px;
}

.portfolio-hero .portfolio-visual-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;

    margin-bottom: 14px;
    color: #647995;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.portfolio-hero .portfolio-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;

    box-shadow:
        0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Main showcase window */

.portfolio-hero .portfolio-showcase {
    width: 100%;
    overflow: hidden;

    border: 1px solid rgba(210, 224, 245, 0.95);
    border-radius: 13px;

    background: rgba(255, 255, 255, 0.96);

    box-shadow:
        0 25px 70px rgba(24, 52, 94, 0.15),
        0 4px 14px rgba(24, 52, 94, 0.05);

    transform: perspective(1200px) rotateY(-3deg);
    transition: transform 0.4s ease;
}

.portfolio-hero .portfolio-hero-visual:hover .portfolio-showcase {
    transform:
        perspective(1200px)
        rotateY(0deg)
        translateY(-3px);
}

/* Showcase top bar */

.portfolio-hero .portfolio-showcase-top {
    min-height: 48px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 16px;
    border-bottom: 1px solid #e9eff8;
    background: #ffffff;
}

.portfolio-hero .portfolio-window-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.portfolio-hero .portfolio-window-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.portfolio-hero .portfolio-window-dots span:nth-child(1) {
    background: #fb7185;
}

.portfolio-hero .portfolio-window-dots span:nth-child(2) {
    background: #fbbf24;
}

.portfolio-hero .portfolio-window-dots span:nth-child(3) {
    background: #34d399;
}

.portfolio-hero .portfolio-window-title {
    min-width: 0;
    flex: 1;

    overflow: hidden;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-hero .portfolio-showcase-top > i {
    flex-shrink: 0;
    color: #2563eb;
    font-size: 12px;
}

/* Showcase body */

.portfolio-hero .portfolio-showcase-body {
    padding: clamp(20px, 3vw, 34px);
    background: linear-gradient(145deg, #ffffff, #f4f8ff);
}

.portfolio-hero .portfolio-showcase-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-bottom: 18px;

    color: #8291a8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.portfolio-hero .portfolio-showcase-heading i {
    color: #2563eb;
    font-size: 17px;
}

.portfolio-hero .portfolio-showcase-body > h2 {
    margin: 0 0 12px;

    color: #10284b;
    font-size: clamp(25px, 3vw, 39px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
}

.portfolio-hero .portfolio-showcase-body > h2 span {
    color: #2563eb;
}

.portfolio-hero .portfolio-showcase-body > p {
    margin: 0 0 25px;

    color: #6b7d95;
    font-size: 12px;
    line-height: 1.8;
}

/* Project preview */

.portfolio-hero .portfolio-project-preview {
    position: relative;
    min-height: 190px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 145px;
    align-items: center;
    gap: 15px;

    overflow: hidden;
    padding: 25px;

    border: 1px solid #dce9ff;
    border-radius: 8px;

    background: linear-gradient(
        120deg,
        #eaf2ff 0%,
        #f5f9ff 60%,
        #e4f5ff 100%
    );
}

.portfolio-hero .portfolio-preview-content {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.portfolio-hero .portfolio-preview-tag {
    color: #2563eb;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.portfolio-hero .portfolio-preview-content > strong {
    max-width: 230px;
    color: #16345c;
    font-size: clamp(17px, 2vw, 23px);
    font-weight: 800;
    line-height: 1.35;
}

.portfolio-hero .portfolio-preview-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
}

/* Abstract illustration */

.portfolio-hero .portfolio-preview-art {
    position: relative;
    width: 140px;
    height: 140px;
    display: grid;
    place-items: center;
}

.portfolio-hero .portfolio-art-orbit {
    position: absolute;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 50%;
}

.portfolio-hero .portfolio-art-orbit.orbit-one {
    width: 125px;
    height: 125px;
}

.portfolio-hero .portfolio-art-orbit.orbit-two {
    width: 90px;
    height: 90px;
    border-color: rgba(6, 166, 207, 0.4);
}

.portfolio-hero .portfolio-art-core {
    position: relative;
    z-index: 1;

    width: 65px;
    height: 65px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;

    background: linear-gradient(
        135deg,
        #2563eb,
        #06a6cf
    );

    box-shadow:
        0 12px 28px rgba(37, 99, 235, 0.2);

    transform: rotate(-8deg);
}

.portfolio-hero .portfolio-art-core i {
    color: #ffffff;
    font-size: 27px;
    transform: rotate(8deg);
}

/* Showcase footer */

.portfolio-hero .portfolio-showcase-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;

    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid #e2eaf5;
}

.portfolio-hero .portfolio-showcase-footer span {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #60718b;
    font-size: 9px;
    font-weight: 700;
}

.portfolio-hero .portfolio-showcase-footer i {
    color: #2563eb;
    font-size: 11px;
}

/* ==========================================
   FLOATING NOTE
========================================== */

.portfolio-hero .portfolio-floating-note {
    position: absolute;
    z-index: 2;
    left: -14px;
    bottom: 0;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 17px;

    border: 1px solid rgba(218, 229, 245, 0.95);
    border-radius: 9px;

    background: rgba(255, 255, 255, 0.97);

    box-shadow:
        0 14px 35px rgba(28, 55, 95, 0.12);

    animation: portfolioFloat 4s ease-in-out infinite;
}

.portfolio-hero .portfolio-floating-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 16px;
}

.portfolio-hero .portfolio-floating-note strong {
    display: block;
    margin-bottom: 4px;

    color: #183153;
    font-size: 11px;
    font-weight: 800;
}

.portfolio-hero .portfolio-floating-note > div > span {
    display: block;
    color: #8190a6;
    font-size: 10px;
    line-height: 1.5;
}

@keyframes portfolioFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

/* ==========================================
   SCROLL INDICATOR
========================================== */

.portfolio-hero .portfolio-scroll-link {
    position: absolute;
    z-index: 2;
    left: clamp(24px, 5vw, 78px);
    bottom: 28px;

    display: inline-flex;
    align-items: center;
    gap: 12px;

    color: #7185a2;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.7px;
    text-decoration: none;

    transition: color 0.25s ease;
}

.portfolio-hero .portfolio-scroll-link:hover {
    color: #2563eb;
}

.portfolio-hero .portfolio-scroll-line {
    width: 30px;
    height: 1px;
    background: #2563eb;
}

.portfolio-hero .portfolio-scroll-link i {
    color: #2563eb;
    font-size: 10px;
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 1050px) {
    .portfolio-hero {
        min-height: 650px;
        padding-top: 75px;
        padding-bottom: 95px;
    }

    .portfolio-hero .portfolio-hero-container {
        gap: 35px;
    }

    .portfolio-hero .portfolio-hero-content h1 {
        font-size: clamp(38px, 4.7vw, 52px);
    }

    .portfolio-hero .portfolio-project-preview {
        grid-template-columns: minmax(0, 1fr) 110px;
        padding: 18px;
    }

    .portfolio-hero .portfolio-preview-art {
        width: 110px;
        height: 120px;
    }

    .portfolio-hero .portfolio-art-orbit.orbit-one {
        width: 105px;
        height: 105px;
    }

    .portfolio-hero .portfolio-art-orbit.orbit-two {
        width: 75px;
        height: 75px;
    }

    .portfolio-hero .portfolio-floating-note {
        left: -5px;
    }
}

/* ==========================================
   TABLET / SMALL SCREENS
========================================== */

@media (max-width: 800px) {
    .portfolio-hero {
        min-height: auto;
        padding: 75px 28px 100px;
    }

    .portfolio-hero .portfolio-hero-overlay {
        background: rgba(248, 251, 255, 0.91);
    }

    .portfolio-hero .portfolio-hero-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 55px;
    }

    .portfolio-hero .portfolio-hero-content {
        max-width: 700px;
    }

    .portfolio-hero .portfolio-hero-content h1 {
        max-width: 680px;
        font-size: clamp(40px, 7vw, 58px);
    }

    .portfolio-hero .portfolio-hero-description {
        max-width: 650px;
    }

    .portfolio-hero .portfolio-hero-visual {
        width: 100%;
        max-width: 620px;
        margin: 0 auto;
    }

    .portfolio-hero .portfolio-showcase {
        transform: none;
    }

    .portfolio-hero .portfolio-floating-note {
        left: -5px;
    }
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 520px) {
    .portfolio-hero {
        padding: 55px 18px 85px;
    }

    .portfolio-hero .portfolio-hero-container {
        gap: 42px;
    }

    .portfolio-hero .portfolio-eyebrow {
        margin-bottom: 20px;
        font-size: 10px;
        letter-spacing: 1.8px;
    }

    .portfolio-hero .portfolio-hero-content h1 {
        margin-bottom: 19px;
        font-size: clamp(33px, 8vw, 43px);
        line-height: 1.17;
        letter-spacing: -0.8px;
    }

    .portfolio-hero .portfolio-hero-description {
        font-size: 14px;
        line-height: 1.85;
    }

    .portfolio-hero .portfolio-hero-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin-top: 25px;
    }

    .portfolio-hero .portfolio-btn {
        width: 100%;
    }

    .portfolio-hero .portfolio-hero-highlights {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
        margin-top: 24px;
    }

    .portfolio-hero .portfolio-hero-highlights span {
        font-size: 11px;
    }

    .portfolio-hero .portfolio-hero-visual {
        padding: 18px 0 38px;
    }

    .portfolio-hero .portfolio-visual-label {
        font-size: 9px;
    }

    .portfolio-hero .portfolio-showcase {
        border-radius: 10px;
    }

    .portfolio-hero .portfolio-showcase-top {
        gap: 8px;
        padding: 11px 9px;
    }

    .portfolio-hero .portfolio-window-title {
        font-size: 9px;
    }

    .portfolio-hero .portfolio-showcase-body {
        padding: 18px 13px;
    }

    .portfolio-hero .portfolio-showcase-body > h2 {
        font-size: 27px;
    }

    .portfolio-hero .portfolio-project-preview {
        min-height: 155px;
        grid-template-columns: minmax(0, 1fr) 75px;
        gap: 7px;
        padding: 14px 10px;
    }

    .portfolio-hero .portfolio-preview-content {
        gap: 10px;
    }

    .portfolio-hero .portfolio-preview-tag {
        font-size: 7px;
        letter-spacing: 1px;
    }

    .portfolio-hero .portfolio-preview-content > strong {
        font-size: 16px;
    }

    .portfolio-hero .portfolio-preview-link {
        font-size: 9px;
    }

    .portfolio-hero .portfolio-preview-art {
        width: 75px;
        height: 100px;
    }

    .portfolio-hero .portfolio-art-orbit.orbit-one {
        width: 72px;
        height: 72px;
    }

    .portfolio-hero .portfolio-art-orbit.orbit-two {
        width: 53px;
        height: 53px;
    }

    .portfolio-hero .portfolio-art-core {
        width: 43px;
        height: 43px;
        border-radius: 12px;
    }

    .portfolio-hero .portfolio-art-core i {
        font-size: 20px;
    }

    .portfolio-hero .portfolio-showcase-footer {
        gap: 10px 13px;
    }

    .portfolio-hero .portfolio-showcase-footer span {
        font-size: 8px;
    }

    .portfolio-hero .portfolio-floating-note {
        left: 0;
        bottom: 0;
        gap: 8px;
        padding: 9px 11px;
    }

    .portfolio-hero .portfolio-floating-icon {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .portfolio-hero .portfolio-floating-note strong {
        font-size: 9px;
    }

    .portfolio-hero .portfolio-floating-note > div > span {
        font-size: 8px;
    }

    .portfolio-hero .portfolio-scroll-link {
        left: 18px;
        bottom: 24px;
        gap: 8px;
        font-size: 8px;
        letter-spacing: 1.2px;
    }
}

/* ==========================================
   VERY SMALL SCREENS
========================================== */

@media (max-width: 360px) {
    .portfolio-hero .portfolio-hero-content h1 {
        font-size: 31px;
    }

    .portfolio-hero .portfolio-project-preview {
        grid-template-columns: minmax(0, 1fr) 60px;
        padding: 12px 8px;
    }

    .portfolio-hero .portfolio-preview-art {
        width: 60px;
    }

    .portfolio-hero .portfolio-showcase-footer {
        gap: 9px;
    }
}

/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {
    .portfolio-hero .portfolio-floating-note {
        animation: none;
    }

    .portfolio-hero .portfolio-showcase,
    .portfolio-hero .portfolio-btn,
    .portfolio-hero .portfolio-btn-primary i,
    .portfolio-hero .portfolio-hero-highlights,
    .portfolio-hero .portfolio-scroll-link {
        transition: none;
    }
}

/* =========================================================
   PAVIONX PORTFOLIO PAGE
   Complete Responsive CSS
   ========================================================= */

/* ---------- GLOBAL RESET ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: clip;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: clip;
    font-family: inherit;
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

a {
    overflow-wrap: anywhere;
}

#projects,
.portfolio-filter-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
    overflow-x: clip;
    font-family: inherit;
}

#projects *,
.portfolio-filter-section * {
    box-sizing: border-box;
}

/* ---------- PORTFOLIO SECTION ---------- */

.portfolio-filter-section {
    position: relative;
    padding: 0 0 75px;
    background: linear-gradient(
        180deg,
        #f8fbff 0%,
        #ffffff 100%
    );
}

/*
   Prevent unwanted space above the section.
   Header spacing should be controlled by the main page layout,
   not by a large margin on the portfolio section.
*/

#projects {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ---------- SECTION HEADING ---------- */

.portfolio-filter-section .section-heading {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 28px;
    padding: 32px 24px 0;
    text-align: center;
}

.portfolio-filter-section .section-heading h1,
.portfolio-filter-section .section-heading h2 {
    margin: 0 0 14px;
    padding: 0;
    color: #10264b;
    font-family: inherit;
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.portfolio-filter-section .section-heading p {
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
    color: #64748b;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* ---------- FILTER BUTTONS ---------- */

.portfolio-filter-section .portfolio-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;

    width: 100%;
    max-width: 100%;

    margin: 0 auto 32px !important;
    padding: 0 24px !important;

    border: 0;
    background: transparent;
}

.portfolio-filter-section .filter-btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;

    max-width: 100%;
    margin: 0;
    padding: 10px 8px;

    border: 0;
    border-radius: 0;
    outline: none;

    background: transparent;
    color: #52647e;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;

    white-space: normal;
    overflow-wrap: anywhere;

    transition: color 0.25s ease;
}

.portfolio-filter-section .filter-btn::after {
    content: "";
    position: absolute;
    right: 8px;
    bottom: 2px;
    left: 8px;

    height: 2px;
    background: #2563eb;

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 0.25s ease;
}

.portfolio-filter-section .filter-btn:hover,
.portfolio-filter-section .filter-btn.active,
.portfolio-filter-section .filter-btn[aria-pressed="true"] {
    color: #155eef;
}

.portfolio-filter-section .filter-btn.active::after,
.portfolio-filter-section .filter-btn[aria-pressed="true"]::after {
    transform: scaleX(1);
}

.portfolio-filter-section .filter-btn:focus-visible,
.portfolio-filter-section .project-link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
}

/* ---------- PROJECT GRID ---------- */

.portfolio-filter-section .portfolio-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;

    width: 100%;
    max-width: 1440px;
    min-width: 0;

    margin: 0 auto !important;
    padding: 0 24px !important;

    column-gap: 32px;
    row-gap: 48px;
}

/* ---------- PROJECT ITEM ---------- */

.portfolio-filter-section .portfolio-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin: 0 !important;
    padding: 0 !important;

    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    overflow-wrap: anywhere;
    word-break: normal;
}

/* ---------- PROJECT VISUAL ---------- */

.portfolio-filter-section .project-placeholder {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    aspect-ratio: 1.68 / 1;

    margin: 0 0 24px !important;
    padding: 20px;

    border: none;
    border-radius: 0;

    overflow: hidden;
    isolation: isolate;
}

/* Decorative circles */

.portfolio-filter-section .project-placeholder::before {
    content: "";

    position: absolute;
    z-index: -1;

    top: -110px;
    right: -75px;

    width: 230px;
    height: 230px;

    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;

    pointer-events: none;
}

.portfolio-filter-section .project-placeholder::after {
    content: "";

    position: absolute;
    z-index: -1;

    bottom: -75px;
    left: -80px;

    width: 160px;
    height: 160px;

    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;

    pointer-events: none;
}

/* If actual images are placed inside project placeholders */

.portfolio-filter-section .project-placeholder img {
    display: block;

    width: 100%;
    height: 100%;
    max-width: 100%;

    object-fit: cover;
    object-position: center;

    border: 0;
}

/* ---------- PROJECT CATEGORY LABEL ---------- */

.portfolio-filter-section .project-category {
    position: absolute;
    z-index: 2;

    bottom: 16px;
    left: 16px;

    display: inline-block;

    max-width: calc(100% - 32px);
    margin: 0;
    padding: 8px 12px;

    background: #10264b;
    color: #ffffff;

    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.6px;
    text-transform: uppercase;

    overflow-wrap: anywhere;
}

/* ---------- PROJECT NUMBER ---------- */

.portfolio-filter-section .project-number {
    margin: 0 0 16px !important;
    padding: 0 !important;

    color: #2563eb;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 2px;
}

/* ---------- PROJECT TITLE ---------- */

.portfolio-filter-section .portfolio-card h3,
.portfolio-filter-section .project-title {
    max-width: 100%;
    min-width: 0;

    margin: 0 0 16px !important;
    padding: 0 !important;

    color: #10264b;

    font-family: inherit;
    font-size: clamp(20px, 1.6vw, 25px);
    font-weight: 700;
    line-height: 1.4;

    overflow-wrap: anywhere;
    word-break: normal;
}

.portfolio-filter-section .portfolio-card:first-child h3,
.portfolio-filter-section .portfolio-card:first-child .project-title {
    color: #2563eb;
}

/* ---------- PROJECT DESCRIPTION ---------- */

.portfolio-filter-section .portfolio-card p {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin: 0 0 18px !important;
    padding: 0 !important;

    color: #52647e;

    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.9;

    overflow-wrap: anywhere;
    word-break: normal;
}

/* ---------- TECHNOLOGY TAGS ---------- */

.portfolio-filter-section .project-tech {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin: 0 0 22px !important;
    padding: 0 !important;

    color: #52647e;

    font-family: inherit;
    font-size: 12px;
    line-height: 1.8;

    overflow-wrap: anywhere;
}

.portfolio-filter-section .project-tech span {
    display: inline-block;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Separator between technology names */

.portfolio-filter-section .project-tech span + span::before {
    content: "/";
    display: inline-block;
    margin-right: 10px;
    color: #94a3b8;
}

/* ---------- VIEW PROJECT LINK ---------- */

.portfolio-filter-section .project-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;

    gap: 10px;

    width: fit-content;
    max-width: 100%;
    min-width: 0;

    margin: auto 0 0 !important;
    padding: 0 !important;

    border: none;
    border-radius: 0;
    background: transparent;

    color: #155eef;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;

    text-decoration: none;
    overflow-wrap: anywhere;

    transition:
        color 0.25s ease,
        gap 0.25s ease;
}

.portfolio-filter-section .project-link:hover {
    gap: 15px;
    color: #0b3da8;
}

/* ---------- FILTER VISIBILITY ---------- */

.portfolio-filter-section .portfolio-card[hidden] {
    display: none !important;
}

/* Optional filter animation class */

.portfolio-filter-section .portfolio-card {
    animation: portfolioFadeIn 0.35s ease both;
}

@keyframes portfolioFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- TABLET ---------- */

@media (max-width: 1024px) {
    .portfolio-filter-section {
        padding-bottom: 60px;
    }

    .portfolio-filter-section .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 26px;
        row-gap: 42px;
        padding: 0 22px !important;
    }

    .portfolio-filter-section .portfolio-filters {
        gap: 8px 14px;
        margin-bottom: 28px !important;
    }

    .portfolio-filter-section .portfolio-card h3,
    .portfolio-filter-section .project-title {
        font-size: 22px;
    }

    .portfolio-filter-section .project-placeholder {
        margin-bottom: 22px !important;
    }
}

/* ---------- MOBILE ---------- */

@media (max-width: 640px) {
    .portfolio-filter-section {
        padding-bottom: 45px;
    }

    .portfolio-filter-section .section-heading {
        padding: 24px 18px 0;
        margin-bottom: 22px;
    }

    .portfolio-filter-section .section-heading h1,
    .portfolio-filter-section .section-heading h2 {
        font-size: 28px;
    }

    .portfolio-filter-section .section-heading p {
        font-size: 14px;
        line-height: 1.8;
    }

    .portfolio-filter-section .portfolio-filters {
        justify-content: flex-start;
        gap: 8px 12px;

        margin-bottom: 24px !important;
        padding: 0 18px !important;
    }

    .portfolio-filter-section .filter-btn {
        padding: 8px 8px;
        font-size: 12px;
    }

    .portfolio-filter-section .portfolio-grid {
        grid-template-columns: minmax(0, 1fr);

        gap: 38px;

        width: 100%;
        padding: 0 18px !important;
    }

    .portfolio-filter-section .portfolio-card {
        width: 100%;
        min-width: 0;
    }

    .portfolio-filter-section .project-placeholder {
        aspect-ratio: 1.55 / 1;
        margin-bottom: 20px !important;
    }

    .portfolio-filter-section .project-category {
        bottom: 12px;
        left: 12px;
        max-width: calc(100% - 24px);
        font-size: 9px;
    }

    .portfolio-filter-section .project-number {
        margin-bottom: 12px !important;
    }

    .portfolio-filter-section .portfolio-card h3,
    .portfolio-filter-section .project-title {
        margin-bottom: 12px !important;
        font-size: 22px;
    }

    .portfolio-filter-section .portfolio-card p {
        margin-bottom: 16px !important;
        font-size: 14px;
    }

    .portfolio-filter-section .project-tech {
        margin-bottom: 18px !important;
    }
}

/* ---------- SMALL MOBILE ---------- */

@media (max-width: 380px) {
    .portfolio-filter-section .section-heading {
        padding-right: 14px;
        padding-left: 14px;
    }

    .portfolio-filter-section .portfolio-filters {
        padding-right: 14px !important;
        padding-left: 14px !important;
        gap: 6px 8px;
    }

    .portfolio-filter-section .portfolio-grid {
        padding-right: 14px !important;
        padding-left: 14px !important;
    }

    .portfolio-filter-section .filter-btn {
        font-size: 11px;
        padding: 7px 6px;
    }

    .portfolio-filter-section .portfolio-card h3,
    .portfolio-filter-section .project-title {
        font-size: 20px;
    }

    .portfolio-filter-section .project-placeholder {
        aspect-ratio: 1.4 / 1;
    }
}

/* ---------- ACCESSIBILITY ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .portfolio-filter-section *,
    .portfolio-filter-section *::before,
    .portfolio-filter-section *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}



