/* AI Virtual Cell - unified deep space bio system */

:root {
    --bg-primary: #08111f;
    --bg-secondary: #0f1b2f;
    --bg-tertiary: #16253d;
    --bg-elevated: rgba(17, 29, 50, 0.82);
    --surface-soft: rgba(255, 255, 255, 0.03);
    --surface-strong: rgba(255, 255, 255, 0.06);
    --text-primary: #eef4ff;
    --text-secondary: #a7b6cf;
    --text-muted: #72819a;
    --green: #35d67f;
    --green-strong: #1fb86a;
    --green-glow: rgba(53, 214, 127, 0.28);
    --blue: #54a9ff;
    --blue-glow: rgba(84, 169, 255, 0.24);
    --purple: #b07bff;
    --purple-glow: rgba(176, 123, 255, 0.24);
    --amber: #f0b34a;
    --pink: #f670b7;
    --red: #ff6d7a;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.34);
    --shadow-md: 0 18px 38px rgba(0, 0, 0, 0.24);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container: 1180px;
    --section-space: 96px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
    background:
        radial-gradient(circle at 12% 18%, rgba(53, 214, 127, 0.14), transparent 22%),
        radial-gradient(circle at 82% 12%, rgba(84, 169, 255, 0.14), transparent 22%),
        radial-gradient(circle at 70% 78%, rgba(176, 123, 255, 0.12), transparent 24%),
        linear-gradient(180deg, #08111f 0%, #091523 45%, #07101c 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
    opacity: 0.28;
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img, svg { display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

#particles-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.page {
    position: relative;
    z-index: 1;
    padding-top: 88px;
}

.section {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
    padding: var(--section-space) 0;
}

.section-tight { padding-top: 40px; }
.section-compact { padding-top: 64px; padding-bottom: 64px; }
.section.section-wide {
    width: min(1400px, calc(100% - 40px));
}

.page-hero {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 54px;
}

.page-hero.compact { padding-bottom: 24px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.eyebrow::before {
    content: "";
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--green));
}

.page-title,
.hero-title {
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.page-title { font-size: clamp(34px, 5vw, 52px); }

.page-subtitle,
.hero-subtitle,
.section-header p,
.lead {
    margin: 16px 0 0;
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.75;
    max-width: 760px;
}

.hero-subtitle { max-width: 680px; }
.muted { color: var(--text-secondary); }
.small { font-size: 13px; color: var(--text-muted); }

.section-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero-grid,
.split-layout,
.mapping-layout,
.doc-layout,
.timeline-summary,
.contribute-layout {
    display: grid;
    gap: 28px;
}

.hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: center; }
.split-layout,
.mapping-layout,
.doc-layout,
.contribute-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timeline-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.surface,
.card,
.glass-card,
.metric-card,
.flow-card,
.doc-card,
.case-panel,
.story-block {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
    box-shadow: var(--shadow-md);
}

.card,
.glass-card,
.metric-card,
.flow-card,
.doc-card,
.case-panel,
.story-block {
    padding: 28px;
}

.glass-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.card:hover,
.doc-card:hover,
.metric-card:hover,
.story-block:hover {
    transform: translateY(-4px);
    border-color: rgba(84, 169, 255, 0.22);
    box-shadow: var(--shadow-lg);
}

.card,
.doc-card,
.metric-card,
.story-block,
.case-tab,
.btn,
.nav-links a,
.nav-github,
.mobile-menu a {
    transition:
        transform 220ms var(--ease),
        background-color 220ms var(--ease),
        border-color 220ms var(--ease),
        color 220ms var(--ease),
        box-shadow 220ms var(--ease),
        opacity 220ms var(--ease);
}

.metric-grid,
.stats-grid { display: grid; gap: 18px; }
.metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.metric-card,
.stat-card {
    text-align: left;
    position: relative;
    overflow: hidden;
}

.metric-card::before,
.stat-card::before {
    content: "";
    position: absolute;
    top: -28px;
    right: -28px;
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(84,169,255,0.16), transparent 68%);
}

