:root {
    --bg-dark: #080909;
    --bg-light: #f4f1ea;
    --bg-warm: #ebe5da;
    --text-light: #f5f1e8;
    --text-muted: #b7b0a2;
    --text-dark: #151515;
    --line-light: rgba(245, 241, 232, .22);
    --line-dark: rgba(20, 20, 20, .16);
    --accent: #9d8a68;
    --max: 1360px;
    --serif: Georgia, "Times New Roman", serif;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--text-dark); background: var(--bg-light); line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .19em; color: var(--accent); font-weight: 600; }

.text-link {
    display: inline-flex; align-items: center; gap: 14px; padding-bottom: 8px;
    border-bottom: 1px solid currentColor; font-size: 11px; text-transform: uppercase;
    letter-spacing: .16em; font-weight: 600; opacity: .94; transition: opacity .2s, transform .2s;
}
.text-link:hover { opacity: .66; transform: translateX(2px); }
.text-link span { font-size: 18px; line-height: 1; }

/* Header (siempre sólido en el blog) */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 20; color: var(--text-light); background: rgba(8, 9, 9, .96); backdrop-filter: blur(8px); }
.nav { width: min(var(--max), calc(100% - 48px)); height: 82px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 24px; letter-spacing: .18em; font-weight: 500; line-height: 1; }
.nav-links { display: flex; gap: 34px; align-items: center; font-size: 13px; color: rgba(245, 241, 232, .88); }
.nav-links a:hover, .nav-links a.on { color: #fff; }
.nav-links a.on { border-bottom: 1px solid var(--accent); padding-bottom: 4px; }
.menu-toggle { display: none; border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: var(--text-light); padding: 9px 14px; border-radius: 99px; text-transform: uppercase; letter-spacing: .14em; font-size: 11px; cursor: pointer; }

/* Hero del blog */
.blog-hero { background: var(--bg-dark); color: var(--text-light); padding: 170px 0 70px; }
.blog-hero h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -.05em; line-height: .9; font-size: clamp(56px, 8vw, 120px); margin: 14px 0 22px; }
.blog-hero p { color: rgba(245, 241, 232, .68); font-size: 16px; max-width: 560px; margin: 0; }

.cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 38px; }
.cat {
    padding: 9px 18px; border: 1px solid var(--line-light); border-radius: 99px;
    font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(245, 241, 232, .85); transition: .2s;
}
.cat:hover { border-color: var(--text-light); }
.cat.on { background: var(--text-light); color: var(--bg-dark); border-color: var(--text-light); }

/* Listado */
.posts { padding: 70px 0 90px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.card { display: flex; flex-direction: column; }
.card .img { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #3b4437, #a68f63) center/cover no-repeat; overflow: hidden; position: relative; }
.card .img::after { content: ""; position: absolute; inset: 0; background: inherit; transition: transform .6s ease; }
.card:hover .img::after { transform: scale(1.04); }
.card .meta { display: flex; gap: 12px; align-items: center; margin: 20px 0 10px; font-size: 12px; color: rgba(20, 20, 20, .55); }
.card h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.03em; line-height: 1.05; font-size: 30px; margin: 0 0 12px; }
.card p { margin: 0 0 18px; font-size: 14px; color: rgba(20, 20, 20, .66); }
.card .text-link { align-self: flex-start; margin-top: auto; }

.featured { display: grid; grid-template-columns: 1.3fr 1fr; gap: 44px; align-items: center; margin-bottom: 70px; padding-bottom: 70px; border-bottom: 1px solid var(--line-dark); }
.featured .img { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #3b4437, #a68f63) center/cover no-repeat; }
.featured h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; line-height: .98; font-size: clamp(38px, 4.4vw, 68px); margin: 14px 0 18px; }
.featured p { font-size: 15px; color: rgba(20, 20, 20, .68); margin: 0 0 26px; max-width: 460px; }

.empty-state { text-align: center; padding: 90px 0; color: rgba(20, 20, 20, .6); }
.empty-state h2 { font-family: var(--serif); font-weight: 400; font-size: 40px; margin: 0 0 10px; color: var(--text-dark); }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 70px; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-dark); font-size: 13px; }
.pagination .cur { background: var(--bg-dark); color: var(--text-light); border-color: var(--bg-dark); }
.pagination a:hover { background: var(--bg-warm); }

