/* ==========================================================================
   NexaWeb — Futuristic 3D Cyber Portfolio & Showcase Engine
   ========================================================================== */

:root {
    --nx-port-bg: #030712;
    --nx-port-card-bg: rgba(15, 23, 42, 0.75);
    --nx-port-card-border: rgba(99, 102, 241, 0.2);
    --nx-port-cyan: #06b6d4;
    --nx-port-indigo: #6366f1;
    --nx-port-purple: #a855f7;
    --nx-port-emerald: #10b981;
}

/* 1. Hero Canvas & Stage */
.nx-portfolio-hero {
    position: relative;
    background: #030712;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(99, 102, 241, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, #020617 0%, #030712 100%);
    overflow: hidden;
    padding-top: 170px;
    padding-bottom: 90px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nx-portfolio-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.nx-portfolio-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 980px;
    margin: 0 auto;
}

/* Live Production Badge */
.nx-live-deploy-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.35);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
    margin-bottom: 24px;
}

.nx-live-deploy-badge .beacon-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: nxDeployPulse 1.8s infinite;
}

@keyframes nxDeployPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 16px #10b981; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.nx-live-deploy-badge span.txt {
    color: #38bdf8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nx-live-deploy-badge span.sep {
    color: rgba(255, 255, 255, 0.25);
}

.nx-live-deploy-badge span.sub {
    color: #e2e8f0;
    font-size: 12.5px;
    font-weight: 600;
}

/* Hero Typography */
.nx-portfolio-title {
    font-size: clamp(34px, 5.2vw, 58px);
    font-weight: 900;
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.nx-portfolio-title .nx-gradient-text {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.nx-portfolio-subtitle {
    font-size: clamp(16px, 1.8vw, 19px);
    color: #94a3b8;
    line-height: 1.65;
    max-width: 780px;
    margin: 0 auto 36px;
}

/* KPI Counter Bar */
.nx-portfolio-kpi-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 880px;
    margin: 0 auto;
    padding: 18px 24px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.nx-kpi-item {
    text-align: center;
    position: relative;
}

.nx-kpi-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.nx-kpi-item .kpi-num {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    display: block;
    font-family: inherit;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nx-kpi-item .kpi-lbl {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-top: 4px;
    display: block;
}

/* 2. Main Showcase Section */
.nx-portfolio-showcase {
    position: relative;
    background: #030712;
    padding: 70px 0 120px;
    z-index: 2;
}

/* Filter Navigation Bar */
.nx-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 55px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.nx-filter-btn {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none !important;
}

.nx-filter-btn .count {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    transition: all 0.3s ease;
}

.nx-filter-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nx-filter-btn.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(99, 102, 241, 0.3) 100%);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
}

.nx-filter-btn.is-active .count {
    background: #06b6d4;
    color: #030712;
}

/* 3. Portfolio Grid Layout */
.nx-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 1199px) {
    .nx-portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .nx-portfolio-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .nx-filter-bar {
        border-radius: 20px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 10px 14px;
    }
    .nx-filter-btn {
        flex-shrink: 0;
    }
    .nx-portfolio-kpi-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .nx-kpi-item:nth-child(2)::after {
        display: none;
    }
}

/* 4. 3D Cyber Project Card */
.nx-card-3d-wrapper {
    perspective: 1200px;
    transform-style: preserve-3d;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.nx-card-3d-wrapper.is-hidden {
    display: none !important;
}

.nx-project-card {
    position: relative;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.85) 0%, rgba(8, 12, 24, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.25s ease-out;
    transform-style: preserve-3d;
}

.nx-project-card:hover {
    border-color: var(--accent-glow, rgba(6, 182, 212, 0.6));
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.85),
        0 0 35px var(--accent-glow-sub, rgba(6, 182, 212, 0.25));
}