.metric-value,
.stat-value {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.metric-label,
.stat-label {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.stack { display: grid; gap: 18px; }
.stack-sm { display: grid; gap: 12px; }
.inline-stack { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-actions,
.cta-row,
.card-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.btn-primary {
    color: #06111e;
    background: linear-gradient(135deg, var(--green), #6de2a3);
    box-shadow: 0 8px 24px var(--green-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px var(--green-glow);
}

.btn-outline {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: rgba(255,255,255,0.02);
}

.btn-outline:hover {
    transform: translateY(-2px);
    border-color: rgba(84, 169, 255, 0.42);
    box-shadow: 0 10px 28px rgba(84, 169, 255, 0.12);
}

.priority-filter.active {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(84,169,255,0.18), rgba(84,169,255,0.08));
    border-color: rgba(84,169,255,0.4);
    box-shadow: 0 8px 20px rgba(84,169,255,0.16);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}
.tag-green { color: #9cecbc; background: rgba(53,214,127,0.12); border-color: rgba(53,214,127,0.22); }
.tag-blue { color: #b9dcff; background: rgba(84,169,255,0.14); border-color: rgba(84,169,255,0.24); }
.tag-purple { color: #ddc8ff; background: rgba(176,123,255,0.14); border-color: rgba(176,123,255,0.24); }
.tag-pink { color: #ffc8e4; background: rgba(246,112,183,0.14); border-color: rgba(246,112,183,0.24); }
.tag-amber { color: #ffd99b; background: rgba(240,179,74,0.14); border-color: rgba(240,179,74,0.24); }
.tag-red { color: #ffb5bc; background: rgba(255,109,122,0.14); border-color: rgba(255,109,122,0.26); }

.glow-green { color: var(--green); text-shadow: 0 0 20px rgba(53, 214, 127, 0.26); }
.glow-blue { color: var(--blue); text-shadow: 0 0 20px rgba(84, 169, 255, 0.22); }
.glow-purple { color: var(--purple); text-shadow: 0 0 20px rgba(176, 123, 255, 0.22); }

.icon-badge {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.icon-badge svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.icon-green { color: var(--green); }
.icon-blue { color: var(--blue); }
.icon-purple { color: var(--purple); }
.icon-amber { color: var(--amber); }
.icon-red { color: var(--red); }

.kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.card-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.card-subtitle {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.copy,
.body-copy {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.75;
}

.list-clean,
.mapping-list,
.check-list,
.step-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.list-clean li,
.mapping-list li,
.check-list li,
.step-list li {
    position: relative;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
}

.list-clean li::before,
.mapping-list li::before,
.check-list li::before,
.step-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.9;
}

.list-clean li strong,
.mapping-list li strong { color: var(--text-primary); }

.divider-list {
    display: grid;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.divider-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
}
.divider-list li:last-child { border-bottom: none; }

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding: 14px 0;
}

.nav.scrolled {
    background: rgba(7, 16, 28, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.nav-inner {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
    min-height: 58px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 999px;
    background: rgba(10, 19, 34, 0.62);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.nav-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(53,214,127,0.18), rgba(84,169,255,0.16));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 18px rgba(53,214,127,0.14);
}

.nav-mark svg {
    width: 18px;
    height: 18px;
    color: var(--green);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

.nav-github {
    background: linear-gradient(135deg, rgba(53,214,127,0.18), rgba(84,169,255,0.18));
    border: 1px solid rgba(84,169,255,0.16);
    color: var(--text-primary) !important;
}

.nav-github:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(84,169,255,0.12);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 20px;
    right: 20px;
    z-index: 99;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(11, 21, 37, 0.94);
    box-shadow: var(--shadow-lg);
}
.mobile-menu.active { display: grid; gap: 8px; }
.mobile-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--text-secondary);
}
.mobile-menu a:hover,
.mobile-menu a.active {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.hero-visual,
.orbit-panel {
    position: relative;
    min-height: 420px;
}

.orbit-panel {
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    background:
        radial-gradient(circle at 48% 45%, rgba(53,214,127,0.16), transparent 42%),
        radial-gradient(circle at 72% 28%, rgba(84,169,255,0.08), transparent 32%),
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    overflow: hidden;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08);
}

.orbit-grid {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 20px 20px, 64px 64px, 64px 64px;
    opacity: 0.35;
}

.orbit-ring,
.orbit-core,
.orbit-node {
    position: absolute;
    border-radius: 999px;
}

.orbit-ring {
    inset: 56px;
    border: 1px solid rgba(84,169,255,0.18);
    box-shadow: 0 0 20px rgba(84,169,255,0.08);
    animation: orbit-ring-rotate 40s linear infinite;
}

.orbit-ring.ring-2 {
    inset: 110px;
    border-color: rgba(176,123,255,0.18);
    box-shadow: 0 0 16px rgba(176,123,255,0.06);
    animation: orbit-ring-rotate 60s linear infinite reverse;
}

@keyframes orbit-ring-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orbit-core {
    inset: calc(50% - 62px);
    width: 124px;
    height: 124px;
    background: radial-gradient(circle at 32% 32%, rgba(127,255,186,0.95), rgba(53,214,127,0.7) 35%, rgba(29,115,80,0.5) 60%, rgba(9,24,39,0.9) 85%);
    box-shadow:
        0 0 50px rgba(53,214,127,0.32),
        0 0 100px rgba(53,214,127,0.16),
        inset 0 2px 8px rgba(255,255,255,0.2);
    animation: core-pulse 4s ease-in-out infinite;
}

@keyframes core-pulse {
    0%, 100% {
        box-shadow: 0 0 50px rgba(53,214,127,0.32), 0 0 100px rgba(53,214,127,0.16), inset 0 2px 8px rgba(255,255,255,0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 60px rgba(53,214,127,0.4), 0 0 120px rgba(53,214,127,0.2), inset 0 2px 8px rgba(255,255,255,0.25);
        transform: scale(1.05);
    }
}

.orbit-node {
    width: 70px;
    height: 70px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(135deg, rgba(8,17,31,0.85), rgba(15,27,47,0.75));
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 12px 28px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.08);
    transition: all 320ms var(--ease);
    animation: orbit-node-float 3s ease-in-out infinite;
}

@keyframes orbit-node-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.orbit-node:hover {
    transform: scale(1.08) translateY(-4px);
    border-color: currentColor;
    box-shadow:
        0 16px 36px rgba(0,0,0,0.4),
        0 0 24px currentColor,
        inset 0 1px 0 rgba(255,255,255,0.12);
    animation: none;
}

.orbit-node svg {
    width: 24px;
    height: 24px;
    animation: orbit-node-icon-pulse 2.4s ease-in-out infinite;
}

.orbit-node:hover svg {
    animation: orbit-node-icon-spin 0.6s ease-out;
}

@keyframes orbit-node-icon-pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes orbit-node-icon-spin {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.15); }
}

.node-a {
    top: 62px;
    left: 56px;
    color: var(--green);
    animation-delay: 0s;
}

.node-b {
    top: 96px;
    right: 64px;
    color: var(--blue);
    animation-delay: 0.75s;
}

.node-c {
    bottom: 82px;
    left: 82px;
    color: var(--purple);
    animation-delay: 1.5s;
}

.node-d {
    bottom: 58px;
    right: 110px;
    color: var(--amber);
    animation-delay: 2.25s;
}
.node-d { bottom: 58px; right: 110px; color: var(--amber); }

.hero-notes {
    position: absolute;
    left: 30px;
    right: 30px;
    bottom: 28px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.note-chip {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(135deg, rgba(8,17,31,0.88), rgba(15,27,47,0.82));
    backdrop-filter: blur(12px);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transition: all 280ms var(--ease);
}
.note-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}
.note-chip strong {
    display: block;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 14px;
}

.comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.comparison-card { padding: 28px; }
.comparison-card.alert { border-color: rgba(255,109,122,0.18); }
.comparison-card.good { border-color: rgba(53,214,127,0.18); }
.comparison-card h3 { margin: 0 0 16px; font-size: 18px; }

.nav-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.story-block h3,
.doc-card h3,
.metric-card h3 { margin: 0; }
.story-block p,
.doc-card p { margin: 10px 0 0; }
.story-link { color: var(--green); font-size: 13px; font-weight: 700; margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; }

.table-wrapper {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255,255,255,0.02);
}
.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}
.table-wrapper th {
    text-align: left;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.table-wrapper td {
    padding: 16px;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    vertical-align: top;
}
.table-wrapper td strong,
.table-wrapper td .table-strong { color: var(--text-primary); }

.code-block {
    margin: 0;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(0,0,0,0.32), rgba(255,255,255,0.02));
    font-family: "JetBrains Mono", "Fira Code", Menlo, monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #e4efff;
    overflow: auto;
}

.timeline {
    position: relative;
    padding-left: 36px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--green), var(--blue), var(--purple));
}
.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 22px;
}
.timeline-item::before {
    content: "";
    position: absolute;
    left: -36px;
    top: 12px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--bg-primary);
    border: 3px solid var(--green);
    box-shadow: 0 0 14px var(--green-glow);
}
.timeline-item.future::before {
    border-color: rgba(255,255,255,0.2);
    box-shadow: none;
}
.timeline-item.active::before { background: var(--green); }

.progress-item { display: grid; gap: 8px; }
.progress-head { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; color: var(--text-secondary); }
.progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    transition: width 800ms var(--ease);
}
.progress-bar.green { background: linear-gradient(90deg, var(--green), #6be4a3); }
.progress-bar.blue { background: linear-gradient(90deg, var(--blue), #91c4ff); }
.progress-bar.purple { background: linear-gradient(90deg, var(--purple), #d4b7ff); }

.mapping-overview {
    display: grid;
    gap: 26px;
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.flow-card {
    position: relative;
    min-height: 100%;
}
.flow-card::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -12px;
    width: 24px;
    height: 1px;
    background: linear-gradient(90deg, rgba(84,169,255,0.0), rgba(84,169,255,0.55));
}
.flow-card:last-child::after { display: none; }
.flow-index {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #06111e;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--green), #6de2a3);
    margin-bottom: 12px;
}

.mapping-strands {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    align-items: stretch;
}

.axis-card {
    padding: 26px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}
.axis-card h3 { margin: 0 0 14px; font-size: 18px; }
.axis-card .axis-label { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }

.bridge-column {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
}
.bridge-pill {
    min-width: 138px;
    text-align: center;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid rgba(84,169,255,0.18);
    background: rgba(84,169,255,0.07);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
}

.case-shell {
    display: grid;
    gap: 22px;
}
.case-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
.case-tab {
    min-height: 82px;
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 16px 18px;
    text-align: left;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}
.case-tab::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(84,169,255,0.0), rgba(84,169,255,0.05));
    opacity: 0;
    transition: opacity 280ms var(--ease);
}
.case-tab:hover {
    border-color: rgba(84,169,255,0.22);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.case-tab:hover::before { opacity: 1; }
.case-tab.active {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(84,169,255,0.18), rgba(84,169,255,0.08));
    border-color: rgba(84,169,255,0.4);
    box-shadow:
        0 14px 32px rgba(84,169,255,0.16),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transform: translateY(-2px);
}
.case-tab.active::before { opacity: 0; }
.case-tab strong {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    position: relative;
    z-index: 1;
}
.case-tab span {
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}
.case-panel { display: none; }
.case-panel.active { display: block; }
.case-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.case-title {
    margin: 10px 0 6px;
    font-size: 28px;
    line-height: 1.08;
}
.case-subtitle { margin: 0; color: var(--text-muted); font-size: 14px; }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.case-block {
    padding: 22px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.025);
}
.case-block h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.case-foot {
    margin-top: 22px;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1px solid rgba(53,214,127,0.14);
    background: linear-gradient(180deg, rgba(53,214,127,0.08), rgba(53,214,127,0.03));
}
.case-foot h4 { margin: 0 0 10px; font-size: 15px; }

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.matrix-card {
    padding: 22px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.025);
}
.matrix-card h3 { margin: 0 0 10px; font-size: 18px; }

.doc-card {
    display: grid;
    gap: 12px;
    min-height: 100%;
}
.doc-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.doc-card h3 { font-size: 18px; }
.doc-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.doc-card .story-link { margin-top: auto; }

.role-list,
.topic-grid {
    display: grid;
    gap: 14px;
}
.role-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.role-card,
.topic-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.025);
}
.role-card h4,
.topic-card h4 { margin: 0 0 6px; font-size: 15px; }
.role-card p,
.topic-card p { margin: 0; color: var(--text-secondary); font-size: 13px; }

