/* ==========================================================================
   Black Beard's Portfolio — AI Systems, MCP & Agentic Engineering Theme
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@600;700&display=swap');

:root {
    --bg-void: #050811;
    --bg-surface: #0b1120;
    --bg-card: rgba(13, 20, 36, 0.86);
    --bg-card-hover: rgba(18, 28, 50, 0.96);
    --text-primary: #e6edf7;
    --text-secondary: #9fb0c9;
    --text-muted: #6e82a3;
    --neon-cyan: #00d4ff;
    --neon-emerald: #00ff9d;
    --neon-violet: #a855f7;
    --border-subtle: rgba(0, 212, 255, 0.22);
    --border-emerald: rgba(0, 255, 157, 0.35);
    --glow-cyan: 0 0 24px rgba(0, 212, 255, 0.25);
    --glow-emerald: 0 0 26px rgba(0, 255, 157, 0.28);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    min-height: 100%;
    background-color: var(--bg-void);
    background-image:
        radial-gradient(circle at 15% 10%, rgba(0, 212, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(168, 85, 247, 0.09) 0%, transparent 42%),
        radial-gradient(circle at 50% 85%, rgba(0, 255, 157, 0.06) 0%, transparent 45%),
        linear-gradient(rgba(0, 212, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.025) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 44px 44px, 44px 44px;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

code, .mono-tag, .tech-pill, .hero-kicker, .category-badge {
    font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    background: rgba(5, 8, 17, 0.88) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.28);
    padding: 0.85rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.55);
}

.navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--neon-emerald);
    box-shadow: 0 0 12px var(--neon-emerald), 0 0 24px var(--neon-cyan);
    display: inline-block;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.98rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--neon-cyan) !important;
    background: rgba(0, 212, 255, 0.08);
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.45);
}

.nav-icon-link {
    color: var(--text-secondary);
    font-size: 1.15rem;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    transition: all 0.22s ease;
    text-decoration: none;
}

.nav-icon-link:hover {
    color: var(--neon-emerald);
    background: rgba(0, 255, 157, 0.08);
}

/* ==========================================================================
   Hero & Architecture Banner
   ========================================================================== */
.hero {
    padding: 3.2rem 1.25rem 2.6rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(0, 212, 255, 0.16);
    background: radial-gradient(ellipse at top, rgba(0, 212, 255, 0.12), rgba(5, 8, 17, 0.25) 70%);
}

