/* CSS Variables for theme switching */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --border-color: #21262d;
    --text-primary: #ffffff;
    --text-secondary: #d0d7de;
    --text-muted: #7d8590;
    --matrix-bg: #0d1117;
    --surface-bg: #161b22;
    --scrollbar-track: #0d1117;
    /* background used to mask the timeline under step circles (matches terminal/step bg) */
    --timeline-bg: var(--bg-primary);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --border-color: #d1d5db;
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --matrix-bg: #f8fafc;
    --surface-bg: #ffffff;
    --scrollbar-track: #e5e7eb;
    /* in light theme the pipeline-step background is var(--surface-bg) so use it for masking */
    --timeline-bg: var(--surface-bg);
}

/* Transition for smooth theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Navigation bar theme support */
.nav-bg {
    background: var(--bg-primary);
    opacity: 0.95;
}

/* Fix navbar height - independent of logo size */
nav {
    height: 80px;
}

nav .max-w-7xl {
    height: 100%;
}

nav .flex.justify-between {
    height: 100%;
    align-items: center;
}

/* Enhanced light mode navigation */
[data-theme="light"] .nav-bg {
    background: rgba(248, 250, 252, 0.95);
    border-bottom: 1px solid #e5e7eb;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Company Logo Styling */
nav img[alt="The Thunderbolts Logo"] {
    max-height: 200px;
    width: auto;
    object-fit: contain;    
    transition: transform 0.3s ease, filter 0.3s ease;
    /* Much more aggressive enhancement for dark mode */
    filter:
        brightness(3)
        contrast(2)
        saturate(2)
        /*drop-shadow(0 0 20px rgba(249, 115, 22, 1))
        drop-shadow(0 0 10px rgba(249, 115, 22, 0.8));*/
}

nav img[alt="The Thunderbolts Logo"]:hover {
    transform: scale(1.1) rotate(5deg);
    filter:
        brightness(3.5)
        contrast(2.2)
        saturate(2.2)
        /*drop-shadow(0 0 25px rgba(249, 115, 22, 1))
        drop-shadow(0 0 15px rgba(249, 115, 22, 0.9));*/
}

[data-theme="light"] nav img[alt="The Thunderbolts Logo"] {
    /* EXTREMELY aggressive enhancement for light mode visibility */
    filter:
        brightness(0.3)
        contrast(3)
        saturate(3.5)
        /*drop-shadow(0 2px 8px rgba(249, 115, 22, 0.9))
        drop-shadow(0 0 4px rgba(249, 115, 22, 0.7))*/
        invert(0.15);
}

[data-theme="light"] nav img[alt="The Thunderbolts Logo"]:hover {
    filter:
        brightness(0.25)
        contrast(3.5)
        saturate(4)
        /*drop-shadow(0 3px 12px rgba(249, 115, 22, 1))
        drop-shadow(0 0 6px rgba(249, 115, 22, 0.9))*/
        invert(0.15);
}

/* Light mode text color adjustments */
[data-theme="light"] .text-gray-100,
[data-theme="light"] .text-gray-300,
[data-theme="light"] .text-white {
    color: var(--text-primary) !important;
}

[data-theme="light"] .text-gray-400 {
    color: var(--text-primary) !important;
}

[data-theme="light"] .text-gray-500,
[data-theme="light"] .text-gray-600 {
    color: var(--text-secondary) !important;
}

/* FORCE navigation items to use --text-muted in light mode */
[data-theme="light"] nav a[href="#tech"],
[data-theme="light"] nav a[href="#experience"],
[data-theme="light"] #ourWorkDropdown,
[data-theme="light"] #ourWorkDropdown *,
[data-theme="light"] button#ourWorkDropdown,
[data-theme="light"] button#ourWorkDropdown *,
[data-theme="light"] #mobileOurWorkDropdown,
[data-theme="light"] #mobileOurWorkDropdown *,
[data-theme="light"] button#mobileOurWorkDropdown,
[data-theme="light"] button#mobileOurWorkDropdown * {
    color: #6b7280 !important;
}

/* Ensure all text elements have good contrast in light mode */
[data-theme="light"] * {
    color: var(--text-primary);
}

/* Override specific color classes for light mode */
[data-theme="light"] .font-mono {
    color: var(--text-primary);
}

