/* ==========================================================================
   NEURAL ARCHIVES: COURSES & ACCREDITATIONS STYLING (CYBER HUD ENGINE)
   Omar Ashraf Portfolio - High-Tech Accreditation Matrix
   ========================================================================== */

:root {
    --cyber-cyan: #00D4FF;
    --cyber-purple: #a78bfa;
    --cyber-emerald: #10b981;
    --cyber-amber: #f59e0b;
    --cyber-blue: #3b82f6;
    --cyber-dark: #070c1a;
    --cyber-darker: #040711;
    --cyber-card-bg: rgba(15, 23, 42, 0.72);
    --cyber-card-border: rgba(0, 212, 255, 0.22);
    --cyber-glow-cyan: rgba(0, 212, 255, 0.35);
    --cyber-glow-purple: rgba(167, 139, 250, 0.35);
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & typography */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cyber-dark);
    color: #e2e8f0;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

/* Ambient Canvas & Orbs */
#cyber-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

.ambient-glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    animation: orbFloat 22s infinite alternate ease-in-out;
}

.ambient-orb-1 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #00D4FF 0%, transparent 70%);
    top: -120px;
    right: -100px;
    animation-duration: 25s;
}

.ambient-orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    bottom: -150px;
    left: -120px;
    animation-duration: 28s;
}

.ambient-orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
    top: 45%;
    left: 45%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    animation-duration: 32s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.08); }
    100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* Pulsing Status Dot */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--cyber-emerald);
    box-shadow: 0 0 10px var(--cyber-emerald);
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* Cyber Badge */
.cyber-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.35);
    color: var(--cyber-cyan);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.15);
}

/* Telemetry Bento Cards */
.telemetry-card {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.telemetry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.6), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
}

.telemetry-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 212, 255, 0.1);
}

.telemetry-card:hover::before {
    opacity: 1;
}

/* ==========================================================================
   INTERACTIVE SPECIALIZATION PIPELINE SHOWCASE
   ========================================================================== */
.pipeline-container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(10, 17, 34, 0.9) 100%);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 24px;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 35px rgba(0, 212, 255, 0.06);
}

.pipeline-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.12), transparent 50%);
    pointer-events: none;
}

.pipeline-node-card {
    background: rgba(13, 20, 38, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.pipeline-node-card:hover,
.pipeline-node-card.active-node {
    border-color: var(--cyber-cyan);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.3);
    background: rgba(15, 25, 48, 0.95);
}

.pipeline-node-card.active-node .node-number {
    background: var(--cyber-cyan);
    color: var(--cyber-dark);
}

.pipeline-capstone-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 16px;
    padding: 20px;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.15);
}

.pipeline-capstone-card:hover {
    border-color: #fbbf24;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 35px rgba(245, 158, 11, 0.4);
}

.pipeline-connector-line {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.3), rgba(167, 139, 250, 0.4), rgba(245, 158, 11, 0.5));
    z-index: 1;
    transform: translateY(-50%);
}

/* ==========================================================================
   FILTER TABS & CONTROLS STATION
   ========================================================================== */
.filter-pill {
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #94a3b8;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.filter-pill:hover {
    color: #ffffff;
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.08);
}

.filter-pill.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--cyber-cyan);
    color: var(--cyber-cyan);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.25);
}

.filter-count {
    font-size: 0.7rem;
    font-family: ui-monospace, monospace;
    padding: 1px 7px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
}

.skill-tag-pill {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-family: ui-monospace, monospace;
    transition: var(--transition-smooth);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.skill-tag-pill:hover,
.skill-tag-pill.active-skill {
    border-color: var(--cyber-cyan);
    background: rgba(0, 212, 255, 0.12);
    color: var(--cyber-cyan);
    transform: translateY(-1px);
}

.view-mode-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #94a3b8;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.view-mode-btn:hover {
    color: #fff;
    border-color: rgba(0, 212, 255, 0.3);
}

