:root {
    /* Color Palette - Sanitized Precision */
    --bg-primary: #FFFFFF;
    --bg-surface: #F8FAFC;
    --bg-glass: rgba(255, 255, 255, 0.65);

    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-accent: #17AAD1;
    /* Logo Cyan */

    --border-metal: #CBD5E1;
    --border-polished: #94A3B8;

    --shadow-soft: 0 4px 6px -1px rgba(148, 163, 184, 0.1), 0 2px 4px -1px rgba(148, 163, 184, 0.06);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-glow: 0 0 15px rgba(23, 170, 209, 0.3);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Layout */
    --radius-lg: 24px;
    --radius-pill: 9999px;
    --nav-height: 80px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-surface: #1E293B;
    --bg-glass: rgba(15, 23, 42, 0.75);

    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    /* --text-accent stays the same */

    --border-metal: #334155;
    --border-polished: #475569;
    --border-light: rgba(255, 255, 255, 0.08);

    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 15px rgba(23, 170, 209, 0.4);
}

/* Dark mode specific overrides for elements with hardcoded colors */
[data-theme="dark"] .glass-nav {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .btn-primary {
    background: var(--text-accent);
    color: #0F172A;
}

[data-theme="dark"] .btn-secondary {
    border-color: var(--border-polished);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .code-window {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .code-window .code-header {
    background: rgba(0, 0, 0, 0.3);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .deepr-card {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .physio-card {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .physio-icon {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .modal-content {
    background: var(--bg-surface);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .microscope-lens {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 40px rgba(23, 170, 209, 0.15);
}

[data-theme="dark"] .section-number {
    color: rgba(148, 163, 184, 0.15);
}

[data-theme="dark"] .app-card.future {
    opacity: 0.4;
}

/* Dark mode toggle button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-metal);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    margin-left: 12px;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--text-accent);
    box-shadow: var(--shadow-glow);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

button {
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    outline: none;
}

/* Background Layers */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

#vector-field {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.equation-watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='200' viewBox='0 0 400 200' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='50%25' y='50%25' font-family='JetBrains Mono' font-size='14' fill='%23F1F5F9' opacity='0.5'%3E %E2%88%AE L dt = 0 %3C/text%3E%3C/svg%3E");
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    z-index: -1;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;
    height: 64px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-glass);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 24px;
}

.nav-logo-img {
    height: 48px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(23, 170, 209, 0.4);
    color: var(--text-accent);
    box-shadow: 0 4px 12px rgba(23, 170, 209, 0.15);
}

.btn-primary:hover {
    background: rgba(23, 170, 209, 0.1);
    border-color: var(--text-accent);
    box-shadow: 0 0 20px rgba(23, 170, 209, 0.4);
    transform: translateY(-1px);
    text-shadow: 0 0 8px rgba(23, 170, 209, 0.3);
}

.btn-large {
    padding: 16px 48px;
    font-size: 16px;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

/* Sections */
section {
    position: relative;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-pad {
    padding: 120px 0;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: var(--nav-height);
}

.hero-content {
    z-index: 2;
    max-width: 800px;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.15;
    /* Subtle background */
    pointer-events: none;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.microscope-lens {
    position: relative;
    width: 380px;
    height: 380px;
    margin: 0 auto 32px;
    border-radius: 50%;
    /* Glass lens border */
    border: 1px solid rgba(23, 170, 209, 0.3);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 30px rgba(23, 170, 209, 0.1),
        inset 0 0 60px rgba(23, 170, 209, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), transparent 60%);
}

.lens-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    /* Subtle reticle crosshair */
    background:
        linear-gradient(to right, transparent 49.5%, rgba(23, 170, 209, 0.1) 49.5%, rgba(23, 170, 209, 0.1) 50.5%, transparent 50.5%),
        linear-gradient(to bottom, transparent 49.5%, rgba(23, 170, 209, 0.1) 49.5%, rgba(23, 170, 209, 0.1) 50.5%, transparent 50.5%);
    background-size: 80% 80%;
    background-repeat: no-repeat;
    background-position: center;
    /* Vignette */
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.1);
}

.hero-logo {
    height: 360px;
    margin-bottom: 0;
    /* Remove margin as container handles it */
    /* Feather edges - sharpened gradient (reduced by 50%) */
    -webkit-mask-image: radial-gradient(circle closest-side, black 90%, transparent 100%);
    mask-image: radial-gradient(circle closest-side, black 90%, transparent 100%);
    transition: all 0.5s ease;
}

.microscope-lens:hover .hero-logo {
    transform: scale(1.05);
    /* Zoom effect */
}

.microscope-lens:hover {
    box-shadow:
        0 0 0 1px rgba(23, 170, 209, 0.5),
        0 0 50px rgba(23, 170, 209, 0.2),
        inset 0 0 80px rgba(23, 170, 209, 0.1);
}

.hero-title {
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border-metal);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--text-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Typography Utils */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 42px;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.mono-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding: 4px 8px;
    border: 1px solid var(--border-metal);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
}

.accent-text {
    color: var(--text-accent);
    border-color: rgba(23, 170, 209, 0.3);
    background: rgba(23, 170, 209, 0.05);
}

/* Cards & Glass */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-metal);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(148, 163, 184, 0.15);
    border-color: var(--border-polished);
}

.glass-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.glass-card p {
    color: var(--text-secondary);
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.feature-list {
    list-style: none;
    margin-top: 32px;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 500;
}

.feature-list .icon {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-accent);
    margin-right: 12px;
    opacity: 0.7;
}

.equation-display {
    font-family: var(--font-mono);
    font-size: 24px;
    color: var(--text-primary);
    padding: 32px;
    background: var(--bg-surface);
    border-radius: 16px;
    margin: 32px 0;
    border: 1px solid var(--border-metal);
    text-align: center;
}

/* Architecture Grid */
.architecture-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.arch-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-metal);
    text-align: center;
}

.icon-box {
    width: 64px;
    height: 64px;
    background: var(--bg-surface);
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-accent);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Comparison View */
.big-card {
    padding: 64px;
    background: white;
}

.centered {
    text-align: center;
}

.comparison-view {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
}

.comp-col {
    flex: 1;
    text-align: center;
}

.divider {
    flex: 0 0 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-metal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.stat-box {
    margin: 24px 0;
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-surface);
}

.stat-box .value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-box.fail .value {
    color: var(--text-secondary);
}

.stat-box.success .value {
    color: var(--text-accent);
}

.stat-box .label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* CTA & Footer */
.cta-section {
    padding: 160px 0;
    text-align: center;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
}

.cta-title {
    font-size: 48px;
    margin-bottom: 24px;
}

.cta-desc {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

footer {
    padding: 48px 0;
    border-top: 1px solid var(--border-metal);
    background: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Animation Utils */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 40px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .architecture-grid {
        grid-template-columns: 1fr 1fr;
    }

    .comparison-view {
        flex-direction: column;
        gap: 48px;
    }
}

/* --- DEEPr Architecture --- */
.deepr-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5 Columns */
    gap: 24px;
    margin-top: 64px;
}

.deepr-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-metal);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all 0.4s ease;
}

