/* ==========================================================================
   Ayim Nelson portfolio: site styles
   ========================================================================== */

:root {
    --bg: #0b1120;
    --bg-alt: #0f172a;
    --surface: #131d33;
    --surface-2: #1a2742;
    --border: rgba(148, 163, 184, 0.14);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --heading: #f8fafc;
    --accent: #22d3ee;
    --accent-2: #818cf8;
    --accent-ink: #04202a;
    --success: #34d399;
    --danger: #f87171;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 45px -20px rgba(2, 6, 23, 0.8);
    --container: 1160px;
    --header-h: 72px;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--heading); }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--heading);
    line-height: 1.15;
    margin: 0 0 0.6em;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    padding: 10px 16px; background: var(--accent); color: var(--accent-ink);
    border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 16px; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.container.narrow { max-width: 760px; }

.muted { color: var(--muted); font-weight: 400; }
.accent { color: var(--accent); }

/* ---------- Buttons, tags, chips ---------- */

.btn {
    display: inline-flex; align-items: center; gap: 0.5em;
    padding: 0.8em 1.5em;
    font: 600 0.95rem/1 var(--font-body);
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), #67e8f9);
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(34, 211, 238, 0.7); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

.btn-ghost {
    color: var(--heading); background: transparent; border-color: var(--border);
}
.btn-ghost:hover { color: var(--heading); background: var(--surface); box-shadow: none; }

.btn-small { padding: 0.6em 1.15em; font-size: 0.875rem; }

