:root {
    --bg: #131313;
    --bg-elevated: #1c1c1c;
    --text: #e5e2e1;
    --text-muted: #9a9694;
    --accent: #dc2626;
    --border: #2b2b2b;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --wrap: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(19,19,19,0.92);
    backdrop-filter: blur(8px);
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 24px;
    flex-wrap: wrap;
}
.brand {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.main-nav { display: flex; gap: 28px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; }
.search-form input {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    width: 220px;
}
.search-form input:focus { outline: 1px solid var(--accent); }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; }
.hero h1 { font-family: var(--font-serif); font-size: clamp(2.5rem, 6vw, 4rem); margin: 0 0 12px; }
.hero-tagline { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

.search-meta { color: var(--text-muted); margin-bottom: 24px; }

/* Post grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin: 24px 0 48px;
}
.post-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: #3a3a3a; }
.post-card-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #0d0d0d; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(19,19,19,0.85);
    color: var(--text);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
}
.post-card-body { padding: 20px; }
.post-card-title { font-family: var(--font-serif); font-size: 1.25rem; margin: 0 0 10px; line-height: 1.3; }
.post-card-excerpt { color: var(--text-muted); font-size: 0.92rem; margin: 0 0 14px; }
.post-card-meta { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }

.empty-state { text-align: center; color: var(--text-muted); padding: 60px 0; }

/* Load more */
.load-more-wrap { text-align: center; padding-bottom: 64px; }
.btn {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 12px 32px;
    border-radius: 999px;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-load-more.is-loading::after { content: '\2026'; }

/* Single post */
.single-post { max-width: 780px; padding-top: 48px; padding-bottom: 64px; }
.single-post-header h1 { font-family: var(--font-serif); font-size: clamp(2rem, 5vw, 3rem); margin: 16px 0; }
.single-post-figure { margin: 32px 0; border-radius: 6px; overflow: hidden; }
.single-post-figure figcaption { color: var(--text-muted); font-size: 0.85rem; padding-top: 10px; }
.single-post-content { font-size: 1.05rem; }
.single-post-content p { margin: 0 0 1.4em; }
.single-post-content h2, .single-post-content h3 { font-family: var(--font-serif); margin-top: 2em; }
.single-post-content img { border-radius: 6px; margin: 1.5em 0; }
.post-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px; }
.tag-pill { border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 0.78rem; color: var(--text-muted); }

.related-posts { padding-bottom: 64px; }
.related-posts h2 { font-family: var(--font-serif); margin-bottom: 24px; }

/* Not found */
.not-found { text-align: center; padding: 120px 0; }
.not-found h1 { font-family: var(--font-serif); font-size: 6rem; margin: 0; color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--text-muted); font-size: 0.85rem; }

@media (max-width: 720px) {
    .main-nav { display: none; }
    .search-form input { width: 150px; }
}