/* Never allow third-party scroll libraries to leave content invisible */
[data-aos] {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--neon-emerald);
    background: rgba(0, 255, 157, 0.08);
    border: 1px solid rgba(0, 255, 157, 0.32);
    padding: 0.38rem 0.95rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.hero .neon-text {
    font-size: clamp(2.1rem, 4.4vw, 3.35rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.14;
    margin-bottom: 0.95rem;
    text-shadow: 0 0 32px rgba(0, 212, 255, 0.32);
}

.hero-gradient-span {
    background: linear-gradient(90deg, var(--neon-emerald) 0%, var(--neon-cyan) 52%, var(--neon-violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .neon-text-blue {
    font-size: 1.08rem;
    color: var(--text-secondary);
    max-width: 820px;
    margin: 0 auto 1.45rem;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
}

.btn-cyber-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #00ff9d 100%);
    color: #041019 !important;
    font-weight: 700;
    border: none;
    padding: 0.78rem 1.65rem;
    border-radius: 10px;
    box-shadow: 0 0 22px rgba(0, 212, 255, 0.35);
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cyber-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgba(0, 255, 157, 0.55);
    color: #02080d !important;
}

.btn-cyber-outline {
    background: rgba(13, 20, 36, 0.75);
    color: var(--neon-cyan) !important;
    font-weight: 600;
    border: 1px solid rgba(0, 212, 255, 0.45);
    padding: 0.78rem 1.55rem;
    border-radius: 10px;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cyber-outline:hover {
    background: rgba(0, 212, 255, 0.14);
    border-color: var(--neon-emerald);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Stats / Pillars Bar */
.pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 1.45rem;
    height: 100%;
    transition: all 0.25s ease;
}

.pillar-card:hover {
    border-color: var(--neon-emerald);
    transform: translateY(-4px);
    box-shadow: var(--glow-cyan);
}

.pillar-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.9rem;
    background: rgba(0, 212, 255, 0.12);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.pillar-card h4 {
    font-size: 1.08rem;
    color: #ffffff;
    margin-bottom: 0.45rem;
}

.pillar-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ==========================================================================
   Section Headers & Filter Tabs
   ========================================================================== */
.neon-section-title {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.65rem;
    text-shadow: 0 0 22px rgba(168, 85, 247, 0.35);
}

.section-subtitle {
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto 2rem;
    font-size: 1.02rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 2.25rem;
}

.filter-btn {
    background: rgba(13, 20, 36, 0.85);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 212, 255, 0.22);
    border-radius: 999px;
    padding: 0.45rem 1.05rem;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(168, 85, 247, 0.24));
    color: #ffffff;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.28);
}

/* ==========================================================================
   Cards (Projects & Blog)
   ========================================================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    border-color: var(--neon-emerald);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.65), 0 0 24px rgba(0, 255, 157, 0.2);
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #070b14;
    border-bottom: 1px solid rgba(0, 212, 255, 0.16);
}

.card img.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.45s ease;
}

.card:hover img.card-img-top {
    transform: scale(1.04);
}

.category-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.22rem 0.62rem;
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.12);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
    margin-bottom: 0.55rem;
}

.category-badge.badge-mcp {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, 0.4);
}

.category-badge.badge-nexus {
    background: rgba(0, 255, 157, 0.12);
    color: var(--neon-emerald);
    border-color: rgba(0, 255, 157, 0.36);
}

.category-badge.badge-security {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.38);
}

.card-body {
    padding: 1.15rem 1.25rem 0.95rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 0.48rem;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.89rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tech-stack-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-top: 0.85rem;
}

.tech-pill {
    font-size: 0.71rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.95rem 1.4rem 1.2rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    justify-content: space-between;
}

.btn-card-action {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.48rem 0.95rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-card-primary {
    background: rgba(0, 212, 255, 0.14);
    color: var(--neon-cyan) !important;
    border: 1px solid rgba(0, 212, 255, 0.38);
}

.btn-card-primary:hover {
    background: var(--neon-cyan);
    color: #041019 !important;
}

.btn-card-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-card-ghost:hover {
    border-color: var(--neon-emerald);
    color: var(--neon-emerald) !important;
}

/* ==========================================================================
   Project Deep-Dive & Blog Editorial Pages
   ========================================================================== */
.detail-hero-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2.2rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.project-details img.project-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(0, 212, 255, 0.35);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 28px rgba(0, 212, 255, 0.18);
}

.detail-section-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.75rem;
}

.detail-section-card h2,
.detail-hero-box h2 {
    font-size: 1.38rem;
    color: var(--neon-cyan);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.detail-section-card p,
.detail-hero-box p,
.detail-section-card li,
.detail-hero-box li {
    color: var(--text-primary);
    font-size: 0.98rem;
}

.detail-hero-box ul,
.detail-section-card ul {
    padding-left: 1.25rem;
}

.detail-hero-box li,
.detail-section-card li {
    margin-bottom: 0.55rem;
}

.detail-hero-box li strong,
.detail-section-card li strong {
    color: var(--neon-emerald);
}

/* Run Nexus Sub-Apps Matrix */
.nexus-app-mini {
    background: rgba(7, 12, 24, 0.85);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    height: 100%;
    transition: all 0.22s ease;
}

.nexus-app-mini:hover {
    border-color: var(--neon-emerald);
    transform: translateY(-3px);
}

.nexus-app-mini h5 {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.nexus-app-mini p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Blog Story Editorial Container */
.story-article {
    max-width: 860px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: clamp(1.5rem, 4vw, 3rem);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.story-hero-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    margin: 1.5rem 0 2rem;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
}

.story-article h1 {
    font-size: clamp(1.85rem, 3.6vw, 2.6rem);
    color: #ffffff;
    line-height: 1.2;
}

.story-article h2 {
    font-size: 1.45rem;
    color: var(--neon-cyan);
    margin-top: 2.2rem;
    margin-bottom: 0.85rem;
}

.story-article p.lead {
    font-size: 1.13rem;
    color: #f1f5f9;
    border-left: 3px solid var(--neon-emerald);
    padding-left: 1.1rem;
    margin-bottom: 1.5rem;
}

.story-article p,
.story-article li {
    color: #d6e0ee;
    font-size: 1.01rem;
    line-height: 1.8;
}

.story-article li strong {
    color: var(--neon-emerald);
}

.story-callout {
    background: rgba(0, 212, 255, 0.07);
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-left: 4px solid var(--neon-cyan);
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    margin: 1.75rem 0;
}

.related-section {
    background: rgba(7, 11, 22, 0.78);
    border-top: 1px solid rgba(0, 212, 255, 0.16);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-content {
    background: #0b1222;
    color: var(--text-primary);
    border: 1px solid rgba(0, 212, 255, 0.38);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 212, 255, 0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.2rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.5rem;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* ==========================================================================
   Particles & Footer
   ========================================================================== */
#interactive-particle-container {
    position: relative;
    width: 100%;
    height: 170px;
    background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.04));
    overflow: hidden;
}

footer {
    background: #04070f !important;
    color: var(--text-secondary);
    border-top: 1px solid rgba(168, 85, 247, 0.32);
    padding: 2.2rem 1rem !important;
}

.breadcrumb-cyber {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.83rem;
    margin-bottom: 1.25rem;
}

.breadcrumb-cyber a {
    color: var(--neon-cyan);
    text-decoration: none;
}

.breadcrumb-cyber span {
    color: var(--text-muted);
}

/* ==========================================================================
   Portfolio v3 — Scalable Explorer, Track Bento, Multi-View & Cmd+K Palette
   ========================================================================== */

/* Navbar Cmd+K Search Trigger */
.cmdk-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(13, 20, 36, 0.9);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 212, 255, 0.32);
    border-radius: 999px;
    padding: 0.38rem 0.75rem 0.38rem 0.85rem;
    font-size: 0.83rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cmdk-trigger-btn:hover {
    color: #ffffff;
    border-color: var(--neon-emerald);
    background: rgba(0, 212, 255, 0.12);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.22);
}