/* Simulated Cyber Browser HUD Header */
.nx-browser-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    background: rgba(3, 7, 18, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nx-browser-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nx-browser-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.nx-browser-dots span.dot-red { background: #ef4444; }
.nx-browser-dots span.dot-yellow { background: #f59e0b; }
.nx-browser-dots span.dot-green { background: #10b981; }

.nx-browser-url-chip {
    font-size: 11px;
    font-family: monospace;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-browser-url-chip i {
    font-size: 9px;
    color: #10b981;
}

.nx-browser-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #34d399;
}

.nx-browser-status .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* Image Viewport & Live Hover Trigger */
.nx-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #020617;
}

.nx-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
    filter: brightness(0.92) contrast(1.05);
}

.nx-project-card:hover .nx-card-media img {
    transform: scale(1.06);
    filter: brightness(1) contrast(1.08);
}

/* Hover Quick Action Curtain */
.nx-card-hover-curtain {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.2) 0%, rgba(3, 7, 18, 0.85) 100%);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: opacity 0.35s ease;
    z-index: 5;
    padding: 20px;
}

.nx-project-card:hover .nx-card-hover-curtain {
    opacity: 1;
}

.nx-curtain-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.nx-curtain-btn.primary {
    background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.45);
}

.nx-curtain-btn.secondary {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    backdrop-filter: blur(8px);
}

.nx-curtain-btn:hover {
    transform: translateY(-2px) scale(1.04);
}

/* Card Body Content */
.nx-card-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.nx-card-category-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.nx-category-tag {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
}

.nx-location-tag {
    font-size: 11px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nx-card-title {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.35;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.nx-card-title a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.25s ease;
}

.nx-card-title a:hover {
    color: #38bdf8 !important;
}

/* Result Stat Callout */
.nx-card-result {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    margin-bottom: 14px;
}

.nx-card-result i {
    color: #34d399;
    font-size: 13px;
    margin-top: 2px;
    flex-shrink: 0;
}

.nx-card-result span {
    font-size: 12px;
    font-weight: 700;
    color: #a7f3d0;
    line-height: 1.4;
}

.nx-card-desc {
    font-size: 13.5px;
    color: #cbd5e1 !important;
    line-height: 1.65;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tech Tags Cluster */
.nx-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nx-tech-pill {
    font-size: 10.5px;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 6px;
}

/* Card Action Footer */
.nx-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px 18px;
    background: rgba(3, 7, 18, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nx-portfolio-visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 800;
    color: #38bdf8 !important;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.nx-portfolio-visit-btn:hover {
    color: #ffffff !important;
    transform: translateX(4px);
}

.nx-portfolio-case-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.nx-portfolio-case-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

/* 5. Quick View Holographic Modal */
.nx-quickview-modal {
    position: fixed;
    inset: 0;
    z-index: 10080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nx-quickview-modal.is-active {
    opacity: 1;
    pointer-events: auto;
}

.nx-quickview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(16px);
}

.nx-quickview-dialog {
    position: relative;
    z-index: 2;
    width: min(840px, 94vw);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    background: linear-gradient(160deg, #0f172a 0%, #050816 100%);
    border: 1px solid rgba(6, 182, 212, 0.4);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 50px rgba(6, 182, 212, 0.2);
    padding: 36px 32px;
    color: #ffffff;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nx-quickview-modal.is-active .nx-quickview-dialog {
    transform: scale(1) translateY(0);
}

.nx-quickview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nx-quickview-close:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #f87171;
    transform: rotate(90deg);
}

/* 6. Bottom Holographic Conversion Hub */
.nx-portfolio-cta-hub {
    position: relative;
    padding: 80px 0;
    background: #030712;
    overflow: hidden;
}

.nx-portfolio-cta-card {
    position: relative;
    border-radius: 28px;
    padding: 56px 40px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(8, 12, 24, 0.95) 100%);
    border: 1px solid rgba(6, 182, 212, 0.35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(6, 182, 212, 0.15);
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
    overflow: hidden;
}

.nx-portfolio-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.nx-portfolio-cta-card h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 14px;
}

.nx-portfolio-cta-card p {
    font-size: clamp(15px, 1.8vw, 17px);
    color: #94a3b8;
    max-width: 650px;
    margin: 0 auto 30px;
}

.nx-portfolio-cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
