:root {
    /* Modern Color Palette */
    --bg-color: #0D1117;
    --primary-color: #e6edf3;
    --secondary-color: #8b949e;
    --accent-grad: linear-gradient(90deg, #58a6ff, #9370db);
    --accent-color: #58a6ff;
    --accent-hover: #79c0ff;
    --border-color: rgba(255, 255, 255, 0.1);
    --code-bg: #161b22;
    --glass-bg: rgba(22, 27, 34, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.4);

    --font-primary: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Base font size */
    font-size: 16px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* account for fixed navbar when jumping to anchors */
}

body {
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-family: var(--font-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
    cursor: default;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background: radial-gradient(circle at top left, rgba(88, 166, 255, 0.2), transparent 40%),
                radial-gradient(circle at bottom right, rgba(147, 112, 219, 0.2), transparent 40%);
    animation: aurora 15s linear infinite;
}

@keyframes aurora {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100dvh; /* Use dynamic viewport height for mobile */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 1rem 0.5rem 1.5rem;
    box-sizing: border-box;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    padding-top: 3.5rem; /* Account for fixed navbar */
}

.hero .container {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
}

.hero-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.hero-illustration {
    margin: 3rem auto 0;
    position: relative;
    z-index: 1;
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: all 0.3s ease;
    background-color: rgba(13, 17, 23, 0.5); /* More transparent background */
    backdrop-filter: blur(12px); /* Increased blur for better glass effect */
    -webkit-backdrop-filter: blur(12px);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* Lighter border */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    background-color: rgba(13, 17, 23, 0.7); /* More transparent when scrolled */
    backdrop-filter: blur(15px); /* Slightly more blur when scrolled */
    -webkit-backdrop-filter: blur(15px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo .fa-cube {
    color: var(--accent-color);
    margin-right: 0.5rem;
    animation: rotateCube 10s linear infinite;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0;
}

.nav-links a {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-grad);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after, .nav-links a.active::after {
    width: 60%;
}

.nav-links a.active {
    color: var(--accent-color);
}

.github-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.github-btn:hover {
    background-color: var(--accent-hover);
    color: white;
}

.pypi-btn {
    background: var(--accent-grad);
    color: #fff;
    border: none;
}

.pypi-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(147, 112, 219, 0.4);
}

.github-btn .fa-github {
    margin-right: 0.5rem;
}

.hero-content {
    text-align: center;
    margin: auto;
    padding: 6rem 1rem 2rem;
    position: relative;
    z-index: 10;
    max-width: 100%;
    width: 100%;
}

.glitch {
    font-size: clamp(2.8rem, 10vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
    position: relative;
    line-height: 1.2;
    margin: 0.5em 0;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: subtle-shine 5s infinite linear;
}

/* GitHub and PyPI Buttons */
.github-btn, .pypi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* GitHub Button Specific */
.github-btn {
    background: rgba(22, 27, 34, 0.3);
    color: var(--primary-color);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.github-btn:hover {
    background: rgba(36, 41, 46, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* Remove the before pseudo-element as we're using the same style as navbar */

/* PyPI Button Specific */
.pypi-btn {
    background: linear-gradient(135deg, rgba(32, 74, 135, 0.9) 0%, rgba(32, 74, 135, 0.7) 100%);
    color: #f0f6fc;
}

/* Hover Effects */
.github-btn:hover, .pypi-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

/* GitHub Hover Specific */
.github-btn:hover {
    background: linear-gradient(135deg, rgba(46, 51, 56, 0.9) 0%, rgba(46, 51, 56, 0.7) 100%);
}

/* PyPI Hover Specific */
.pypi-btn:hover {
    background: linear-gradient(135deg, rgba(42, 94, 165, 0.9) 0%, rgba(42, 94, 165, 0.7) 100%);
}

/* Active State */
.github-btn:active, .pypi-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Navbar Buttons Specific */
.nav-links .github-btn,
.nav-links .pypi-btn {
    margin-left: 0.8rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Button Icons */
.github-btn i, .pypi-btn i {
    font-size: 1.1em;
    transition: transform 0.2s ease;
}

.github-btn:hover i, .pypi-btn:hover i {
    transform: scale(1.1);
}

.tagline {
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 1rem;
    color: var(--secondary-color);
}

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

.cta-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.install-code {
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
}

.copy-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
    margin-left: 1rem;
    position: relative;
}

.copy-btn .tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.copy-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.hero-illustration {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.code-window {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow-color);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.code-window:hover {
    transform: perspective(1000px) rotateX(0deg);
}

.window-header {
    background-color: rgba(0,0,0,0.2);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.dot {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}
.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.code-window pre {
    padding: 1.5rem;
    overflow-x: auto;
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--secondary-color);
    text-align: center;
    animation: bounce 2s infinite;
}

/* Sections */
.features-section, .examples-section {
    padding: 6rem 0;
}

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

.section-header h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    box-sizing: border-box;
    will-change: transform, box-shadow, border-color;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-grad);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(88, 166, 255, 0.3);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.feature-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--secondary-color);
}

/* Examples Section */
.examples {
    padding: 3rem 0;
    background: var(--bg-color);
    overflow: hidden;
    scroll-margin-top: 4rem; /* Account for fixed navbar */
}

/* Example Tabs */
.example-tabs {
    display: flex;
    padding: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.example-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.example-tab {
    padding: 0.6rem 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color);
    flex-shrink: 0;
}

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

/* Code Window */
.example-window {
    background: var(--code-bg);
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.code-header {
    padding: 0.6rem 1rem;
    background: var(--code-header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.code-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.code-actions {
    display: flex;
    gap: 0.5rem;
}

.code-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.code-btn.red { background: #ff5f56; }
.code-btn.yellow { background: #ffbd2e; }
.code-btn.green { background: #27c93f; }

.code-content {
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--code-text);
    background: var(--code-bg);
}

/* Code Block in Hero */
.hero-code {
    background: var(--code-bg);
    border-radius: 0.5rem;
    padding: 1rem 0.75rem;
    margin: 1rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--code-text);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
}

/* Adjust code block for small screens */
@media (max-width: 480px) {
    :root {
        --container-padding: 1.25rem;
        --section-spacing: 3rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .hero-code {
        font-size: 0.8rem;
        padding: 1rem 0.75rem;
        margin: 1.25rem -0.5rem;
        border-radius: 0;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    .hero-code pre {
        padding: 0 0.5rem;
    }
}

/* Responsive adjustments */
/* Responsive Design */
:root {
    --container-padding: 2rem;
    --section-spacing: 4rem;
}

@media (max-width: 1200px) {
    .container {
        padding: 0 var(--container-padding);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .example-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .example-tabs .tab-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 5rem 1.5rem 3rem !important;
        min-height: auto;
        display: flex;
        text-align: center;
        flex-direction: column;
        justify-content: flex-start;
        transition: padding 0.3s ease;
    }
    
    .navbar .container {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .nav-links a {
        margin: 0.25rem 0;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .hero-content {
        padding: 2rem 0 !important;
    }
    
    .hero-illustration {
        margin-top: 2rem;
    }
    
    .hero .container {
        padding: 0 0.75rem;
    }
    
    .glitch {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin: 0.5rem 0;
    }
    
    .tagline {
        font-size: 1.2rem !important;
        line-height: 1.3;
        margin: 0.5rem 0 0.75rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
        margin: 0.5rem 0 1.25rem;
    }
    
    .cta-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-btn {
        width: 100%;
        text-align: center;
    }
    
    /* Examples section */
    .examples {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .example-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .code-content {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .code-header {
        padding: 0.5rem 0.75rem;
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        padding: 6rem 2rem 4rem;
    }
    
    .glitch {
        font-size: 3.5rem !important;
        margin-bottom: 1rem;
    }
    
    .tagline {
        font-size: 1.4rem !important;
        margin-bottom: 1rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
        max-width: 90%;
        margin: 0 auto 2rem;
    }
    
    .examples {
        padding: 3rem 2rem;
    }
    
    .feature-card {
        padding: 1.75rem;
    }
    
    .example-tabs {
        gap: 0.5rem;
    }
    
    .tab-link {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

.example-window {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.example-window:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border-color: rgba(88, 166, 255, 0.2);
}

/* Smooth scrolling for mobile */
/* Hide code sections on mobile */
@media (max-width: 768px) {
    #examples,
    .hero-illustration {
        display: none;
    }
    
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Improve tap targets */
    a, button, .tab-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
        width: 100%;
    }
}

/* Performance optimizations */
@media (hover: hover) {
    .feature-card, .example-window, .tab-link {
        will-change: transform, box-shadow;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.example-window .window-header {
    justify-content: flex-start;
}

.example-tabs {
    display: flex;
    overflow-x: auto;
    padding: 0 1rem;
    margin: 0 -1rem;
    scrollbar-width: thin; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-behavior: smooth;
}

/* WebKit scrollbar styling for example tabs */
.example-tabs::-webkit-scrollbar {
    height: 4px;
}

.example-tabs::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 4px;
}

.example-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.tab-link {
    background: none;
    border: 1px solid transparent;
    color: var(--secondary-color);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.tab-link:hover {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.tab-link.active {
    color: var(--primary-color);
    /* background-color: rgba(255, 255, 255, 0.1); */
    border-color: transparent;
    font-weight: 500;
}

.tab-link.active::after {
    content: none;
}

.tab-pane {
    display: none;
}

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

.example-content {
    background-color: #1e1e1e;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.example-content pre {
    background-color: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 1.5rem;
}

/* Footer */
.footer {
    background-color: #000;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 0.5rem 0;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Mobile styles for footer links */
@media (max-width: 768px) {
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 1rem 0;
    }
    
    .footer-links a {
        margin: 0.5rem 0;
        padding: 0.5rem 1rem;
        width: 100%;
        text-align: center;
    }
    
    /* Hide Examples link on mobile */
    .footer-links a[href="#examples"] {
        display: none;
    }
}

.footer-social a {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Animations */
@keyframes rotateCube {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes glitch {
    0%, 100% { text-shadow: 0.05em 0 0 rgba(255,0,0,0.75), -0.025em -0.05em 0 rgba(0,255,0,0.75), 0.025em 0.05em 0 rgba(0,0,255,0.75); }
    25% { text-shadow: -0.05em 0 0 rgba(255,0,0,0.75), 0.025em 0.05em 0 rgba(0,255,0,0.75), -0.025em -0.05em 0 rgba(0,0,255,0.75); }
    50% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,0.75), 0.05em 0 0 rgba(0,255,0,0.75), 0 -0.05em 0 rgba(0,0,255,0.75); }
    75% { text-shadow: -0.025em -0.05em 0 rgba(255,0,0,0.75), -0.025em 0.05em 0 rgba(0,255,0,0.75), 0.05em 0 0 rgba(0,0,255,0.75); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* Responsive Breakpoints */
:root {
    --breakpoint-mobile: 768px;
    --breakpoint-tablet: 1024px;
}

/* Base Mobile Styles */
html {
    font-size: 14px; /* Base font size for mobile */
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none; /* Hidden by default, shown only on mobile */
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    padding: 0.75rem;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* Mobile Menu Open State */
.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) { 
    opacity: 0; 
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) { 
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .navbar {
        display: none;
    }
    .mobile-menu-btn { 
        display: none; 
    }

    /* Nav links for mobile */
    .nav-links {
        display: none; /* Hide navigation links on mobile */
    }

    /* Show navigation when menu is active */
    .nav-links.active {
        right: 0;
    }

    /* Style navigation links */
    .nav-links a {
        width: 100%;
        margin: 0.5rem 0;
        padding: 0.8rem 1rem;
        text-align: center;
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    /* Style buttons in mobile nav */
    .nav-links a.github-btn,
    .nav-links a.pypi-btn {
        margin: 1rem 0;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }

    /* Adjust hero section for mobile */
    .hero {
        padding: 2rem 1rem;
        min-height: auto;
    }
    
    .hero-content {
        padding: 1rem 0 !important;
    }
    
    .glitch {
        font-size: 3rem !important;  /* Increased from 2.2rem for better visibility on mobile */
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .tagline {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-btn {
        width: 100%;
        text-align: center;
    }

    .hero-content {
        padding: 2rem 1rem;
    }

    /* Adjust font sizes for mobile */
    .glitch {
        font-size: 3.5rem !important;  /* Increased for better mobile visibility */
        line-height: 1.1;
        margin: 0 0 0.5rem;
        letter-spacing: -0.02em;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    
    .hero-content {
        padding: 1.5rem 0.5rem 0 !important;
        max-width: 90%;
        margin: 0 auto;
    }
    
    .tagline {
        font-size: 1.4rem !important;
        line-height: 1.3;
        margin: 0.5rem 0 1rem;
        font-weight: 700;
        color: var(--primary-color);
    }
    
    .subtitle {
        font-size: 1.05rem;
        line-height: 1.6;
        max-width: 100%;
        margin: 0 auto 2rem;
        color: var(--secondary-color);
        padding: 0 0.5rem;
    }
    
    .cta-container {
        margin-top: 1.5rem;
    }

    .tagline {
        font-size: 1.2rem !important;
    }

    /* Make code blocks scrollable */
    .code-window {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }

    /* Adjust feature grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Footer adjustments */
    footer {
        text-align: center;
        padding: 2rem 1rem;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    html {
        font-size: 15px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .hero-content {
        padding: 4rem 2rem;
    }
}

/* Desktop Styles */
@media (min-width: 1025px) {
    html {
        font-size: 16px;
    }
    
    .nav-links {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    
    .mobile-menu-btn {
        display: none;
    }
}

/* Small mobile adjustments for tabs container */
@media (max-width: 480px) {
    .example-tabs { padding: 0 0.5rem; margin: 0 -0.5rem; }
}

/* Responsive base font size (moved out of :root) */
@media (max-width: 1200px) { html { font-size: 15px; } }
@media (max-width: 768px) { html { font-size: 14px; } }
@media (max-width: 480px) { html { font-size: 13px; } }


/* Spotlight effect over hero */
.hero { position: relative; /* stacking context for pseudo-element */ }
.hero::before {
    content: "";
    position: absolute; /* restrict to hero only */
    inset: 0;
    pointer-events: none;
    z-index: 0; /* above hero background, below content */
    background: radial-gradient(var(--spot-size, 600px) var(--spot-size, 600px) at var(--spot-x, 50%) var(--spot-y, 30%), rgba(255,255,255,0.10), rgba(255,255,255,0.0) 60%);
    mix-blend-mode: soft-light;
    transition: background-position 0.15s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .hero::before { transition: none; }
}

/* Section reveal helper */
.features-section,
.examples-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.6s ease-out;
}

.features-section.animate-in,
.examples-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

