:root {
    --bg: #fbf9f6;
    --bg-alt: #f2ede6;
    --surface: #ffffff;
    --text: #2b2724;
    --text-soft: #6b635c;
    --accent: #b5794f;
    --accent-dark: #8f5c39;
    --border: #e6ded4;
    --radius: 14px;
    --shadow: 0 8px 30px rgba(60, 45, 30, 0.08);
    --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow { max-width: 720px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 249, 246, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand {
    font-family: 'Fraunces', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.nav { display: flex; gap: 28px; }
.nav a {
    color: var(--text-soft);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.active { color: var(--accent-dark); border-bottom-color: var(--accent); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
    padding: 96px 0 72px;
    text-align: center;
    background: radial-gradient(ellipse at top, var(--bg-alt), var(--bg));
}
.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.78rem;
    color: var(--accent);
    margin: 0 0 12px;
}
.hero-title { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0 0 12px; }
.hero-tagline { font-size: 1.15rem; color: var(--text-soft); margin: 0 0 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform .15s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 8px;
}
.section-head h2 { font-size: 1.8rem; margin: 0; }
.link-more { font-weight: 500; font-size: 0.95rem; }

.page-head {
    padding: 56px 0 8px;
    text-align: center;
}
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 8px; }
.page-head p { color: var(--text-soft); margin: 0; }

/* ---------- Post grid ---------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card a { color: inherit; }
.post-card a:hover { text-decoration: none; }
.post-card-cover { aspect-ratio: 16 / 10; overflow: hidden; }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card-cover img { transform: scale(1.05); }
.post-card-body { padding: 20px 22px 24px; }
.post-card-body h3 { font-size: 1.25rem; margin: 6px 0 10px; }
.post-card-body p { color: var(--text-soft); font-size: 0.95rem; margin: 0; }
.post-date {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 500;
}

/* ---------- Gallery ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.gallery-item {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-alt);
    cursor: pointer;
    position: relative;
    aspect-ratio: 1 / 1;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 20px 14px 10px;
    font-size: 0.82rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,.6));
    opacity: 0;
    transition: opacity .2s ease;
}
.gallery-item:hover figcaption { opacity: 1; }

/* ---------- Single post ---------- */
.single-post { padding: 48px 0 72px; }
.back-link { display: inline-block; margin-bottom: 24px; color: var(--text-soft); font-size: 0.9rem; }
.single-head { text-align: center; margin-bottom: 32px; }
.single-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 10px 0 0; }
.single-cover {
    margin: 0 0 40px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.single-cover img { width: 100%; }

/* ---------- Prose ---------- */
.prose { font-size: 1.06rem; color: #3b342e; }
.prose h2 { font-size: 1.6rem; margin: 2em 0 0.6em; }
.prose h3 { font-size: 1.3rem; margin: 1.6em 0 0.5em; }
.prose p { margin: 0 0 1.2em; }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose ul { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
    margin: 1.5em 0;
    padding: 4px 20px;
    border-left: 3px solid var(--accent);
    color: var(--text-soft);
    font-style: italic;
}
.prose code {
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.9em;
}
.prose pre {
    background: #2b2724;
    color: #f2ede6;
    padding: 18px;
    border-radius: var(--radius);
    overflow-x: auto;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* Embed video responsif (YouTube) */
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.5em 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: start; }
.about-avatar img { width: 200px; height: 200px; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow); }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 48px;
}
.page-info { color: var(--text-soft); font-size: 0.9rem; }

.empty-state {
    text-align: center;
    color: var(--text-soft);
    padding: 40px 0;
}
.empty-state code { background: var(--bg-alt); padding: 2px 8px; border-radius: 6px; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--text);
    color: #d9d1c7;
    padding: 48px 0 24px;
    margin-top: 40px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand strong { font-family: 'Fraunces', serif; font-size: 1.2rem; color: #fff; }
.footer-brand p { margin: 4px 0 0; font-size: 0.9rem; opacity: .8; }
.footer-social { display: flex; gap: 20px; }
.footer-social a { color: #d9d1c7; font-size: 0.92rem; }
.footer-social a:hover { color: #fff; }
.copyright { padding-top: 20px; font-size: 0.82rem; opacity: .6; }

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 12, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; }
.lightbox-caption { color: #eee; margin-top: 16px; font-size: 0.95rem; }
.lightbox-close {
    position: absolute;
    top: 20px; right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    cursor: pointer;
    line-height: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .nav {
        position: absolute;
        top: 68px; left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 8px 24px 16px;
        display: none;
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
    .nav a.active { border-bottom-color: var(--border); }
    .nav-toggle { display: block; }
    .about-layout { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .hero { padding: 64px 0 48px; }
}