.number-step {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #06111e;
}
.number-step.green { background: var(--green); }
.number-step.blue { background: var(--blue); }
.number-step.purple { background: var(--purple); color: white; }
.number-step.amber { background: var(--amber); }

/* Mapping matrix grid visualization */
.mapping-matrix-grid {
    background: rgba(8,17,31,0.6);
    border-radius: 16px;
    padding: 24px;
    overflow-x: auto;
}

.matrix-header {
    display: flex;
    margin-bottom: 8px;
}

.matrix-corner {
    width: 120px;
    flex-shrink: 0;
}

.matrix-ai-labels {
    display: grid;
    grid-template-columns: repeat(15, 60px);
    gap: 4px;
    flex: 1;
}

.matrix-ai-labels span {
    font-size: 10px;
    color: var(--text-muted);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 4px 0;
    font-weight: 600;
}

.matrix-body {
    display: flex;
}

.matrix-bio-labels {
    width: 120px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.matrix-bio-labels span {
    height: 40px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding-right: 8px;
    text-align: right;
    font-weight: 600;
}

.matrix-cells {
    display: grid;
    grid-template-columns: repeat(15, 60px);
    grid-template-rows: repeat(13, 40px);
    gap: 4px;
    flex: 1;
}

.matrix-cell {
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 200ms ease;
    position: relative;
}

.matrix-cell:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.matrix-cell.mapping-strong {
    background: linear-gradient(135deg, rgba(53,214,127,0.6), rgba(53,214,127,0.4));
    border-color: rgba(53,214,127,0.8);
}

.matrix-cell.mapping-medium {
    background: linear-gradient(135deg, rgba(84,169,255,0.5), rgba(84,169,255,0.3));
    border-color: rgba(84,169,255,0.6);
}

.matrix-cell.mapping-weak {
    background: linear-gradient(135deg, rgba(240,179,74,0.4), rgba(240,179,74,0.2));
    border-color: rgba(240,179,74,0.5);
}

.matrix-cell.mapping-empty {
    background: rgba(255,255,255,0.02);
    border-style: dashed;
    border-color: rgba(255,255,255,0.06);
}

.matrix-cell.mapping-empty:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

@media (max-width: 1200px) {
    .matrix-ai-labels {
        grid-template-columns: repeat(15, 50px);
    }

    .matrix-cells {
        grid-template-columns: repeat(15, 50px);
        grid-template-rows: repeat(13, 35px);
    }

    .matrix-bio-labels span {
        height: 35px;
        font-size: 10px;
    }
}

@media (max-width: 760px) {
    .mapping-matrix-grid {
        padding: 16px;
    }

    .matrix-corner,
    .matrix-bio-labels {
        width: 100px;
    }

    .matrix-ai-labels {
        grid-template-columns: repeat(15, 40px);
    }

    .matrix-ai-labels span {
        font-size: 9px;
        height: 100px;
    }

    .matrix-cells {
        grid-template-columns: repeat(15, 40px);
        grid-template-rows: repeat(13, 30px);
    }

    .matrix-bio-labels span {
        height: 30px;
        font-size: 9px;
    }
}

/* Mapping matrix table */
.mapping-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: rgba(8,17,31,0.6);
    border-radius: 12px;
    overflow: hidden;
}

.mapping-matrix-table thead {
    background: linear-gradient(135deg, rgba(84,169,255,0.15), rgba(84,169,255,0.08));
    position: sticky;
    top: 0;
    z-index: 10;
}

.mapping-matrix-table th {
    padding: 16px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    border-bottom: 2px solid rgba(84,169,255,0.3);
}

.mapping-matrix-table td {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    line-height: 1.6;
}

.mapping-matrix-table tbody tr {
    transition: background 200ms ease;
}

.mapping-matrix-table tbody tr:hover {
    background: rgba(84,169,255,0.08);
}

.mapping-matrix-table tbody tr.mapping-strong {
    background: linear-gradient(90deg, rgba(53,214,127,0.08), transparent);
}

.mapping-matrix-table tbody tr.mapping-strong:hover {
    background: linear-gradient(90deg, rgba(53,214,127,0.12), rgba(84,169,255,0.08));
}

.mapping-matrix-table tbody tr.mapping-medium {
    background: linear-gradient(90deg, rgba(84,169,255,0.06), transparent);
}

