@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    --cyan: #00d4ff;
    --cyan-bright: #00f0ff;
    --cyan-dim: rgba(0, 212, 255, 0.15);
    --cyan-glow: rgba(0, 212, 255, 0.3);
    --cyan-border: rgba(0, 212, 255, 0.2);
    --purple: #a855f7;
    --purple-dim: rgba(168, 85, 247, 0.12);
    --purple-border: rgba(168, 85, 247, 0.2);
    --bg-dark: #0a0a1a;
    --bg-darker: #050510;
    --text-primary: #e0e8f0;
    --text-secondary: rgba(224, 232, 240, 0.6);
    --text-muted: rgba(224, 232, 240, 0.35);
    --glass-bg: rgba(8, 12, 24, 0.55);
    --glass-heavy: rgba(6, 8, 20, 0.75);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #050510 url('bg.jpg') center center / cover fixed no-repeat;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Overlays ── */
.scanline-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 212, 255, 0.008) 2px,
        rgba(0, 212, 255, 0.008) 4px
    );
}

.vignette-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
}

/* ── Background tint overlay (keeps text readable over image) ── */
.bg-tint {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: rgba(5, 5, 16, 0.55);
}

/* ── Navigation ── */
.back-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: var(--glass-bg);
    border: 1px solid var(--cyan-border);
    backdrop-filter: blur(24px) saturate(1.3);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    transition: all 0.3s ease;
}

.back-nav:hover {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.back-btn {
    color: var(--cyan);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.back-btn:hover {
    color: var(--cyan-bright);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Project selector */
.project-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--cyan-border);
    backdrop-filter: blur(24px) saturate(1.3);
    z-index: 2000;
    cursor: pointer;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-radius 0.4s ease;
    transform-origin: top right;
}

.project-selector.collapsed {
    width: 44px;
    height: 44px;
    max-height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.project-selector.expanded {
    width: 220px;
    max-height: 600px;
    padding: 8px;
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.05);
}

.project-menu-icon {
    width: 20px;
    height: 20px;
    color: var(--cyan);
    stroke-width: 2.5;
    cursor: pointer;
    display: block;
    margin: auto;
}

.project-menu-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.project-menu-item {
    padding: 9px 14px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    letter-spacing: 0.02em;
}

.project-menu-item:hover {
    color: var(--cyan);
    background: rgba(0, 212, 255, 0.06);
}

.project-menu-item.active {
    color: var(--cyan);
    font-weight: 700;
    background: rgba(0, 212, 255, 0.1);
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-selector.expanded .project-menu-item {
    animation: menuFadeIn 0.3s ease backwards;
}
.project-selector.expanded .project-menu-item:nth-child(1) { animation-delay: 0.05s; }
.project-selector.expanded .project-menu-item:nth-child(2) { animation-delay: 0.08s; }
.project-selector.expanded .project-menu-item:nth-child(3) { animation-delay: 0.11s; }
.project-selector.expanded .project-menu-item:nth-child(4) { animation-delay: 0.14s; }
.project-selector.expanded .project-menu-item:nth-child(5) { animation-delay: 0.17s; }
.project-selector.expanded .project-menu-item:nth-child(6) { animation-delay: 0.20s; }

/* ── Page Container ── */
.jarvis-page {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin: 0 auto;
    padding: 120px 2rem 100px;
}

/* ── HUD Panels ── */
.hud-panel {
    background: var(--glass-bg);
    border: 1px solid var(--cyan-border);
    backdrop-filter: blur(24px) saturate(1.3);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.hud-panel:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 212, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hud-panel-heavy {
    background: var(--glass-heavy);
    border: 1px solid var(--cyan-border);
    backdrop-filter: blur(32px) saturate(1.4);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Typography ── */
.orbitron {
    font-family: 'Orbitron', sans-serif;
}

.hud-label {
    font-family: 'Orbitron', 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(0, 212, 255, 0.5);
    line-height: 1;
}

.glow-text {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5), 0 0 20px rgba(0, 212, 255, 0.3);
}

/* ── Glow Lines ── */
.glow-line {
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 212, 255, 0.15),
        rgba(0, 212, 255, 0.4),
        rgba(0, 212, 255, 0.15),
        transparent
    );
    margin: 0 0 28px 0;
}

/* ── Buttons ── */
.jarvis-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 212, 255, 0.35);
    color: var(--cyan);
    background: rgba(0, 212, 255, 0.08);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.jarvis-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.5);
    filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.2));
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

.jarvis-btn:active {
    transform: scale(0.97);
}

.jarvis-btn-primary {
    background: rgba(0, 212, 255, 0.18);
    border-color: rgba(0, 212, 255, 0.5);
    color: var(--cyan);
}

