/* ═══════════════════════════════════════════════════════════
   KHIIMORI WORLD — blog.css
   Single post & archive pages only.
   Loaded on is_single() and is_archive() via functions.php.
   Depends on: main.css (variables, .article-card, buttons).
═══════════════════════════════════════════════════════════ */

/* ── Nav: always visible on blog pages ─────────────────── */
/*
 * WP adds body class 'single' on posts and 'archive' on archive pages.
 * blog.css is only loaded on these pages, so this always applies.
 */
#main-nav {
    opacity: 1;
    background: rgba(242, 237, 216, 0.97);
    box-shadow: 0 1px 0 rgba(44, 26, 14, 0.07);
    backdrop-filter: blur(8px);
}

/* ── Blog layout variables ──────────────────────────────── */
:root {
    --pad-x:    60px;
    --body-max: 720px;
    --wide-max: 960px;
}

/* ── Layout zones ───────────────────────────────────────── */
/*
 * .wide-zone  — breadcrumbs, title, meta, hero  → max 960px
 * .narrow-zone — body text, post footer         → max 720px
 */
.wide-zone {
    max-width: calc( var(--wide-max) + var(--pad-x) * 2 );
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--pad-x);
    padding-right: var(--pad-x);
}

.narrow-zone {
    max-width: calc( var(--body-max) + var(--pad-x) * 2 );
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--pad-x);
    padding-right: var(--pad-x);
}

/* ══════════════════════════════════════════════════════════
   SINGLE POST
══════════════════════════════════════════════════════════ */

.single-post {
    padding-top: 52px; /* fixed nav height */
}

/* ── Breadcrumbs ────────────────────────────────────────── */
.breadcrumbs {
    padding-top: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted-l);
    font-weight: 500;
}
.breadcrumbs a { text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--sky); }
.breadcrumbs .sep { opacity: 0.5; }
.breadcrumbs .bc-current {
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

/* ── Post header ────────────────────────────────────────── */
.post-header { padding-top: 48px; }

.post-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 300;
    line-height: 1.1;
    color: var(--earth);
    letter-spacing: 0.5px;
    margin-bottom: 28px;
    max-width: 900px;
}
.post-title em { font-style: italic; color: var(--sky); }

/* ── Post meta row ──────────────────────────────────────── */
.post-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--divider);
    flex-wrap: wrap;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}

.author-photo-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--parchment-d);
    border: 1px solid var(--sky-border);
    flex-shrink: 0;
}
.author-photo-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-name {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--earth);
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.meta-author:hover .author-name {
    color: var(--sky);
    border-color: var(--sky-border);
}

.meta-sep { color: var(--muted-l); }

.meta-date,
.meta-read {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

/* ── Hero image ─────────────────────────────────────────── */
.post-hero {
    margin: 36px auto 0;
    /* Inherits .wide-zone layout but is a <figure>, needs explicit padding */
    padding-left: var(--pad-x);
    padding-right: var(--pad-x);
    max-width: calc( var(--wide-max) + var(--pad-x) * 2 );
}
.hero-ratio {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--earth);
}
.hero-ratio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-caption {
    margin-top: 9px;
    font-size: 10px;
    line-height: 1.6;
    color: var(--muted-l);
    font-style: italic;
}

/* ══════════════════════════════════════════════════════════
   POST BODY — typography
══════════════════════════════════════════════════════════ */
.post-body {
    padding-top: 52px;
    padding-bottom: 8px;
}

/* Lead — add class="lead" on the first paragraph in Gutenberg */
.post-body .lead {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--earth);
    margin-bottom: 32px;
}

/* Body paragraphs */
.post-body p {
    font-size: 15px;
    line-height: 1.9;
    color: var(--earth);
    margin-bottom: 22px;
}

/* Headings */
.post-body h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 30px;
    font-weight: 300;
    line-height: 1.2;
    color: var(--earth);
    margin: 52px 0 20px;
}
.post-body h3 {
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--sky);
    font-weight: 600;
    margin: 40px 0 14px;
}

/* Inline elements */
.post-body a {
    color: var(--sky);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(46, 104, 186, 0.35);
    transition: text-decoration-color 0.2s;
}
.post-body a:hover { text-decoration-color: var(--sky); }
.post-body strong { color: var(--earth); font-weight: 600; }
.post-body em { font-style: italic; color: var(--sky); }