.mapping-matrix-table tbody tr.mapping-medium:hover {
    background: linear-gradient(90deg, rgba(84,169,255,0.1), rgba(84,169,255,0.08));
}

.mapping-matrix-table tbody tr.mapping-weak {
    background: linear-gradient(90deg, rgba(240,179,74,0.06), transparent);
}

.mapping-matrix-table tbody tr.mapping-weak:hover {
    background: linear-gradient(90deg, rgba(240,179,74,0.1), rgba(84,169,255,0.08));
}

.mapping-matrix-table td strong {
    color: var(--text-primary);
    font-weight: 700;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

@media (max-width: 760px) {
    .mapping-matrix-table {
        font-size: 12px;
    }

    .mapping-matrix-table th,
    .mapping-matrix-table td {
        padding: 12px 10px;
    }
}

/* Component mapping styles */
.component-mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

.component-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 24px;
    transition: all 300ms ease;
}

.component-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
    border-color: rgba(84,169,255,0.4);
}

.component-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.component-bio,
.component-ai {
    flex: 1;
    text-align: center;
}

.component-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.component-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.component-arrow {
    font-size: 24px;
    color: var(--blue);
    font-weight: 700;
}

.component-body {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 16px;
}

.component-logic {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.component-details {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.component-details li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.component-details li:last-child {
    border-bottom: none;
}

.component-example {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.component-example strong {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--blue);
}

.component-example pre {
    margin: 0;
    overflow-x: auto;
}

.component-example code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Process mapping styles */
.process-mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.process-card {
    background: linear-gradient(135deg, rgba(84,169,255,0.08), rgba(84,169,255,0.02));
    border: 1px solid rgba(84,169,255,0.2);
    border-radius: 10px;
    padding: 20px;
    transition: all 250ms ease;
}

.process-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(84,169,255,0.2);
}

.process-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.process-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.process-arrow {
    font-size: 18px;
    color: var(--blue);
    font-weight: 700;
}

.process-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 760px) {
    .component-mapping-grid {
        grid-template-columns: 1fr;
    }

    .component-header {
        flex-direction: column;
        gap: 12px;
    }

    .component-arrow {
        transform: rotate(90deg);
    }

    .process-mapping-grid {
        grid-template-columns: 1fr;
    }
}

/* Architecture comparison styles */
.arch-part {
    cursor: pointer;
    transition: opacity 180ms ease, filter 180ms ease;
}

.arch-part.is-active {
    filter: drop-shadow(0 0 8px rgba(84,169,255,0.7));
}

.arch-part.is-dimmed {
    opacity: 0.25;
}

.architecture-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
    margin-top: 32px;
}

.architecture-side {
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 24px;
}

.architecture-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

@media (max-width: 1024px) {
    .architecture-comparison {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Architecture comparison — living animations */
.architecture-side svg {
    overflow: visible;
}

.architecture-side svg text {
    pointer-events: none;
}

/* Cell side */
.cell-membrane {
    transform-box: fill-box;
    transform-origin: center;
    animation: cell-breathe 6s ease-in-out infinite;
}

.cell-membrane,
.sw-gateway {
    stroke-dashoffset: 0;
    animation-name: cell-breathe, membrane-dash;
    animation-duration: 6s, 14s;
    animation-timing-function: ease-in-out, linear;
    animation-iteration-count: infinite, infinite;
}

.sw-gateway {
    transform-box: fill-box;
    transform-origin: center;
    animation-name: sw-gateway-pulse, membrane-dash;
    animation-duration: 5s, 10s;
    animation-timing-function: ease-in-out, linear;
    animation-iteration-count: infinite, infinite;
}

.cell-nucleus {
    transform-box: fill-box;
    transform-origin: center;
    animation: cell-nucleus-pulse 4.2s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(53, 214, 127, 0.35));
}

.cell-mito {
    transform-box: fill-box;
    transform-origin: center;
    animation: cell-mito-glow 2.6s ease-in-out infinite;
}

.cell-mito--b {
    animation-delay: -1.3s;
}

.cell-ribosome {
    transform-box: fill-box;
    transform-origin: center;
    animation: cell-ribosome-drift 5s ease-in-out infinite;
}

.cell-ribosome--a {
    animation-duration: 5.2s;
}

.cell-ribosome--b {
    animation-duration: 6s;
    animation-delay: -2s;
}

.cell-er {
    stroke-dasharray: 140;
    stroke-dashoffset: 140;
    animation: cell-er-flow 3.4s ease-in-out infinite;
}

.cell-er--b {
    animation-delay: -1.7s;
}

.cell-golgi-strip {
    transform-box: fill-box;
    transform-origin: center;
    animation: cell-golgi-shift 2.8s ease-in-out infinite;
}

.cell-golgi-strip--2 {
    animation-delay: -0.6s;
}

.cell-golgi-strip--3 {
    animation-delay: -1.2s;
}

.cell-lysosome {
    transform-box: fill-box;
    transform-origin: center;
    animation: cell-lysosome-pulse 3.2s ease-in-out infinite;
}

/* Software side */
.sw-scheduler {
    transform-box: fill-box;
    transform-origin: center;
    animation: sw-scheduler-pulse 3.6s ease-in-out infinite;
}

.sw-gpu {
    transform-box: fill-box;
    transform-origin: center;
    animation: sw-gpu-load 2.4s ease-in-out infinite;
}

.sw-gpu--b {
    animation-delay: -1.2s;
}

.sw-codegen {
    transform-box: fill-box;
    transform-origin: center;
    animation: sw-codegen-blink 1.6s ease-in-out infinite;
}

.sw-codegen--b {
    animation-delay: -0.8s;
}

.sw-queue-flow {
    stroke-dasharray: 20 80;
    stroke-dashoffset: 0;
    animation: sw-queue-flow 2.2s linear infinite;
}

.sw-queue-flow--delay {
    animation-delay: -1.1s;
}

.sw-formatter {
    transform-box: fill-box;
    transform-origin: left center;
    animation: sw-formatter-scan 2.4s ease-in-out infinite;
}

.sw-formatter--2 {
    animation-delay: -0.35s;
}

.sw-formatter--3 {
    animation-delay: -0.7s;
}

.sw-gc {
    transform-box: fill-box;
    transform-origin: center;
    animation: sw-gc-sweep 4s ease-in-out infinite;
}

/* Connector between the two sides */
.architecture-arrow-inner {
    position: relative;
    width: 72px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.architecture-arrow-line {
    position: absolute;
    inset: 50% 0 auto 0;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(53, 214, 127, 0.55), rgba(84, 169, 255, 0.55));
    border-radius: 999px;
    opacity: 0.7;
}

.architecture-arrow-dot {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.architecture-arrow-dot--ltr {
    left: 0;
    color: var(--green);
    background: var(--green);
    animation: arrow-shuttle-ltr 2.4s ease-in-out infinite;
}

.architecture-arrow-dot--rtl {
    right: 0;
    color: var(--blue);
    background: var(--blue);
    animation: arrow-shuttle-rtl 2.4s ease-in-out infinite;
    animation-delay: -1.2s;
}

.architecture-arrow-glyph {
    position: relative;
    font-size: 28px;
    line-height: 1;
    color: var(--text-primary);
    text-shadow: 0 0 12px rgba(84, 169, 255, 0.45);
    animation: arrow-glyph-pulse 3s ease-in-out infinite;
}

@media (max-width: 1024px) {
    .architecture-arrow-inner {
        width: 48px;
        height: 72px;
    }

    .architecture-arrow-line {
        inset: 0 50% 0 50%;
        width: 2px;
        height: auto;
        transform: translateX(-50%);
        background: linear-gradient(180deg, rgba(53, 214, 127, 0.55), rgba(84, 169, 255, 0.55));
    }

    .architecture-arrow-dot {
        left: 50%;
        margin-left: -4px;
        top: auto;
        margin-top: 0;
    }

    .architecture-arrow-dot--ltr {
        top: 0;
        animation-name: arrow-shuttle-ttb;
    }

    .architecture-arrow-dot--rtl {
        bottom: 0;
        top: auto;
        animation-name: arrow-shuttle-btt;
    }
}

/* Pause animations when an element is dimmed (on selection) so focus stays on the highlighted pair */
.arch-part.is-dimmed * {
    animation-play-state: paused;
}

@keyframes cell-breathe {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.015); opacity: 1; }
}