/* Nota individual */
.article-hero { background: var(--bg-dark); color: var(--text-light); padding: 160px 0 60px; }
.article-hero .inner { max-width: 880px; margin-inline: auto; width: calc(100% - 48px); }
.article-hero h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; line-height: .98; font-size: clamp(40px, 6vw, 84px); margin: 18px 0 26px; }
.article-hero .by { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: rgba(245, 241, 232, .68); }
.article-cover { max-width: 1100px; width: calc(100% - 48px); margin: -1px auto 0; }
.article-cover img { width: 100%; max-height: 560px; object-fit: cover; }
.article-body { max-width: 760px; width: calc(100% - 48px); margin: 0 auto; padding: 64px 0 40px; font-size: 18px; line-height: 1.8; color: rgba(20, 20, 20, .85); }
.article-body .lead { font-family: var(--serif); font-size: 24px; line-height: 1.5; color: rgba(20, 20, 20, .75); margin: 0 0 36px; }
.article-body h2, .article-body h3, .article-body h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -.03em; line-height: 1.1; color: var(--text-dark); margin: 2.2em 0 .6em; }
.article-body h2 { font-size: 40px; }
.article-body h3 { font-size: 30px; }
.article-body p { margin: 0 0 1.3em; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.article-body ul, .article-body ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.article-body li { margin-bottom: .5em; }
.article-body blockquote { margin: 2em 0; padding: 6px 0 6px 26px; border-left: 2px solid var(--accent); font-family: var(--serif); font-size: 24px; line-height: 1.4; font-style: italic; color: rgba(20, 20, 20, .78); }
.article-body img { margin: 2em auto; border-radius: 2px; }
.article-body .ql-align-center { text-align: center; }
.article-body .ql-align-right { text-align: right; }
.article-foot { max-width: 760px; width: calc(100% - 48px); margin: 0 auto; padding: 30px 0 80px; border-top: 1px solid var(--line-dark); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.related { background: var(--bg-warm); padding: 80px 0; }
.related h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.04em; font-size: clamp(36px, 4vw, 56px); margin: 0 0 40px; }

/* CTA + footer */
.cta { background: var(--bg-dark); color: var(--text-light); padding: 70px 0; text-align: center; }
.cta h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; font-size: clamp(36px, 4vw, 60px); margin: 0 0 12px; }
.cta p { color: rgba(245, 241, 232, .68); margin: 0 0 28px; }
.footer { background: var(--bg-dark); color: rgba(245, 241, 232, .7); padding: 19px 0; font-size: 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-links { display: flex; gap: 24px; }

@media (max-width: 1050px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .featured { grid-template-columns: 1fr; gap: 26px; }
    .nav-links {
        flex-direction: column; position: fixed; top: 82px; left: 0; right: 0;
        background: rgba(8, 9, 9, .98); padding: 32px 28px 48px; gap: 22px; align-items: flex-start;
        border-top: 1px solid rgba(255, 255, 255, .08); transform: translateY(-110%); opacity: 0;
        pointer-events: none; transition: transform .35s ease, opacity .3s ease; z-index: 19;
    }
    .nav-links a { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; width: 100%; padding: 6px 0; }
    body.menu-open .nav-links { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .menu-toggle { display: inline-block; }
}
@media (max-width: 680px) {
    .container, .nav { width: min(100% - 28px, var(--max)); }
    .post-grid { grid-template-columns: 1fr; }
    .blog-hero { padding: 140px 0 50px; }
    .article-body { font-size: 17px; }
    .article-body h2 { font-size: 32px; }
}
