/*
 * Páginas del blog (/blog/ y /en/blog/). Se cargan después de styles.css,
 * de donde toman los colores (también los de cada tema), la barra superior
 * y la cabecera de ventana; aquí solo va lo propio de la lectura.
 */

.page-blog {
    --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: auto;
    background-attachment: fixed;
}

.page-blog .menubar { position: sticky; top: 0; }
.page-blog .menubar a { color: inherit; text-decoration: none; }
.page-blog .menubar a:hover { color: var(--gold); }

.page-blog .menubar a:focus-visible,
.blog-body a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 3px;
}

.blog-nav { display: flex; gap: 16px; font-size: 12px; }

.blog-main { padding: 28px 16px 56px; }

.blog-window {
    max-width: 780px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--term-bg);
    box-shadow: var(--shadow), 0 0 0 1px var(--term-border);
}

.blog-window-header { cursor: default; touch-action: auto; }
.blog-window-header .light { cursor: default; }

.blog-body {
    padding: 32px clamp(18px, 5vw, 48px) 36px;
    color: var(--ink);
}

.blog-body a {
    color: var(--sky);
    text-decoration: underline;
    text-decoration-color: rgba(140, 207, 224, 0.45);
    text-underline-offset: 3px;
}

.blog-body a:hover { text-decoration-color: currentColor; }

/* Cabecera de la nota */

.post-header { margin-bottom: 28px; }

.post-header h1 {
    margin: 6px 0 10px;
    font-size: clamp(24px, 4vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--gold);
}

.post-meta { margin: 0; font-size: 12px; color: var(--ink-muted); }
.post-lead { margin: 0 0 12px; font: 17px/1.6 var(--font-text); color: var(--ink-muted); }

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    color: var(--accent);
}

.post-translation { margin: 12px 0 0; font-size: 13px; }

/* Contenido */

.post-content {
    font: 17px/1.75 var(--font-text);
    overflow-wrap: break-word;
}

.post-content > * { margin: 0 0 1.1em; }

.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 1.8em 0 0.6em;
    font-family: var(--font-mono);
    line-height: 1.3;
    color: var(--ink);
}

.post-content h2 { font-size: 21px; }
.post-content h2::before { content: "## "; color: var(--accent); }
.post-content h3 { font-size: 18px; }
.post-content h4 { font-size: 16px; }

.post-content strong { color: var(--gold); font-weight: 650; }
.post-content ul,
.post-content ol { padding-left: 1.4em; }
.post-content li { margin: 0.3em 0; }
.post-content li::marker { color: var(--accent); }

.post-content code {
    font: 0.86em var(--font-mono);
    color: var(--gold);
    background: rgba(233, 196, 106, 0.1);
    padding: 1px 5px;
    border-radius: 4px;
}

.post-content pre {
    overflow-x: auto;
    padding: 14px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    box-shadow: inset 0 0 0 1px var(--term-border);
    line-height: 1.55;
}

.post-content pre code { padding: 0; background: none; color: var(--ink); font-size: 14px; }

.post-content blockquote {
    margin-left: 0;
    padding: 2px 0 2px 16px;
    border-left: 3px solid var(--accent);
    color: var(--ink-muted);
}

.post-content blockquote > :last-child { margin-bottom: 0; }

.post-content img { max-width: 100%; height: auto; border-radius: 8px; }

.post-content hr { border: 0; border-top: 1px solid var(--term-border); margin: 2em 0; }

/* Índice */

.post-list { list-style: none; margin: 0; padding: 0; }

.post-list li {
    padding: 18px 0;
    border-top: 1px solid var(--term-border);
}

.post-list h2 { margin: 4px 0 6px; font-size: 19px; line-height: 1.35; }
.post-list h2 a { color: var(--gold); text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; }
.post-list p { margin: 0 0 8px; font: 15px/1.6 var(--font-text); color: var(--ink-muted); }
.post-list .post-meta { font: 12px var(--font-mono); }

/* Pie */

.post-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--term-border);
    font-size: 13px;
}

@media (max-width: 720px) {
    .blog-main { padding: 0 0 32px; }
    .blog-window { border-radius: 0; box-shadow: none; }
    .blog-body { padding-top: 24px; }
    .post-content { font-size: 16.5px; }
}