/* Lists */
.post-body ul,
.post-body ol {
    padding-left: 24px;
    margin-bottom: 22px;
}
.post-body li {
    font-size: 15px;
    line-height: 1.85;
    color: var(--earth);
    margin-bottom: 8px;
}
.post-body ul li::marker { color: var(--gold); }
.post-body ol li::marker {
    color: var(--sky);
    font-size: 12px;
    font-weight: 600;
}

/* Blockquote */
.post-body blockquote {
    position: relative;
    margin: 48px 0;
    padding: 32px 36px 32px 52px;
    border-left: 3px solid var(--sky);
    background: var(--sky-dim);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.post-body blockquote::before {
    content: '\201C';
    position: absolute;
    top: 20px;
    left: 18px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 44px;
    line-height: 1;
    color: var(--sky);
    opacity: 0.4;
}
.post-body blockquote p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 1.6;
    font-style: italic;
    color: var(--earth);
    margin-bottom: 0;
}
.post-body blockquote cite {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-style: normal;
    color: var(--muted);
    font-weight: 500;
    margin-top: 14px;
}

/* Inline images & Gutenberg image block */
.post-body figure,
.post-body .wp-block-image {
    margin: 40px 0;
}
.post-body figure img,
.post-body .wp-block-image img {
    width: 100%;
    border-radius: var(--radius);
}
.post-body figcaption,
.post-body .wp-block-image figcaption {
    font-size: 11px;
    color: var(--muted);
    font-style: italic;
    margin-top: 9px;
    line-height: 1.5;
    text-align: left;
}

/* HR — decorative · · · divider */
.post-body hr {
    border: none;
    border-top: 1px solid var(--divider);
    margin: 52px 0;
    position: relative;
}
.post-body hr::after {
    content: '· · ·';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--parchment);
    padding: 0 16px;
    font-size: 12px;
    color: var(--muted-l);
    letter-spacing: 6px;
}

/* Gutenberg separator block */
.post-body .wp-block-separator {
    border: none;
    border-top: 1px solid var(--divider);
    margin: 52px 0;
    position: relative;
}
.post-body .wp-block-separator::after {
    content: '· · ·';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--parchment);
    padding: 0 16px;
    font-size: 12px;
    color: var(--muted-l);
    letter-spacing: 6px;
}

/* ══════════════════════════════════════════════════════════
   POST FOOTER
══════════════════════════════════════════════════════════ */

/* Subscribe strip */
.blog-subscribe {
    padding-top: 40px;
    padding-bottom: 40px;
    background: var(--parchment-d);
    border-top: 1px solid var(--divider);
    border-bottom: 1px solid var(--divider);
}
.subscribe-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--earth);
    margin-bottom: 20px;
}
.blog-subscribe .nl-form-wrap {
    max-width: 380px;
}
.post-footer {
    padding-top: 52px;
    background: var(--parchment);
    color: var(--earth);
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--divider);
}
.tags-label {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    margin-right: 4px;
}
.tag {
    font-size: 8.5px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--sky);
    border: 1px solid var(--sky-border);
    padding: 5px 12px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.tag:hover { background: var(--sky-dim); border-color: var(--sky); }

/* Share */
.post-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}
.share-label {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    margin-right: 4px;
}
.share-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--earth);
    background: #fff;
    border: 1px solid rgba(44, 26, 14, 0.15);
    padding: 9px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.share-btn:hover { border-color: var(--sky); color: var(--sky); }
.share-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.share-btn.copied {
    border-color: var(--sky);
    color: var(--sky);
    background: var(--sky-dim);
}

/* Related posts */
.related-posts {
    margin-top: 60px;
    margin-bottom: 80px;
}

.related-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--divider);
}
.related-title {
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--earth);
    font-weight: 600;
}
.related-all {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--sky);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--sky-border);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}
.related-all:hover { color: var(--sky-d); border-color: var(--sky-d); }

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ══════════════════════════════════════════════════════════
   ARCHIVE PAGE
══════════════════════════════════════════════════════════ */
.archive-page {
    padding-top: 104px; /* 72px nav + 32px breathing room */
    min-height: 60vh;
}

.archive-header {
    max-width: calc( var(--wide-max) + var(--pad-x) * 2 );
    margin: 0 auto 56px;
    padding: 0 var(--pad-x);
}
.archive-header .section-eyebrow { margin-bottom: 10px; }

/* ════════════════════════════════════════════════════════
   BLOG ARCHIVE & CATEGORY
════════════════════════════════════════════════════════ */

.blog-archive {
    padding-top: 72px;
    min-height: 60vh;
    background: var(--parchment-d);
}

