:root {
    --bg-primary: #020612;
    --bg-secondary: #0a1120;
    --bg-panel: rgba(10, 15, 30, 0.6);
    
    --text-primary: #e0e5f0;
    --text-secondary: #9aa5bb;
    --text-muted: #5e6880;
    
    --accent-1: #00e5ff; /* Cyan / Imaginary */
    --accent-2: #ffaa00; /* Gold / Real / Light boundary */
    --accent-glow: rgba(0, 229, 255, 0.4);
    
    --border-light: rgba(0, 229, 255, 0.15);
    --border-strong: rgba(255, 170, 0, 0.3);
    
    --nav-glass: rgba(2, 6, 18, 0.7);
    --panel-glass: rgba(10, 15, 30, 0.4);
    
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Canvas */
#complex-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Typography Gradient */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typography & Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.container.wide {
    max-width: 1000px;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: var(--nav-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo span {
    color: var(--accent-1);
    font-weight: 300;
    margin-left: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-1);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 5%;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid var(--accent-1);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-1);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    background: rgba(0, 229, 255, 0.05);
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero .subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-1);
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
    background: #00b8cc;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.6;
}

.scroll-indicator .mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator .mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent-1);
    border-radius: 50%;
    animation: scrollAnimation 2s infinite;
}

@keyframes scrollAnimation {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* Sections */
.section {
    padding: 8rem 0;
    position: relative;
}

.alt-bg {
    background-color: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-header h2 span {
    color: var(--accent-2);
}

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

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Glass Panels */
.glass-panel {
    background: var(--panel-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2.5rem;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.glass-panel:hover {
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Text & Math */
h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1.2rem;
}

.mono-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-1);
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.math-box {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--accent-1);
    font-size: 1.1rem;
    border-radius: 0 4px 4px 0;
}

.math-box.glow {
    box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.05);
}

.math-display {
    font-size: 1.2rem;
    padding: 1rem 0;
}

/* Visual Assets (Canvas wrappers) */
.visual-card .canvas-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-light);
}

.visual-card .canvas-wrapper canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    margin-top: 1rem;
}

/* Details IA / Collapsible */
.ia-details {
    background: transparent;
    border: none;
    border-radius: 4px;
}

.ia-summary {
    list-style: none;
    cursor: pointer;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: rgba(0, 229, 255, 0.03);
    transition: background 0.3s;
    user-select: none;
}

.ia-summary::-webkit-details-marker {
    display: none;
}

.ia-summary:hover {
    background: rgba(0, 229, 255, 0.08);
}

.ia-summary .mono-label {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ia-content {
    padding: 2rem 1.5rem;
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: rgba(10, 15, 30, 0.8);
}

.ia-content h4 {
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 1rem;
    margin: 2rem 0 1rem;
}

.ia-content h4:first-child {
    margin-top: 1rem;
}

.ia-content ul {
    padding-left: 1.2rem;
    margin-bottom: 1.5rem;
}

.ia-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Register Transition */
.register-transition {
    padding: 6rem 5%;
    text-align: center;
}

.separator-line {
    height: 1px;
    width: 60px;
    background: linear-gradient(90deg, transparent, var(--accent-1), transparent);
    margin: 0 auto 2rem;
}

.register-transition p {
    font-style: italic;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Footer / Reconnaissance */
.badge-reconnaissance {
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.reconnaissance-panel h3 {
    margin-bottom: 1.5rem;
    font-weight: 500;
}

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem 0 2rem;
    background: #010308;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 3rem;
}

.brand .logo {
    margin-bottom: 0.5rem;
}

.brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links-container {
    max-width: 600px;
}

.footer-title {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2px;
    transition: color 0.3s, border-color 0.3s;
}

.footer-link:hover,
.footer-link.active {
    color: var(--accent-1);
    border-color: var(--accent-1);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* Reveal Animations */
.reveal-text, .fade-in, .reveal-up {
    opacity: 0;
}

.reveal-text.visible, .fade-in.visible {
    animation: fadeIn 1s ease forwards;
}

.reveal-up.visible {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiveness */
@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .reverse-mobile {
        display: flex;
        flex-direction: column-reverse;
    }
    
    .nav-links {
        display: none; /* simple hidden state for mobile nav in structure */
    }
    
    .menu-btn {
        display: block;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* -------------------------------------------
   RESPONSIVE TEXT & OVERFLOW FIXES (Mobile)
   ------------------------------------------- */
body {
    word-break: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}
.math-display, .math-box, .ia-content, pre, code {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}
@media (max-width: 768px) {
    .glass-panel {
        padding: 1.5rem !important;
    }
    .ia-details {
        padding: 1rem 1.2rem !important;
    }
    .hero h1 {
        font-size: 2.2rem !important;
    }
    .section {
        padding: 4rem 0 !important;
    }
    .container {
        padding: 0 1rem !important;
    }
}
