
:root {
    --color-bg: #0b0b10;
    --color-surface: #111827;
    --color-surface-alt: #020617;
    --color-accent: #2563eb;
    --color-accent-soft: rgba(37, 99, 235, 0.12);
    --color-text: #f9fafb;
    --color-text-muted: #9ca3af;
    --color-border: #1f2933;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-full: 999px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.55);
    --max-width: 1200px;
    --transition-fast: 150ms ease-out;
}

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

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #111827 0, #020617 45%, #020617 100%);
    color: var(--color-text);
}

body {
    -webkit-font-smoothing: antialiased;
}

/* Top bar */

.top-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.75), transparent);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.top-bar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 14px;
    background: radial-gradient(circle at 20% 20%, #38bdf8, #2563eb 40%, #4f46e5 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.6);
}

.brand-text {
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 0.98rem;
}

/* Navigation */

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding: 0.3rem 0;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.25rem;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #38bdf8, #2563eb);
    transition: width var(--transition-fast);
}

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

.main-nav a:hover::after {
    width: 100%;
}

/* Mobile nav toggle */

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
}

.nav-toggle-line {
    width: 20px;
    height: 2px;
    background: #e5e7eb;
    border-radius: 999px;
}

/* Hero */

.hero {
    padding: 3.5rem 1.5rem 2.5rem;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-kicker {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: 2.6rem;
    line-height: 1.1;
    margin: 0 0 1rem;
}

.hero-subtitle {
    margin: 0 0 1.75rem;
    color: var(--color-text-muted);
    max-width: 32rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn.primary {
    background: linear-gradient(to right, #2563eb, #4f46e5);
    color: white;
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.75);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 55px rgba(37, 99, 235, 0.85);
}

.btn.secondary {
    background: rgba(15, 23, 42, 0.9);
    color: var(--color-text);
    border-color: rgba(148, 163, 184, 0.4);
}

.btn.secondary:hover {
    background: rgba(30, 64, 175, 0.5);
}

/* Hero side card */

.hero-panel {
    display: flex;
    justify-content: center;
}

.hero-card {
    width: 100%;
    max-width: 340px;
    border-radius: 22px;
    padding: 1.6rem 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 55%),
        radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.18), transparent 55%),
        rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: var(--shadow-soft);
}

.hero-card h2 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.hero-card ul {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.hero-card li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.hero-card .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: radial-gradient(circle, #38bdf8, #6366f1);
}

.hero-note {
    font-size: 0.8rem;
    color: #e5e7eb;
    opacity: 0.9;
}

/* Sections */

.section {
    padding: 1.5rem 1.5rem 2.5rem;
}

.section-alt {
    background: radial-gradient(circle at top, rgba(30, 64, 175, 0.12), transparent 55%), rgba(15, 23, 42, 0.92);
}

.section-header {
    max-width: var(--max-width);
    margin: 0 auto 1.8rem;
}

.section-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.4rem;
}

.section-header p {
    margin: 0;
    color: var(--color-text-muted);
}

/* Card grid */

.card-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.card {
    background: rgba(15, 23, 42, 0.97);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: 1.1rem 1.1rem 1.2rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.65);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 0;
}

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

.card h3 {
    position: relative;
    z-index: 1;
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-size: 1.02rem;
}

.card p {
    position: relative;
    z-index: 1;
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.card-list {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0 0 0.8rem;
    padding: 0;
    font-size: 0.85rem;
    color: #e5e7eb;
}

.card-list li {
    margin-bottom: 0.25rem;
}

.card-link {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    color: #93c5fd;
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}

/* Horizontal cards (news) */

.card-row {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.card.horizontal {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: #bfdbfe;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Languages */

.pill-grid {
    max-width: var(--max-width);
    margin: 0 auto 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.pill {
    border-radius: var(--radius-full);
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    background: rgba(15, 23, 42, 0.9);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.pill:hover {
    transform: translateY(-1px);
}

.pill.active {
    background: var(--color-accent-soft);
    color: #e5e7eb;
    border-color: rgba(59, 130, 246, 0.8);
}

.language-panel {
    max-width: var(--max-width);
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.97);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: 1.2rem 1.3rem;
    box-shadow: var(--shadow-soft);
}

.language-panel h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.language-panel p {
    margin-top: 0;
    margin-bottom: 0.9rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.language-panel pre {
    margin: 0;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: #020617;
    overflow-x: auto;
    font-size: 0.8rem;
}

/* Learn steps */

.learn-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.learn-step {
    background: rgba(15, 23, 42, 0.97);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: 1rem 1.1rem;
    position: relative;
    overflow: hidden;
}

.learn-step::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.learn-step:hover::before {
    opacity: 1;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(148, 163, 184, 0.8);
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.learn-step h3 {
    margin-top: 0;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.learn-step p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Footer */

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1.5rem 1.5rem 2rem;
    background: #020617;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: left;
}

.footer-brand {
    margin: 0 0 0.4rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-text {
    margin: 0 0 0.4rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.footer-meta {
    margin: 0;
    font-size: 0.78rem;
    color: #6b7280;
}

/* Responsive */

@media (max-width: 960px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }
    .hero-panel {
        order: -1;
    }
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .card-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .learn-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .top-bar-inner {
        padding-inline: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        inset-inline: 0;
        top: 100%;
        background: rgba(15, 23, 42, 0.98);
        border-bottom: 1px solid rgba(148, 163, 184, 0.25);
        transform-origin: top;
        transform: scaleY(0.3);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition-fast), opacity var(--transition-fast);
    }

    .main-nav.open {
        transform: scaleY(1);
        opacity: 1;
        pointer-events: auto;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 0.75rem 1rem 1rem;
        gap: 0.35rem;
    }

    .hero {
        padding-top: 2.5rem;
    }

    .hero h1 {
        font-size: 2.1rem;
    }

    .card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .card-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .learn-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