.kbd-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 0.1rem 0.42rem;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 212, 255, 0.28);
    line-height: 1.3;
}

/* Guided Domain Track Bento Strip (Homepage) */
.track-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.95rem;
}

@media (max-width: 991.98px) {
    .track-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .track-bento-grid {
        grid-template-columns: 1fr;
    }
}

.track-bento-card {
    background: linear-gradient(155deg, rgba(13, 20, 36, 0.92), rgba(8, 13, 25, 0.95));
    border: 1px solid rgba(0, 212, 255, 0.22);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-primary);
}

.track-bento-card:hover,
.track-bento-card.active {
    border-color: var(--neon-emerald);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 255, 157, 0.16);
    color: #ffffff;
}

.track-bento-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.track-bento-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(0, 212, 255, 0.12);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.track-count-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 255, 157, 0.1);
    color: var(--neon-emerald);
    border: 1px solid rgba(0, 255, 157, 0.28);
}

.track-bento-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.3rem;
}

.track-bento-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 0.65rem;
}

.track-bento-cta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.73rem;
    color: var(--neon-cyan);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Card ID Ribbon */
.card-id-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.18rem 0.52rem;
    border-radius: 6px;
    background: rgba(5, 8, 17, 0.84);
    backdrop-filter: blur(8px);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 212, 255, 0.35);
}

.card-flagship-ribbon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
    background: rgba(5, 8, 17, 0.86);
    color: var(--neon-emerald);
    border: 1px solid rgba(0, 255, 157, 0.45);
}

/* Explorer Control Bar (Projects & Blog) */
.explorer-shell {
    background: rgba(11, 17, 32, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 212, 255, 0.26);
    border-radius: 16px;
    padding: 1.05rem 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.explorer-top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.explorer-search-wrap {
    position: relative;
    flex: 1 1 320px;
}

.explorer-search-wrap i.fa-magnifying-glass {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-cyan);
    font-size: 0.9rem;
    pointer-events: none;
}

.explorer-search-input {
    width: 100%;
    background: rgba(5, 8, 17, 0.9);
    color: #ffffff;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    padding: 0.58rem 2.4rem 0.58rem 2.35rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.explorer-search-input::placeholder {
    color: var(--text-muted);
}

.explorer-search-input:focus {
    border-color: var(--neon-emerald);
    box-shadow: 0 0 0 3px rgba(0, 255, 157, 0.14);
}

.explorer-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    display: none;
}

.explorer-clear-btn:hover {
    color: #ffffff;
}

.explorer-controls-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.explorer-sort-select {
    background: rgba(5, 8, 17, 0.9);
    color: var(--text-primary);
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: 10px;
    padding: 0.52rem 0.85rem;
    font-size: 0.83rem;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    cursor: pointer;
}