/* Preserve accent colors while fixing base text colors */
[data-theme="light"] .text-matrix-green {
    color: #00ff41 !important;
}

[data-theme="light"] .text-terminal-blue {
    color: #0ea5e9 !important;
}

[data-theme="light"] .text-code-purple {
    color: #8b5cf6 !important;
}

[data-theme="light"] .text-syntax-orange {
    color: #f97316 !important;
}

/* Fix description text colors */
[data-theme="light"] .text-gray-400.font-mono {
    color: var(--text-primary) !important;
}

/* Ensure paragraph text is readable */
[data-theme="light"] p {
    color: var(--text-primary) !important;
}

/* Fix all text within sections */
[data-theme="light"] section {
    color: var(--text-primary);
}

[data-theme="light"] div {
    color: inherit;
}

/* Enhanced light mode terminal styling */
[data-theme="light"] .terminal {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Light mode tech ribbon improvements */
[data-theme="light"] .tech-ribbon {
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .tech-ribbon::before {
    background: linear-gradient(to right, #f8fafc, transparent);
}

[data-theme="light"] .tech-ribbon::after {
    background: linear-gradient(to left, #f8fafc, transparent);
}

[data-theme="light"] .tech-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .tech-item:hover {
    background: rgba(0, 255, 65, 0.05);
    border-color: #00ff41;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Light mode section backgrounds */
[data-theme="light"] #tech {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
}

[data-theme="light"] #experience {
    background: linear-gradient(to bottom, #f0f9ff 0%, #e0f2fe 50%, #f8fafc 100%) !important;
    position: relative;
}

[data-theme="light"] #experience::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] #experience > * {
    position: relative;
    z-index: 1;
}

[data-theme="light"] #contact {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
}

/* Dark mode experience section background */
#experience {
    position: relative;
    background: linear-gradient(to bottom, rgba(13, 17, 23, 0.95) 0%, rgba(22, 27, 34, 0.98) 50%, rgba(13, 17, 23, 0.95) 100%);
}

#experience::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(0, 255, 65, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

#experience > * {
    position: relative;
    z-index: 1;
}

/* Project card enhancements */
#experience .terminal {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

#experience .terminal:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 65, 0.15);
}

[data-theme="light"] #experience .terminal {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] #experience .terminal:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.12),
        0 0 20px rgba(59, 130, 246, 0.1);
}

/* Light mode matrix background adjustments */
[data-theme="light"] .matrix-bg {
    opacity: 0.015;
}

[data-theme="light"] .matrix-char {
    color: #059669;
}

/* Form elements light mode styling */
[data-theme="light"] .bg-dark-bg,
[data-theme="light"] .bg-dark-surface {
    background-color: var(--surface-bg) !important;
}

[data-theme="light"] .border-dark-border {
    border-color: var(--border-color) !important;
}

[data-theme="light"] .bg-dark-surface\/50 {
    background-color: var(--surface-bg) !important;
    opacity: 1;
}

