/* Wave Default — no framework, no build step. */
:root {
    --bg: #ffffff; --surface: #f8fafc; --text: #0f172a; --muted: #475569;
    --border: #e2e8f0; --accent: #2563eb; --accent-contrast: #ffffff;
    --radius: 12px; --max: 1080px; --prose: 70ch;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b1120; --surface: #111a2e; --text: #e2e8f0; --muted: #94a3b8;
        --border: #1e293b; --accent: #60a5fa; --accent-contrast: #0b1120; color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #0b1120; --surface: #111a2e; --text: #e2e8f0; --muted: #94a3b8;
    --border: #1e293b; --accent: #60a5fa; --accent-contrast: #0b1120; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 1rem/1.65 var(--font); color: var(--text); background: var(--bg); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-contrast); padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.primary-nav { display: flex; align-items: center; gap: 1rem; }
.primary-nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.primary-nav a:hover { color: var(--accent); }
.theme-toggle, .nav-toggle { background: none; border: 1px solid var(--border); color: var(--text); border-radius: 10px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.theme-toggle:hover, .nav-toggle:hover { background: var(--surface); }
.nav-toggle { display: none; }

@media (max-width: 640px) {
    .nav-toggle { display: grid; }
    .primary-nav { display: none; position: absolute; inset: 64px 0 auto 0; flex-direction: column; align-items: flex-start; padding: 1rem; background: var(--bg); border-bottom: 1px solid var(--border); }
    .primary-nav.is-open { display: flex; }
    .primary-nav ul { flex-direction: column; gap: .75rem; }
}

/* Layout */
main { padding-block: 2.5rem 4rem; min-height: 60vh; }
.hero { padding-block: 2rem 2.5rem; }
.hero.center { text-align: center; }
.hero h1, .entry-header h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -0.02em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; margin: 0 auto 1rem 0; }
.hero.center .lead { margin-inline: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--accent); margin: 0 0 .5rem; }
.meta { color: var(--muted); font-size: .9rem; margin: 0; }
.button { display: inline-block; background: var(--accent); color: var(--accent-contrast); padding: .65rem 1.25rem; border-radius: 10px; text-decoration: none; font-weight: 600; }
.button:hover { filter: brightness(1.1); }

/* Cards */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
.card-media { display: block; margin: -1.5rem -1.5rem 1.25rem; }
.card-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.entry-image { margin: 0 0 2rem; }
.entry-image img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.card-title { font-size: 1.25rem; line-height: 1.3; margin: 0 0 .5rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: var(--muted); margin: 0 0 1rem; }

/* Single */
.entry { max-width: var(--prose); margin-inline: auto; }
.entry-header { margin-bottom: 2rem; }
.prose h2 { font-size: 1.6rem; margin: 2rem 0 .75rem; line-height: 1.25; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.25rem; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface); border: 1px solid var(--border); padding: .1em .35em; border-radius: 6px; }
.prose pre { background: var(--surface); border: 1px solid var(--border); padding: 1rem; border-radius: var(--radius); overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote { margin: 0 0 1.25rem; padding-left: 1rem; border-left: 4px solid var(--accent); color: var(--muted); }
.back { margin-top: 3rem; }
.empty { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 2rem; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
    .site-header, .site-footer, .skip-link { display: none; }
    body { color: #000; background: #fff; }
}

/* Taxonomies & pagination */
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 2rem 0 0; padding: 0; }
.tags a { display: inline-block; padding: .2rem .7rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .875rem; }
.tags a:hover { color: var(--accent); border-color: var(--accent); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; }
.pagination-status { color: var(--muted); font-size: .9rem; }
.button-outline { display: inline-block; padding: .55rem 1.1rem; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.button-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Comments & contact form */
.comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comments h2 { font-size: 1.4rem; margin: 0 0 1rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1rem; }
.comment { padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.comment .meta { margin-bottom: .5rem; }
.notice { padding: .75rem 1rem; margin: 0 0 1.25rem; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; }
.form { display: grid; gap: 1rem; }
.form h3 { margin: 0; font-size: 1.1rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; }
.form input, .form textarea { width: 100%; padding: .65rem .8rem; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form [aria-invalid="true"] { border-color: #dc2626; }
.form-error { margin: .35rem 0 0; font-size: .875rem; color: #dc2626; }
.form .button { justify-self: start; border: 0; cursor: pointer; font: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); font-weight: 400; }
