/* cms-demo theme — self-contained, no external dependencies */

/* ── Custom properties ─────────────────────────────────────── */
:root {
    --color-bg:        #ffffff;
    --color-surface:   #f8f9fa;
    --color-border:    #e2e8f0;
    --color-text:      #1a202c;
    --color-muted:     #718096;
    --color-accent:    #2563eb;
    --color-accent-h:  #1d4ed8;
    --color-danger:    #dc2626;

    --font-sans:  system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono:  'SF Mono', 'Fira Code', 'Consolas', monospace;

    --radius:     6px;
    --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);

    --container:  860px;
    --gap:        1.5rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg:      #0f172a;
        --color-surface: #1e293b;
        --color-border:  #334155;
        --color-text:    #e2e8f0;
        --color-muted:   #94a3b8;
        --color-accent:  #60a5fa;
        --color-accent-h:#93c5fd;
    }
}

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); }
a:hover { color: var(--color-accent-h); }

/* ── Layout ────────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Header / Nav ──────────────────────────────────────────── */
.site-header {
    border-bottom: 1px solid var(--color-border);
    padding: .875rem 0;
    background: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: var(--gap);
}

.site-logo {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: var(--color-text);
    letter-spacing: -.01em;
    flex-shrink: 0;
}

.site-logo span {
    color: var(--color-accent);
}

.site-nav {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.site-nav a {
    text-decoration: none;
    font-size: .9375rem;
    color: var(--color-muted);
    transition: color .15s;
}

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

/* ── Main content ──────────────────────────────────────────── */
.site-main {
    padding: 3rem 0 4rem;
    min-height: calc(100vh - 140px);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
    padding: 3.5rem 0 3rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: 0 0 1rem;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--color-muted);
    max-width: 540px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: .6rem 1.25rem;
    border-radius: var(--radius);
    font-size: .9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-accent-h);
    color: #fff;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}
.btn-secondary:hover {
    background: var(--color-border);
    color: var(--color-text);
}

/* ── Prose content ─────────────────────────────────────────── */
.prose {
    max-width: 70ch;
}

.prose h1, .prose h2, .prose h3 {
    line-height: 1.25;
    letter-spacing: -.01em;
    margin-top: 2rem;
    margin-bottom: .5rem;
}
.prose h1 { font-size: 1.875rem; }
.prose h2 { font-size: 1.375rem; }
.prose h3 { font-size: 1.125rem; }

.prose p { margin: 0 0 1rem; }

.prose a { text-decoration: underline; text-underline-offset: 3px; }

.prose code {
    font-family: var(--font-mono);
    font-size: .875em;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: .1em .35em;
    border-radius: 3px;
}

.prose pre {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 1.25rem 0;
}

.prose pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: .875rem;
}

.prose blockquote {
    border-left: 3px solid var(--color-accent);
    margin: 1.25rem 0;
    padding: .5rem 0 .5rem 1.25rem;
    color: var(--color-muted);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9375rem;
    margin: 1.25rem 0;
}

.prose th {
    text-align: left;
    font-weight: 600;
    padding: .5rem .75rem;
    border-bottom: 2px solid var(--color-border);
}

.prose td {
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--color-border);
}

.prose ul, .prose ol {
    padding-left: 1.5rem;
    margin: 0 0 1rem;
}
.prose li { margin-bottom: .25rem; }

/* ── Page intro ────────────────────────────────────────────── */
.page-intro {
    font-size: 1.125rem;
    color: var(--color-muted);
    margin-bottom: 2rem;
    max-width: 60ch;
}

/* ── Body content section (home) ──────────────────────────── */
.body-content {
    max-width: var(--container);
    margin: 2.5rem auto 0;
    padding: 0 1.25rem;
}

/* ── Blog listing ──────────────────────────────────────────── */
.blog-listing h1 { margin-bottom: .5rem; }

.post-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.post-card h2 {
    margin: 0 0 .4rem;
    font-size: 1.2rem;
}

.post-card h2 a { text-decoration: none; color: var(--color-text); }
.post-card h2 a:hover { color: var(--color-accent); }

.post-card time {
    font-size: .875rem;
    color: var(--color-muted);
    display: block;
    margin-bottom: .5rem;
}

.post-card p { margin: 0 0 1rem; color: var(--color-muted); font-size: .9375rem; }

.read-more { font-size: .9rem; font-weight: 500; text-decoration: none; }

/* ── Blog post ─────────────────────────────────────────────── */
.blog-post { max-width: 70ch; }

.post-header { margin-bottom: 2rem; }
.post-header h1 { margin: 0 0 .5rem; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; }

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: .875rem;
    color: var(--color-muted);
    flex-wrap: wrap;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.post-footer a { font-weight: 500; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    font-size: .875rem;
    color: var(--color-muted);
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.site-footer a { color: var(--color-muted); }
.site-footer a:hover { color: var(--color-text); }

/* ── 404 ───────────────────────────────────────────────────── */
.is-404 .site-main { text-align: center; padding-top: 5rem; }