.deepr-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: var(--text-accent);
}

.deepr-letter {
    font-size: 80px;
    font-weight: 200;
    line-height: 1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-sans);
}

.deepr-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.deepr-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Cognitive Pipeline --- */
.pipeline-container {
    display: flex;
    flex-direction: column;
    gap: 120px;
    margin-top: 80px;
    position: relative;
}

/* Step Visualizations */
#step-entropy .step-number {
    color: #94A3B8;
    /* Grey for noise */
    text-shadow: 0 0 5px rgba(148, 163, 184, 0.5);
}

#step-graph .step-number {
    color: var(--text-accent);
}

#step-compression .step-number {
    color: var(--text-accent);
    text-shadow: 0 0 10px rgba(23, 170, 209, 0.5);
    /* Glow for compression energy */
}

#step-parsimony .step-number {
    color: #10B981;
    /* Emerald for "Least Action" / Optimized */
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Connecting Line Gradient - Transitioning colors */
.pipeline-container::before {
    background: linear-gradient(to bottom,
            transparent,
            #94A3B8 10%,
            /* Entropy */
            var(--text-accent) 40%,
            /* Graph */
            var(--text-accent) 60%,
            /* Compression */
            #10B981 90%,
            /* Parsimony */
            transparent);
}

.pipeline-step {
    display: flex;
    align-items: center;
    gap: 64px;
    position: relative;
    z-index: 1;
    /* Above line */
}