.eyebrow {
    margin: 0 0 0.75em;
    font: 600 0.8rem/1 var(--font-body);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.tag {
    display: inline-block;
    margin: 0;
    padding: 0.3em 0.75em;
    font-size: 0.75rem; font-weight: 600; line-height: 1.4;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
    border-radius: 999px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li {
    padding: 0.25em 0.7em; font-size: 0.78rem; color: var(--muted);
    border: 1px solid var(--border); border-radius: 999px;
}

.pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 0.4em 1em; margin-bottom: 1.5em;
    font-size: 0.85rem; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.pulse {
    width: 8px; height: 8px; border-radius: 50%; background: var(--success);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
    animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.link-arrow { display: inline-flex; align-items: center; gap: 0.45em; font-weight: 600; }
.link-arrow i { transition: transform .2s ease; }
.link-arrow:hover i { transform: translateX(4px); }
.link-arrow.back:hover i { transform: translateX(-4px); }

/* ---------- Header ---------- */

.site-header {
    position: fixed; inset: 0 0 auto; z-index: 50;
    height: var(--header-h);
    transition: background .25s ease, border-color .25s ease;
    border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-open {
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border);
}

.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { font: 700 1.5rem/1 var(--font-head); color: var(--heading); letter-spacing: -0.02em; }
.brand:hover { color: var(--heading); }
.brand-mark { color: var(--accent); }
.brand-dot { color: var(--accent-2); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--muted); font-size: 0.95rem; font-weight: 500; position: relative; }
.site-nav a:not(.btn):hover,
.site-nav a.is-active { color: var(--heading); }
.site-nav a.is-active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
    height: 2px; border-radius: 2px; background: var(--accent);
}

.menu-toggle {
    display: none; width: 44px; height: 44px; padding: 0;
    background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; position: relative;
}
.menu-toggle span:not(.sr-only) {
    position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px;
    background: var(--heading); transition: transform .25s ease, top .25s ease;
}
.menu-toggle span:nth-of-type(2) { top: 17px; }
.menu-toggle span:nth-of-type(3) { top: 25px; }
.site-header.is-open .menu-toggle span:nth-of-type(2) { top: 21px; transform: rotate(45deg); }
.site-header.is-open .menu-toggle span:nth-of-type(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }
.page-top { padding-top: calc(var(--header-h) + 56px); }
.page-title { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.lead { font-size: 1.15rem; color: var(--muted); }

.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
.section-head h2 { margin: 0; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.card-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
    position: relative;
    padding: calc(var(--header-h) + 72px) 0 56px;
    background:
        radial-gradient(50rem 26rem at 90% -20%, rgba(129, 140, 248, 0.16), transparent 60%),
        radial-gradient(40rem 22rem at 0% 120%, rgba(34, 211, 238, 0.10), transparent 60%),
        var(--bg);
    border-bottom: 1px solid var(--border);
}
.page-hero .page-title { margin-bottom: 0.3em; }
.page-hero .lead { max-width: 640px; margin: 0; }
.page-hero + .section { padding-top: clamp(56px, 7vw, 88px); }

.cta-band { padding: 72px 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-inner h2 { margin: 0; }
.cta-inner .actions { margin: 0; }

.about-socials { margin-top: 24px; }
.about-grid .actions { margin: 28px 0 0; }
.project-chips { margin: 4px 0 16px; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex; align-items: center;
    padding: calc(var(--header-h) + 40px) 0 80px;
    overflow: hidden;
    background:
        radial-gradient(60rem 40rem at 85% -10%, rgba(129, 140, 248, 0.18), transparent 60%),
        radial-gradient(50rem 35rem at -10% 110%, rgba(34, 211, 238, 0.14), transparent 60%),
        var(--bg);
}
.hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.hero-inner {
    position: relative;
    display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 56px;
}
.hero h1 { margin-bottom: 0.2em; }
.hero-role { font: 600 clamp(1.3rem, 2.6vw, 1.9rem)/1.3 var(--font-head); color: var(--muted); min-height: 1.3em; }
.typed { color: var(--accent); border-right: 2px solid var(--accent); padding-right: 4px; animation: caret 1s step-end infinite; }
@keyframes caret { 50% { border-color: transparent; } }
.hero-lead { max-width: 560px; font-size: 1.1rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0; }

.socials { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.socials a {
    display: grid; place-items: center; width: 42px; height: 42px;
    color: var(--muted); border: 1px solid var(--border); border-radius: 50%;
    transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.hero-art { display: flex; justify-content: center; }
.avatar-ring {
    position: relative; width: min(360px, 80vw); aspect-ratio: 1;
    padding: 6px; border-radius: 50%;
    background: conic-gradient(from 140deg, var(--accent), var(--accent-2), var(--accent));
    box-shadow: 0 30px 80px -30px rgba(34, 211, 238, 0.55);
}
.avatar-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 6px solid var(--bg); }

/* ---------- About ---------- */

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.about-grid p { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stat { padding: 20px 14px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat strong { display: block; font: 700 2rem/1.1 var(--font-head); color: var(--heading); }
.stat span { font-size: 0.8rem; color: var(--muted); }

.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.facts li { display: flex; align-items: center; gap: 14px; }
.facts i {
    display: grid; place-items: center; flex: none; width: 40px; height: 40px;
    color: var(--accent); background: rgba(34, 211, 238, 0.1); border-radius: var(--radius-sm);
}
.facts a, .facts span { color: var(--text); word-break: break-word; }
.facts a:hover { color: var(--accent); }

/* ---------- Services ---------- */

.service .icon {
    display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px;
    font-size: 1.3rem; color: var(--accent);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(129, 140, 248, 0.16));
    border-radius: 14px;
}
.service p { margin: 0; color: var(--muted); }
.card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.35); box-shadow: var(--shadow); }

/* ---------- Experience timeline ---------- */

.timeline { position: relative; margin: 0; padding: 0 0 0 32px; list-style: none; }
.timeline::before {
    content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
    background: linear-gradient(var(--accent), var(--accent-2), transparent);
}
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute; left: -32px; top: 6px; width: 16px; height: 16px;
    background: var(--bg); border: 3px solid var(--accent); border-radius: 50%;
}
.timeline-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.period { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.timeline-item h3 { font-size: 1.25rem; margin-bottom: 0.4em; }
.timeline-item p { max-width: 760px; color: var(--muted); }

/* ---------- Projects ---------- */

.project-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.project {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.project:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.35); box-shadow: var(--shadow); }
.project-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.project-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s ease; }
.project:hover .project-media img { transform: scale(1.04); }
.project-placeholder {
    width: 100%; height: 100%; display: grid; place-items: center;
    font: 700 3.5rem/1 var(--font-head); color: rgba(226, 232, 240, 0.3);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(129, 140, 248, 0.18));
}
.project-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.project-body .tag { align-self: flex-start; margin-bottom: 12px; }
.project-body h3 { margin-bottom: 0.35em; }
.project-body p { color: var(--muted); font-size: 0.95rem; }
.project-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: auto; padding-top: 8px; font-size: 0.9rem; font-weight: 600; }

/* ---------- Testimonials ---------- */

