@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/Inter-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/Inter-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/Inter-Bold.woff2') format('woff2');
}

:root {
    --color-bg: #ffffff;
    --color-bg-soft: #fafafa;
    --color-bg-dark: #0a0a14;
    --color-text: #0a0a14;
    --color-text-soft: #4b5563;
    --color-text-muted: #9ca3af;
    --color-border: #e5e7eb;
    --color-primary: #6366f1;
    --color-primary-hover: #4f46e5;
    --color-purple: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-text: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-ghost:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 10px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    color: var(--color-text-soft);
    font-weight: 500;
}

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

/* Hero */
.hero {
    position: relative;
    padding: 120px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.12), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.10), transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.08), transparent 50%);
    z-index: -1;
}

.hero-content {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--color-primary);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 28px;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(40px, 6vw, 68px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 19px;
    color: var(--color-text-soft);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 80px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 14px;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-dark {
    background: var(--color-bg-dark);
    color: white;
}

.section-dark .section-desc {
    color: rgba(255, 255, 255, 0.6);
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.eyebrow {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-desc {
    font-size: 18px;
    color: var(--color-text-soft);
    line-height: 1.6;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.icon-purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.icon-blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.icon-pink { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.icon-green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.icon-orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.icon-cyan { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--color-text-soft);
    font-size: 15px;
    line-height: 1.7;
}

/* Research Grid */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.research-card {
    padding: 32px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.research-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
}

.research-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 16px;
}

.research-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.research-card p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.research-link {
    color: #a5b4fc;
    font-size: 14px;
    font-weight: 500;
}

.research-link:hover {
    color: white;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    display: block;
    padding: 28px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.project-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.lang-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3572A5;
}

.lang-dot.lang-ts { background: #3178c6; }
.lang-dot.lang-rust { background: #dea584; }

.project-card p {
    color: var(--color-text-soft);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-footer {
    display: flex;
    gap: 16px;
    color: var(--color-text-muted);
    font-size: 13px;
}

/* CTA */
.section-cta {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    padding: 100px 0;
}

.cta-content {
    max-width: 680px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.cta-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 36px;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.section-cta .btn-primary {
    background: white;
    color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.section-cta .btn-primary:hover {
    background: rgba(255, 255, 255, 0.95);
}

.section-cta .btn-ghost {
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.section-cta .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Footer */
.footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 0 32px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 64px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .logo {
    color: white;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col h4 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 32px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero {
        padding: 80px 0 60px;
    }
    .hero-stats {
        gap: 40px;
    }
    .section {
        padding: 64px 0;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer-cols {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