/* Alternate Layout */
.pipeline-step:nth-child(even) {
    flex-direction: row-reverse;
}

.step-info {
    flex: 1;
    text-align: right;
}

.pipeline-step:nth-child(even) .step-info {
    text-align: left;
}

.step-number {
    display: block;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-accent);
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.step-info h3 {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.step-info p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Code Window */
.code-window {
    flex: 1.2;
    /* Slightly wider */
    background: #0F172A;
    /* Dark IDE background */
    border: 1px solid var(--border-metal);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    position: relative;
}

.code-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.file-name {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
}

.code-window pre {
    margin: 0;
    padding: 24px;
    overflow-x: auto;
}

.code-window code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: #E2E8F0;
    /* Light text code */
    line-height: 1.5;
}

/* Syntax Highlighting (Manual Sim) */
.language-python {
    color: #E2E8F0;
}


/* --- Lagrangian Mechanics --- */
#mechanics {
    background: radial-gradient(circle at center, rgba(23, 170, 209, 0.03) 0%, transparent 70%);
}

.equation-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    font-family: 'Times New Roman', serif;
    font-size: 120px;
    font-style: italic;
    margin: 64px 0 96px;
    line-height: 1;
}

.equation-term {
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #10B981;
}

.equation-equals,
.equation-operator {
    color: var(--text-secondary);
    font-weight: 200;
    opacity: 0.5;
}

.term-kinetic {
    color: #EFB083;
    /* Logo Cyan */
    text-shadow: 0 0 30px rgba(23, 170, 209, 0.4);
}

.term-potential {
    color: #17AAD1;
    /* Logo Gold/Orange */
    text-shadow: 0 0 30px rgba(239, 176, 131, 0.4);
}

.mechanics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.mech-card {
    background: var(--bg-surface);
    /* Glass base */
    border: 1px solid var(--border-metal);
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all 0.4s ease;
}

.mech-card:hover {
    transform: translateY(-8px);
    border-color: var(--text-primary);
}

.mech-card.accent {
    border-color: #10B981;
    /* Emerald border for Least Action */
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

.mech-icon {
    font-family: 'Times New Roman', serif;
    font-size: 64px;
    font-style: italic;
    margin-bottom: 24px;
    color: var(--text-primary);
}

#mech-kinetic .mech-icon {
    color: #EFB083;
}

#mech-potential .mech-icon {
    color: #17AAD1;
}

#mech-action .mech-icon {
    color: #10B981;
}

.mech-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 4px 8px;
    border: 1px solid var(--border-metal);
    border-radius: 4px;
}

.mech-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.mech-card p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

.mech-formula {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    border: 1px solid var(--border-metal);
}



/* --- Applications --- */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    padding: 32px;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: var(--text-accent);
}

.app-icon-box {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-metal);
    margin-bottom: 8px;
}

.app-emoji {
    font-size: 32px;
}

.app-card h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin: 0;
}

.future-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.app-card.future {
    border-style: dashed;
    background: rgba(15, 23, 42, 0.3);
}

.app-card.future:hover {
    border-color: var(--text-secondary);
    transform: none;
    cursor: default;
}

/* Local Responsive */
@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }

    .future-header {
        flex-direction: row;
        /* Keep header row on mobile, maybe wrap if title long? */
    }
}



