:root {
    --bg-color: #050510;
    --bg-deep: #000000;
    --primary-red: #ff0000;
    --secondary-red: #330000;
    --text-color: #e0e0e0;
    --accent-white: #ffffff;
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: var(--bg-deep);
    color: var(--text-color);
    font-family: var(--font-heading);
    overflow-x: hidden;
}

#canvas-container,
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    min-height: 100vh;
    z-index: 0;
}

#ui-layer {
    overflow-y: auto;
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    box-sizing: border-box;
    pointer-events: none;
    /* Let clicks pass to 3D layer if needed */
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-glitch {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    position: relative;
    color: var(--primary-red);
    text-shadow: 0 0 5px var(--secondary-red);
}

.status-indicator {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    opacity: 0.8;
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--primary-red);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(255, 0, 0, 0.7);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

.hero {
    text-align: center;
    margin-bottom: 10vh;
}

.console-text {
    font-family: var(--font-heading);
    font-weight: 300;
    font-size: 3rem;
    letter-spacing: 0.5rem;
    margin: 0;
    text-transform: uppercase;
    color: var(--accent-white);
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--primary-red);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.subtitle {
    font-family: var(--font-mono);
    color: var(--primary-red);
    margin-top: 1rem;
    font-size: 1rem;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(20px);
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.contact {
    pointer-events: auto;
}

.email-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--primary-red);
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.email-link:hover {
    text-shadow: 0 0 10px var(--primary-red);
}

.meta-data {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 1px;
}

.separator {
    margin: 0 1rem;
    color: var(--secondary-red);
}

.attribution {
    opacity: 0.5;
}

.tagline {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.5rem;
    opacity: 0;
    letter-spacing: 2px;
}
/* --- EPIC INFRASTRUCTURE DASHBOARD STYLES --- */

/* Color scheme - Cyan/Gold accents */
:root {
    --cyan: #00ffff;
    --cyan-glow: rgba(0, 255, 255, 0.5);
    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.5);
}

/* Service Categories */
.service-categories {
    max-width: 1400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.service-category {
    width: 100%;
}

.category-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: 0 0 20px var(--cyan-glow);
}

.category-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px var(--cyan-glow));
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Enhanced Service Cards */
.service-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::after {
    opacity: 1;
}

.service-card.ai-glow {
    border-color: rgba(0, 255, 255, 0.2);
}

.service-card.ai-glow:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.2),
                inset 0 0 30px rgba(0, 255, 255, 0.05);
}

.service-stats {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.stat-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    color: var(--cyan);
    letter-spacing: 0.05em;
}

.stat-pill.gold {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: var(--gold);
    animation: goldPulse 2s infinite;
}

@keyframes goldPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
}

/* Origin Credit Section */
.origin-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.creator-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.creator-badge:hover {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.creator-icon {
    font-size: 2rem;
    animation: iconFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

.creator-info {
    display: flex;
    flex-direction: column;
}

.creator-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: rgba(255, 215, 0, 0.6);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.creator-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 15px var(--gold-glow);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e0e0e0;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-white);
    color: var(--accent-white);
    transform: translateY(-2px);
}

.github-icon {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.github-link:hover .github-icon {
    opacity: 1;
}

/* Infrastructure Section */
#infrastructure {
    padding-top: 8rem;
}

.infra-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
}

/* Traffic Flow Diagram */
.traffic-flow {
    padding: 2rem;
}

.flow-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cyan);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px var(--cyan-glow);
}

.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    min-width: 100px;
    transition: all 0.3s ease;
}

.flow-node:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.2);
    transform: translateY(-3px);
}

.flow-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.flow-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cyan);
}

.flow-detail {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.25rem;
}

.flow-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.arrow-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--gold));
    position: relative;
}

.arrow-line::after {
    content: '▶';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    color: var(--gold);
}

.arrow-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* VPN Mesh Diagram */
.vpn-mesh {
    padding: 2rem;
}

.mesh-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.mesh-center {
    position: relative;
}

.mesh-hub {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(0, 255, 255, 0.1));
    border: 2px solid var(--gold);
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    animation: hubPulse 3s infinite;
}

@keyframes hubPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.4); }
}

.hub-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hub-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
}

.hub-peers {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: rgba(255, 215, 0, 0.6);
}

.mesh-connections {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.mesh-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.mesh-node::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 15px;
    background: linear-gradient(180deg, transparent, var(--cyan));
}

.mesh-node:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.node-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.node-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cyan);
}

.node-peers {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: rgba(0, 255, 255, 0.5);
}

.mesh-total {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.total-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow);
}

.total-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Security Layers */
.security-layers {
    padding: 2rem;
}

.layers-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.layer {
    display: grid;
    grid-template-columns: 50px 120px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid;
    transition: all 0.3s ease;
}

.layer:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.layer-1 { border-color: #ff6b6b; }
.layer-2 { border-color: #ffd93d; }
.layer-3 { border-color: #6bcb77; }
.layer-4 { border-color: #4d96ff; }

.layer-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
}

.layer-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-white);
}

.layer-desc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 900px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .infra-container {
        grid-template-columns: 1fr;
    }
    .flow-diagram {
        flex-direction: column;
    }
    .flow-arrow {
        transform: rotate(90deg);
    }
    .layer {
        grid-template-columns: 40px 1fr;
        gap: 0.75rem;
    }
    .layer-desc {
        grid-column: span 2;
        padding-left: 40px;
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    .origin-credit {
        flex-direction: column;
        gap: 1rem;
    }
    .mesh-connections {
        flex-direction: column;
    }
}

/* --- NEW STYLES FOR UPGRADE --- */

/* Scroll Reveal Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

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

/* Keyboard Shortcuts Modal */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 11000;
    display: none;
    align-items: center;
    justify-content: center;
}

.help-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.help-modal {
    background: rgba(10, 0, 0, 0.95);
    border: 1px solid var(--primary-red);
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.2);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    position: relative;
}

.help-header {
    border-bottom: 1px solid rgba(255, 0, 0, 0.3);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-title {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-red);
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

.help-close {
    cursor: pointer;
    color: #666;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    line-height: 1;
}
.help-close:hover { color: var(--accent-white); }

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.help-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.help-key {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 0, 0, 0.15);
    color: var(--accent-white);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.help-desc {
    font-family: 'JetBrains Mono', monospace;
    color: #888;
    font-size: 0.8rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Enhanced Project Cards */
.project-card .project-icon {
    transition: transform 0.4s ease;
}
.project-card:hover .project-icon {
    transform: scale(1.2) rotate(-10deg);
}

/* Nav Help Hint */
.nav-help-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    margin-left: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    cursor: help;
}
.nav-help-hint:hover {
    color: var(--primary-red);
    border-color: var(--primary-red);
}

/* Scroll fix - append to style.css */
html {
    overflow-y: scroll !important;
}
body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
}
#ui-layer {
    height: auto !important;
    min-height: 100vh;
    pointer-events: auto;
}
