:root {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f29;
    --bg-elevated: #242b38;
    --bg-code: #161b22;
    --bg-card: #1f2633;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --accent-blue: #58a6ff;
    --accent-teal: #39d0d8;
    --accent-purple: #bc8cff;
    --accent-orange: #ff9757;
    --border-light: #30363d;
    --border-medium: #484f58;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --glow-blue: rgba(88, 166, 255, 0.3);
    --glow-teal: rgba(57, 208, 216, 0.3);
    --code-comment: #8b949e;
    --code-keyword: #ff7b72;
    --code-string: #a5d6ff;
    --code-function: #d2a8ff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Work Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
}

/* Header */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(26, 31, 41, 0.95);
    box-shadow: 0 1px 0 var(--border-light);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.wavelet-logo {
    display: block;
    height: 35px;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.wavelet-logo:hover {
    opacity: 1;
}

.wavelet-logo img {
    height: 100%;
    width: auto;
}

.header-divider {
    width: 1px;
    height: 30px;
    background: var(--border-medium);
}

.logo {
    font-family: 'Fira Code', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.logo span {
    color: var(--accent-blue);
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

nav a:hover {
    color: var(--accent-blue);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.2s ease;
}

nav a:hover::after {
    width: 100%;
}

.git-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-blue);
    color: var(--bg-primary);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 0 20px var(--glow-blue);
}

.git-btn:hover {
    background: var(--accent-teal);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 0 30px var(--glow-teal);
}

.git-btn::after {
    display: none;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    padding: 8rem 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.wave-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, var(--glow-blue) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--glow-teal) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(188, 140, 255, 0.2) 0%, transparent 40%);
    opacity: 0.4;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--border-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
}

.morlet-graphic {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    opacity: 0.15;
    width: 400px;
    max-width: 30vw;
    pointer-events: none;
}

.morlet-graphic img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    max-width: 800px;
}

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

.cta-group {
    display: flex;
    gap: 1rem;
}

.cta-primary {
    padding: 1rem 2rem;
    background: var(--accent-blue);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 0 30px var(--glow-blue);
}

.cta-primary:hover {
    background: var(--accent-teal);
    transform: translateY(-2px);
    box-shadow: 0 0 40px var(--glow-teal), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.cta-secondary {
    padding: 1rem 2rem;
    border: 2px solid var(--border-medium);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    background: transparent;
}

.cta-secondary:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    box-shadow: 0 0 20px var(--glow-blue);
    transform: translateY(-2px);
}

/* Libraries Section */
.libraries {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 5rem 2rem;
}

.libraries-content {
    max-width: 1400px;
    margin: 0 auto;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.01em;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.library-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.library-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal), var(--accent-purple));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.library-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 30px rgba(88, 166, 255, 0.2), var(--shadow-md);
    transform: translateY(-4px);
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.library-name {
    font-family: 'Fira Code', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.library-badge {
    padding: 0.25rem 0.75rem;
    background: var(--bg-code);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.library-badge.stable {
    background: rgba(57, 208, 216, 0.2);
    color: var(--accent-teal);
    border: 1px solid var(--accent-teal);
}

.library-badge.beta {
    background: rgba(255, 151, 87, 0.2);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
}

.library-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.library-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.library-features li {
    padding: 0.4rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.library-features li::before {
    content: '→';
    color: var(--accent-teal);
    font-weight: 600;
}

.library-links {
    display: flex;
    gap: 1rem;
}

.library-link {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.library-link:hover {
    color: var(--accent-teal);
}

/* Code Examples Section */
.examples {
    padding: 5rem 2rem;
    background: var(--bg-primary);
}

.examples-content {
    max-width: 1400px;
    margin: 0 auto;
}

.example-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    font-weight: 500;
}

.tab-btn.active {
    color: var(--accent-blue);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-blue);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
}

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

.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    white-space: pre;
}

.code-block .comment {
    color: var(--code-comment);
}

.code-block .keyword {
    color: var(--code-keyword);
    font-weight: 500;
}

.code-block .string {
    color: var(--code-string);
}

.code-block .function {
    color: var(--code-function);
    font-weight: 500;
}

.example-note {
    background: var(--bg-elevated);
    border-left: 4px solid var(--accent-purple);
    padding: 1.5rem;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

/* Documentation Section */
.documentation {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 5rem 2rem;
}

.documentation-content {
    max-width: 1400px;
    margin: 0 auto;
}

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

.doc-card {
    padding: 2rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.doc-card:hover {
    border-color: var(--accent-teal);
    box-shadow: 0 0 25px rgba(57, 208, 216, 0.2), var(--shadow-md);
    transform: translateY(-2px);
}

.doc-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.doc-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.doc-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.doc-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.doc-link:hover {
    color: var(--accent-teal);
}

.doc-link::after {
    content: '→';
}

/* Community Section */
.community {
    padding: 5rem 2rem;
    background: var(--bg-primary);
    position: relative;
}

.community::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 30%, var(--glow-blue) 0%, transparent 40%),
        radial-gradient(circle at 90% 70%, var(--glow-teal) 0%, transparent 40%);
    opacity: 0.15;
    pointer-events: none;
}

.community-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.community-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.community-main {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 3rem;
    box-shadow: var(--shadow-sm);
}

.community-main h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.community-main p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.community-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.community-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.sidebar-card:hover {
    box-shadow: var(--shadow-md);
}

.sidebar-card h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.sidebar-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.sidebar-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-link:hover {
    color: var(--accent-teal);
}

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

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-family: 'Fira Code', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .hero {
        padding: 4rem 2rem;
    }
    
    .community-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .header-divider {
        display: none;
    }
    
    .wavelet-logo {
        height: 28px;
    }
    
    nav {
        display: none;
    }
    
    .cta-group {
        flex-direction: column;
    }
    
    .library-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .community-stats {
        grid-template-columns: 1fr;
    }
    
    .example-tabs {
        flex-direction: column;
    }
    
    .morlet-graphic {
        display: none;
    }
}