:root {
    --bg-primary: #0a0a30;
    --bg-secondary: #121240;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --text-muted: #606080;
    --accent-primary: #7c3aed;
    --accent-secondary: #a855f7;
    --accent-tertiary: #c084fc;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --logo-navy: #0a0a30;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(124, 58, 237, 0.3);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
    --gradient-galaxy: linear-gradient(135deg, #0a0a30 0%, #1a0a4e 25%, #0f174a 50%, #1e0b56 75%, #0a0a30 100%);
    --gradient-accent: linear-gradient(135deg, #7c3aed, #3b82f6, #06b6d4);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
}

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

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-galaxy);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 60% 40%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,0.25), transparent),
        radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 90% 90%, rgba(255,255,255,0.15), transparent),
        radial-gradient(1px 1px at 30% 50%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 50% 20%, rgba(255,255,255,0.3), transparent);
    z-index: -1;
    animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.3); }
    50% { box-shadow: 0 0 40px rgba(124, 58, 237, 0.5); }
}

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

a {
    color: var(--accent-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--logo-navy);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width var(--transition-base);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Language Selector */
.lang-selector {
    display: flex;
    gap: 8px;
}

.lang-link {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.lang-link:hover {
    color: var(--text-primary);
    border-color: var(--border-glow);
}

.lang-link.active {
    color: var(--accent-tertiary);
    border-color: var(--accent-primary);
    background: rgba(124, 58, 237, 0.1);
}

/* Article Translations */
.article-translations {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.translations-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.translation-link {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-tertiary);
    border: 1px solid rgba(124, 58, 237, 0.3);
    transition: all var(--transition-fast);
}

.translation-link:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--accent-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 400;
    font-family: 'Orbit', sans-serif;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #ffffff;
    letter-spacing: 1px;
}

.hero-title-bold {
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: #ffffff;
    margin-bottom: 40px;
    line-height: 1.7;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-accent);
    background-size: 200% 200%;
    color: white;
    animation: gradient-shift 3s ease infinite;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: white;
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    color: var(--text-primary);
}

/* Projects Section */
.projects {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

.project-card:hover::before {
    opacity: 1;
}

.project-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-tertiary);
}

.project-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-project {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-project.docs {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
}

.btn-project.docs:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--accent-cyan);
}

.btn-project.repo {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: var(--accent-tertiary);
}

.btn-project.repo:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--accent-primary);
}

/* Blog Section */
.blog {
    padding: 100px 0;
}

.blog-grid {
    display: grid;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.blog-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-base);
}

.blog-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.blog-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.blog-title a:hover {
    color: var(--accent-tertiary);
}

.blog-summary {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Article Page */
.article {
    padding: 120px 0 80px;
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 48px;
}

.article-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-content {
    line-height: 1.8;
}

.article-content h2,
.article-content h3 {
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.article-content code {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.article-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 24px;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content blockquote {
    border-left: 3px solid var(--accent-primary);
    padding-left: 20px;
    margin: 24px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 8px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 48px 0;
    margin-top: 80px;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

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

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

/* Responsive */
@media (max-width: 768px) {
    .navbar-nav {
        gap: 20px;
    }
    
    .hero {
        padding: 100px 20px 60px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer .container {
        flex-direction: column;
        text-align: center;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}
