/* ═══════════════════════════════════════════
   AI Lab Page Styles
   ═══════════════════════════════════════════ */

/* ── Navbar (now present in AI Lab) ── */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ── Mono Font ── */
.code-block, .code-window code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Lab Hero ── */
.lab-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 40%, #312e81 70%, #1e293b 100%);
    overflow: hidden;
    padding-top: 80px;
}

.lab-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.neural-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(129, 140, 248, 0.6);
    border-radius: 50%;
    left: var(--x);
    top: var(--y);
    animation: particleFloat 6s ease-in-out infinite;
    animation-delay: var(--delay);
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.4);
}

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    25% { transform: translate(30px, -20px) scale(1.5); opacity: 1; }
    50% { transform: translate(-10px, -40px) scale(1); opacity: 0.4; }
    75% { transform: translate(20px, -10px) scale(1.3); opacity: 0.8; }
}

.pulse-ring {
    position: absolute;
    width: 400px;
    height: 400px;
    border: 1px solid rgba(129, 140, 248, 0.15);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulseExpand 4s ease-out infinite;
    animation-delay: var(--delay);
}

@keyframes pulseExpand {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.lab-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 0;
}

.lab-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(129, 140, 248, 0.15);
    color: #a5b4fc;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(129, 140, 248, 0.25);
    backdrop-filter: blur(10px);
}

.lab-badge.inline {
    margin-bottom: 1rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.lab-hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    color: #ffffff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.lab-hero .gradient-text {
    background: linear-gradient(135deg, #818cf8, #c084fc, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lab-hero-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 640px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.lab-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.lab-stat {
    text-align: center;
}

.lab-stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.lab-stat-label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.lab-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(148, 163, 184, 0.2);
}

.lab-hero .btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.lab-hero .btn-secondary {
    border-color: rgba(129, 140, 248, 0.4);
    color: #a5b4fc;
}

.lab-hero .btn-secondary:hover {
    background: rgba(129, 140, 248, 0.15);
    color: #ffffff;
}

.lab-hero .hero-buttons {
    justify-content: center;
}

/* ── Motivation Section ── */
.motivation-section {
    padding: 6rem 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.motivation-content {
    max-width: 1000px;
    margin: 0 auto;
}

.motivation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.motivation-content h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    line-height: 1.25;
}

.motivation-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
    text-align: justify;
}

.motivation-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.motivation-text p:last-child {
    margin-bottom: 0;
}

.motivation-text strong {
    color: var(--text-primary);
}

/* Vision Venn */
.vision-venn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 0;
}

.venn-circle {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    position: relative;
    z-index: 1;
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid transparent;
}

.venn-circle::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    padding: 1px;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        transparent 60%,
        rgba(99, 102, 241, 0.4) 75%,
        rgba(129, 140, 248, 0.6) 80%,
        rgba(99, 102, 241, 0.4) 85%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.venn-word {
    margin-right: -38px;
    padding-right: 24px;
}

.venn-word::before {
    animation: vennSpin 8s linear infinite;
}

.venn-world {
    margin-left: -48px;
    padding-left: 24px;
}

.venn-world::before {
    animation: vennSpin 8s linear infinite reverse;
}

@keyframes vennSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.venn-label {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

.venn-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.6;
}

.venn-center {
    position: absolute;
    z-index: 2;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: vennGlow 4s ease-in-out infinite;
}

@keyframes vennGlow {
    0%, 100% {
        box-shadow:
            0 0 12px rgba(99, 102, 241, 0.2),
            0 0 0 0 rgba(99, 102, 241, 0);
    }
    50% {
        box-shadow:
            0 0 20px rgba(99, 102, 241, 0.35),
            0 0 0 12px rgba(99, 102, 241, 0.06);
    }
}

.venn-center span {
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    line-height: 1.3;
}

/* Conclusion / Blockquote */
.motivation-conclusion {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 3rem;
}

.motivation-conclusion blockquote {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.6;
    text-align: center;
    padding: 2rem 2.5rem;
    margin: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(168, 85, 247, 0.04));
    border-radius: 16px;
    position: relative;
}

/* ── Why Section ── */
.why-section {
    padding: 6rem 0;
    background: var(--white);
}

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

.why-card {
    padding: 2.5rem 2rem;
    border-radius: 16px;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.why-card.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-color: rgba(99, 102, 241, 0.2);
}

.why-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