@keyframes membrane-dash {
    to { stroke-dashoffset: -120; }
}

@keyframes cell-nucleus-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(53,214,127,0.25)); }
    50% { transform: scale(1.06); filter: drop-shadow(0 0 14px rgba(53,214,127,0.55)); }
}

@keyframes cell-mito-glow {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(240,179,74,0.2)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(240,179,74,0.65)); }
}

@keyframes cell-ribosome-drift {
    0%, 100% { transform: translate(0, 0); opacity: 0.85; }
    25% { transform: translate(2px, -3px); opacity: 1; }
    50% { transform: translate(-1px, 2px); opacity: 0.8; }
    75% { transform: translate(3px, 1px); opacity: 1; }
}

@keyframes cell-er-flow {
    0% { stroke-dashoffset: 140; opacity: 0.5; }
    50% { opacity: 1; }
    100% { stroke-dashoffset: -140; opacity: 0.5; }
}

@keyframes cell-golgi-shift {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(3px); opacity: 1; }
}

@keyframes cell-lysosome-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(255,100,100,0.3)); }
    50% { transform: scale(1.18); filter: drop-shadow(0 0 8px rgba(255,100,100,0.7)); }
}

@keyframes sw-scheduler-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(84,169,255,0.3)); }
    50% { transform: scale(1.04); filter: drop-shadow(0 0 14px rgba(84,169,255,0.6)); }
}

@keyframes sw-gateway-pulse {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(84,169,255,0.2)); }
    50% { filter: drop-shadow(0 0 12px rgba(84,169,255,0.5)); }
}

@keyframes sw-gpu-load {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(240,179,74,0.2)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 10px rgba(240,179,74,0.7)); transform: scale(1.06); }
}

@keyframes sw-codegen-blink {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@keyframes sw-queue-flow {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

@keyframes sw-formatter-scan {
    0%, 100% { transform: scaleX(0.6); opacity: 0.4; }
    50% { transform: scaleX(1); opacity: 1; }
}

@keyframes sw-gc-sweep {
    0%, 100% { opacity: 0.6; filter: drop-shadow(0 0 2px rgba(255,100,100,0.3)); }
    45% { opacity: 1; filter: drop-shadow(0 0 10px rgba(255,100,100,0.7)); }
    55% { opacity: 0.3; }
}

@keyframes arrow-shuttle-ltr {
    0% { transform: translateX(0); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translateX(64px); opacity: 0; }
}

@keyframes arrow-shuttle-rtl {
    0% { transform: translateX(0); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translateX(-64px); opacity: 0; }
}

@keyframes arrow-shuttle-ttb {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translateY(64px); opacity: 0; }
}

@keyframes arrow-shuttle-btt {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translateY(-64px); opacity: 0; }
}

@keyframes arrow-glyph-pulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.12); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .cell-membrane,
    .sw-gateway,
    .cell-nucleus,
    .cell-mito,
    .cell-ribosome,
    .cell-er,
    .cell-golgi-strip,
    .cell-lysosome,
    .sw-scheduler,
    .sw-gpu,
    .sw-codegen,
    .sw-queue-flow,
    .sw-formatter,
    .sw-gc,
    .architecture-arrow-dot,
    .architecture-arrow-glyph {
        animation: none !important;
    }
}

/* Page navigation */
.page-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 12, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transform: translateY(-100%);
    transition: transform 300ms ease;
}

.page-nav.is-visible {
    transform: translateY(0);
}

.page-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.page-nav-inner::-webkit-scrollbar {
    display: none;
}

.page-nav-link {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 200ms ease;
}

.page-nav-link:hover {
    color: var(--text-primary);
}

.page-nav-link.is-active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

@media (max-width: 760px) {
    .page-nav-inner {
        padding: 0 14px;
        gap: 4px;
    }

    .page-nav-link {
        padding: 12px 12px;
        font-size: 12px;
    }
}

.footer {
    margin-top: 36px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 56px 0 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.03));
}
.footer-inner,
.footer-bottom {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
    gap: 34px;
}
.footer-brand h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
}
.footer-brand p {
    margin: 14px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.75;
}
.footer-links h4 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
}
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { color: var(--text-secondary); font-size: 13px; }
.footer-links a:hover { color: var(--text-primary); }
.footer-contact .contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.footer-contact .wechat-qr {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    object-fit: cover;
}
.footer-contact ul li {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}
.footer-contact ul li svg {
    flex-shrink: 0;
}
.footer-bottom {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 1100px) {
    .hero-grid,
    .split-layout,
    .mapping-layout,
    .doc-layout,
    .contribute-layout,
    .timeline-summary,
    .stats-grid,
    .metric-grid,
    .grid-4,
    .grid-3,
    .nav-cards,
    .flow-grid,
    .matrix-grid,
    .case-nav,
    .role-list,
    .topic-grid,
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mapping-strands { grid-template-columns: 1fr; }
    .bridge-column { grid-auto-flow: column; justify-content: start; overflow: auto; padding: 0; }
}

@media (max-width: 760px) {
    :root { --section-space: 74px; }
    .section,
    .page-hero,
    .nav-inner,
    .footer-inner,
    .footer-bottom { width: calc(100% - 28px); }
    .page { padding-top: 82px; }
    .nav-links { display: none; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .hero-grid,
    .split-layout,
    .mapping-layout,
    .doc-layout,
    .contribute-layout,
    .timeline-summary,
    .grid-2,
    .grid-3,
    .grid-4,
    .stats-grid,
    .metric-grid,
    .nav-cards,
    .flow-grid,
    .matrix-grid,
    .case-grid,
    .case-nav,
    .role-list,
    .topic-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }
    .section-header { margin-bottom: 42px; }
    .hero-notes { grid-template-columns: 1fr; left: 18px; right: 18px; bottom: 18px; }
    .orbit-panel { min-height: 360px; }
    .orbit-ring { inset: 36px; }
    .orbit-ring.ring-2 { inset: 82px; }
    .node-a { top: 32px; left: 26px; }
    .node-b { top: 58px; right: 30px; }
    .node-c { bottom: 64px; left: 34px; }
    .node-d { bottom: 44px; right: 54px; }
    .timeline { padding-left: 28px; }
    .timeline-item::before { left: -28px; }
    .table-wrapper table { min-width: 620px; }
    .card,
    .glass-card,
    .metric-card,
    .flow-card,
    .doc-card,
    .case-panel,
    .story-block { padding: 22px; }
}

