.portfolio-section {
    padding-top: 85px;
    min-height: 100vh;
}

.portfolio-hero {
    text-align: center;
    padding: 40px 24px 25px;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(36, 132, 198, 0.15);
    border: 1px solid rgba(36, 132, 198, 0.3);
    border-radius: 40px;
    color: #6db3ff;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.hero-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.text-gradient {
    background: linear-gradient(135deg, #aad0ff, #6db3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}



/* ── Category Selector Bar (Desktop) ── */

.category-selector-wrapper {

    padding: 16px 24px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    background: rgba(2, 6, 23, 0.85);

    backdrop-filter: blur(16px);

    -webkit-backdrop-filter: blur(16px);

    position: sticky;

    top: 85px;

    z-index: 50;

}

.category-selector-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.selector-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6db3ff;
    white-space: nowrap;
}

.category-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.category-chip i {
    color: #6db3ff;
}

.category-chip .chip-count {
    background: rgba(36, 132, 198, 0.3);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 4px;
}

.category-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.category-chip.active {
    background: #2484c6;
    border-color: #2484c6;
    color: white;
    box-shadow: 0 8px 20px rgba(36, 132, 198, 0.3);
}

.category-chip.active i {
    color: white;
}

.category-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.25);
}



/* ─────────────────────────────

   DESKTOP STICKY SIDEBAR

───────────────────────────── */



.work-dashboard {

    display: grid;

    grid-template-columns: 260px minmax(0, 1fr);

    gap: 30px;



    max-width: 1400px;

    margin: 0 auto;

    padding: 30px 24px 40px;



    align-items: start;

}



.work-sidebar {

    position: sticky;

    top: 140px;

    align-self: start;

    height: fit-content;

}

.sidebar-content {



    background: rgba(30, 47, 143, 0.08);

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 18px;

    padding: 14px;



    z-index: 20;

    margin-top: 50px;

    height: fit-content;

}



.work-sidebar::-webkit-scrollbar {
    width: 4px;
}

.work-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.work-sidebar::-webkit-scrollbar-thumb {
    background: rgba(36, 132, 198, 0.4);
    border-radius: 4px;
}





.sidebar-search {
    position: relative;
    margin-bottom: 12px;
}

.sidebar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
}

.sidebar-search input:focus {
    border-color: #2484c6;
}

.sidebar-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}



/* Sidebar Nav Items */

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.nav-sub-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-sub-item.active {
    background: rgba(36, 132, 198, 0.2);
    color: white;
    border-left: 3px solid #2484c6;
}

.nav-sub-item i {
    width: 16px;
    color: #6db3ff;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.nav-sub-item.active i {
    color: #aad0ff;
}



/* Mobile Trigger */

.mobile-trigger {
    display: none;
    padding: 10px 16px;
    background: rgba(30, 47, 143, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 14px;
}

.mobile-trigger i:first-child {
    color: #6db3ff;
    margin-right: 8px;
}

.mobile-trigger span {
    color: white;
    font-size: 0.9rem;
}

.mobile-trigger i:last-child {
    color: rgba(255, 255, 255, 0.5);
    float: right;
    transition: transform 0.3s;
}

.mobile-trigger.active {
    background: rgba(36, 132, 198, 0.25);
    border-color: rgba(36, 132, 198, 0.4);
}

.mobile-trigger.active i:last-child {
    transform: rotate(180deg);
}



/* ── Work Content — centered ── */

.work-content {

    width: 100%;

    min-width: 0;

}

.portfolio-grid {

    width: 100%;

}



/* ── Subcategory sections ── */

.subcategory-section {
    margin-bottom: 40px;
    width: 100%;
}



.subcategory-title {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    margin-bottom: 20px;

    padding-bottom: 14px;

    border-bottom: 2px solid rgba(36, 132, 198, 0.3);

    text-align: center;

}

.subcategory-title i {
    color: #6db3ff;
    font-size: 1.4rem;
    background: rgba(36, 132, 198, 0.12);
    padding: 10px;
    border-radius: 12px;
}

.subcategory-title h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.35rem;
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.subcategory-title span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-left: 8px;
    background: rgba(36, 132, 198, 0.1);
    padding: 4px 14px;
    border-radius: 20px;
}



/* ── Projects grid (desktop) ── */

.projects-grid {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));

    gap: 16px;

}



/* ── Project cards ── */

.project-card {
    background: rgba(30, 47, 143, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(36, 132, 198, 0.4);
}

.card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, #1a5fa6, #0f1e4a);
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.project-card:hover .card-image img {
    transform: scale(1.05);
}

.image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-fallback i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
}

.card-content {
    padding: 14px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.tag {
    padding: 3px 8px;
    background: rgba(36, 132, 198, 0.15);
    border-radius: 15px;
    font-size: 0.65rem;
    color: #aad0ff;
}

.card-title {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.card-client {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-client i {
    color: #2484c6;
    font-size: 0.6rem;
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.4);
}



/* ── CTA ── */

.portfolio-cta {
    padding: 40px 24px 80px;
}

.cta-card {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(36, 132, 198, 0.1), rgba(45, 63, 148, 0.05));
    border: 1px solid rgba(36, 132, 198, 0.2);
    border-radius: 24px;
}

.cta-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #2484c6;
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #3a9bdc;
    transform: translateY(-2px);
}



