@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --border-color: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-blue: #2563eb;
    --accent-cyan: #0891b2;
    --accent-purple: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #0891b2 0%, #2563eb 50%, #7c3aed 100%);
    --accent-gradient-hover: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
    position: relative;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

p {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Glassmorphism Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition-smooth);
}

.logo:hover {
    opacity: 0.9;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

.lang-switch {
    display: flex;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2px;
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 18px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.lang-btn.active {
    background: var(--accent-gradient);
    color: #ffffff;
}

/* Burger menu for mobile */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-content h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-family: var(--font-display);
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.25);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

/* Dynamic Decorative Element */
.hero-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    filter: blur(20px);
    animation: pulse 8s infinite alternate;
}

.glow-orb-2 {
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    filter: blur(30px);
    animation: pulse 6s infinite alternate-reverse;
}

.hero-visual svg {
    width: 100%;
    max-width: 320px;
    z-index: 2;
    filter: drop-shadow(0 10px 30px rgba(6, 182, 212, 0.2));
}

/* Feature Showcase Styles (MANTIS & Book) */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tag-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
    display: block;
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.showcase-grid.reverse > :first-child {
    order: 2;
}

.showcase-grid.reverse > :last-child {
    order: 1;
}

.showcase-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.showcase-content p {
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.showcase-visual {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

/* Network Causal Trace Visualization (MANTIS) */
.network-trace-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
}

.trace-node {
    background: rgba(15, 23, 42, 0.03);
    border-left: 3px solid var(--accent-cyan);
    padding: 0.6rem 1rem;
    border-radius: 0 6px 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.trace-node:hover {
    background: rgba(15, 23, 42, 0.06);
    transform: translateX(4px);
}

.trace-node.danger {
    border-left-color: #ef4444;
}

.trace-node.warning {
    border-left-color: #f59e0b;
}

.node-tag {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
}

.trace-node.danger .node-tag {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Book Cover & Info Mockup */
.book-showcase-visual {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.book-cover {
    width: 160px;
    height: 240px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 4px 12px 12px 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 10px 15px 30px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    position: relative;
    flex-shrink: 0;
    color: #ffffff;
}

.book-cover::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
}

.book-cover-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
}

.book-cover-author {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.book-chapters-list {
    flex: 1;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.book-chapters-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.book-chapters-list li::before {
    content: '→';
    color: var(--accent-purple);
}

/* Biography Layout */
.bio-layout {
    max-width: 800px;
    margin: 0 auto;
}

.bio-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.bio-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bio-highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.bio-highlight-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.bio-highlight-date {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.bio-highlight-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.bio-highlight-card p {
    font-size: 0.95rem;
}

/* Contact / Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-socials a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.footer-socials a:hover {
    color: var(--text-primary);
}

.footer-credits {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Scroll Animation Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 0.8; }
}

/* Responsive Rules */
@media (max-width: 968px) {
    section {
        padding: 5rem 0;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .cta-group {
        justify-content: center;
    }
    
    .showcase-grid,
    .showcase-grid.reverse {
        grid-template-columns: 1fr;
        gap: 3rem;
        direction: ltr;
    }
    
    .showcase-grid.reverse .showcase-content {
        direction: ltr;
    }
    
    .bio-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 5rem;
        left: 0;
        width: 100%;
        background: rgba(248, 250, 252, 0.98);
        backdrop-filter: blur(12px);
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .showcase-grid.reverse > :first-child,
    .showcase-grid.reverse > :last-child {
        order: unset;
    }

    .book-showcase-visual {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-chapters-list {
        align-items: center;
    }
}

/* MANTIS Process Flow Styling */
.process-flow {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.8rem 0;
    border-left: 2px solid var(--border-color);
    padding-left: 1.5rem;
}

.process-step {
    display: flex;
    flex-direction: column;
    position: relative;
}

.process-step::before {
    content: '';
    position: absolute;
    left: calc(-1.5rem - 5px);
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-cyan);
    border: 2px solid var(--bg-dark);
    transition: var(--transition-smooth);
}

.process-step:hover::before {
    transform: scale(1.3);
    background: var(--accent-blue);
}

.step-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