.view-toggle-group {
    display: inline-flex;
    background: rgba(5, 8, 17, 0.92);
    border: 1px solid rgba(0, 212, 255, 0.26);
    border-radius: 10px;
    padding: 0.18rem;
    gap: 0.15rem;
}

.view-toggle-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 7px;
    padding: 0.36rem 0.72rem;
    font-size: 0.79rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    transition: all 0.18s ease;
}

.view-toggle-btn:hover {
    color: #ffffff;
}

.view-toggle-btn.active {
    background: rgba(0, 212, 255, 0.18);
    color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
}

.explorer-status-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Compact 2-Column Horizontal Cards */
.compact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

@media (max-width: 991.98px) {
    .compact-grid {
        grid-template-columns: 1fr;
    }
}

.compact-item-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    gap: 0.95rem;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.compact-item-card:hover {
    border-color: var(--neon-emerald);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.compact-thumb {
    width: 78px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    object-position: top center;
    border: 1px solid rgba(0, 212, 255, 0.25);
    flex-shrink: 0;
}

.compact-body {
    flex: 1;
    min-width: 0;
}

.compact-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    display: block;
    margin-bottom: 0.22rem;
    line-height: 1.3;
}

.compact-title:hover {
    color: var(--neon-cyan);
}

.compact-desc {
    font-size: 0.81rem;
    color: var(--text-secondary);
    line-height: 1.42;
    margin-bottom: 0.45rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* High-Density Directory Table */
.directory-table-wrap {
    background: var(--bg-card);
    border: 1px solid rgba(0, 212, 255, 0.24);
    border-radius: 14px;
    overflow-x: auto;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.directory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.directory-table thead th {
    background: rgba(5, 8, 17, 0.92);
    color: var(--neon-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.24);
    white-space: nowrap;
}

.directory-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.16s ease;
}

.directory-table tbody tr:last-child {
    border-bottom: none;
}

.directory-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.06);
}

.directory-table td {
    padding: 0.72rem 1rem;
    vertical-align: middle;
    color: var(--text-secondary);
}

.dir-title-link {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.94rem;
    color: #ffffff;
    text-decoration: none;
}

.dir-title-link:hover {
    color: var(--neon-emerald);
}

.dir-subline {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 520px;
}

/* Progressive Disclosure / Show More Bar */
.progressive-more-bar {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(90deg, rgba(13, 20, 36, 0.88), rgba(18, 28, 52, 0.88));
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Cmd+K Instant Search Command Palette Modal */
.cmdk-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2050;
    background: rgba(3, 6, 14, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 7vh 1rem 2rem;
}

.cmdk-backdrop.open {
    display: flex;
}

.cmdk-dialog {
    width: 100%;
    max-width: 720px;
    background: #0b1222;
    border: 1px solid rgba(0, 212, 255, 0.42);
    border-radius: 16px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.88), 0 0 36px rgba(0, 212, 255, 0.22);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 82vh;
}

.cmdk-header {
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cmdk-header i {
    color: var(--neon-cyan);
    font-size: 1.05rem;
}

.cmdk-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1rem;
}

.cmdk-input::placeholder {
    color: var(--text-muted);
}

.cmdk-scope-bar {
    padding: 0.5rem 1.1rem;
    background: rgba(5, 8, 17, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cmdk-scope-pills {
    display: flex;
    gap: 0.4rem;
}

.cmdk-scope-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.18rem 0.68rem;
    font-size: 0.74rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
}

.cmdk-scope-btn.active {
    background: rgba(0, 212, 255, 0.16);
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.cmdk-results {
    overflow-y: auto;
    padding: 0.55rem;
    max-height: 56vh;
}

.cmdk-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.68rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid transparent;
    transition: background 0.14s ease;
}

.cmdk-item:hover,
.cmdk-item.active {
    background: rgba(0, 212, 255, 0.11);
    border-color: rgba(0, 212, 255, 0.32);
    color: #ffffff;
}

.cmdk-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.cmdk-type-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    padding: 0.16rem 0.48rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.cmdk-type-proj {
    background: rgba(0, 255, 157, 0.12);
    color: var(--neon-emerald);
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.cmdk-type-story {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.cmdk-item-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmdk-item-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmdk-footer {
    padding: 0.55rem 1.1rem;
    background: rgba(5, 8, 17, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
}