.jarvis-btn-primary:hover {
    background: rgba(0, 212, 255, 0.28);
    filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.3));
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

/* ── Hero ── */
.hero-section {
    text-align: center;
    margin-bottom: 80px;
}

.hero-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto 40px;
    border-radius: 28px;
    display: block;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 800;
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.25);
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    line-height: 1.15;
}

.hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(0, 212, 255, 0.5);
    margin-bottom: 24px;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 12px;
    line-height: 1.7;
    font-weight: 400;
}

.hero-emphasis {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: 36px;
    text-transform: uppercase;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.tech-badge {
    background: rgba(0, 212, 255, 0.08);
    color: rgba(0, 212, 255, 0.7);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 5px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
    transition: all 0.2s ease;
}

.tech-badge:hover {
    background: rgba(0, 212, 255, 0.14);
    color: var(--cyan);
    border-color: rgba(0, 212, 255, 0.35);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── Section Blocks ── */
.section-block {
    margin-bottom: 80px;
}

.section-header {
    margin-bottom: 28px;
}

.section-label {
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(0, 212, 255, 0.45);
    margin-bottom: 8px;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.04em;
}

/* ── Vision Panel ── */
.vision-panel {
    padding: 36px 40px;
}

.vision-panel p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    padding: 28px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--glass-bg);
    border: 1px solid var(--cyan-border);
    backdrop-filter: blur(24px);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.stat-card:hover {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.08);
    transform: translateY(-3px);
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cyan);
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ── Architecture Diagram ── */
.arch-container {
    background: rgba(4, 6, 16, 0.85);
    border: 1px solid var(--cyan-border);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 1px rgba(0, 212, 255, 0.1);
    padding: 40px;
    overflow: hidden;
}

.arch-title-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.arch-title-bar .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #39ff14;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
    flex-shrink: 0;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 6px rgba(57, 255, 20, 0.5); }
    50% { box-shadow: 0 0 14px rgba(57, 255, 20, 0.9); }
}

.arch-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--cyan);
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

.arch-layer {
    border: 1px solid rgba(0, 212, 255, 0.1);
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.arch-layer:last-child { margin-bottom: 0; }

.arch-layer:hover {
    border-color: rgba(0, 212, 255, 0.25);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.06);
}

.arch-layer-header {
    background: rgba(0, 212, 255, 0.06);
    padding: 12px 18px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--cyan);
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 212, 255, 0.08);
}

.arch-layer-body {
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    background: rgba(0, 0, 0, 0.2);
}

.arch-item {
    color: rgba(224, 232, 240, 0.6);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.arch-item::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--cyan);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.6);
}

/* ── Feature Groups ── */
.feature-group {
    margin-bottom: 44px;
}

.feature-group:last-child { margin-bottom: 0; }

.feature-group-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    color: rgba(0, 212, 255, 0.45);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.feature-group-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.feature-cards-2col {
    grid-template-columns: repeat(2, 1fr);
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--cyan-border);
    backdrop-filter: blur(24px);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    padding: 24px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.06);
    transform: translateY(-3px);
}

.feature-card h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.97rem;
    line-height: 1.65;
    font-weight: 400;
}

/* ── Channel Cards ── */
.channel-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.channel-card {
    flex: 1 1 200px;
    max-width: 260px;
    min-width: 180px;
    background: var(--glass-bg);
    border: 1px solid var(--cyan-border);
    backdrop-filter: blur(24px);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    padding: 22px 20px;
    transition: all 0.3s ease;
    text-align: center;
}

.channel-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.06);
    transform: translateY(-3px);
}

.channel-card h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 10px;
}

.channel-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ── Demo CTA ── */
.demo-section {
    background: rgba(0, 212, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(24px);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    padding: 56px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.demo-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0, 212, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.demo-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.demo-section p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
    font-weight: 400;
}

.demo-section .small-print {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 24px auto 0;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.3); }

/* ── Animations ── */
@keyframes floatIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .jarvis-page { padding: 100px 1.25rem 80px; }
    .hero-icon { width: 120px; height: 120px; }
    .hero-title { font-size: 2rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-number { font-size: 1.4rem; }
    .arch-container { padding: 24px 16px; }
    .arch-layer-body { gap: 6px 16px; }
    .feature-cards,
    .feature-cards-2col { grid-template-columns: 1fr; }
    .channel-card { max-width: 100%; flex: 1 1 100%; }
    .vision-panel { padding: 24px 20px; }
    .demo-section { padding: 36px 24px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .back-btn { font-size: 0.68rem; padding: 12px 14px; }
}

@media (max-width: 480px) {
    .stats-grid { gap: 10px; }
    .stat-card { padding: 20px 12px; }
    .tech-badge { font-size: 0.72rem; }
}
