/* ---------- Tokens ---------- */
:root {
    --accent: #1d4ed8;
    --accent-dark: #1e3a8a;
    --accent-soft: #e8efff;
    --ink: #0f172a;
    --ink-2: #334155;
    --ink-3: #64748b;
    --line: #e2e8f0;
    --bg: #ffffff;
    --bg-alt: #f6f8fb;
    --bg-dark: #0f172a;
    --radius: 14px;
    --container: 1100px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.hero-grid > *, .about-grid > *, .contact-grid > *, .card-grid > *, .stats-row > * { min-width: 0; }
.narrow { max-width: 640px; }
.kicker {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.lead { font-size: 1.15rem; color: var(--ink-2); }

.skip-link {
    position: absolute; left: -999px; top: 8px; z-index: 100;
    background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.4rem;
    border-radius: 999px;
    font-weight: 650;
    border: 1.5px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent-soft); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; height: 68px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: 0.06em; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-grid; place-items: center;
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--accent); color: #fff; font-weight: 800; font-size: 1.1rem;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links > a { color: var(--ink-2); font-weight: 600; }
.nav-links > a:hover { color: var(--ink); text-decoration: none; }
.nav-links > a.btn-primary, .nav-links > a.btn-primary:hover { color: #fff; }
.lang-switch { font-size: 0.85rem; letter-spacing: 0.08em; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; }
.nav-toggle { display: none; }
.nav-burger { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; background: radial-gradient(1200px 500px at 85% -10%, var(--accent-soft), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero-copy .lead { max-width: 540px; }

.code-window {
    background: var(--bg-dark); color: #e2e8f0;
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.5);
    overflow: hidden;
    font-family: var(--mono); font-size: 0.86rem;
}
.code-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #1e293b; }
.code-bar span { width: 11px; height: 11px; border-radius: 50%; background: #475569; }
.code-bar span:nth-child(1) { background: #f87171; }
.code-bar span:nth-child(2) { background: #fbbf24; }
.code-bar span:nth-child(3) { background: #34d399; }
.code-bar em { margin-left: auto; font-style: normal; color: #94a3b8; font-size: 0.78rem; }
.code-window pre { margin: 0; padding: 18px 20px; overflow-x: auto; line-height: 1.55; }
.code-window .k { color: #93c5fd; }
.code-window .t { color: #6ee7b7; }
.code-window .s { color: #fcd34d; }
.code-window .n { color: #f9a8d4; }
.code-window .f { color: #c4b5fd; }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 26px 20px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value { font-size: 1.7rem; font-weight: 800; color: var(--accent-dark); }
.stat-label { color: var(--ink-3); font-size: 0.95rem; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head .lead { margin-bottom: 0; }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: 0 16px 30px -18px rgba(15, 23, 42, 0.35); transform: translateY(-2px); }
.card p { color: var(--ink-2); font-size: 0.98rem; margin-bottom: 0; }
.card h3 { margin-top: 14px; }
.icon {
    display: inline-grid; place-items: center;
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--accent-soft); color: var(--accent);
}
.tags { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
    font-size: 0.78rem; font-weight: 600; color: var(--ink-2);
    background: var(--bg-alt); border: 1px solid var(--line);
    border-radius: 6px; padding: 3px 8px;
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 360px 1fr; gap: 56px; align-items: center; }
.about-photo img { border-radius: var(--radius); width: 100%; }
.about-copy p { color: var(--ink-2); }
.availability { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink) !important; margin-top: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }

/* ---------- Contact ---------- */
.section-dark { background: var(--bg-dark); color: #e2e8f0; }
.section-dark .kicker { color: #93c5fd; }
.section-dark h2 { color: #fff; }
.section-dark .lead { color: #cbd5e1; }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.contact-card {
    background: #1e293b; border: 1px solid #334155; border-radius: var(--radius); padding: 30px;
}
.contact-card dl { margin: 0; display: grid; grid-template-columns: 110px 1fr; row-gap: 14px; column-gap: 16px; }
.contact-card dt { color: #94a3b8; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.contact-card dd { margin: 0; }
.contact-card a { color: #fff; }
.contact-card a:hover { color: #93c5fd; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; font-size: 0.92rem; color: var(--ink-3); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-meta { display: flex; gap: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .card-grid, .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr; }
    .code-window { max-width: 560px; }
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .about-photo { max-width: 280px; }
    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .section { padding: 64px 0; }
    .hero { padding: 48px 0 40px; }
    .card-grid, .card-grid.cols-3 { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr; }
    .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
    .contact-card dl { grid-template-columns: 1fr; row-gap: 4px; }
    .contact-card dt { margin-top: 12px; }
    .contact-card dt:first-child { margin-top: 0; }
    .footer-row, .footer-meta { flex-direction: column; gap: 6px; }

    /* CSS-only mobile menu */
    .nav-burger {
        display: flex; flex-direction: column; justify-content: center; gap: 5px;
        width: 42px; height: 42px; cursor: pointer; padding: 8px;
        border: 1px solid var(--line); border-radius: 8px;
    }
    .nav-burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
    .nav-links {
        display: none;
        position: absolute; left: 0; right: 0; top: 68px;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--line);
        padding: 8px 20px 16px;
    }
    .nav-links > a { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .nav-links > a.btn { margin-top: 12px; text-align: center; border-bottom: 0; }
    .nav-links > a.lang-switch { align-self: flex-start; border: 0; padding: 12px 0; }
    .nav-toggle:checked ~ .nav-links { display: flex; }
}