.view-mode-btn.active {
    background: rgba(0, 212, 255, 0.18);
    border-color: var(--cyber-cyan);
    color: var(--cyber-cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

/* ==========================================================================
   HOLO-CARD 3D ARCHITECTURE
   ========================================================================== */
.course-card-3d {
    perspective: 1200px;
    position: relative;
    border-radius: 20px;
    min-height: 520px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.course-card-3d.highlight-pulse {
    animation: neonHighlight 2.5s ease-out;
}

@keyframes neonHighlight {
    0% { transform: scale(1.04); box-shadow: 0 0 45px rgba(0, 212, 255, 0.9); }
    50% { transform: scale(1.02); box-shadow: 0 0 30px rgba(0, 212, 255, 0.6); }
    100% { transform: scale(1); box-shadow: none; }
}

.card-inner-3d {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 20px;
}

.course-card-3d.flipped .card-inner-3d {
    transform: rotateY(180deg);
}

.card-face-front,
.card-face-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(13, 20, 38, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 212, 255, 0.22);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.course-card-3d:hover .card-face-front {
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 212, 255, 0.16);
}

.card-face-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, rgba(11, 19, 38, 0.98) 0%, rgba(18, 30, 56, 0.98) 100%);
    border-color: rgba(167, 139, 250, 0.35);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(167, 139, 250, 0.08);
}

/* Corner Cyber Brackets */
.cyber-bracket-tl,
.cyber-bracket-br {
    position: absolute;
    width: 14px;
    height: 14px;
    pointer-events: none;
    z-index: 10;
    transition: var(--transition-smooth);
}

.cyber-bracket-tl {
    top: 8px;
    left: 8px;
    border-top: 2px solid var(--cyber-cyan);
    border-left: 2px solid var(--cyber-cyan);
}

.cyber-bracket-br {
    bottom: 8px;
    right: 8px;
    border-bottom: 2px solid var(--cyber-cyan);
    border-right: 2px solid var(--cyber-cyan);
}

.course-card-3d:hover .cyber-bracket-tl {
    width: 20px;
    height: 20px;
    border-color: #ffffff;
}

.course-card-3d:hover .cyber-bracket-br {
    width: 20px;
    height: 20px;
    border-color: #ffffff;
}

/* Holo Image Section & Scanline */
.card-media-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #020617;
    cursor: pointer;
}

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

.course-card-3d:hover .card-media-img {
    transform: scale(1.08);
}

.scanline-sweeper {
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 212, 255, 0.25) 50%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.course-card-3d:hover .scanline-sweeper {
    opacity: 1;
    animation: scanSweep 2s infinite linear;
}

@keyframes scanSweep {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.zoom-overlay-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    background: rgba(7, 12, 26, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.zoom-overlay-badge:hover {
    background: var(--cyber-cyan);
    color: var(--cyber-dark);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

/* Category Badge Variants */
.badge-machine-learning {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.badge-data-science {
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: #38bdf8;
}

.badge-specialization {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fbbf24;
}

/* Buttons in Card */
.cyber-action-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(0, 212, 255, 0.14);
    border: 1px solid rgba(0, 212, 255, 0.45);
    color: var(--cyber-cyan);
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.12);
}

.cyber-action-btn-primary:hover {
    background: var(--cyber-cyan);
    color: var(--cyber-dark);
    box-shadow: 0 0 22px rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

.cyber-action-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    transition: var(--transition-smooth);
}

.cyber-action-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.cyber-flip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: var(--cyber-purple);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.cyber-flip-btn:hover {
    background: rgba(167, 139, 250, 0.25);
    border-color: var(--cyber-purple);
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.3);
}

/* ==========================================================================
   CYBER LEDGER MATRIX VIEW (TABLE MODE)
   ========================================================================== */
.ledger-table-container {
    background: rgba(13, 20, 38, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5);
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.ledger-table th {
    background: rgba(8, 14, 28, 0.85);
    padding: 16px 20px;
    font-size: 0.75rem;
    font-family: ui-monospace, monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.ledger-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition-smooth);
}

.ledger-row:hover {
    background: rgba(0, 212, 255, 0.05);
}

.ledger-row td {
    padding: 16px 20px;
    vertical-align: middle;
}

/* ==========================================================================
   CERTIFICATE LIGHTBOX & MODAL
   ========================================================================== */
.certificate-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(4, 7, 17, 0.94);
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.certificate-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content-box {
    position: relative;
    max-width: 960px;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 212, 255, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(0, 212, 255, 0.35);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 20;
}

.lightbox-nav-btn:hover {
    background: var(--cyber-cyan);
    color: var(--cyber-dark);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #040711;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.25);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-cyan);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pipeline-connector-line {
        display: none;
    }
    .course-card-3d {
        min-height: 480px;
    }
    .lightbox-nav-btn {
        width: 38px;
        height: 38px;
    }
}