/* Component interaction states */
.component-card {
    cursor: pointer;
}

.component-card.is-active {
    border-color: rgba(84,169,255,0.45);
    box-shadow: 0 0 0 1px rgba(84,169,255,0.2), 0 16px 36px rgba(84,169,255,0.12);
    transform: translateY(-4px);
}

.component-card.is-dimmed,
.case-system-card.is-dimmed {
    opacity: 0.42;
    filter: saturate(0.72);
}

.case-system-card.is-highlight {
    border-color: rgba(84,169,255,0.45);
    box-shadow: 0 0 0 1px rgba(84,169,255,0.2), 0 16px 36px rgba(84,169,255,0.12);
    transform: translateY(-4px);
}

.interaction-hint {
    margin: 10px auto 0;
    max-width: 720px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.component-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 0 28px;
}

.component-filter {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: all 200ms ease;
}

.component-filter:hover {
    border-color: rgba(84,169,255,0.3);
    color: var(--text-primary);
}

.component-filter.is-active {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(84,169,255,0.18), rgba(84,169,255,0.08));
    border-color: rgba(84,169,255,0.4);
    box-shadow: 0 8px 20px rgba(84,169,255,0.14);
}

.component-card.is-hidden {
    display: none;
}

@media (max-width: 760px) {
    .component-card.is-dimmed,
    .case-system-card.is-dimmed {
        opacity: 0.65;
    }
}

@media (prefers-reduced-motion: reduce) {
    .component-card.is-active,
    .case-system-card.is-highlight {
        transform: none;
    }
}

/* ========================================
   COMPREHENSIVE PAGE ANIMATIONS
   ======================================== */

/* Process Mapping Cards */
.process-card {
    transition: transform 220ms ease-out, box-shadow 220ms ease-out;
    will-change: transform;
}

.process-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.process-card:active {
    transform: translateY(-2px);
    transition-duration: 100ms;
}

.process-arrow {
    display: inline-block;
    color: var(--blue);
    font-size: 24px;
    font-weight: 300;
    animation: process-arrow-pulse 1.8s ease-in-out infinite;
    transform-origin: center;
}

.process-card:hover .process-arrow {
    animation: process-arrow-burst 0.6s ease-out;
}

@keyframes process-arrow-pulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes process-arrow-burst {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Case System Cards */
.case-system-card {
    transition: transform 220ms ease-out, box-shadow 220ms ease-out;
    will-change: transform;
}

.case-system-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}

.case-system-card:hover .icon-badge {
    transform: scale(1.08);
}

.icon-badge {
    position: relative;
    transition: transform 200ms ease-out;
}

.icon-badge::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    background: radial-gradient(circle at center, currentColor 0%, transparent 70%);
    opacity: 0;
    animation: icon-halo-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

.case-system-card:hover .icon-badge::after {
    animation: icon-halo-rotate 2s linear infinite;
    opacity: 0.25;
}

@keyframes icon-halo-pulse {
    0%, 100% {
        opacity: 0.15;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.1);
    }
}

@keyframes icon-halo-rotate {
    from {
        transform: rotate(0deg) scale(1.05);
        opacity: 0.2;
    }
    to {
        transform: rotate(360deg) scale(1.05);
        opacity: 0.3;
    }
}

.icon-badge svg {
    display: block;
    transition: transform 200ms ease-out;
}

.case-system-card:hover .icon-badge svg {
    transform: rotate(8deg);
}

/* Flow Cards (Application Steps) */
.flow-card {
    transition: transform 220ms ease-out, box-shadow 220ms ease-out;
    will-change: transform;
}

.flow-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.flow-card:hover .flow-index {
    transform: scale(1.12);
}

.flow-index {
    position: relative;
    transition: transform 200ms ease-out;
}

.flow-index::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: conic-gradient(
        from 0deg,
        var(--blue) 0%,
        var(--green) 50%,
        var(--blue) 100%
    );
    opacity: 0;
    animation: flow-index-spin 4s linear infinite;
    z-index: -1;
}

.flow-card:hover .flow-index::before {
    opacity: 0.6;
}

@keyframes flow-index-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Principle Cards Icons */
.icon-green svg {
    filter: drop-shadow(0 0 4px rgba(53,214,127,0.4));
    animation: icon-glow-green 2.4s ease-in-out infinite;
    transition: transform 200ms ease-out;
}

.icon-badge.icon-green:hover svg {
    transform: rotate(12deg) scale(1.1);
    filter: drop-shadow(0 0 8px rgba(53,214,127,0.6));
}

.icon-badge.icon-red svg {
    filter: drop-shadow(0 0 4px rgba(255,100,100,0.4));
    animation: icon-glow-red 2.4s ease-in-out infinite;
    transition: transform 200ms ease-out;
}

.icon-badge.icon-red:hover svg {
    transform: rotate(-12deg) scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255,100,100,0.6));
}

@keyframes icon-glow-green {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(53,214,127,0.3));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(53,214,127,0.7));
    }
}

@keyframes icon-glow-red {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(255,100,100,0.3));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(255,100,100,0.7));
    }
}

/* Component Cards Enhancement */
.component-card {
    transition: transform 200ms ease-out, box-shadow 200ms ease-out, border-color 200ms ease-out;
}

.component-card:hover {
    transform: translateY(-3px);
    border-color: rgba(84,169,255,0.3);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.component-card.is-active {
    border-color: rgba(84,169,255,0.6);
    box-shadow: 0 0 0 2px rgba(84,169,255,0.2), 0 12px 24px rgba(0,0,0,0.15);
    animation: component-highlight-pulse 1.2s ease-in-out;
}

@keyframes component-highlight-pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(84,169,255,0.2), 0 12px 24px rgba(0,0,0,0.15);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(84,169,255,0.4), 0 16px 32px rgba(0,0,0,0.2);
    }
}