/* Enhanced light mode form inputs */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: var(--text-primary) !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    border-color: #00ff41 !important;
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* Light mode button enhancements */
[data-theme="light"] .bg-matrix-green {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .bg-matrix-green:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Light mode button and accent adjustments */
[data-theme="light"] button.bg-matrix-green:hover {
    color: var(--bg-primary) !important;
}

[data-theme="light"] .hover\:text-dark-bg:hover {
    color: var(--bg-primary) !important;
}

/* Light mode glitch effect adjustment */
[data-theme="light"] .glitch {
    color: var(--text-primary);
    font-weight: 800;
}

[data-theme="light"] .glitch::before {
    color: #00cc35;
}

[data-theme="light"] .glitch::after {
    color: #0ea5e9;
}


/* CLI Theme Toggle Switch */
.theme-switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.theme-switch-label {
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.theme-switch-label.active {
    color: #00ff41;
    font-weight: 600;
}

.theme-switch {
    position: relative;
    cursor: pointer;
    padding: 6px 8px;
    background: var(--bg-primary);
    border: 1px solid #00ff41;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 80px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.theme-switch:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

.theme-switch-pointer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

/* Dotted arrow pointing right for dark mode (default) */
.theme-switch-pointer::before {
    content: '•••>';
    color: #00ff41;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    line-height: 1;
}

/* Dotted arrow pointing left for light mode */
.theme-switch.light .theme-switch-pointer::before {
    content: '<•••';
}

/* Mobile CLI version */
.mobile-theme-switch-container {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
}

.mobile-theme-switch {
    position: relative;
    cursor: pointer;
    padding: 4px 6px;
    background: var(--bg-primary);
    border: 1px solid #00ff41;
    border-radius: 3px;
    transition: all 0.3s ease;
    min-width: 55px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.mobile-theme-switch:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
}

.mobile-theme-switch-pointer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

/* Dotted arrow pointing right for dark mode (default) */
.mobile-theme-switch-pointer::before {
    content: '••>';
    color: #00ff41;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1;
}

/* Dotted arrow pointing left for light mode */
.mobile-theme-switch.light .mobile-theme-switch-pointer::before {
    content: '<••';
}

/* Mobile Menu Animations */
.mobile-menu-panel {
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-menu-hidden .mobile-menu-panel {
    transform: translateX(-100%);
}

#mobileMenu:not(.mobile-menu-hidden) .mobile-menu-panel {
    transform: translateX(0);
}

/* ===== DROPDOWN MENU STYLING ===== */

/* Desktop Dropdown */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    z-index: 1000;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.dropdown-menu.show {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-arrow.rotate {
    transform: rotate(180deg);
}

/* Dropdown hover effects */
.dropdown-menu a:hover {
    background: var(--bg-primary);
}

/* Fix navigation item colors in light mode */
[data-theme="light"] #ourWorkDropdown,
[data-theme="light"] #ourWorkDropdown span,
[data-theme="light"] #mobileOurWorkDropdown,
[data-theme="light"] #mobileOurWorkDropdown span {
    color: var(--text-muted) !important;
}

[data-theme="light"] nav a[href="#tech"],
[data-theme="light"] nav a[href="#experience"] {
    color: var(--text-muted) !important;
}

/* ===== MOBILE PROJECTS LIST ===== */
.mobile-dropdown-container {
    position: relative;
    margin-bottom: 0 !important;
}

.mobile-projects-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.mobile-projects-list.show {
    max-height: 300px;
    opacity: 1;
}

.mobile-projects-list a {
    display: block;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.mobile-projects-list a:hover {
    background: var(--surface-bg);
    padding-left: 24px;
}

.mobile-dropdown-arrow {
    transition: transform 0.3s ease;
}

.mobile-dropdown-arrow.rotate {
    transform: rotate(180deg);
}

/* ===== BENEFIT CARDS - FORMAL REDESIGN ===== */

/* Fade-In Animation */
@keyframes benefitFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.benefit-card {
    opacity: 0;
    animation: benefitFadeIn 0.6s ease-out forwards;
}

/* Staggered Animation Delays */
.benefit-grid > .benefit-card:nth-child(1) { animation-delay: 0s; }
.benefit-grid > .benefit-card:nth-child(2) { animation-delay: 0.1s; }
.benefit-grid > .benefit-card:nth-child(3) { animation-delay: 0.2s; }
.benefit-grid > .benefit-card:nth-child(4) { animation-delay: 0.3s; }

/* Enhanced Hover State */
.benefit-card:hover {
    transform: translateY(-4px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Responsiveness for Benefit Cards */
@media (max-width: 768px) {
    .benefit-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .benefit-card:hover {
        transform: translateY(-2px);
    }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    50% { border-color: transparent }
}

@keyframes matrix {
    0% { transform: translateY(-100%) }
    100% { transform: translateY(100vh) }
}

@keyframes pulse-subtle {
    0%, 100% { opacity: 0.8 }
    50% { opacity: 1 }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) }
    to { opacity: 1; transform: translateY(0) }
}

@keyframes fadeIn {
    from { opacity: 0 }
    to { opacity: 1 }
}

/* Terminal cursor */
.typing::after {
    content: '|';
    color: #00ff41;
    animation: blink 1s infinite;
}

/* Matrix rain effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
}

.matrix-char {
    position: absolute;
    color: #00ff41;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    animation: matrix 20s linear infinite;
}

/* Code syntax highlighting */
.syntax-keyword { color: #cf6679; }
.syntax-function { color: #82aaff; }
.syntax-string { color: #c3e88d; }
.syntax-comment { color: #676e95; }
.syntax-variable { color: #ffcb6b; }

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #00ff41, #64ffda);
    border-radius: 4px;
}

/* Glitch effect */
.glitch {
    position: relative;
    color: #ffffff;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.8;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #00ff41;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #ff0080;
    z-index: -2;
}

@keyframes glitch-1 {
    0% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

@keyframes glitch-2 {
    0% { transform: translate(0); }
    20% { transform: translate(1px, -1px); }
    40% { transform: translate(1px, 1px); }
    60% { transform: translate(-1px, -1px); }
    80% { transform: translate(-1px, 1px); }
    100% { transform: translate(0); }
}

/* Terminal window */
.terminal {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    position: relative;
}

/* Capability Card Enhancements */
.capability-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.capability-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 102, 0.15);
}

[data-theme="light"] .capability-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 15px rgba(0, 255, 102, 0.1);
}

.capability-icon {
    transition: transform 0.4s ease, filter 0.4s ease;
    flex-shrink: 0;
}

.capability-card:hover .capability-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 8px currentColor);
}

.capability-card h3 {
    transition: letter-spacing 0.3s ease;
}

.capability-card:hover h3 {
    letter-spacing: 0.5px;
}

/* Tech Stack Ribbon */
.tech-ribbon {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.tech-ribbon::before,
.tech-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
    width: 30px;
    height: 100%;
    z-index: 2;
}

.tech-ribbon::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-primary), transparent);
}

.tech-ribbon::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-primary), transparent);
}

