/* Kavva blog — editorial content on the shared site chrome (.nav / .foot).
   Header, footer and language toggle come from main.css + app.js; this file
   only styles the blog list and article body. */

/* Reset sets display on these, which overrides the [hidden] attribute used by
   the language toggle — force hidden to actually hide. */
[hidden] { display: none !important; }

/* Visually hidden but available to screen readers / search engines */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.blog-page { background: var(--cream); }

/* Centered reading column, padded to clear the fixed site nav */
.blog-main {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(7rem, 13vw, 9.5rem) var(--px) clamp(3.5rem, 7vw, 6rem);
}

.blog-back {
    display: inline-block;
    margin-bottom: 2.5rem;
    font-family: var(--font-body);
    font-size: .85rem;
    color: var(--mid);
    text-decoration: none;
    transition: color .2s var(--ease);
}
.blog-back:hover { color: var(--brown); }

/* ─── Index ─── */
.blog-head {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    color: var(--brown);
    margin-bottom: .5rem;
}
.blog-sub {
    font-family: var(--font-body);
    color: var(--mid);
    margin-bottom: 3rem;
}
.blog-list { list-style: none; padding: 0; margin: 0; }
.blog-list__item { border-top: 1px solid var(--border); }
.blog-list__item:last-child { border-bottom: 1px solid var(--border); }

.blog-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 2rem 0;
    text-decoration: none;
}
.blog-card__thumb {
    flex: 0 0 clamp(110px, 22vw, 180px);
    aspect-ratio: 16 / 11;
    border-radius: 12px;
    overflow: hidden;
    background: var(--warm);
}
.blog-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card__text { display: block; }
.blog-card__date {
    display: block;
    font-family: var(--font-body);
    font-size: .72rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .55rem;
}
.blog-card__title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.7rem;
    line-height: 1.2;
    color: var(--brown);
    margin-bottom: .5rem;
    transition: color .2s var(--ease);
}
.blog-card:hover .blog-card__title { color: var(--mid); }
.blog-card__desc {
    display: block;
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--mid);
    line-height: 1.7;
}
.blog-empty { font-family: var(--font-body); color: var(--muted); }

/* ─── Post ─── */
.post { font-family: var(--font-body); }
.post__date {
    font-size: .72rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}
.post__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5.5vw, 3rem);
    line-height: 1.15;
    color: var(--brown);
    margin: 0 0 2rem;
}
.post__cover {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    display: block;
}
.post__body { color: var(--mid); }
.post__body p, .post__body li { font-size: 1.02rem; line-height: 1.85; }
.post__body p { margin: 0 0 1.25rem; }
.post__body p:last-child { margin-bottom: 0; }
.post__body h2 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    color: var(--brown);
    margin: 2.75rem 0 1rem;
}
.post__body h3 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--brown);
    margin: 2rem 0 .75rem;
}
.post__body ul, .post__body ol { padding-left: 1.4rem; margin: 1rem 0; }
.post__body li { margin: .35rem 0; }
.post__body a { color: var(--brown); text-decoration: underline; }
.post__body img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 2rem 0;
    display: block;
}
.post__body blockquote {
    margin: 1.75rem 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--sand);
    color: var(--mid);
    font-style: italic;
}
.post__body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: var(--warm);
    padding: .15em .4em;
    border-radius: 5px;
    font-size: .9em;
}
.post__body pre {
    background: var(--espresso);
    color: var(--cream);
    padding: 1.1rem 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.post__body pre code { background: none; padding: 0; color: inherit; }

@media (max-width: 560px) {
    .blog-card { flex-direction: column; gap: 1rem; }
    .blog-card__thumb { flex-basis: auto; width: 100%; aspect-ratio: 16 / 9; }
}