/* --- Research / Proof --- */
.research-summary {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
    margin-bottom: 32px;
}

.research-meta {
    display: flex;
    gap: 48px;
    border-bottom: 1px solid var(--border-metal);
    padding-bottom: 24px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-item .label {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    font-weight: 600;
}

.meta-item .value {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
}

.meta-item .value.warning {
    color: #F59E0B;
    /* Amber */
    font-weight: bold;
}

.hypothesis-block h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hypothesis-block p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hypothesis-block strong {
    color: var(--text-accent);
}

.outcome strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .research-meta {
        flex-direction: column;
        gap: 16px;
    }
}


/* --- About The Team --- */
.profile-card {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-metal);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.profile-title h3 {
    font-size: 32px;
    margin-bottom: 4px;
}

.profile-quote {
    font-size: 20px;
    font-style: italic;
    color: var(--text-primary);
    border-left: 4px solid var(--text-accent);
    padding-left: 24px;
    margin: 0 0 32px 0;
}

.profile-content p {
    margin-bottom: 24px;
    line-height: 1.8;
}

.research-focus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-metal);
}

.focus-item h4 {
    font-size: 16px;
    color: var(--text-accent);
    margin-bottom: 8px;
}

.focus-item p {
    font-size: 14px;
    color: var(--text-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 32px;
}

.job-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.job-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid var(--border-metal);
}

.job-item strong {
    display: block;
    margin-bottom: 4px;
}

.job-item p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Local Responsive overrides */
@media (max-width: 1024px) {
    .research-focus-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}