/* Scroll-triggered Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for grid children */
.grid-3.reveal.is-visible > *,
.grid-2.reveal.is-visible > *,
.process-mapping-grid.reveal.is-visible > *,
.flow-grid.reveal.is-visible > * {
    animation: stagger-fade-in 500ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.grid-3.reveal.is-visible > *:nth-child(1),
.grid-2.reveal.is-visible > *:nth-child(1),
.process-mapping-grid.reveal.is-visible > *:nth-child(1),
.flow-grid.reveal.is-visible > *:nth-child(1) {
    animation-delay: 0ms;
}

.grid-3.reveal.is-visible > *:nth-child(2),
.grid-2.reveal.is-visible > *:nth-child(2),
.process-mapping-grid.reveal.is-visible > *:nth-child(2),
.flow-grid.reveal.is-visible > *:nth-child(2) {
    animation-delay: 60ms;
}

.grid-3.reveal.is-visible > *:nth-child(3),
.process-mapping-grid.reveal.is-visible > *:nth-child(3),
.flow-grid.reveal.is-visible > *:nth-child(3) {
    animation-delay: 120ms;
}

.process-mapping-grid.reveal.is-visible > *:nth-child(4) {
    animation-delay: 180ms;
}

.process-mapping-grid.reveal.is-visible > *:nth-child(5) {
    animation-delay: 240ms;
}

.process-mapping-grid.reveal.is-visible > *:nth-child(6) {
    animation-delay: 300ms;
}

@keyframes stagger-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Code Block Subtle Highlight */
.code-block {
    position: relative;
    overflow: hidden;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(84,169,255,0.08) 50%,
        transparent 100%
    );
    animation: code-shimmer 3s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes code-shimmer {
    0%, 90%, 100% {
        left: -100%;
    }
    45% {
        left: 100%;
    }
}

/* Performance Optimization */
.process-card,
.case-system-card,
.flow-card,
.component-card {
    will-change: transform;
}

.process-arrow,
.icon-badge,
.flow-index {
    will-change: transform;
    transform: translateZ(0);
}

/* Metric Cards - Number Counter Animation */
.metric-value {
    font-variant-numeric: tabular-nums;
    transition: transform 200ms ease-out;
}

.metric-card:hover .metric-value {
    transform: scale(1.08);
}

.metric-value.glow-green {
    text-shadow: 0 0 20px rgba(53,214,127,0.4);
    animation: metric-glow-green 3s ease-in-out infinite;
}

.metric-value.glow-blue {
    text-shadow: 0 0 20px rgba(84,169,255,0.4);
    animation: metric-glow-blue 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

.metric-value.glow-purple {
    text-shadow: 0 0 20px rgba(176,123,255,0.4);
    animation: metric-glow-purple 3s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes metric-glow-green {
    0%, 100% { text-shadow: 0 0 15px rgba(53,214,127,0.3); }
    50% { text-shadow: 0 0 30px rgba(53,214,127,0.7); }
}

@keyframes metric-glow-blue {
    0%, 100% { text-shadow: 0 0 15px rgba(84,169,255,0.3); }
    50% { text-shadow: 0 0 30px rgba(84,169,255,0.7); }
}

@keyframes metric-glow-purple {
    0%, 100% { text-shadow: 0 0 15px rgba(176,123,255,0.3); }
    50% { text-shadow: 0 0 30px rgba(176,123,255,0.7); }
}

/* Component Card Icons (Emoji) */
.component-icon {
    display: inline-block;
    font-size: 24px;
    transition: transform 200ms ease-out;
}

.component-card:hover .component-bio .component-icon {
    animation: component-icon-bounce 0.6s ease-out;
}

.component-card:hover .component-ai .component-icon {
    animation: component-icon-spin 0.6s ease-out;
}

@keyframes component-icon-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-8px) scale(1.1); }
    60% { transform: translateY(-4px) scale(1.05); }
}

@keyframes component-icon-spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Component Card Arrow */
.component-arrow {
    display: inline-block;
    color: var(--blue);
    font-size: 20px;
    font-weight: 300;
    transition: transform 200ms ease-out, color 200ms ease-out;
    animation: component-arrow-pulse 2.4s ease-in-out infinite;
}

.component-card:hover .component-arrow {
    animation: component-arrow-flow 0.8s ease-in-out;
    color: var(--green);
}

@keyframes component-arrow-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes component-arrow-flow {
    0% { transform: translateX(0) scale(1); opacity: 1; }
    50% { transform: translateX(8px) scale(1.3); opacity: 0.7; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

/* Icon Badge Color Variants */
.icon-badge.icon-blue svg {
    filter: drop-shadow(0 0 4px rgba(84,169,255,0.4));
    animation: icon-glow-blue-badge 2.4s ease-in-out infinite;
    transition: transform 200ms ease-out;
}

.icon-badge.icon-blue:hover svg {
    transform: rotate(8deg) scale(1.1);
    filter: drop-shadow(0 0 8px rgba(84,169,255,0.6));
}

.icon-badge.icon-purple svg {
    filter: drop-shadow(0 0 4px rgba(176,123,255,0.4));
    animation: icon-glow-purple-badge 2.4s ease-in-out infinite;
    transition: transform 200ms ease-out;
}

.icon-badge.icon-purple:hover svg {
    transform: rotate(-8deg) scale(1.1);
    filter: drop-shadow(0 0 8px rgba(176,123,255,0.6));
}

@keyframes icon-glow-blue-badge {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(84,169,255,0.3)); }
    50% { filter: drop-shadow(0 0 10px rgba(84,169,255,0.7)); }
}

@keyframes icon-glow-purple-badge {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(176,123,255,0.3)); }
    50% { filter: drop-shadow(0 0 10px rgba(176,123,255,0.7)); }
}

/* Code Block Typing Effect (on first reveal) */
.code-block code {
    display: block;
    white-space: pre;
}

.case-system-card:hover .code-block::before {
    animation-duration: 2s;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .process-arrow,
    .component-arrow,
    .component-icon,
    .icon-badge::after,
    .flow-index::before,
    .code-block::before,
    .metric-value {
        animation: none !important;
    }
}

/* ========================================
   SHARED ELEMENTS — ANIMATIONS
   (roadmap / innovations / docs / all-mappings)
   ======================================== */

/* Timeline items — dot breathing + line reveal */
.timeline {
    position: relative;
}

.timeline-item {
    transition: transform 220ms var(--ease);
}

.timeline-item:hover {
    transform: translateX(4px);
}

.timeline-item.active::before {
    animation: timeline-dot-pulse 2.4s ease-in-out infinite;
}

.timeline-item::before {
    transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.timeline-item:hover::before {
    transform: scale(1.2);
    box-shadow: 0 0 18px currentColor;
}

@keyframes timeline-dot-pulse {
    0%, 100% {
        box-shadow: 0 0 10px var(--green-glow);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 22px rgba(53,214,127,0.7);
        transform: scale(1.15);
    }
}

/* Progress bars — shimmer overlay while filled */
.progress-track {
    position: relative;
}

.progress-bar {
    position: relative;
    overflow: hidden;
    transition: width 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.35) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: progress-shimmer 2.6s ease-in-out infinite;
    animation-delay: 1.4s;
}

@keyframes progress-shimmer {
    0%, 100% { transform: translateX(-100%); }
    60% { transform: translateX(200%); }
}

/* Matrix cards — lift + colored glow ring */
.matrix-card {
    position: relative;
    transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
    will-change: transform;
}