.testimonial { margin: 0; display: flex; flex-direction: column; gap: 20px; }
.testimonial blockquote { margin: 0; position: relative; padding-top: 28px; color: var(--text); }
.testimonial blockquote::before {
    content: '\201C'; position: absolute; top: -18px; left: -4px;
    font: 700 4rem/1 var(--font-head); color: var(--accent); opacity: .5;
}
.testimonial figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testimonial figcaption img,
.initials { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.initials {
    display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
    color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.testimonial strong { display: block; color: var(--heading); line-height: 1.3; }
.testimonial small { color: var(--muted); }

/* ---------- Blog ---------- */

.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.post-card > :not(.post-cover) { margin-inline: 24px; }
.post-card .link-arrow { margin-top: auto; margin-bottom: 24px; }
.post-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); margin-bottom: 20px; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card h3 a { color: var(--heading); }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { color: var(--muted); font-size: 0.95rem; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 0.85rem; color: var(--muted); }

.post-header { margin: 28px 0 32px; }
.post-hero { width: 100%; border-radius: var(--radius); margin-bottom: 40px; }

.prose { font-size: 1.075rem; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-sm); margin: 1.5em auto; height: auto; }
.prose blockquote { margin: 1.5em 0; padding: 0.5em 1.25em; border-left: 3px solid var(--accent); color: var(--muted); }
.prose pre, .prose code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 0.9em; }
.prose code { padding: 0.15em 0.4em; background: var(--surface); border-radius: 6px; }
.prose pre { padding: 20px; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose pre code { padding: 0; background: none; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.prose figure { margin: 1.5em 0; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 48px; }
.empty { color: var(--muted); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
.contact-grid > div > p { color: var(--muted); margin-bottom: 32px; }
.contact-form { display: grid; gap: 18px; }
.contact-form:hover { transform: none; box-shadow: none; border-color: var(--border); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field input,
.field textarea {
    width: 100%; padding: 0.8em 1em;
    font: inherit; color: var(--heading);
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }
.field.has-error input,
.field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); min-height: 0; }

/* Rich text message box */
.rte { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.rte.is-focused { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }
.field.has-error .rte { border-color: var(--danger); }
.rte-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.rte-btn { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; font-size: 0.82rem; color: var(--muted); background: none; border: 0; border-radius: 8px; cursor: pointer; transition: color .15s, background .15s; }
.rte-btn:hover { color: var(--heading); background: rgba(255, 255, 255, .06); }
.rte-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rte-btn.is-active { color: var(--accent); background: rgba(34, 211, 238, .14); }
.rte-sep { width: 1px; height: 18px; margin: 0 6px; background: var(--border); }
.rte-editor { position: relative; min-height: 160px; max-height: 420px; overflow-y: auto; padding: 12px 14px; color: var(--heading); line-height: 1.65; outline: none; overflow-wrap: anywhere; }
.rte-editor.is-empty::before { content: attr(data-placeholder); color: var(--muted); opacity: .6; pointer-events: none; position: absolute; }
.rte-editor > :first-child { margin-top: 0; }
.rte-editor > :last-child { margin-bottom: 0; }
.rte-editor p { margin: 0 0 .7em; }
.rte-editor ul, .rte-editor ol { margin: 0 0 .7em; padding-left: 1.4em; }
.rte-editor blockquote { margin: 0 0 .7em; padding-left: 12px; border-left: 3px solid var(--accent); color: var(--muted); }
.rte-editor a { color: var(--accent); text-decoration: underline; }
.field-error:empty { display: none; }
.contact-form .btn { justify-self: start; }
.form-status { margin: 0; font-weight: 600; }
.form-status.success { color: var(--success); }
.form-status.error { color: var(--danger); }

/* ---------- Toasts ---------- */

.toasts { position: fixed; top: calc(var(--header-h) + 12px); right: 20px; z-index: 60; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; font-size: 0.92rem;
    background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm); box-shadow: var(--shadow);
    animation: toast-in .3s ease;
}
.toast span { flex: 1; }
.toast.alert-success { border-left-color: var(--success); }
.toast.alert-danger { border-left-color: var(--danger); }
.toast.alert-warning { border-left-color: #fbbf24; }
.toast-close { background: none; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0; }
.toast-close:hover { color: var(--heading); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Footer ---------- */

.site-footer { padding: 32px 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner .socials a { width: 36px; height: 36px; font-size: 0.9rem; }

/* ---------- Error page ---------- */

.error-page { min-height: 70vh; display: flex; align-items: center; text-align: center; }
.error-code {
    margin: 0; font: 700 clamp(5rem, 16vw, 9rem)/1 var(--font-head);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Scroll reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .hero-inner,
    .about-grid,
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-inner { text-align: center; }
    .hero-art { order: -1; }
    .avatar-ring { width: min(220px, 60vw); }
    .hero-lead { margin-inline: auto; }
    .actions, .hero .socials, .pill { justify-content: center; }
    .hero { min-height: auto; }
}

@media (max-width: 820px) {
    .menu-toggle { display: block; }
    .site-nav {
        position: fixed; top: var(--header-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 12px 20px 24px;
        background: rgba(11, 17, 32, 0.97);
        border-bottom: 1px solid var(--border);
        transform: translateY(-8px); opacity: 0; visibility: hidden;
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .site-header.is-open .site-nav { transform: none; opacity: 1; visibility: visible; }
    .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
    .site-nav a.is-active::after { display: none; }
    .site-nav .btn { margin-top: 18px; justify-content: center; }
}

@media (max-width: 560px) {
    .field-row { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .stat strong { font-size: 1.5rem; }
    .card { padding: 22px; }
    .project-grid { grid-template-columns: 1fr; }
    .section-head-row { flex-direction: column; align-items: flex-start; }
    .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}