/* ── Mobile Tab Bar ── */

.mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 30, 74, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 4px;
    z-index: 95;
    justify-content: space-around;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 8px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    min-width: 44px;
}

.tab-item i {
    font-size: 1.05rem;
}

.tab-item span {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-item.active {
    color: #6db3ff;
    background: rgba(36, 132, 198, 0.15);
}



/* ================================================================

   MOBILE  ≤ 900px

   ================================================================ */

@media (max-width: 900px) {



    /* Hide desktop category bar */

    .category-selector-wrapper {
        display: none;
    }



    /* Single-column dashboard */

    .work-dashboard {

        grid-template-columns: 1fr;

        padding: 0 0 30px;

        gap: 0;

    }



    /* ── Mobile sidebar trigger — sticky below navbar ── */

    .work-sidebar {

        position: sticky;

        top: 66px;

        z-index: 60;

        max-height: none;

        overflow: visible;

        background: rgba(2, 6, 23, 0.92);

        backdrop-filter: blur(16px);

        -webkit-backdrop-filter: blur(16px);

        border-bottom: 1px solid rgba(255, 255, 255, 0.08);

        padding: 10px 16px;

    }



    .mobile-trigger {

        display: flex;

        align-items: center;

        margin-bottom: 0;

        border-radius: 10px;

    }



    .sidebar-content {

        display: none;

        position: absolute;

        top: calc(100% + 4px);

        left: 16px;

        right: 16px;

        z-index: 100;

        max-height: 340px;

        overflow-y: auto;

        background: rgba(15, 30, 74, 0.98);

        border: 1px solid rgba(255, 255, 255, 0.1);

        border-radius: 16px;

        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);

        padding: 14px;

    }

    .sidebar-content.show {
        display: block;
    }



    /* ── Content padding on mobile ── */

    .work-content {

        padding: 20px 14px 20px;

    }



    /* ── Mobile: horizontal swipe row per subcategory ── */

    .subcategory-section {

        margin-bottom: 32px;

    }



    .subcategory-title {

        justify-content: flex-start;

        padding-bottom: 10px;

        margin-bottom: 14px;

    }



    /* Override desktop grid → horizontal scroll row */

    .projects-grid {

        display: flex;

        flex-direction: row;

        gap: 12px;

        overflow-x: auto;

        overflow-y: visible;

        scroll-snap-type: x mandatory;

        -webkit-overflow-scrolling: touch;

        padding-bottom: 10px;

        /* hide scrollbar but keep scroll */

        scrollbar-width: none;

    }

    .projects-grid::-webkit-scrollbar {
        display: none;
    }



    /* Each card: show exactly 2 per viewport width */

    .project-card {

        flex: 0 0 calc(50% - 6px);

        min-width: 0;

        scroll-snap-align: start;

        border-radius: 14px;

    }



    /* Slightly taller image ratio on small cards */

    .card-image {
        aspect-ratio: 4/3;
    }



    /* Tighter card text */

    .card-content {
        padding: 10px 11px;
    }

    .card-title {
        font-size: 0.82rem;
    }

    .card-client {
        font-size: 0.68rem;
    }

    .tag {
        font-size: 0.6rem;
        padding: 2px 6px;
    }



    /* Show tab bar */

    .mobile-tab-bar {
        display: flex;
    }

    .portfolio-section {
        padding-bottom: 70px;
    }

    #footer-placeholder {
        margin-bottom: 70px;
    }

}



/* ── Very small phones ── */

@media (max-width: 400px) {


    .project-card {

        flex: 0 0 calc(50% - 6px);

    }

    .card-title {
        font-size: 0.76rem;
    }

    .tab-item span {
        font-size: 0.55rem;
    }

    .tab-item i {
        font-size: 0.95rem;
    }

}









html,

body,

.portfolio-section,

.work-dashboard {

    overflow: visible !important;

}



body {

    overflow-x: hidden;

    overflow-y: auto;

}



.portfolio-section,

.work-dashboard,

.work-sidebar,

.work-content {

    overflow: visible !important;

}



/* Make "All" tab bigger on mobile */

@media (max-width: 900px) {

    .mobile-tab-bar .tab-item:first-child {

        min-width: 60px;

        padding: 8px 18px;

        background: rgba(36, 132, 198, 0.2);

        border: 1px solid rgba(36, 132, 198, 0.4);

        border-radius: 25px;

    }



    .mobile-tab-bar .tab-item:first-child i {

        font-size: 1.4rem;

    }



    .mobile-tab-bar .tab-item:first-child span {

        font-size: 0.7rem;

        font-weight: 700;

    }



    .mobile-tab-bar .tab-item:first-child.active {

        background: #2484c6;

        border-color: #2484c6;

    }

}