:root {
    /* Silver/Titanium Palette (Jarvis GUI Match) */
    --bg-deep: #B0B5BA;
    /* Chassis Dark */
    --bg-mid: #E0E5EB;
    /* Chassis Mid */
    --bg-light: #FFFFFF;
    /* Chassis Light */
    --bg-card: rgba(255, 255, 255, 0.65);
    --bg-panel: rgba(224, 229, 235, 0.8);

    --text-primary: #333333;
    /* Dark Grey for light bg */
    --text-secondary: #555555;

    /* Accents */
    --plasma-cyan: #007AFF;
    /* Electric Blue (Primary Action) */
    --electric-blue: #00DDFF;
    /* Cyan Highlight */
    --amber-alert: #FF9500;

    /* Decoration Colors */
    --chassis-dark: #B0B5BA;
    --chassis-mid: #E0E5EB;
    --screen-bg: #050A14;
    /* Keep dark for "screens" */

    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-highlight: rgba(255, 255, 255, 0.6);
    --code-bg: #1e1e1e;
    /* VS Code Dark style for code blocks */
    --success: #10b981;
}

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

body {
    /* Seamless vertical gradient for the entire page flow */
    background: linear-gradient(to bottom, #f6f7f8 0%, #e8eaed 25%, #d1d5db 50%, #e8eaed 75%, #f6f7f8 100%);
    background-attachment: scroll;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    padding-top: 80px;
    /* offset for fixed nav */
    position: relative;
}

h1,
h2,
h3,
h4 {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Biomechanical Backgrounds */
.circuit-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(124, 139, 161, 0.08), transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(82, 94, 117, 0.08), transparent 35%);
    z-index: -2;
    pointer-events: none;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
    display: none;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(125, 142, 170, 0.22), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(146, 160, 182, 0.18), transparent);
    background-size: 420px 420px;
    animation: none;
    /* Static to avoid repaint cost */
    display: none;
}

/* Keep background layers non-interactive and behind all UI */
.circuit-bg,
.grid-overlay,
.particles {
    pointer-events: none !important;
    z-index: -5;
}

main,
footer {
    position: relative;
    z-index: 1;
}

@keyframes particles-float {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 220px 120px;
    }
}

/* BioMech Nav */
.biomech-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2147483000;
    pointer-events: auto !important;
    isolation: isolate;
    background: rgba(232, 234, 237, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: visible;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
    z-index: 2147483001;
    pointer-events: auto !important;
    overflow: visible;
}

.logo {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 1.6rem;
    font-weight: normal;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo .core-glow {
    color: var(--plasma-cyan);
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0 4px;
}

.logo .core-glow svg {
    width: 14px;
    height: 14px;
    filter: drop-shadow(0 0 5px var(--plasma-cyan));
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    pointer-events: auto !important;
    overflow: visible;
    position: relative;
    z-index: 2147483001;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    pointer-events: auto !important;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: 0.3s;
    border-radius: 2px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    pointer-events: auto !important;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--plasma-cyan);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--plasma-cyan);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: rgba(55, 230, 255, 0.1);
    color: var(--plasma-cyan) !important;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(55, 230, 255, 0.3);
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: rgba(55, 230, 255, 0.2);
    box-shadow: 0 0 20px rgba(55, 230, 255, 0.3);
}

/* Hero */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    padding-right: 4rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(52, 211, 153, 0.1);
    color: var(--success);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.pulse-ring {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--success);
    animation: status-pulse 3s infinite ease-in-out;
}

@keyframes status-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.status-text {
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.plasma-text {
    background: linear-gradient(135deg, var(--plasma-cyan) 0%, var(--electric-blue) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

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

.btn-primary {
    background: transparent;
    color: var(--plasma-cyan);
    border: 2px solid var(--plasma-cyan);
    box-shadow: 0 4px 15px rgba(55, 230, 255, 0.1);
}

.btn-primary:hover {
    background: var(--plasma-cyan);
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(55, 230, 255, 0.4);
}

.btn-secondary {
    border: 2px solid var(--glass-border);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--plasma-cyan);
}

/* Jarvis GUI Mockup (Titanium Pod) */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
    padding-top: 2rem;
    pointer-events: none;
}

.jarvis-gui {
    width: 420px;
    /* Increased from 380px to fit controls */
    height: 520px;
    position: relative;
    pointer-events: none;
}

.gui-chassis {
    width: 100%;
    height: 100%;
    /* Silver gradient from top-left light to bottom-right dark */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 50px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    /* Subtle outline */
    padding: 20px;
    /* Reduced from 24px for more internal space */
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #a0a0a0;
}

/* Header */
.gui-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 4px;
}

