@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg: #090614;
    --bg-2: #0f0a22;
    --surface: rgba(18, 11, 38, 0.75);
    --surface-hover: rgba(26, 16, 54, 0.9);
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(147, 51, 234, 0.35);
    --accent: #9333ea;
    --accent-soft: #7c3aed;
    --accent-bright: #a855f7;
    --accent-glow: rgba(147, 51, 234, 0.3);
    --accent-glow-strong: rgba(147, 51, 234, 0.5);
    --text: #f1f0f5;
    --text-secondary: #9090a8;
    --text-muted: #5a5a72;
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --success-border: rgba(34, 197, 94, 0.3);
    --warning: #eab308;
    --warning-bg: rgba(234, 179, 8, 0.1);
    --warning-border: rgba(234, 179, 8, 0.3);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --danger-border: rgba(239, 68, 68, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
    scroll-behavior: smooth;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

.text-gradient {
    background: linear-gradient(135deg, #c084fc 0%, #a78bfa 50%, #9333ea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(147, 51, 234, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 51, 234, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.grid-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(147, 51, 234, 0.12) 0%, transparent 70%);
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
    pointer-events: none;
}

.page-content {
    position: relative;
    z-index: 1;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(9, 6, 20, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.navbar-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    z-index: 10;
    flex: 1;
}

.navbar-logo:hover {
    color: var(--text);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.navbar-links a {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.navbar-links a:hover,
.navbar-links a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.navbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    z-index: 10;
    flex: 1;
}

.github-btn-wrapper {
    position: relative;
}

.github-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.github-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.github-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 220px;
    background: rgba(15, 10, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    pointer-events: none;
}

.github-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.github-dropdown-label {
    padding: 10px 16px 8px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.github-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
    border-top: 1px solid var(--border);
}

.github-dropdown-item:first-of-type {
    border-top: none;
}

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

.github-dropdown-item-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.github-dropdown-item-icon.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.github-dropdown-item-icon.red { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.github-dropdown-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.github-dropdown-item-code {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--accent-soft);
    box-shadow: 0 0 32px var(--accent-glow-strong);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(147, 51, 234, 0.1);
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-display);
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

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

.stat-sep {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Custom Cursor (Dot Trailing) */
.custom-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    box-shadow: 0 0 10px var(--accent-glow);
    transform: translate(-50%, -50%);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid;
}

.badge-stable {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-border);
}

.badge-beta {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: var(--warning-border);
}

.badge-open-source {
    background: rgba(147, 51, 234, 0.12);
    color: var(--accent-bright);
    border-color: rgba(147, 51, 234, 0.3);
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    text-align: center;
}

.site-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer-copy {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.site-footer-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.site-footer-links-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-right: 4px;
}

.site-footer-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.site-footer-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.site-footer-sep {
    color: var(--text-muted);
    opacity: 0.4;
    font-size: 0.75rem;
}

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

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

.animate-fade-up {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(147, 51, 234, 0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(147, 51, 234, 0.6); }

@media (max-width: 768px) {
    .navbar { padding: 0 12px; }
    .navbar-links { display: none; }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(147, 51, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(147, 51, 234, 0); }
}

.pulse-glow-btn {
    animation: pulse-glow 2.5s infinite;
}

.pulse-glow-btn:hover {
    animation: none;
}

@keyframes meteor-fall {
    0% { transform: rotate(var(--angle, 215deg)) translateX(0); opacity: 1; }
    70% { opacity: 1; }
    100% { transform: rotate(var(--angle, 215deg)) translateX(-500px); opacity: 0; }
}

.meteor {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.9);
    box-shadow: 0 0 6px 1px rgba(168, 85, 247, 0.4);
    animation: meteor-fall linear infinite;
    pointer-events: none;
    transform-origin: 50% 50%;
}

.meteor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 60px;
    height: 1px;
    transform: translateY(-50%) translateX(-100%);
    background: linear-gradient(to left, rgba(168, 85, 247, 0.8), transparent);
}

.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #9333ea 0%, #a855f7 50%, #c084fc 80%, #38bdf8 100%);
    width: 0%;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
    transition: width 0.08s ease-out;
}

.shine-border-wrap {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    opacity: 0.35;
    transition: opacity 0.4s ease;
}

.magic-card:hover .shine-border-wrap,
.cta-card:hover .shine-border-wrap {
    opacity: 1;
}

.shine-border-inner {
    position: absolute;
    inset: -100%;
    background: conic-gradient(from 0deg, transparent 0deg, transparent 60deg, rgba(168, 85, 247, 0.7) 110deg, rgba(236, 72, 153, 0.9) 140deg, rgba(168, 85, 247, 0.9) 170deg, transparent 220deg, transparent 360deg);
    animation: shine-spin 7s linear infinite;
}

@keyframes shine-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.marquee-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 24px 0 32px;
    mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 16px;
    animation: marquee-scroll 32s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
    animation-play-state: paused;
}

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

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: rgba(18, 11, 38, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
    user-select: none;
}

.marquee-item:hover {
    border-color: rgba(168, 85, 247, 0.45);
    color: #fff;
    background: rgba(147, 51, 234, 0.15);
    transform: translateY(-1px);
}

.marquee-item-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-bright);
    box-shadow: 0 0 6px var(--accent-bright);
    flex-shrink: 0;
}

@keyframes shimmer-travel {
    0% { transform: translateX(-100%) rotate(0deg); }
    100% { transform: translateX(200%) rotate(0deg); }
}

.shimmer-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 32px;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: rgba(9, 6, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
    white-space: nowrap;
    z-index: 0;
}

.shimmer-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(from 270deg, transparent 0deg, rgba(168, 85, 247, 0.9) 90deg, transparent 180deg);
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    animation: shimmer-travel 3s linear infinite;
    z-index: -2;
    filter: blur(2px);
}

.shimmer-btn::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: calc(999px - 1px);
    background: rgba(9, 6, 20, 0.95);
    z-index: -1;
}

.shimmer-btn:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 28px rgba(147, 51, 234, 0.35), inset 0 -6px 10px rgba(255,255,255,0.06);
    transform: translateY(-2px);
}

.shimmer-btn:active {
    transform: translateY(0);
}

.magic-card {
    position: relative;
    border-radius: 24px;
    background: var(--surface);
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--border);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0px); }
}

.magic-card-spotlight {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.magic-card:hover .magic-card-spotlight {
    opacity: 1;
}

.magic-card-content {
    position: relative;
    z-index: 2;
}

@keyframes hyper-text-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hyper-char {
    display: inline-block;
    font-family: var(--font-mono);
    transition: none;
}

.hyper-char.scrambling {
    color: var(--accent-bright);
    animation: hyper-text-flash 0.08s linear;
}

@keyframes flicker-square {
    0%, 100% { opacity: var(--op, 0.3); }
    50% { opacity: calc(var(--op, 0.3) * 0.3); }
}

.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.section-eyebrow-line {
    width: 32px;
    height: 1px;
    background: var(--accent);
    opacity: 0.6;
}

.section-eyebrow-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-bright);
}

@keyframes number-tick-up {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.number-ticker-digit {
    display: inline-block;
    overflow: hidden;
    height: 1.15em;
    vertical-align: bottom;
}

.number-ticker-digit span {
    display: block;
    animation: number-tick-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes shine-sweep {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.animated-shiny-text {
    background: linear-gradient(
        90deg,
        var(--text-secondary) 0%,
        var(--text-secondary) 40%,
        #fff 50%,
        var(--text-secondary) 60%,
        var(--text-secondary) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine-sweep 4s linear infinite;
}