.tech-scroll {
    display: flex;
    animation: scroll-left 30s linear infinite;
    width: fit-content;
}

.tech-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 0 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    white-space: nowrap;
    min-width: 140px;
    
    transition: all 0.3s ease;
}

.tech-item:hover {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    transform: translateY(-2px);
}

.tech-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    object-fit: contain;
}

.tech-item:hover .tech-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsive adjustments for ribbon */
@media (max-width: 768px) {
    .tech-scroll {
        animation-duration: 20s;
    }
    .tech-item {
        min-width: 120px;
        padding: 10px 16px;
    }
}

/* Enhanced Pipeline Visualizer Styles */
.pipeline-container {
    position: relative;
}

/* Grey background line (full height) connecting all circles */
.pipeline-container::before {
    content: '';
    position: absolute;
    left: 62px;
    top: 0px; /* Start from top of first circle */
    width: 3px;
    height: 101px; /* Fixed height for vertical line */
    background: var(--border-color); /* Grey line */
    z-index: 1;
    border-radius: 2px;
}

/* Scrolling pointer circle that moves along the timeline */
.pipeline-container::after {
    content: '';
    position: absolute;
    left: 53.5px; /* centered on the line (38px - 8.5px) */
    top: var(--pointer-top, 0px);
    width: 17px;
    height: 17px;
    background: radial-gradient(circle, #00ff41 0%, #64ffda 100%);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    z-index: 100;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.7), 0 0 25px rgba(0, 255, 65, 0.4);
    transition: top 0.15s ease-out;
    pointer-events: none;
}

/* Green progress line (grows from top to scroll position) - dynamically created in JS */
.pipeline-timeline-progress {
    position: absolute;
    left: 62px;
    top: 0px;
    width: 3px;
    height: var(--line-height, 0px); /* Dynamic height based on scroll */
    background: linear-gradient(to bottom, #00ff41, #64ffda);
    z-index: 2;
    border-radius: 2px;
    transition: height 0.15s ease-out;
}

.pipeline-step-enhanced {
    position: relative;
    padding: 0px 0 20px 80px; /* reduced vertical space between steps */
    cursor: pointer;
    transition: all 0.3s ease;
}

.pipeline-step-enhanced:hover {
    transform: translateX(8px);
}

.pipeline-step-enhanced:hover .terminal-output {
    background: rgba(0, 255, 65, 0.05);
    border-left: 3px solid var(--matrix-green, #00ff41);
    padding-left: 20px;
}

.terminal-output {
    background: var(--bg-primary);
    border-radius: 6px;
    padding: 16px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.pipeline-connector {
    display: none; /* hide per-step connectors because we use a single continuous line */
    position: absolute;
    left: 24px;
    top: 60px;
    width: 2px;
    height: calc(100% - 40px);
    background: linear-gradient(to bottom, 
        var(--border-color), 
        var(--text-muted), 
        var(--border-color)
    );
    z-index: -1;
}

.pipeline-step-enhanced:last-child .pipeline-connector {
    display: none;
}

.step-indicator {
    position: absolute;
    left: 1px; /* moved left to avoid overlapping with the vertical line */
    top: 0px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-time {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px 8px;
    white-space: nowrap;
}

.terminal-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

/* Typing animation for demo text */
.typing-demo::after {
    content: '|';
    color: #00ff41;
    animation: blink 1s infinite;
}

/* Enhanced hover effects with business-friendly animations */
.pipeline-step-enhanced[data-step="1"]:hover .terminal-output {
    border-left-color: var(--matrix-green, #00ff41);
    background: rgba(0, 255, 65, 0.08);
    box-shadow: 0 4px 20px rgba(0, 255, 65, 0.15);
}

.pipeline-step-enhanced[data-step="2"]:hover .terminal-output {
    border-left-color: var(--terminal-blue, #64ffda);
    background: rgba(100, 255, 218, 0.08);
    box-shadow: 0 4px 20px rgba(100, 255, 218, 0.15);
}

.pipeline-step-enhanced[data-step="3"]:hover .terminal-output {
    border-left-color: var(--code-purple, #bb86fc);
    background: rgba(187, 134, 252, 0.08);
    box-shadow: 0 4px 20px rgba(187, 134, 252, 0.15);
}

.pipeline-step-enhanced[data-step="4"]:hover .terminal-output {
    border-left-color: var(--syntax-orange, #ffab40);
    background: rgba(255, 171, 64, 0.08);
    box-shadow: 0 4px 20px rgba(255, 171, 64, 0.15);
}

/* Business-friendly visual enhancements */
.pipeline-step-enhanced .terminal-output {
    position: relative;
    overflow: hidden;
}
    /* Reveal animation initial state (matches JS) */
    .pipeline-step-enhanced {
        opacity: 0;
        transform: translateY(20px);
    }
    .pipeline-step-enhanced.reveal-step {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    /* Ensure the circular number visuals are centered and readable */
    .step-indicator > div {
        width: 48px;
        height: 48px;
            z-index: 1; /* keep it above the line (z-index:1) but below the circle content */
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-family: 'JetBrains Mono', monospace;
        background: rgba(0,0,0,0.04);
        position: relative; /* required for masking pseudo-element */
    z-index: 3; /* ensure the number and circle sit above the mask */
    }

    /* mask placed on the wrapper so it doesn't cover the number inside the circle */
    .step-indicator {
        position: absolute; /* already set elsewhere but keep for safety */
    }

    .step-indicator::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 56px; /* slightly larger than circle to mask the line under it */
        height: 56px;
        border-radius: 50%;
        background: var(--timeline-bg);
        z-index: 2; /* above the line (z-index:1) but below the circle (z-index:4) */
        pointer-events: none;
    }

.pipeline-step-enhanced .terminal-output::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pipeline-step-enhanced:hover .terminal-output::before {
    opacity: 1;
}

/* Enhanced step indicators with business appeal */
.step-indicator > div {
    position: relative;
    overflow: hidden;
}

.step-indicator > div::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.pipeline-step-enhanced:hover .step-indicator > div::after {
    width: 100%;
    height: 100%;
}

/* Business-friendly info boxes */
.pipeline-step-enhanced .terminal-output .grid > div {
    transition: all 0.3s ease;
    position: relative;
}

.pipeline-step-enhanced .terminal-output .grid > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Success message enhancement */
.pipeline-container > div > div:last-child {
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.4);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 20px 5px rgba(0, 255, 65, 0.1);
    }
}

/* Light mode adjustments for pipeline */
[data-theme="light"] .terminal-output {
    background: var(--surface-bg);
    border: 1px solid var(--border-color);
}

[data-theme="light"] .pipeline-connector {
    background: linear-gradient(to bottom, 
        var(--border-color), 
        #9ca3af, 
        var(--border-color)
    );
}

[data-theme="light"] .step-time {
    background: var(--bg-primary);
    color: var(--text-secondary);
}

/* Light mode scrolling pointer adjustments */
[data-theme="light"] .pipeline-container::after {
    background: radial-gradient(circle, #059669 0%, #0ea5e9 100%);
    border-color: var(--bg-primary);
    box-shadow: 0 0 12px rgba(5, 150, 105, 0.4), 0 0 20px rgba(5, 150, 105, 0.2);
}

/* ===== MOBILE RESPONSIVENESS - COMPREHENSIVE FIXES ===== */

/* Tablet Breakpoint - 1024px and below */
@media (max-width: 1024px) {
    .max-w-7xl {
        padding-left: 24px;
        padding-right: 24px;
    }

    /* Hero section adjustments */
    .glitch {
        font-size: 2.5rem;
    }

    /* Terminal displays */
    .terminal {
        padding: 20px;
    }
}

/* Mobile Large - 768px and below */
@media (max-width: 768px) {
    /* ===== NAVIGATION FIXES ===== */
    nav .max-w-7xl {
        padding: 12px 16px;
    }

    /* Logo sizing */
    nav img[alt="The Thunderbolts Logo"] {
        width: 50px !important;
        height: 50px !important;
    }

    /* Terminal in nav */
    nav .terminal {
        padding: 6px 12px;
        font-size: 10px;
    }

    nav .terminal .text-sm {
        font-size: 10px;
    }

    /* Mobile nav links */
    nav .hidden.md\:flex {
        display: none;
    }

    /* ===== HERO SECTION FIXES ===== */
    section.min-h-screen {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 40px;
    }

    .glitch {
        font-size: 2rem;
        line-height: 1.2;
    }

    /* Hero terminal display */
    .terminal.h-96 {
        height: auto;
        max-height: 400px;
        overflow-y: auto;
    }

    /* Hero stats grid */
    .grid.grid-cols-2 {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .grid.grid-cols-2 > div {
        padding: 12px;
    }

    .grid.grid-cols-2 .text-2xl {
        font-size: 1.5rem;
    }

    .grid.grid-cols-2 .text-sm {
        font-size: 0.75rem;
    }

    /* ===== TYPOGRAPHY MOBILE FIXES ===== */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

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

    .text-lg {
        font-size: 0.95rem;
    }

    /* ===== TECH RIBBON MOBILE ===== */
    .tech-scroll {
        animation-duration: 20s;
    }

    .tech-item {
        min-width: 110px;
        padding: 10px 14px;
        font-size: 0.8rem;
    }

    .tech-icon {
        width: 20px;
        height: 20px;
    }

    /* ===== CAPABILITIES GRID ===== */
    .grid.grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Capability cards mobile adjustments */
    .capability-card {
        padding: 20px !important;
    }

    .capability-card:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .capability-icon {
        width: 28px;
        height: 28px;
    }

    .capability-card h3 {
        font-size: 1.1rem;
    }

    /* ===== PROCESS PIPELINE MOBILE FIXES ===== */
    /* COMPLETELY REMOVE ALL TIMELINE ELEMENTS ON MOBILE */
    .pipeline-connector {
        display: none !important;
    }

    .pipeline-container::before,
    .pipeline-container::after {
        display: none !important;
    }

    .pipeline-timeline-progress {
        display: none !important;
    }

    /* Simplify pipeline for mobile - card-based layout */
    .pipeline-step-enhanced {
        padding: 0 0 20px 0 !important;
        margin-bottom: 20px;
    }

    .pipeline-step-enhanced:hover {
        transform: none !important;
    }

    .pipeline-step-enhanced .flex {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    /* Center align the content container on mobile */
    .pipeline-step-enhanced .flex-1 {
        width: 100%;
    }

    /* Step indicator - centered above box on mobile */
    .step-indicator {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        margin-bottom: 16px;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .step-indicator > div {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }

    .step-indicator::before {
        display: none !important; /* Remove masking circle */
    }

    .terminal-output {
        padding: 16px;
        margin: 0;
        width: 100%;
        border-left: none !important; /* Remove left border on mobile */
    }

    /* Mobile-specific improvements for business appeal */
    .pipeline-step-enhanced .terminal-output .text-2xl {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .pipeline-step-enhanced .terminal-output .text-lg {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .step-time {
        font-size: 0.75rem;
        padding: 6px 12px;
        align-self: center;
        margin-left: 0;
        text-align: center;
    }

    /* Pipeline benefit boxes mobile */
    .pipeline-step-enhanced .terminal-output .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Remove all hover effects on mobile */
    .pipeline-step-enhanced:hover .terminal-output {
        background: var(--bg-primary) !important;
        border-left: 3px solid transparent !important;
        transform: none !important;
    }

    .pipeline-step-enhanced[data-step="1"]:hover .terminal-output,
    .pipeline-step-enhanced[data-step="2"]:hover .terminal-output,
    .pipeline-step-enhanced[data-step="3"]:hover .terminal-output,
    .pipeline-step-enhanced[data-step="4"]:hover .terminal-output {
        border-left-color: transparent !important;
        background: var(--bg-primary) !important;
        box-shadow: none !important;
    }

    /* ===== CONTACT SECTION MOBILE ===== */
    .grid.grid-cols-1.lg\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* ===== BUSINESS BENEFITS GRID ===== */
    .grid.grid-cols-1.md\:grid-cols-4 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* ===== BUTTON FIXES ===== */
    a.px-8 {
        padding-left: 24px;
        padding-right: 24px;
        padding-top: 12px;
        padding-bottom: 12px;
        font-size: 0.9rem;
    }

    /* ===== SECTION SPACING ===== */
    section {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .py-20 {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

/* Mobile Small - 480px and below */
@media (max-width: 480px) {
    /* ===== NAVIGATION ULTRA MOBILE ===== */
    nav img[alt="The Thunderbolts Logo"] {
        width: 45px !important;
        height: 45px !important;
    }

    nav .terminal {
        padding: 4px 8px;
        font-size: 9px;
    }

    nav .terminal .text-sm,
    nav .terminal .ml-2 {
        font-size: 9px;
    }

    /* Mobile theme switch even smaller */
    .mobile-theme-switch-container {
        gap: 4px;
    }

    .mobile-theme-switch {
        min-width: 45px;
        height: 20px;
        padding: 3px 4px;
    }

    .theme-switch-label {
        font-size: 9px;
    }

    /* ===== HERO ULTRA MOBILE ===== */
    .glitch {
        font-size: 1.75rem;
    }

    /* Hero button stack */
    .flex.flex-col.sm\:flex-row {
        flex-direction: column;
    }

    /* Hero info indicators */
    .grid.grid-cols-1.sm\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* ===== TYPOGRAPHY ULTRA MOBILE ===== */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .text-xl {
        font-size: 0.95rem;
    }

    .text-lg {
        font-size: 0.9rem;
    }

    /* ===== TECH RIBBON ULTRA MOBILE ===== */
    .tech-item {
        min-width: 100px;
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .tech-icon {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }

    /* ===== PROCESS PIPELINE ULTRA MOBILE ===== */
    .terminal {
        margin: 0 -8px;
        border-radius: 8px;
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
    }

    .pipeline-step-enhanced {
        padding: 0 0 20px 0;
        margin-bottom: 12px;
    }

    .step-indicator > div {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .terminal-output {
        padding: 12px;
    }

    .pipeline-step-enhanced .terminal-output .text-2xl {
        font-size: 1.2rem;
    }

    .pipeline-step-enhanced .terminal-output .text-lg {
        font-size: 0.85rem;
    }

    .pipeline-step-enhanced .terminal-output .grid > div {
        padding: 10px;
    }

    /* ===== STATS GRID ULTRA MOBILE ===== */
    .grid.grid-cols-2 {
        grid-template-columns: 1fr;
    }

    /* ===== SECTION SPACING ULTRA MOBILE ===== */
    section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .py-20 {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .max-w-7xl,
    .max-w-4xl {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* ===== BUTTON ULTRA MOBILE ===== */
    a.px-8 {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 0.85rem;
    }

    /* ===== TERMINAL PADDING ===== */
    .terminal {
        padding: 12px;
    }

    .terminal.p-6 {
        padding: 12px;
    }

    .terminal.p-8 {
        padding: 16px;
    }
}

