/* ═══════════════════════════════════════════════════════════
   base.css — Shared foundation for all pages
   Variables · Reset · Nav · Footer · Buttons · Tokens
═══════════════════════════════════════════════════════════ */

/* ─── Variables ──────────────────────────────────────────── */
:root {
    --bg: #080810;
    --bg-2: #0d0d18;
    --bg-3: #12121e;
    --bg-4: #181826;
    --border: #1e1e30;
    --border-2: #2a2a40;
    --text: #e4e4f0;
    --text-2: #7878a0;
    --text-3: #45455a;
    --accent: #00e89d;
    --accent-10: rgba(0, 232, 157, .10);
    --accent-20: rgba(0, 232, 157, .20);
    --accent-40: rgba(0, 232, 157, .40);
    --blue: #60a5fa;
    --purple: #a78bfa;
    --orange: #fb923c;
    --red: #f87171;
    --green: #4ade80;
    --yellow: #fbbf24;
    --font-ui: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 10px;
    --radius-lg: 16px;
    --nav-h: 62px;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ─── Inline code ────────────────────────────────────────── */
pre code {
    padding: 0;
}

code {
    font-family: var(--font-mono);
    font-size: .88em;
    color: var(--accent);
    background: var(--accent-10);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ─── Utility ────────────────────────────────────────────── */
.accent {
    color: var(--accent);
}

/* ─── Scroll Reveal ──────────────────────────────────────── */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

[data-reveal-right] {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity .8s ease .15s, transform .8s ease .15s;
}

[data-reveal].revealed,
[data-reveal-right].revealed {
    opacity: 1;
    transform: none;
}

/* ─── Nav ────────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    transition: background .3s, border-color .3s, backdrop-filter .3s;
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    background: rgba(8, 8, 16, .85);
    backdrop-filter: blur(20px);
    border-color: var(--border);
}

.nav-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -.02em;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    transition: color .2s;
    white-space: nowrap;
}

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

.nav-links a.active {
    color: var(--accent);
}

.nav-cta {
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--bg) !important;
    font-weight: 600;
    font-size: 13px;
    transition: box-shadow .25s !important;
}

.nav-cta span {
    transition: transform .2s;
    display: inline-block;
}

.nav-cta:hover {
    box-shadow: 0 0 24px var(--accent-40);
}

.nav-cta:hover span {
    transform: translateX(3px);
}

.github-stars {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--bg);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 15px;
    transition: box-shadow .25s, transform .2s;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn-primary span {
    transition: transform .2s;
    display: inline-block;
}

.btn-primary:hover {
    box-shadow: 0 0 32px var(--accent-40);
    transform: translateY(-1px);
}

.btn-primary:hover span {
    transform: translateX(3px);
}

.btn-primary.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border-2);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    transition: border-color .2s, color .2s;
    white-space: nowrap;
}

.btn-secondary:hover {
    border-color: var(--text-3);
    color: var(--text);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border-2);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    transition: border-color .2s, color .2s;
}

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

/* ─── Footer ─────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    background: var(--bg-2);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 16px;
}

.footer-copy {
    font-size: 12px;
    color: var(--text-3);
}

.footer-links {
    display: flex;
    gap: 48px;
}

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

.footer-col-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-3);
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 13.5px;
    color: var(--text-2);
    transition: color .2s;
}

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

/* ─── Animations ─────────────────────────────────────────── */
@keyframes badgePulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 var(--accent-40);
    }

    50% {
        opacity: .7;
        box-shadow: 0 0 0 4px transparent;
    }
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 720px) {
    nav {
        padding: 12px 18px;
        height: auto;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
        width: 100%;
    }

    .nav-links a {
        padding: 8px 10px;
        font-size: 13px;
        white-space: normal;
    }

    .nav-links a:not(.nav-cta) {
        display: inline-flex;
        border-radius: 999px;
        border: 1px solid transparent;
        background: rgba(255, 255, 255, 0.03);
    }

    .nav-links a:not(.nav-cta):hover {
        background: var(--bg-3);
        color: var(--text);
    }

    .nav-cta {
        display: inline-flex;
        flex: 1 1 100%;
        min-width: 0;
        padding: 10px 14px;
        font-size: 13px;
        justify-content: center;
        align-items: center;
    }

    .footer-inner {
        flex-direction: column;
        padding: 36px 20px;
        gap: 28px;
    }

    .footer-links {
        gap: 28px;
    }
}

@media (max-width: 400px) {
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
}