:root {
    /* Base Colors (Dark Mode Defaults) */
    --bg-color: #050505;
    --bg-secondary: #0a0a0a;
    --card-bg: #111111;
    --card-bg-hover: #161616;
    --border-color: #222;
    --border-color-hover: #444;
    --text-primary: #ededed;
    --text-secondary: #a1a1a1;
    --text-tertiary: #666;
    --accent-color: #0070f3;
    --accent-glow: rgba(0, 112, 243, 0.4);
    --accent-light: #3b9eff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --terminal-bg: linear-gradient(135deg, #1a1a1a 0%, #1e1e1e 100%);
    --terminal-bg-light: #111827;
    --header-bg: rgba(5, 5, 5, 0.85);
    --hero-gradient: linear-gradient(135deg, #fff 0%, #999 100%);

    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    --transition-speed: 0.3s;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --bg-secondary: #f9f9f9;
    --card-bg: #f3f4f6;
    --card-bg-hover: #e5e7eb;
    --border-color: #e5e7eb;
    --border-color-hover: #d1d5db;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    --accent-color: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.1);
    --accent-light: #3b82f6;
    --terminal-bg: var(--terminal-bg-light);
    /* Keep terminal dark even in light mode for dev aesthetic */
    --header-bg: rgba(255, 255, 255, 0.85);
    --hero-gradient: linear-gradient(135deg, #111827 0%, #4b5563 100%);
}

body {
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.center {
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--text-primary) 0%, #ccc 100%);
    color: var(--bg-color);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    text-decoration: none;
    transition: all 0.2s ease;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-light);
    transform: translateY(-1px);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    height: 32px;
    width: auto;
}

.site-nav {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

/* Default state (dark) if data-theme is not set */
body:not([data-theme]) .moon-icon {
    display: none;
}

/* Background Effects */
.background-glow {
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    height: 1200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite;
    transition: opacity var(--transition-speed);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

/* Hero Section */
.hero-section {
    padding-top: 160px;
    padding-bottom: var(--spacing-xl);
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.hero-text h1 {
    font-size: 3.75rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.hero-text .subhead {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    max-width: 540px;
    line-height: 1.5;
}

.hero-text .description {
    font-size: 1rem;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-md);
}

.cta-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.center .cta-group {
    justify-content: center;
}

/* Terminal Visual */
.terminal-window {
    background: var(--terminal-bg);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.terminal-window:hover {
    transform: translateY(-4px);
}

.terminal-header {
    background: #252525;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.terminal-body {
    padding: 24px;
    color: #d4d4d4;
    line-height: 1.6;
}

.code-line {
    margin-bottom: 4px;
}

.prompt {
    color: var(--accent-color);
    margin-right: 8px;
    font-weight: bold;
}

.dimmed {
    color: #666;
}

.success {
    color: var(--success-color);
}

.info {
    color: var(--accent-light);
}

.indent {
    margin-left: 20px;
    color: #a1a1a1;
}

/* Sections */
section {
    padding: var(--spacing-xl) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.section-header {
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-size: 2.75rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.6;
}

.section-header.center p {
    margin: 0 auto;
}

/* Quickstart Section */
.quickstart-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    justify-content: center;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-button:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.tab-button.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.code-block {
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-md);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    color: #d4d4d4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.code-block pre {
    margin: 0;
}

.code-block code {
    color: #d4d4d4;
}

.quickstart-note {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 112, 243, 0.1);
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: var(--spacing-md);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-hover);
    background: var(--card-bg-hover);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 2px 8px rgba(0, 112, 243, 0.3));
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.feature-card code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent-light);
}

/* How It Works Diagram */
.workflow-diagram {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--spacing-lg);
}

.step {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: var(--spacing-sm);
    border-radius: 12px;
    text-align: center;
    position: relative;
    min-width: 0;
    transition: all 0.3s ease;
}

.step:hover {
    border-color: var(--accent-color);
    background: var(--card-bg-hover);
}

.step-number {
    font-family: var(--font-mono);
    color: var(--accent-color);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    opacity: 0.8;
    font-weight: 600;
}

.step h4 {
    margin-bottom: 0.125rem;
    font-size: 0.95rem;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arrow {
    color: var(--text-tertiary);
    font-size: 1.25rem;
    opacity: 0.3;
    flex-shrink: 0;
}

/* Details Grid */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.detail-item h3 {
    font-size: 1.6rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.detail-item p strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: var(--spacing-sm);
}

.detail-item ul {
    list-style: none;
}

.detail-item li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.detail-item li::before {
    content: "→";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.detail-item code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent-light);
}

/* Comparison */
.comparison-box {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.comparison-box .col {
    flex: 1;
    padding: var(--spacing-lg);
}

.comparison-box h3 {
    margin-bottom: var(--spacing-md);
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
}

.comparison-box .divider {
    width: 1px;
    background: var(--border-color);
}

.check-list,
.cross-list {
    list-style: none;
}

.check-list li,
.cross-list li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.check-list li::before {
    content: "✔";
    color: var(--success-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.cross-list li::before {
    content: "✖";
    color: var(--danger-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* CTA Section */
.cta-section {
    padding-top: var(--spacing-xl);
    padding-bottom: 0;
    margin-bottom: var(--spacing-xl);
    border-top: none;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.tagline {
    font-family: var(--font-mono);
    color: var(--accent-color);
    margin: var(--spacing-md) 0;
    font-size: 1.15rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-lg) 0;
    background: var(--bg-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.footer-logo img {
    height: 24px;
    opacity: 0.7;
}

.copyright {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-text .subhead {
        margin: 0 auto 1rem;
    }

    .cta-group {
        justify-content: center;
    }

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

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

    .grid-2-col {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .comparison-box {
        flex-direction: column;
    }

    .comparison-box .divider {
        width: 100%;
        height: 1px;
    }

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

    .quickstart-tabs {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
    }
}