/* --- Research Proposal --- */
.proposal-view .comp-col {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.proposal-view h4 {
    font-size: 20px;
    margin-bottom: 12px;
}

.outcome-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.outcome-implication {
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
}

.fail-box {
    border-left: 3px solid var(--text-destructive);
}

.success-box {
    border-left: 3px solid var(--text-accent);
}

.proposal-cta {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-metal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}


/* --- DEEPr Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    padding: 40px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.close-btn:hover {
    color: var(--text-accent);
}

.modal-header-row {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 32px;
}

.deepr-letter-large {
    font-size: 72px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
}

.modal-title-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-title-col h3 {
    font-size: 32px;
    margin: 0;
}

.modal-divider {
    height: 1px;
    background: var(--border-metal);
    margin: 24px 0;
}

.highlight-text {
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 500;
}

.detail-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.tap-hint {
    font-size: 11px;
    color: var(--text-accent);
    margin-top: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.deepr-card {
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.deepr-card:hover {
    transform: translateY(-5px);
    border-color: var(--text-accent);
    background: rgba(255, 255, 255, 0.8);
}


/* Responsive Design System */

/* Tablet & Smaller Desktop (max-width: 1024px) */
@media (max-width: 1024px) {

    /* DEEPr Grid: 2 Columns */
    .deepr-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .deepr-card:last-child {
        grid-column: span 2;
    }

    /* Mechanics Grid: 1 Column (Vertical Stack) */
    .mechanics-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    /* Pipeline: Left-Aligned Timeline */
    .pipeline-step,
    .pipeline-step:nth-child(even) {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .step-info,
    .pipeline-step:nth-child(even) .step-info {
        text-align: left;
        width: 100%;
    }

    .code-window {
        width: 100%;
    }

    .pipeline-container {
        padding-left: 48px;
    }

    .pipeline-container::before {
        left: 24px;
    }

    /* Component Sizing */
    .equation-container {
        font-size: 80px;
        gap: 16px;
    }

    .glass-card {
        padding: 32px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {

    /* Navigation */
    .nav-links {
        display: none;
    }

    .glass-nav {
        width: 95%;
        padding: 0 16px;
    }

    /* Hero */
    .hero-title {
        font-size: clamp(32px, 8vw, 48px);
    }

    .hero-bg-img {
        object-position: center;
    }

    /* Grids */
    .card-grid,
    .split-layout,
    .architecture-grid,
    .comparison-view {
        grid-template-columns: 1fr;
        display: grid;
        gap: 32px;
    }

    .comparison-view {
        display: flex;
        /* Keep flex for comparison logic but vertical */
        flex-direction: column;
    }

    /* DEEPr: 1 Column on Mobile */
    .deepr-grid {
        grid-template-columns: 1fr;
    }

    .deepr-card:last-child {
        grid-column: span 1;
    }

    /* Typography & Spacing */
    .section-pad {
        padding: 60px 0;
        /* Reduced padding */
    }

    .section-title {
        font-size: 32px;
    }

    .equation-container {
        font-size: clamp(40px, 12vw, 64px);
        flex-direction: column;
        /* Stack T - V = L vertical if needed, or keep row but smaller */
        gap: 8px;
    }

    .mechanics-grid {
        gap: 24px;
    }

    /* Touch Targets */
    .btn,
    a,
    button {
        min-height: 44px;
        /* Apple/Android GUIDELINE */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Pipeline Mobile Adjustments */
    .pipeline-container {
        padding-left: 24px;
        /* Tighter timeline */
        gap: 64px;
    }

    .pipeline-container::before {
        left: 12px;
    }

    .code-window pre {
        padding: 16px;
        /* Save space */
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 36px;
    }

    .microscope-lens {
        width: 280px;
        height: 280px;
    }

    .hero-logo {
        height: 260px;
    }
}

/* --- Physiological Systems --- */
.physiology-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 40px;
    margin-bottom: 64px;
    /* Space before sections */
}

.physio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.physio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.2);
    /* Blue glow */
    border-color: var(--text-accent);
    background: rgba(255, 255, 255, 0.08);
}

.physio-icon {
    font-size: 32px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border-metal);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.physio-card h3 {
    margin-bottom: 8px;
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.physio-card .mono-label {
    display: block;
    margin-bottom: 16px;
    color: var(--text-accent);
    font-size: 11px;
    opacity: 0.9;
}

.physio-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .physiology-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin-left: auto;
    }
}

/* Thesis Modal Specifics */
.thesis-content-wrapper {
    width: 95%;
    max-width: 900px;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

.thesis-text {
    overflow-y: auto;
    padding-right: 16px;
    text-align: left;
    line-height: 1.8;
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 16px;
}

.thesis-text h4 {
    font-size: 20px;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-metal);
    padding-bottom: 8px;
}

.thesis-text p {
    margin-bottom: 24px;
}

/* Scrollbar for thesis */
.thesis-text::-webkit-scrollbar {
    width: 8px;
}

.thesis-text::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.thesis-text::-webkit-scrollbar-thumb {

    /* Mobile Navigation */
    @media (max-width: 768px) {
        .glass-nav {
            top: 16px;
            width: 95%;
            height: 60px;
        }

        .nav-content {
            padding: 0 16px;
        }

        .nav-links {
            display: none;
        }

        .nav-logo-img {
            height: 36px;
            /* Slightly smaller on mobile */
        }

        .glass-nav .btn {
            padding: 8px 16px;
            font-size: 13px;
        }
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 99;
    /* Behind Nav (100) */
    display: none;
    /* Hidden on Desktop */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 48px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-menu-overlay {
        display: flex;
        /* Flex layout allowed, but controlled by opacity/pointer-events */
        pointer-events: none;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        pointer-events: all;
    }
}

.mobile-menu-overlay a {
    font-size: 32px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-menu-overlay a:hover {
    color: var(--text-accent);
}

/* Physiology Icons */
.physio-icon-img {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 15px rgba(23, 170, 209, 0.3));
    transition: transform 0.3s ease;
}

.physio-card:hover .physio-icon-img {
    transform: scale(1.1);
}

/* App Icons */
.app-icon-img {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px rgba(23, 170, 209, 0.2));
    transition: transform 0.3s ease;
}

.app-card:hover .app-icon-img {
    transform: scale(1.1);
}