/* Shared by every page: tokens, reset, navbar, language switch, buttons, section headings, footer. */

:root {
    --background: #09090b;
    --surface: #111113;
    --surface-hover: #18181b;
    --border: #252529;
    --border-hover: #3a3a42;
    --text: #fafafa;
    --text-soft: #e4e4e9;
    --muted: #8b8b95;
    --faint: #71717a;
    --accent: #a78bfa;
    --accent-hover: #bba6ff;
    --accent-soft: rgba(167, 139, 250, 0.1);
    --gitlab: #fc6d26;
    --gitlab-hover: #ff8352;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --page: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
    background: var(--background);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.background-glow {
    position: absolute;
    top: -300px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    max-width: 100vw;
    height: 600px;
    background: rgba(139, 92, 246, 0.09);
    filter: blur(150px);
    pointer-events: none;
    z-index: -1;
}

/* Navbar */

.navbar {
    width: 100%;
    max-width: calc(var(--page) + 48px);
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-wrap { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }

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

.nav-logo img { width: 28px; height: 28px; object-fit: contain; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.nav-links > a { transition: color .2s; }
.nav-links > a:hover, .nav-links > a.is-current { color: var(--text); }

.nav-gitlab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(252, 109, 38, 0.28);
    border-radius: 7px;
    background: rgba(252, 109, 38, 0.06);
    color: #ffb38a !important;
    font-weight: 600;
    transition: background-color .2s, border-color .2s, color .2s;
}

.nav-gitlab svg { width: 15px; height: 15px; flex: none; }
.nav-gitlab:hover { background: rgba(252, 109, 38, 0.13); border-color: rgba(252, 109, 38, 0.55); color: #ffd0b3 !important; }

/* Language switch */

.lang-switch {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    flex: none;
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    padding: 6px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: color .2s, background-color .2s;
}

.lang-btn:hover { color: var(--text); }
.lang-btn.is-active { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

[data-i18n], [data-i18n-html] { transition: filter .2s ease, opacity .2s ease; }
.lang-swapping { filter: blur(4px); opacity: .55; }

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s, color .2s;
}

.button svg { width: 15px; height: 15px; flex: none; }
.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.button:active { transform: translateY(0); }

.button-primary {
    background: var(--text);
    color: #09090b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 26px -14px rgba(250, 250, 250, 0.55);
}

.button-primary:hover { background: #fff; transform: translateY(-1px); }

.button-secondary {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border);
    color: var(--text);
}

.button-secondary:hover { background: rgba(255, 255, 255, 0.055); border-color: var(--border-hover); transform: translateY(-1px); }

.button-gitlab {
    background: rgba(252, 109, 38, 0.06);
    border-color: rgba(252, 109, 38, 0.28);
    color: #ffb38a;
}

.button-gitlab:hover { background: rgba(252, 109, 38, 0.13); border-color: rgba(252, 109, 38, 0.55); color: #ffd0b3; }

/* Sections */

.section { max-width: calc(var(--page) + 48px); margin: 0 auto; padding: 88px 24px; }
.section-heading { text-align: center; margin-bottom: 48px; }

.section-label {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-heading h1,
.section-heading h2 { font-size: 34px; font-weight: 700; letter-spacing: -1.4px; margin-top: 12px; }
.section-heading p { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* Footer */

.footer {
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: calc(var(--page) + 48px);
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 12px;
}

.footer-logo { color: var(--text); font-size: 14px; font-weight: 700; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { display: inline-flex; align-items: center; gap: 5px; transition: color .2s; }
.footer-links a svg { width: 12px; height: 12px; flex: none; }
.footer-links a:hover { color: var(--text); }

@media (max-width: 760px) {
    .nav-links { gap: 12px; }
    .nav-links > a.nav-hide { display: none; }
    .section { padding: 64px 20px; }
    .section-heading h1, .section-heading h2 { font-size: 28px; }
    .footer-inner { flex-direction: column; text-align: center; gap: 14px; }
}

@media (max-width: 420px) {
    .navbar { padding: 0 16px; }
    .nav-logo { font-size: 16px; gap: 8px; }
    .nav-logo img { width: 24px; height: 24px; }
    .nav-gitlab { padding: 7px 10px; font-size: 12px; }
    .lang-btn { padding: 5px 7px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    [data-i18n], [data-i18n-html], .button { transition: none; }
    .lang-swapping { filter: none; opacity: 1; }
}
