/* ================================
   INNOVATIVE DARK THEME
   ================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #1a1a24;
    --bg-card: #151520;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6e6e8f;
    
    --accent-cyan: #00fff7;
    --accent-purple: #b026ff;
    --accent-pink: #ff0a78;
    --accent-blue: #0066ff;
    
    --glow-cyan: rgba(0, 255, 247, 0.5);
    --glow-purple: rgba(176, 38, 255, 0.5);
    
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

/* ================================
   CUSTOM CURSOR
   ================================ */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    transition: width 0.3s, height 0.3s;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    box-shadow: 0 0 20px var(--glow-cyan);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-cyan);
    transition: all 0.15s ease-out;
    opacity: 0.5;
}

/* ================================
   NEURAL NETWORK BACKGROUND
   ================================ */
.neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
}

/* ================================
   NAVIGATION - FUTURISTIC
   ================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 255, 247, 0.1);
    transition: all 0.3s var(--transition-smooth);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo i {
    font-size: 1.8rem;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 5px var(--glow-cyan));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 20px var(--glow-cyan));
        transform: scale(1.1);
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: all 0.3s;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transition: width 0.4s var(--transition-smooth);
}

.nav-link:hover {
    color: var(--accent-cyan);
}

.nav-link:hover::before {
    width: 100%;
}

/* ================================
   HERO - MIND-BLOWING
   ================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 40px;
    overflow: hidden;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--glow-purple) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-50px, 50px) scale(0.9); }
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(0, 255, 247, 0.05);
    border: 1px solid var(--accent-cyan);
    border-radius: 50px;
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--glow-cyan);
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.typing-text {
    display: inline-block;
    border-right: 3px solid var(--accent-cyan);
    animation: typing 3s steps(15) infinite, blink 0.75s step-end infinite;
    overflow: hidden;
    white-space: nowrap;
}

@keyframes typing {
    0%, 100% { width: 0; }
    50%, 90% { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.highlight-text {
    color: var(--accent-cyan);
    font-weight: 600;
    text-shadow: 0 0 20px var(--glow-cyan);
}

/* ================================
   STATS - 3D HOLOGRAPHIC CARDS
   ================================ */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(21, 21, 32, 0.6);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 247, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.5s var(--transition-smooth);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, var(--accent-cyan), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.stat-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    border-color: var(--accent-cyan);
    box-shadow: 
        0 20px 60px rgba(0, 255, 247, 0.2),
        inset 0 0 30px rgba(0, 255, 247, 0.05);
}

.stat-card:hover::before {
    opacity: 0.1;
    animation: shine 2s linear infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* ================================
   BUTTONS - NEON GLOW
   ================================ */
.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    position: relative;
    padding: 16px 40px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    box-shadow: 0 10px 40px rgba(0, 255, 247, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 60px rgba(0, 255, 247, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 255, 247, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 255, 247, 0.2);
}

/* ================================
   TECH BADGES - FLOATING
   ================================ */
.hero-badges-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.badge {
    padding: 10px 20px;
    background: rgba(176, 38, 255, 0.1);
    border: 1px solid rgba(176, 38, 255, 0.3);
    border-radius: 30px;
    color: var(--accent-purple);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    animation: float-badge 3s ease-in-out infinite;
}

.badge:nth-child(even) {
    animation-delay: 1s;
}

.badge:hover {
    background: rgba(176, 38, 255, 0.2);
    border-color: var(--accent-purple);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(176, 38, 255, 0.3);
}

@keyframes float-badge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ================================
   SECTIONS
   ================================ */
.section {
    position: relative;
    padding: 120px 40px;
    z-index: 1;
}

.section-alt {
    background: var(--bg-secondary);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(0, 255, 247, 0.05);
    border: 1px solid var(--accent-cyan);
    border-radius: 30px;
    color: var(--accent-cyan);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ================================
   INTERACTIVE CARDS - GLASS MORPHISM
   ================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.glass-card {
    background: rgba(21, 21, 32, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s var(--transition-smooth);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.7s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--accent-cyan);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 255, 247, 0.1),
        inset 0 0 40px rgba(0, 255, 247, 0.03);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }
    
    .cursor-dot,
    .cursor-outline {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
}

/* ================================
   SCROLL REVEAL ANIMATIONS
   ================================ */
[data-aos] {
    opacity: 0;
    transition: opacity 0.8s, transform 0.8s;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-down"] {
    transform: translateY(-50px);
}

[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
}

/* ================================
   FLOW DIAGRAM
   ================================ */
.arch-flow-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px auto;
    font-family: 'Space Grotesk', sans-serif;
    max-width: 900px;
}

.flow-node {
    padding: 12px 24px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    background: var(--bg-card);
    min-width: 250px;
    opacity: 0;
    transform: translateY(20px);
}

.flow-node.animated {
    animation: flowNodeIn 0.5s ease forwards;
}

@keyframes flowNodeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flow-node:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 255, 247, 0.2);
    border-color: var(--accent-cyan);
}

.node-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.node-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.node-side-note {
    position: absolute;
    right: -130px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--accent-cyan);
    white-space: nowrap;
}

.input-node { background: rgba(240, 230, 210, 0.05); border-color: rgba(240, 230, 210, 0.2); }
.encoder-node { background: rgba(230, 230, 250, 0.05); border-color: rgba(230, 230, 250, 0.2); }
.denoise-node { background: rgba(200, 240, 220, 0.05); border-color: rgba(200, 240, 220, 0.2); }
.classifier-node { background: rgba(250, 220, 210, 0.05); border-color: rgba(250, 220, 210, 0.2); }
.loss-node { background: rgba(245, 222, 179, 0.1); border-color: rgba(245, 222, 179, 0.3); }

.flow-arrow {
    color: rgba(255,255,255,0.2);
    font-size: 1.2rem;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: arrowPulse 2s infinite;
    margin: 5px 0;
}

.mini-arrow {
    height: 20px;
    font-size: 1rem;
    margin: 2px 0;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(3px); }
}

.flow-group {
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 30px 20px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 10px 0;
}

.group-label {
    position: absolute;
    top: -10px;
    background: var(--bg-primary);
    padding: 0 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.branch-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 10px 0;
}

.branch-svg path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 2s ease forwards;
    animation-delay: 1s;
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

.flow-branches {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
}

.flow-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.footnote-box {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    width: 100%;
    max-width: 600px;
}

/* ================================
   POPUPS
   ================================ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-modal {
    background: var(--bg-card);
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 10px 40px rgba(0, 255, 247, 0.2);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s var(--transition-smooth);
    position: relative;
}

.popup-overlay.active .popup-modal {
    transform: scale(1) translateY(0);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.popup-close:hover {
    color: var(--accent-pink);
}

.popup-title {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-bottom: 15px;
    font-weight: 700;
}

.popup-desc {
    color: var(--text-primary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .flow-branches {
        flex-direction: column;
        gap: 20px;
    }
    .branch-svg {
        display: none;
    }
    .hidden-mobile {
        display: none;
    }
}