/* Hero */
.blog-hero {
    padding: 64px 0 56px;
    border-bottom: 1px solid var(--divider);
}
.blog-hero-inner {
    max-width: calc( var(--wide-max) + var(--pad-x) * 2 );
    margin: 0 auto;
    padding: 0 var(--pad-x);
}
.blog-eyebrow {
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--sky);
    font-weight: 500;
    margin-bottom: 14px;
}
.blog-eyebrow a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}
.blog-eyebrow a:hover { opacity: 0.7; }
.blog-hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 300;
    line-height: 1.1;
    color: var(--earth);
    margin-bottom: 18px;
}
.blog-hero-desc {
    font-size: 13px;
    line-height: 1.75;
    color: var(--muted);
    max-width: 520px;
    margin: 0;
}

/* Category filter buttons */
.blog-cats {
    padding: 28px 0;
    border-bottom: 1px solid var(--divider);
}
.blog-cats-inner {
    max-width: calc( var(--wide-max) + var(--pad-x) * 2 );
    margin: 0 auto;
    padding: 0 var(--pad-x);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.cat-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--sky);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--sky-border);
    border-radius: var(--radius);
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.cat-btn:hover,
.cat-btn.active {
    background: var(--sky-dim);
    border-color: var(--sky);
}

/* Post grid */
.blog-grid-wrap {
    max-width: calc( var(--wide-max) + var(--pad-x) * 2 );
    margin: 0 auto;
    padding: 52px var(--pad-x);
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.blog-empty {
    grid-column: 1 / -1;
    font-size: 14px;
    color: var(--muted);
    padding: 40px 0;
    text-align: center;
}

/* Thumbnail gradient placeholder */
.ac-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--parchment-d) 0%, rgba(46, 104, 186, 0.08) 100%);
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 var(--pad-x) 80px;
}
.pag-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--sky);
    text-decoration: none;
    padding: 9px 20px;
    border: 1px solid var(--sky-border);
    border-radius: var(--radius);
    background: transparent;
    transition: background 0.2s, border-color 0.2s;
}
.pag-btn:hover {
    background: var(--sky-dim);
    border-color: var(--sky);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    :root {
        --pad-x: 24px;
    }

    .post-title { font-size: clamp(30px, 8vw, 48px); }

    .post-meta { gap: 10px; }

    .related-grid { grid-template-columns: 1fr; }

    .blog-grid { grid-template-columns: repeat(2, 1fr); }

    .post-share { gap: 8px; }
    .share-btn  { font-size: 8px; padding: 8px 12px; }
}

@media (max-width: 480px) {
    .blog-grid { grid-template-columns: 1fr; }
    .post-tags { gap: 6px; }
}

/* ════════════════════════════════════════════════════════
   AUTHOR PAGE
════════════════════════════════════════════════════════ */

.author-page {
    padding-top: 72px;
    min-height: 60vh;
    background: var(--parchment);
}

.author-hero {
    max-width: calc( var(--wide-max) + var(--pad-x) * 2 );
    margin: 0 auto;
    padding: 80px var(--pad-x) 72px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 72px;
    align-items: start;
}

/* Photo */
.author-photo {
    width: 240px;
    height: 240px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--parchment-d);
    flex-shrink: 0;
}
.author-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Info */
.author-page .author-role {
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--sky);
    font-weight: 500;
    margin-bottom: 14px;
}
.author-page .author-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 300;
    line-height: 1.1;
    color: var(--earth);
    margin-bottom: 24px;
}
.author-bio {
    font-size: 14px;
    line-height: 1.9;
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 36px;
}

/* Social links */
.author-socials {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.author-social {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--earth);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid rgba(44, 26, 14, 0.18);
    border-radius: var(--radius);
    transition: border-color 0.2s, color 0.2s;
}
.author-social:hover { color: var(--sky); border-color: var(--sky); }
.author-social svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* Divider */
.author-divider {
    max-width: calc( var(--wide-max) + var(--pad-x) * 2 );
    margin: 0 auto;
    padding: 0 var(--pad-x);
    border-top: 1px solid var(--divider);
}

/* CTA */
.author-cta {
    max-width: calc( var(--wide-max) + var(--pad-x) * 2 );
    margin: 0 auto;
    padding: 64px var(--pad-x) 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.author-cta-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 300;
    color: var(--earth);
    line-height: 1.3;
}

@media (max-width: 900px) {
    .author-hero {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-top: 56px;
    }
    .author-photo { width: 160px; height: 160px; }
    .author-cta { flex-direction: column; align-items: flex-start; }
}