.gui-title {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 1.6rem;
    color: #333;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.gui-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 15px;
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-bar .label {
    font-size: 8px;
    font-weight: 700;
    color: #666;
    width: 20px;
}

.bar-track {
    width: 50px;
    height: 6px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #007AFF;
    border-radius: 2px;
}

.bar-fill.cyan {
    background: #00DDFF;
}

.gui-controls {
    display: flex;
    gap: 6px;
    /* Reduced from default 8px */
    align-items: center;
    margin-left: auto;
}

.ctrl-btn {
    border: 1px solid #ccc;
    border-radius: 6px;
    /* Slightly more rounded */
    padding: 0 12px;
    height: 28px;
    /* Match icon height */
    line-height: 26px;
    /* Vertically center text */
    font-size: 11px;
    color: #444;
    background: linear-gradient(to bottom, #ffffff, #f0f0f0);
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.ctrl-icon {
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ctrl-icon:hover {
    color: var(--plasma-cyan);
    border-color: var(--plasma-cyan);
    background: white;
}

.ctrl-icon svg {
    width: 16px;
    height: 16px;
}

/* Screen (Terminal) */
.gui-screen {
    background: #000;
    border-radius: 4px;
    border: 2px solid #666;
    /* Bezel */
    border-bottom-color: #777;
    border-right-color: #777;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9);
    margin-bottom: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
    height: 160px;
    /* Fixed height for screen portion */
}

.scroll-bar {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 8px;
    background: #222;
    border: 1px solid #444;
    border-radius: 2px;
}

.scroll-thumb {
    height: 40px;
    background: #555;
    border-radius: 1px;
    margin-top: 2px;
}

.chat-message {
    display: flex;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.user .bubble {
    background: transparent;
    border: 1px solid #007AFF;
    color: #4da6ff;
    border-radius: 12px;
    border-bottom-right-radius: 2px;
    padding: 10px 14px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    max-width: 80%;
    line-height: 1.4;
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.2);
}

.chat-message.system .bubble {
    background: #dcdcdc;
    /* Light grey/white bubble */
    color: #222;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    padding: 10px 14px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    max-width: 80%;
    line-height: 1.4;
}

/* Input Area */
.gui-input-area {
    background: #050A14;
    border-radius: 4px;
    padding: 10px 12px;
    font-family: 'Consolas', monospace;
    color: #006699;
    /* Darker blue text */
    font-size: 13px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    border: 1px solid #333;
}

.cursor {
    color: #007AFF;
    margin-right: 8px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* CORE - ORB */
.gui-core-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
    padding-bottom: 5px;
}

.gui-core-bezel {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d9d9d9 0%, #bfbfbf 100%);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.9),
        0 5px 10px rgba(0, 0, 0, 0.15);
    padding: 4px;
    /* Thickness of outer ring */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #a0a0a0;
}

.gui-core {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 50%;
    box-shadow: inset 0 0 15px #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* The glowing center */
.core-inner {
    width: 35%;
    height: 35%;
    background: radial-gradient(circle at 35% 35%, #5ac8fa, #007AFF);
    border-radius: 50%;
    box-shadow: 0 0 25px #007AFF;
    z-index: 2;
}

/* Ambient glow */
.gui-core .core-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.3) 0%, transparent 70%);
    z-index: 1;
    animation: core-breathe 4s ease-in-out infinite;
}

@keyframes core-breathe {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.status-label {
    margin-top: 10px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 11px;
    color: #666;
    letter-spacing: 1px;
}

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

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

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

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.alt-bg {
    background: transparent;
}

/* UI Framework Section */
.ui-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.ui-component {
    background: var(--bg-card);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.ui-component:hover {
    transform: translateY(-5px);
    border-color: var(--plasma-cyan);
    box-shadow: 0 15px 30px rgba(55, 230, 255, 0.15);
}

.ui-component h4 {
    color: var(--electric-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tech-details p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.code-preview {
    margin-top: 3rem;
}

.code-preview h4 {
    color: var(--plasma-cyan);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.code-window {
    background: var(--code-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
}

.window-header {
    background: var(--chassis-dark);
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.window-header .title {
    font-family: 'Consolas', monospace;
    font-size: 0.8rem;
    color: #888;
}

.code-content {
    padding: 1.5rem;
    color: #d4d4d4;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
}

.comment {
    color: #6a9955;
}

.keyword {
    color: #c586c0;
}

.function {
    color: #61afef;
}

/* Flow Diagram */
.flow-diagram {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    /* Keep them together to show connections */
    justify-content: center;
    align-items: flex-start;
    gap: 4rem;
    /* Wide gap for the connecting lines */
    position: relative;
    padding: 3rem 0;
    max-width: 1100px;
    margin: 0 auto;
}

.flow-step,
.model-card,
.deep-dive {
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flow-step {
    background: var(--bg-card);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    width: 320px;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Connecting Lines (Desktop) */
.flow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    /* Align with middle of icon */
    right: -4rem;
    /* Bridge the gap */
    width: 4rem;
    height: 2px;
    background: linear-gradient(90deg, var(--plasma-cyan), var(--electric-blue));
    opacity: 0.3;
    z-index: -1;
}

.flow-step:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(55, 230, 255, 0.15);
    border-color: var(--plasma-cyan);
}

.flow-step.active,
.model-card.active,
.deep-dive.active {
    border-color: var(--plasma-cyan);
    background: var(--bg-light);
    box-shadow: 0 10px 30px rgba(55, 230, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.flow-step .step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.step-details {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0;
    flex: 1;
}

.flow-step.active .step-details,
.model-card.active .step-details,
.deep-dive.active .step-details {
    max-height: 800px;
    /* Larger max-height for the tech specs code window */
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.step-details h4 {
    color: var(--plasma-cyan);
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.step-details p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.step-details p:last-child {
    margin-bottom: 0;
}

.expand-indicator {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--plasma-cyan);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0.6;
    transition: all 0.4s ease;
}

.expand-indicator span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.expand-indicator svg {
    width: 10px;
    height: 10px;
    stroke-width: 3;
}

.flow-step:hover .expand-indicator,
.model-card:hover .expand-indicator {
    opacity: 1;
    transition-delay: 0s;
    /* Instant feedback on hover */
}

.flow-step.active .expand-indicator,
.model-card.active .expand-indicator {
    opacity: 0;
    transform: translateY(5px);
    pointer-events: none;
    transition-delay: 0s;
    /* Instant hide when expanding */
}

.step-icon {
    margin-bottom: 1.5rem;
    background: rgba(55, 230, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--plasma-cyan);
    border: 1px solid rgba(55, 230, 255, 0.2);
    transition: all 0.3s ease;
}

.step-icon svg {
    width: 32px;
    height: 32px;
}

.flow-step:hover .step-icon {
    background: rgba(55, 230, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(55, 230, 255, 0.2);
}

.flow-step h3,
.flow-step h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.flow-step p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.connector-line {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    width: 2px;
    height: 2rem;
    background: var(--glass-border);
    transform: translateX(-50%);
    z-index: 1;
}

.connector-line.reverse {
    top: -2rem;
    bottom: auto;
}

.flow-branch {
    display: flex;
    justify-content: center;
    gap: 2rem;
    position: relative;
    width: 100%;
    max-width: 900px;
}

.branch-path {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

/* Hover Effects moved from JS to CSS for performance */
.model-card:hover {
    transform: translateY(-5px);
    border-color: var(--plasma-cyan);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.ui-component:hover {
    transform: translateY(-5px);
    border-color: var(--plasma-cyan);
    box-shadow: 0 15px 30px rgba(55, 230, 255, 0.15);
}

.arch-component:hover {
    border-color: var(--electric-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.15);
}

.flow-step:hover {
    border-color: var(--plasma-cyan);
    box-shadow: 0 10px 25px rgba(55, 230, 255, 0.2);
    transform: translateY(-3px);
}

.mgmt-feature:hover {
    background: rgba(55, 230, 255, 0.08);
    border-color: var(--plasma-cyan);
}

.branch-path::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    width: 2px;
    height: 2rem;
    background: var(--glass-border);
}

.flow-branch::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 16.66%;
    right: 16.66%;
    height: 2px;
    background: var(--glass-border);
}

.flow-step.mini {
    width: 200px;
    padding: 1rem;
    font-size: 0.9rem;
}

.tech-term {
    border-bottom: 1px dashed var(--plasma-cyan);
    cursor: help;
    position: relative;
    color: var(--plasma-cyan);
    font-weight: 500;
}

.tech-term:hover {
    background: rgba(55, 230, 255, 0.1);
}

.tooltip-popup {
    position: absolute;
    background: var(--code-bg);
    border: 1px solid var(--plasma-cyan);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #e2e8f0;
    width: 220px;
    text-align: left;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
}

.tooltip-popup.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--plasma-cyan) transparent transparent transparent;
}

/* AI Models Section */
.model-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.model-card {
    background: var(--bg-card);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(4px);
    position: relative;
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--plasma-cyan), var(--electric-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-card.local::before {
    background: linear-gradient(90deg, var(--plasma-cyan), #06b6d4);
}

.model-card.cloud::before {
    background: linear-gradient(90deg, var(--electric-blue), #8b5cf6);
}

.model-card:hover::before {
    opacity: 1;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.model-icon {
    width: 80px;
    height: 80px;
    position: relative;
}

.cpu-core {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.core-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--plasma-cyan);
    border-radius: 50%;
    position: absolute;
    animation: pulse-ring 2s infinite;
}

.core-center {
    width: 30px;
    height: 30px;
    background: var(--plasma-cyan);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 20px rgba(55, 230, 255, 0.5);
}

/* Cloud Model Animation - Network/Neural Look */
.cloud-core {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cloud-center {
    width: 12px;
    height: 12px;
    background: var(--electric-blue);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 20px var(--electric-blue);
    z-index: 2;
    animation: core-pulse 2s infinite ease-in-out;
}

.cloud-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate-network 20s linear infinite;
}

.particle {
    width: 6px;
    height: 6px;
    background: var(--electric-blue);
    border-radius: 50%;
    position: absolute;
    opacity: 0.6;
}

/* Interconnecting Nodes */
.particle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, var(--electric-blue), transparent);
    transform-origin: left center;
    opacity: 0.3;
}

.particle:nth-child(1) {
    top: 15%;
    left: 50%;
    animation: float-node-1 4s infinite alternate ease-in-out;
}

.particle:nth-child(1)::before {
    transform: rotate(120deg);
}

.particle:nth-child(2) {
    bottom: 25%;
    left: 20%;
    animation: float-node-2 5s infinite alternate ease-in-out;
}

.particle:nth-child(2)::before {
    transform: rotate(-30deg);
}

.particle:nth-child(3) {
    bottom: 25%;
    right: 20%;
    animation: float-node-3 6s infinite alternate ease-in-out;
}

.particle:nth-child(3)::before {
    transform: rotate(210deg);
}

@keyframes core-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 15px var(--electric-blue);
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 25px var(--electric-blue);
    }
}

@keyframes rotate-network {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes float-node-1 {
    from {
        transform: translate(-50%, -10px);
    }

    to {
        transform: translate(-50%, 10px);
    }
}

@keyframes float-node-2 {
    from {
        transform: translate(-5px, -5px);
    }

    to {
        transform: translate(5px, 5px);
    }
}

@keyframes float-node-3 {
    from {
        transform: translate(5px, -5px);
    }

    to {
        transform: translate(-5px, 5px);
    }
}

.model-info h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.model-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.model-badge.primary {
    background: rgba(55, 230, 255, 0.2);
    color: var(--plasma-cyan);
    border: 1px solid var(--plasma-cyan);
}

.model-badge.secondary {
    background: rgba(14, 165, 233, 0.2);
    color: var(--electric-blue);
    border: 1px solid var(--electric-blue);
}

.tech-stack {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stack-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 1px solid var(--glass-border);
}

.stack-icon {
    font-size: 1.2rem;
}

.stack-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.features-list {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.feature-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.performance-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.metric {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.metric-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.management-interface {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(4px);
    margin-top: 2rem;
}

.management-interface h4 {
    color: var(--plasma-cyan);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.management-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.mgmt-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.mgmt-feature:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--plasma-cyan);
}

.mgmt-icon {
    font-size: 1.5rem;
    line-height: 1.2rem;
}

.mgmt-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Highlights & Provider Matrix */
.highlight-section .section-header p {
    max-width: 800px;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-6px);
    border-color: var(--plasma-cyan);
    box-shadow: 0 20px 40px rgba(55, 230, 255, 0.15);
}

.highlight-card h3 {
    margin: 0.5rem 0 0.75rem;
}

.highlight-card .note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(55, 230, 255, 0.1);
    color: var(--plasma-cyan);
    border: 1px solid rgba(55, 230, 255, 0.3);
    letter-spacing: 0.5px;
}

.pill-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill-list li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* refined Deep Dive styling for Silver Theme - Premium Tech Look */
.deep-dive {
    margin-top: 3rem;
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.deep-dive.active {
    background: var(--bg-light);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--plasma-cyan);
}

.deep-dive .deep-dive-header {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.3s ease;
    user-select: none;
}

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

.deep-dive .deep-dive-header:hover {
    background: rgba(0, 122, 255, 0.05);
}

.summary-icon {
    font-size: 1.4rem;
    background: rgba(0, 122, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--plasma-cyan);
}

.summary-text {
    flex: 1;
    font-size: 1.1rem;
    letter-spacing: -0.2px;
}

.summary-arrow {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
}

.deep-dive.active .summary-arrow {
    transform: rotate(180deg);
    color: var(--plasma-cyan);
    opacity: 1;
}

.deep-dive .deep-dive-content {
    padding: 0 2rem 2rem;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.deep-dive-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.deep-dive-content ul {
    list-style: none;
    padding: 0;
}

.deep-dive-content li {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
}

.deep-dive-content li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    background: var(--plasma-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--plasma-cyan);
}

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

.provider-matrix {
    margin-top: 2.5rem;
}

.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.provider-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease;
}

.provider-card:hover {
    border-color: var(--plasma-cyan);
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(55, 230, 255, 0.12);
}

.provider-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.provider-head h5 {
    font-size: 1.1rem;
}

.provider-label {
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    background: rgba(55, 230, 255, 0.15);
    color: var(--plasma-cyan);
    border: 1px solid rgba(55, 230, 255, 0.3);
}

.provider-card p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.provider-card.local {
    border-color: rgba(52, 211, 153, 0.2);
}

.provider-card.opencode {
    border-color: rgba(55, 230, 255, 0.2);
}

.provider-card.openai {
    border-color: rgba(14, 165, 233, 0.2);
}

.provider-card.gemini {
    border-color: rgba(99, 102, 241, 0.2);
}

/* Architecture Grid */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.arch-component {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.arch-component:hover {
    border-color: var(--plasma-cyan);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(55, 230, 255, 0.1);
}

.arch-component h4 {
    color: var(--electric-blue);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Centered layout override for simpler sections */
.split-layout.centered {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

@media (max-width: 768px) {
    .split-layout.centered {
        display: block;
        padding: 0;
    }
}

.ha-text {
    color: var(--electric-blue);
}

/* Philosophy Gallery */
.phi-gallery-container {
    position: relative;
    max-width: 700px;
    margin: 3rem auto 0;
    padding: 0 45px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.phi-gallery {
    overflow: hidden;
    border-radius: 20px;
}

.phi-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
}

.phi-slide {
    flex: 0 0 100%;
    opacity: 0.3;
    transition: opacity 0.5s ease;
    padding: 10px;
    box-sizing: border-box;
}

.phi-slide.active {
    opacity: 1;
}

.philosophy-item {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    backdrop-filter: blur(12px);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
    box-sizing: border-box;
    width: 100%;
}

.phi-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--plasma-cyan);
    filter: drop-shadow(0 0 12px rgba(0, 122, 255, 0.4));
}

.phi-icon svg {
    width: 56px;
    height: 56px;
    transition: transform 0.3s ease;
}

.philosophy-item p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

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

/* Nav Buttons */
.phi-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    color: var(--text-primary);
    padding: 0;
}

.phi-nav svg {
    width: 22px;
    height: 22px;
}

.phi-nav:hover {
    background: white;
    box-shadow: 0 0 15px rgba(55, 230, 255, 0.2);
    border-color: var(--plasma-cyan);
}

.phi-nav.prev {
    left: -10px;
}

.phi-nav.next {
    right: -10px;
}

/* Dots */
.phi-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.phi-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.phi-dots .dot.active {
    background: var(--plasma-cyan);
    transform: scale(1.4);
    box-shadow: 0 0 12px var(--plasma-cyan);
}

@media (max-width: 480px) {
    .phi-gallery-container {
        padding: 0 15px 1.5rem;
        margin-top: 2rem;
        max-width: 100vw;
        overflow: visible;
    }

    .phi-nav {
        display: none;
    }

    .philosophy-item {
        padding: 2.5rem 1.5rem;
        min-height: 260px;
        border-radius: 16px;
    }

    .phi-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .philosophy-item p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .phi-dots {
        margin-top: 1rem;
    }
}

.special-home-card {
    padding: 2.5rem;
    background: linear-gradient(165deg, var(--bg-card), rgba(255, 255, 255, 0.4));
    border-color: var(--glass-border);
}

.special-home-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.tech-details p {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0.8rem 0;
    font-size: 1rem;
}

.tech-details p span {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(0, 122, 255, 0.2));
}

.sync-status {
    color: var(--plasma-cyan);
    font-weight: 600;
}

.sync-status span {
    display: inline-block;
}



/* CTA Section */
.cta {
    text-align: center;
}

.install-steps {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    text-align: center;
    display: block;
}

.install-steps ol {
    display: inline-block;
    text-align: center;
    list-style-position: inside;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.install-steps li {
    margin-bottom: 0.5rem;
}

.cli-box {
    background: var(--code-bg);
    border: 2px solid var(--plasma-cyan);
    border-radius: 12px;
    padding: 2rem 3rem;
    display: block;
    margin: 1rem auto 3rem;
    font-family: 'Consolas', monospace;
    font-size: 1.2rem;
    color: var(--plasma-cyan);
    box-shadow: 0 0 30px rgba(55, 230, 255, 0.2);
    text-align: left;
    max-width: fit-content;
}

.prompt {
    color: var(--electric-blue);
    margin-right: 1rem;
}

.install-notes {
    max-width: 600px;
    margin: 1.5rem auto 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
footer {
    background: rgba(5, 7, 11, 0.05);
    /* Very subtle tint to ground the footer */
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
}

footer p {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Dots */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

/* Animations */
@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 968px) {

    .hero {
        flex-direction: column;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .split-layout {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .flow-branch {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .flow-branch::before {
        display: none;
    }

    .branch-path::before {
        display: none;
    }

    .branch-path:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: -2rem;
        left: 50%;
        width: 2px;
        height: 2rem;
        background: var(--glass-border);
    }

    .hero-content {
        padding-right: 0;
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 3rem;
    }

    .jarvis-gui {
        width: 100%;
        max-width: 320px;
        /* Reduced from 420px */
        height: auto;
        min-height: 480px;
        /* Adjusted */
        transform: scale(0.95);
        /* Subtle scale down to ensure it feels smaller */
        transform-origin: center top;
    }

    .ctrl-btn {
        display: none;
        /* Hide chat toggle on mobile to save space */
    }

    .bar-track {
        width: 30px;
        /* Shortened bars for mobile */
    }

    .gui-stats {
        margin-left: 8px;
        /* Reduced margin */
    }

    .container {
        padding: 0 1rem;
        /* Reduced horizontal padding for more content space */
    }

    .cta {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .install-steps {
        margin: 0 0 2rem 0;
    }

    .cli-box {
        margin: 1rem auto 2rem;
        padding: 1.5rem 2rem;
        font-size: 1rem;
    }

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

    .management-features {
        grid-template-columns: 1fr;
    }

    .code-window {
        max-width: 100%;
        margin: 1.5rem auto;
        overflow-x: auto;
        display: block;
    }

    .code-content {
        padding: 1rem;
        font-size: 0.72rem;
    }

    /* Fix card clipping and alignment */
    .deep-dive {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        margin: 1.5rem 0 !important;
        box-sizing: border-box !important;
    }

    .deep-dive summary {
        padding: 1rem 1.2rem !important;
    }

    .deep-dive-content {
        padding: 0 0.8rem 1.5rem !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* Specific fixes for ultra-narrow screens (iPhone SE, etc.) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem !important;
    }

    .deep-dive summary {
        padding: 1rem 0.8rem !important;
        gap: 0.5rem;
    }

    .summary-icon {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .summary-text {
        font-size: 1rem;
    }

    .deep-dive-content {
        padding: 0 0.5rem 1.5rem !important;
    }

    .code-content {
        white-space: pre-wrap !important;
        /* Wrap code on tiny screens */
        word-break: break-word;
        font-size: 0.7rem;
        padding: 0.8rem;
    }

    .code-header {
        padding: 0.6rem 0.8rem;
    }

    .code-title {
        font-size: 0.7rem;
    }

    .hero {
        padding-top: 5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: flex;
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 4rem;
        transition: 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 2147483000;
        pointer-events: auto !important;
    }

    .nav-links.nav-active,
    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Animate Hamburger */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

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

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

    .hero h1 {
        font-size: 2.5rem;
    }

    .performance-metrics {
        grid-template-columns: 1fr;
    }

    .flow-diagram {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .flow-step {
        width: 100%;
        max-width: 400px;
    }

    .flow-step:not(:last-child)::after {
        right: 50%;
        bottom: -3rem;
        top: auto;
        width: 2px;
        height: 3rem;
        transform: translateX(50%);
    }
}