.why-icon.accent {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.why-icon.gradient {
    background: var(--gradient-secondary);
    color: #ffffff;
}

.why-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.why-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

/* ── TWISTER Section ── */
.twister-section {
    padding: 6rem 0;
    background: var(--light-bg);
}

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

.section-subtitle strong {
    color: #6366f1;
    font-weight: 700;
}

/* Intro */
.twister-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 4rem;
}

.lead-text {
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Code Window */
.code-window {
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.code-title {
    font-size: 0.8rem;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
}

.code-block {
    padding: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.8;
    color: #cdd6f4;
    overflow-x: auto;
    margin: 0;
}

.code-keyword { color: #cba6f7; }
.code-class { color: #89dceb; }
.code-comment { color: #585b70; }

/* Key Insight */
.innovation-section {
    margin-bottom: 4rem;
}

.innovation-section h3 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.insight-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.insight-box {
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--white);
}

.insight-box.new {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(139, 92, 246, 0.03));
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.08);
}

.insight-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.insight-box.new .insight-label {
    color: #6366f1;
}

.timeline-viz {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.timeline-step {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--light-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.timeline-step.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.timeline-step.highlight {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.3);
}

.timeline-step.dim {
    opacity: 0.3;
}

.timeline-arrow {
    color: var(--text-light);
    font-weight: 600;
}

.timeline-arrow.dim {
    opacity: 0.3;
}

.insight-box p {
    margin: 0;
    font-size: 0.95rem;
}

/* Component Cards */
.components-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.component-card {
    padding: 2rem;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.component-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.2);
}

.component-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(99, 102, 241, 0.08);
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    line-height: 1;
}

.component-card h4 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.component-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.component-tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ── Architecture Section ── */
.architecture-section {
    padding: 6rem 0;
    background: var(--white);
}

.arch-diagram {
    margin-bottom: 4rem;
}

.arch-flow {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.arch-phase {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.arch-phase.cpc-phase {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(168, 85, 247, 0.04));
    border-color: rgba(99, 102, 241, 0.15);
}

.phase-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.cpc-phase .phase-label {
    color: #6366f1;
}

.arch-pipeline {
    display: flex;
    align-items: center;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-left: 5rem;
}

.arch-node {
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
    min-width: 120px;
}

.arch-node:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.node-icon {
    font-size: 1.3rem;
    color: #6366f1;
    margin-bottom: 0.5rem;
}

.arch-node.transformer .node-icon,
.arch-node.contrast .node-icon {
    color: #8b5cf6;
}

.arch-node.actor .node-icon,
.arch-node.action .node-icon {
    color: #10b981;
}

.node-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.node-detail {
    font-size: 0.75rem;
    color: var(--text-light);
    font-family: 'JetBrains Mono', monospace;
}

.arch-arrow {
    color: var(--text-light);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Loss Cards */
.losses-section h3 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.losses-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.losses-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.loss-card {
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.loss-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.loss-card.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.06));
    border-color: rgba(99, 102, 241, 0.25);
}

.loss-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 0.25rem;
}

.loss-desc {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.loss-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ── Convergence Section ── */
.convergence-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.convergence-section .section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

/* Venn-style Vision Diagram */
.convergence-vision {
    margin-bottom: 4rem;
}

.vision-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 3rem 0;
}

.vision-circle {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.llm-circle {
    background: rgba(59, 130, 246, 0.08);
    border: 2px solid rgba(59, 130, 246, 0.2);
    margin-right: -60px;
    z-index: 1;
}

.rl-circle {
    background: rgba(168, 85, 247, 0.08);
    border: 2px solid rgba(168, 85, 247, 0.2);
    margin-left: -60px;
    z-index: 1;
}

.circle-content {
    text-align: center;
    padding: 2rem;
}

.circle-content i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.llm-circle .circle-content i { color: #3b82f6; }
.rl-circle .circle-content i { color: #a855f7; }

.circle-content h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.circle-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.circle-content li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.2rem 0;
}

.vision-intersection {
    position: absolute;
    z-index: 2;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
    animation: intersectionPulse 3s ease-in-out infinite;
}

@keyframes intersectionPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 60px rgba(99, 102, 241, 0.5); }
}

.intersection-content {
    text-align: center;
    color: #ffffff;
}

.intersection-content i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    display: block;
}

.intersection-content h4 {
    font-size: 0.7rem;
    color: #ffffff;
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

/* Pillar Cards */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.pillar-card {
    padding: 2rem;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.pillar-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.2);
}

.pillar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pillar-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-secondary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.pillar-header h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
}