.matrix-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(53,214,127,0.0) 0%,
        rgba(84,169,255,0.0) 50%,
        rgba(176,123,255,0.0) 100%
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    transition: background 320ms var(--ease);
}

.matrix-card:hover {
    transform: translateY(-4px);
    border-color: rgba(84,169,255,0.35);
    box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}

.matrix-card:hover::before {
    background: linear-gradient(135deg,
        rgba(53,214,127,0.55) 0%,
        rgba(84,169,255,0.55) 50%,
        rgba(176,123,255,0.55) 100%
    );
}

/* Number steps — rotating conic border on hover */
.number-step {
    position: relative;
    transition: transform 200ms var(--ease);
}

.number-step::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: conic-gradient(from 0deg,
        rgba(255,255,255,0.6),
        transparent 40%,
        transparent 60%,
        rgba(255,255,255,0.6)
    );
    opacity: 0;
    animation: number-step-spin 3s linear infinite;
    z-index: -1;
    transition: opacity 200ms ease-out;
}

.role-card:hover .number-step,
.doc-card:hover .number-step,
.topic-card:hover .number-step,
.card:hover .number-step {
    transform: scale(1.08) rotate(-6deg);
}

.role-card:hover .number-step::before,
.doc-card:hover .number-step::before,
.topic-card:hover .number-step::before,
.card:hover .number-step::before {
    opacity: 0.8;
}

@keyframes number-step-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Tags — breathing accent + lift */
.tag {
    transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background-color 180ms var(--ease);
    position: relative;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2), 0 0 10px currentColor;
}

/* Icon badge — missing amber variant (used on index + innovations) */
.icon-badge.icon-amber svg {
    filter: drop-shadow(0 0 4px rgba(240,179,74,0.45));
    animation: icon-glow-amber-badge 2.4s ease-in-out infinite;
    transition: transform 200ms ease-out;
}

.icon-badge.icon-amber:hover svg {
    transform: rotate(10deg) scale(1.1);
    filter: drop-shadow(0 0 8px rgba(240,179,74,0.7));
}

@keyframes icon-glow-amber-badge {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(240,179,74,0.3)); }
    50% { filter: drop-shadow(0 0 10px rgba(240,179,74,0.7)); }
}

/* Doc cards & role cards & topic cards — gentle lift + border glow */
.role-card,
.topic-card,
.doc-card {
    transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
    will-change: transform;
}

.role-card:hover,
.topic-card:hover {
    transform: translateY(-4px);
    border-color: rgba(84,169,255,0.28);
    box-shadow: 0 14px 28px rgba(0,0,0,0.2);
}

/* Table rows — subtle row highlight */
.table-strong tbody tr {
    transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}

.table-strong tbody tr:hover {
    background-color: rgba(84,169,255,0.06);
}

/* Hero-grid note chips (index.html) — stagger fade + subtle lift */
.hero-notes .note-chip {
    transition: transform 220ms var(--ease), border-color 220ms var(--ease), background-color 220ms var(--ease);
}

.hero-notes .note-chip:hover {
    transform: translateY(-3px);
    border-color: rgba(84,169,255,0.3);
    background-color: rgba(255,255,255,0.05);
}

/* Orbit panel — entire panel softly breathes so a stationary viewer still sees life */
.orbit-panel {
    animation: orbit-panel-breathe 8s ease-in-out infinite;
}

@keyframes orbit-panel-breathe {
    0%, 100% { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 40px rgba(53,214,127,0.05); }
    50% { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 60px rgba(53,214,127,0.12); }
}

/* Reduced motion — disable all shared extras */
@media (prefers-reduced-motion: reduce) {
    .timeline-item.active::before,
    .progress-bar::after,
    .number-step::before,
    .orbit-ring,
    .orbit-ring.ring-2,
    .orbit-core,
    .orbit-node,
    .orbit-node svg,
    .orbit-panel,
    .icon-badge.icon-amber svg {
        animation: none !important;
    }

    .progress-bar {
        transition: none !important;
    }
}

/* ========================================
   MAPPING.HTML SPECIFIC
   ======================================== */

/* Bridge pills — floating pulse to feel like live data */
.bridge-pill {
    position: relative;
    transition: transform 200ms var(--ease), border-color 200ms var(--ease), background-color 200ms var(--ease), box-shadow 200ms var(--ease);
    animation: bridge-pill-breathe 3.4s ease-in-out infinite;
}

.bridge-column:nth-child(2n) .bridge-pill {
    animation-delay: -1.7s;
}

.bridge-pill:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: rgba(84,169,255,0.55);
    background: rgba(84,169,255,0.14);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2), 0 0 14px rgba(84,169,255,0.25);
}

@keyframes bridge-pill-breathe {
    0%, 100% {
        box-shadow: 0 0 0 rgba(84,169,255,0);
        border-color: rgba(84,169,255,0.18);
    }
    50% {
        box-shadow: 0 0 14px rgba(84,169,255,0.2);
        border-color: rgba(84,169,255,0.35);
    }
}

/* Axis cards — side-panel hover lift */
.axis-card {
    transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
    will-change: transform;
}

.axis-card:hover {
    transform: translateY(-4px);
    border-color: rgba(84,169,255,0.3);
    box-shadow: 0 14px 28px rgba(0,0,0,0.2);
}

/* Case tabs — active tab pulse + hover scale */
.case-tab {
    transition: transform 220ms var(--ease), border-color 220ms var(--ease), background-color 220ms var(--ease);
    will-change: transform;
}

.case-tab:hover {
    transform: translateY(-3px);
}

.case-tab.active {
    animation: case-tab-active-pulse 2.8s ease-in-out infinite;
}

@keyframes case-tab-active-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(53,214,127,0); }
    50% { box-shadow: 0 0 18px rgba(53,214,127,0.25); }
}

/* Matrix cells — hover lift + data-strength ripple */
.matrix-cell {
    transition: transform 160ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease);
    will-change: transform;
}

.matrix-cell:hover {
    transform: scale(1.08);
    z-index: 2;
    box-shadow: 0 6px 14px rgba(0,0,0,0.35), 0 0 12px currentColor;
}

.matrix-cell.mapping-strong {
    animation: matrix-cell-strong-pulse 2.6s ease-in-out infinite;
}

.matrix-cell.mapping-medium {
    animation: matrix-cell-medium-pulse 3s ease-in-out infinite;
    animation-delay: -1s;
}

@keyframes matrix-cell-strong-pulse {
    0%, 100% { opacity: 0.92; }
    50% { opacity: 1; }
}

@keyframes matrix-cell-medium-pulse {
    0%, 100% { opacity: 0.78; }
    50% { opacity: 0.94; }
}

/* Mapping strands — reveal from center */
.mapping-strands {
    transition: opacity 400ms var(--ease);
}

/* Reduced motion for mapping-specific animations */
@media (prefers-reduced-motion: reduce) {
    .bridge-pill,
    .case-tab.active,
    .matrix-cell.mapping-strong,
    .matrix-cell.mapping-medium {
        animation: none !important;
    }
}