.pillar-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.pillar-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pillar-tags span {
    padding: 0.25rem 0.6rem;
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Proposed Integrated Architecture */
.proposed-arch h3 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.integrated-diagram {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.layer {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    border: 1px solid var(--border-color);
}

.layer-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.layer-nodes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.int-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    min-width: 140px;
    text-align: center;
}

.int-node i {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.int-node span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.int-node small {
    font-size: 0.75rem;
    color: var(--text-light);
    font-family: 'JetBrains Mono', monospace;
}

.llm-node {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.llm-node i { color: #3b82f6; }

.twister-node {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.twister-node i { color: #6366f1; }

.cpc-node {
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.cpc-node i { color: #a855f7; }

.actor-node {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.actor-node i { color: #10b981; }

.env-node {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.env-node i { color: #f59e0b; }

.int-arrow, .int-arrow-up {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
}

/* ── Results Section ── */
.results-section {
    padding: 6rem 0;
    background: linear-gradient(160deg, #0f172a, #1e1b4b);
    color: #ffffff;
}

.results-section .section-header h2 {
    color: #ffffff;
}

.results-section .section-header p {
    color: #94a3b8;
}

.results-section .lab-badge {
    background: rgba(129, 140, 248, 0.15);
    color: #a5b4fc;
    border-color: rgba(129, 140, 248, 0.25);
}

.results-showcase {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.result-bar-chart {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
}

.chart-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chart-bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    width: 80px;
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: right;
    flex-shrink: 0;
}

.bar-track {
    flex: 1;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.3), rgba(99, 102, 241, 0.6));
}

.bar-fill.twister {
    background: linear-gradient(90deg, #6366f1, #a855f7);
}

.chart-bar-row.highlight .bar-label {
    color: #a5b4fc;
    font-weight: 600;
}

.bar-fill.animated {
    width: calc(var(--target-width) * 1%);
}

.chart-baseline {
    position: relative;
    height: 20px;
    margin-top: 0.5rem;
    margin-left: calc(80px + 1rem);
}

.baseline-marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}

.baseline-marker::before {
    content: '';
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 300px;
    background: rgba(245, 158, 11, 0.3);
    pointer-events: none;
    z-index: -1;
}

.baseline-marker span {
    font-size: 0.75rem;
    color: #f59e0b;
    white-space: nowrap;
}

.result-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.highlight-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.highlight-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.highlight-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: #a5b4fc;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.highlight-number span {
    font-size: 1.5rem;
    color: #64748b;
}

.highlight-card p {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* ── CTA Section ── */
.lab-cta {
    padding: 6rem 0;
    background: var(--white);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.cta-content .hero-buttons {
    justify-content: center;
}

/* ── Scroll Animations ── */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .losses-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .results-showcase {
        grid-template-columns: 1fr;
    }

    .result-highlights {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .lab-hero {
        padding-top: 70px;
    }

    .lab-hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .lab-stat-divider {
        width: 40px;
        height: 1px;
    }

    .motivation-body {
        grid-template-columns: 1fr;
    }

    .vision-venn {
        transform: scale(0.85);
        transform-origin: center;
    }

    .motivation-conclusion blockquote {
        font-size: 1.1rem;
        padding: 1.5rem;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .twister-intro {
        grid-template-columns: 1fr;
    }

    .insight-comparison {
        grid-template-columns: 1fr;
    }

    .components-grid {
        grid-template-columns: 1fr;
    }

    .losses-grid {
        grid-template-columns: 1fr 1fr;
    }

    .vision-diagram {
        flex-direction: column;
    }

    .vision-circle {
        width: 260px;
        height: 260px;
        margin: 0 !important;
    }

    .llm-circle { margin-bottom: -40px !important; }
    .rl-circle { margin-top: -40px !important; }

    .vision-intersection {
        z-index: 3;
    }

    .pillars-grid {
        grid-template-columns: 1fr;
    }

    .result-highlights {
        flex-direction: column;
    }

    .arch-pipeline {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s ease-in-out;
        gap: 1.5rem;
        display: flex;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: block;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .lab-hero-content {
        padding: 2rem 0;
    }

    .lab-hero h1 {
        font-size: 2.8rem;
    }

    .losses-grid {
        grid-template-columns: 1fr;
    }

    .code-block {
        font-size: 0.75rem;
    }

    .integrated-diagram {
        padding: 0;
    }

    .int-node {
        min-width: 110px;
        padding: 0.75rem 1rem;
    }
}
