/*
Theme Name: CV Creator Blog
Theme URI: https://getcv.pro
Description: Custom WordPress theme matching the CV Creator design — Space Grotesk + Fraunces, indigo accent, stone-50 background.
Version: 2.0.0
Author: CV Creator
Author URI: https://getcv.pro
Text Domain: cvcreator-blog
*/

/* ══════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --indigo-50: #EEF2FF;
    --indigo-100: #E0E7FF;
    --indigo-600: #4F46E5;
    --indigo-700: #4338CA;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --stone-50: #FAFAF9;
    --amber-50: #FFFBEB;
    --amber-500: #F59E0B;
    --emerald-50: #ECFDF5;
    --emerald-500: #10B981;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    background: var(--stone-50);
    color: var(--gray-900);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
}

a { color: var(--indigo-600); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--indigo-700); }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    line-height: 1.15;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }


/* ══════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════ */
.site-nav {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 40;
}
.site-nav__inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 3.5rem;
}
.site-logo {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}
.site-logo .cv, .site-logo .logo-bold { color: var(--indigo-600); }
.site-logo .creator, .site-logo .logo-light { color: var(--gray-900); }

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}
.nav-links a {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    color: var(--gray-500);
    transition: all 0.15s;
}
.nav-links a:hover { color: var(--gray-900); background: var(--gray-50); }
.nav-links a.active { background: var(--indigo-50); color: var(--indigo-700); font-weight: 500; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--indigo-600);
    color: #fff !important;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: background 0.15s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn-primary:hover { background: var(--indigo-700); color: #fff !important; }

.btn-secondary {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: transparent;
    color: var(--gray-700) !important;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-300);
    transition: all 0.15s;
    cursor: pointer;
}
.btn-secondary:hover { background: var(--gray-50); }


/* ══════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════ */
.site-main {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .blog-layout {
        grid-template-columns: 1fr 320px;
        gap: 3rem;
    }
}
@media (min-width: 1024px) {
    .site-nav__inner, .site-main { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1280px) {
    .site-nav__inner, .site-main { padding-left: 2rem; padding-right: 2rem; }
}


/* ══════════════════════════════════════════════════
   BLOG HEADER (index fallback)
   ══════════════════════════════════════════════════ */
.blog-header {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}
.blog-header h1 { font-size: 2.5rem; }
.blog-header h1 span { color: var(--indigo-600); }
.blog-header p {
    color: var(--gray-500);
    font-size: 1.125rem;
    margin-top: 0.5rem;
    max-width: 65ch;
    line-height: 1.7;
}


/* ══════════════════════════════════════════════════
   HERO FEATURED SECTION
   ══════════════════════════════════════════════════ */
.blog-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
}
@media (min-width: 768px) {
    .blog-hero {
        grid-template-columns: 3fr 2fr;
        gap: 1.25rem;
    }
}

.blog-hero__main {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.blog-hero__main:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -8px rgba(0,0,0,0.1);
    color: inherit;
}

.blog-hero__image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--gray-100);
}
.blog-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.blog-hero__main:hover .blog-hero__image img {
    transform: scale(1.03);
}

.blog-hero__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: var(--indigo-600);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.375rem;
}

.blog-hero__content {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.blog-hero__title {
    font-size: 1.5rem;
    line-height: 1.25;
}
@media (min-width: 768px) {
    .blog-hero__title { font-size: 1.75rem; }
}
.blog-hero__excerpt {
    font-size: 0.9375rem;
    color: var(--gray-500);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-hero__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--indigo-50) 0%, var(--gray-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
}

/* Hero sidebar (2 stacked cards) */
.blog-hero__side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-hero__secondary {
    display: flex;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    overflow: hidden;
    padding: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    flex: 1;
}
.blog-hero__secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -6px rgba(0,0,0,0.08);
    color: inherit;
}

.blog-hero__secondary-image {
    flex-shrink: 0;
    width: 120px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--gray-100);
}
@media (min-width: 768px) {
    .blog-hero__secondary-image { width: 140px; }
}
.blog-hero__secondary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-hero__secondary-content {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}
.blog-hero__secondary-content h3 {
    font-size: 1rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ══════════════════════════════════════════════════
   CATEGORY PILLS
   ══════════════════════════════════════════════════ */
.category-pills {
    margin-bottom: 2rem;
    position: relative;
}
.category-pills__scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-pills__scroll::-webkit-scrollbar { display: none; }

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600) !important;
    white-space: nowrap;
    transition: all 0.15s;
    text-decoration: none;
}
.category-pill:hover {
    border-color: var(--indigo-600);
    color: var(--indigo-600) !important;
    background: var(--indigo-50);
}
.category-pill.active {
    background: var(--indigo-600);
    border-color: var(--indigo-600);
    color: #fff !important;
}
.category-pill__count {
    font-size: 0.75rem;
    opacity: 0.6;
}


/* ══════════════════════════════════════════════════
   POST GRID (3-col)
   ══════════════════════════════════════════════════ */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .post-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ══════════════════════════════════════════════════
   POST CARDS
   ══════════════════════════════════════════════════ */
.post-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08);
}

.post-card__image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--gray-100);
    display: block;
}
.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.post-card:hover .post-card__image img { transform: scale(1.05); }

.post-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.post-card__category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--indigo-600) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}
.post-card__category:hover { color: var(--indigo-700) !important; }

.post-card__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--indigo-600); }

.post-card__excerpt {
    font-size: 0.9375rem;
    color: var(--gray-500);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--indigo-600);
    margin-top: auto;
    padding-top: 0.75rem;
    transition: gap 0.15s;
}
.post-card__read-more:hover { gap: 0.5rem; }
.post-card__read-more svg { width: 1rem; height: 1rem; }


/* ══════════════════════════════════════════════════
   INLINE CTA (grid item & mid-article)
   ══════════════════════════════════════════════════ */
.inline-cta {
    background: linear-gradient(135deg, var(--indigo-600) 0%, var(--indigo-700) 100%);
    border-radius: 0.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.inline-cta__icon { margin-bottom: 0.25rem; }
.inline-cta h3 {
    color: #fff;
    font-size: 1.25rem;
    margin: 0;
}
.inline-cta p {
    color: rgba(255,255,255,0.85);
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 28ch;
}
.inline-cta .btn-primary {
    background: #fff;
    color: var(--indigo-600) !important;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}
.inline-cta .btn-primary:hover {
    background: var(--indigo-50);
    color: var(--indigo-700) !important;
}

/* When inline-cta is inside post-content */
.post-content .inline-cta {
    margin: 2rem 0;
}


/* ══════════════════════════════════════════════════
   NEWSLETTER BANNER
   ══════════════════════════════════════════════════ */
.newsletter-banner {
    margin: 3rem 0;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    overflow: hidden;
}
.newsletter-banner__inner {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
}
@media (min-width: 640px) {
    .newsletter-banner__inner {
        flex-direction: row;
        text-align: left;
        padding: 2rem 2.5rem;
    }
}

.newsletter-banner__text h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}
.newsletter-banner__text p {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.5;
}

.newsletter-banner__form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
    flex-shrink: 0;
}
.newsletter-banner__form input[type="email"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s;
    min-width: 0;
}
.newsletter-banner__form input[type="email"]:focus {
    border-color: var(--indigo-600);
}


/* ══════════════════════════════════════════════════
   ARCHIVE HEADER
   ══════════════════════════════════════════════════ */
.archive-header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}
.archive-header h1 { font-size: 2.25rem; }
.archive-header p {
    color: var(--gray-500);
    font-size: 1rem;
    margin-top: 0.375rem;
    max-width: 65ch;
}
.archive-header__count {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-400);
}


/* ══════════════════════════════════════════════════
   READING PROGRESS BAR
   ══════════════════════════════════════════════════ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--indigo-600);
    z-index: 9999;
    transition: width 0.1s linear;
}


/* ══════════════════════════════════════════════════
   BREADCRUMBS
   ══════════════════════════════════════════════════ */
.breadcrumbs {
    padding: 1rem 0;
}
.breadcrumbs ol {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    flex-wrap: wrap;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--gray-400);
}
.breadcrumbs li a {
    color: var(--gray-400);
    transition: color 0.15s;
}
.breadcrumbs li a:hover { color: var(--indigo-600); }
.breadcrumbs li:last-child { color: var(--gray-600); font-weight: 500; }
.breadcrumbs__sep {
    display: inline-flex;
    margin: 0 0.375rem;
    opacity: 0.5;
}


/* ══════════════════════════════════════════════════
   SINGLE POST
   ══════════════════════════════════════════════════ */
.single-post__header {
    padding: 1.5rem 0 2rem;
    max-width: 48rem;
}
.single-post__category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--indigo-600) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: inline-block;
}
.single-post__title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}
@media (min-width: 768px) {
    .single-post__title { font-size: 2.75rem; }
}

.single-post__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-400);
    flex-wrap: wrap;
}
.single-post__meta .author { color: var(--gray-700); font-weight: 500; }
.single-post__avatar {
    border-radius: 50%;
    object-fit: cover;
}

.single-post__featured {
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 2rem;
    max-width: 48rem;
}
.single-post__featured img {
    width: 100%;
}

/* Content area with optional TOC */
.single-post__body {
    position: relative;
    max-width: 48rem;
}
.single-post__body.has-toc {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 1024px) {
    .single-post__body.has-toc {
        grid-template-columns: 220px 1fr;
        gap: 3rem;
    }
}


/* ══════════════════════════════════════════════════
   TABLE OF CONTENTS
   ══════════════════════════════════════════════════ */
.post-toc {
    display: none;
}
@media (min-width: 1024px) {
    .post-toc {
        display: block;
        order: -1;
    }
    .post-toc__inner {
        position: sticky;
        top: 5rem;
    }
}

.post-toc__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    margin-bottom: 0.75rem;
}

.post-toc__list {
    list-style: none;
    border-left: 2px solid var(--gray-200);
    padding-left: 0.875rem;
}
.post-toc__item {
    margin-bottom: 0.25rem;
}
.post-toc__item a {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500);
    padding: 0.25rem 0;
    transition: color 0.15s;
    line-height: 1.4;
    text-decoration: none;
}
.post-toc__item a:hover { color: var(--gray-900); }
.post-toc__item a.active {
    color: var(--indigo-600);
    font-weight: 500;
}
.post-toc__item--h3 { padding-left: 0.75rem; }


/* ══════════════════════════════════════════════════
   SHARE BUTTONS
   ══════════════════════════════════════════════════ */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}
@media (min-width: 1024px) {
    .share-buttons {
        position: fixed;
        left: max(1rem, calc((100vw - 80rem) / 2 - 4rem));
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
        border: none;
        padding: 0.75rem;
        background: #fff;
        border-radius: 0.75rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        margin: 0;
        z-index: 30;
    }
}

.share-buttons__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    color: var(--gray-500);
    transition: all 0.15s;
    background: none;
    border: none;
    cursor: pointer;
}
.share-btn:hover { background: var(--gray-100); color: var(--gray-700); }
.share-btn--linkedin:hover { color: #0A66C2; }
.share-btn--x:hover { color: var(--gray-900); }
.share-btn--whatsapp:hover { color: #25D366; }
.share-btn--copy.copied { color: var(--indigo-600); background: var(--indigo-50); }


/* ══════════════════════════════════════════════════
   POST CONTENT (Prose)
   ══════════════════════════════════════════════════ */
.post-content {
    max-width: 48rem;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--gray-700);
}
.post-content p { margin-bottom: 1.5rem; }
.post-content h2 { font-size: 1.75rem; margin-top: 2.5rem; margin-bottom: 1rem; }
.post-content h3 { font-size: 1.375rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.post-content h4 { font-size: 1.125rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

.post-content a {
    color: var(--indigo-600);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.post-content a:hover { color: var(--indigo-700); }

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.post-content li { margin-bottom: 0.375rem; }

.post-content blockquote {
    border-left: 3px solid var(--indigo-600);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--indigo-50);
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--gray-700);
    font-style: italic;
}

.post-content pre {
    background: var(--gray-900);
    color: #e5e7eb;
    padding: 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.7;
}
.post-content code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.875em; }
.post-content p code, .post-content li code {
    background: var(--gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    color: var(--gray-800);
}
.post-content img { border-radius: 0.75rem; margin: 1.5rem 0; }
.post-content hr { border: none; border-top: 1px solid var(--gray-200); margin: 2rem 0; }

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}
.post-content th, .post-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    text-align: left;
}
.post-content th { background: var(--gray-50); font-weight: 600; }


/* ══════════════════════════════════════════════════
   AUTHOR CARD
   ══════════════════════════════════════════════════ */
.author-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    margin-top: 2.5rem;
    max-width: 48rem;
}
.author-card__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.author-card__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    margin-bottom: 0.125rem;
}
.author-card__name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}
.author-card__bio {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.5;
}


/* ══════════════════════════════════════════════════
   RELATED POSTS
   ══════════════════════════════════════════════════ */
.related-posts {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--gray-200);
}
.related-posts__title {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}
.related-posts__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 640px) {
    .related-posts__grid { grid-template-columns: repeat(3, 1fr); }
}

.related-post-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -6px rgba(0,0,0,0.08);
    color: inherit;
}

.related-post-card__image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--gray-100);
}
.related-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-card__body { padding: 1rem; }
.related-post-card__meta {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-bottom: 0.375rem;
}
.related-post-card__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ══════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════ */
.sidebar-widget {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.sidebar-widget__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    margin-bottom: 1rem;
}
.sidebar-widget ul { list-style: none; }
.sidebar-widget li { border-bottom: 1px solid var(--gray-100); }
.sidebar-widget li:last-child { border-bottom: none; }
.sidebar-widget li a {
    display: block;
    padding: 0.625rem 0;
    font-size: 0.9375rem;
    color: var(--gray-700);
    transition: color 0.15s;
}
.sidebar-widget li a:hover { color: var(--indigo-600); }

/* CTA widget */
.sidebar-cta {
    background: linear-gradient(135deg, var(--indigo-600), var(--indigo-700));
    border: none;
    color: #fff;
    text-align: center;
}
.sidebar-cta h3 { color: #fff; font-size: 1.25rem; margin-bottom: 0.5rem; }
.sidebar-cta p { color: rgba(255,255,255,0.8); font-size: 0.875rem; margin-bottom: 1rem; line-height: 1.5; }
.sidebar-cta .btn-cta {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #fff;
    color: var(--indigo-600) !important;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: transform 0.15s;
}
.sidebar-cta .btn-cta:hover { transform: translateY(-1px); }


/* ══════════════════════════════════════════════════
   SEARCH FORM
   ══════════════════════════════════════════════════ */
.search-form,
.wp-block-search__inside-wrapper { display: flex; gap: 0.5rem; }
.search-form input[type="search"],
.wp-block-search__input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    background: var(--stone-50);
    outline: none;
    transition: border-color 0.15s;
}
.search-form input[type="search"]:focus,
.wp-block-search__input:focus { border-color: var(--indigo-600); }
.search-form button,
.wp-block-search__button {
    padding: 0.5rem 0.75rem;
    background: var(--indigo-600);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s;
}
.search-form button:hover,
.wp-block-search__button:hover { background: var(--indigo-700); }


/* ══════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}
.pagination a { color: var(--gray-600); }
.pagination a:hover { background: var(--gray-100); color: var(--gray-900); }
.pagination .current { background: var(--indigo-600); color: #fff; }


/* ══════════════════════════════════════════════════
   COMMENTS
   ══════════════════════════════════════════════════ */
.comments-area {
    max-width: 48rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}
.comments-area h2,
.comments-area h3 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.comment-list { list-style: none; }
.comment {
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
}
.comment-author { font-weight: 600; color: var(--gray-900); font-size: 0.9375rem; }
.comment-meta { font-size: 0.8125rem; color: var(--gray-400); margin-bottom: 0.5rem; }
.comment-body p { font-size: 0.9375rem; color: var(--gray-600); line-height: 1.6; }

/* Comment form */
.comment-respond {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.comment-respond .comment-reply-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.comment-respond .comment-notes {
    font-size: 0.8125rem;
    color: var(--gray-400);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.comment-respond label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: var(--stone-50);
}
.comment-respond textarea { min-height: 120px; resize: vertical; }
.comment-respond input:focus,
.comment-respond textarea:focus {
    border-color: var(--indigo-600);
    box-shadow: 0 0 0 3px var(--indigo-50);
    background: #fff;
}
.comment-respond .comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 1.25rem;
}
.comment-respond .comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 0.125rem;
    accent-color: var(--indigo-600);
}
.comment-respond .submit {
    padding: 0.625rem 1.75rem;
    background: var(--indigo-600);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.comment-respond .submit:hover {
    background: var(--indigo-700);
    transform: translateY(-1px);
}


/* ══════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ══════════════════════════════════════════════════ */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 1px;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
}
.lang-switcher__btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-400) !important;
    transition: all 0.15s;
    text-decoration: none;
}
.lang-switcher__btn:hover { background: var(--gray-50); color: var(--gray-600) !important; }
.lang-switcher__btn.active { background: var(--gray-900); color: #fff !important; }

@media (max-width: 639px) {
    .lang-switcher__btn { padding: 0.375rem 0.5rem; font-size: 0.75rem; }
}


/* ══════════════════════════════════════════════════
   TAGS
   ══════════════════════════════════════════════════ */
.tag-cloud a {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: var(--gray-100);
    color: var(--gray-600) !important;
    border-radius: 9999px;
    font-size: 0.8125rem;
    margin: 0.125rem;
    transition: all 0.15s;
}
.tag-cloud a:hover { background: var(--indigo-50); color: var(--indigo-600) !important; }


/* ══════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════ */
.site-footer {
    border-top: 1px solid var(--gray-200);
    margin-top: 4rem;
}
.site-footer__inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 640px) {
    .site-footer__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.footer-left { display: flex; align-items: center; gap: 1.5rem; }
.footer-nav { display: flex; gap: 1rem; list-style: none; }
.footer-nav a { font-size: 0.875rem; color: var(--gray-400); transition: color 0.15s; }
.footer-nav a:hover { color: var(--gray-600); }
.site-footer__copy { font-size: 0.75rem; color: var(--gray-300); }


/* ══════════════════════════════════════════════════
   MOBILE NAV TOGGLE
   ══════════════════════════════════════════════════ */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    color: var(--gray-500);
    cursor: pointer;
}
/* Mobile-only items hidden on desktop */
.nav-mobile-search,
.nav-mobile-cta { display: none; }

@media (max-width: 767px) {
    .mobile-nav-toggle { display: block; }
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 3.5rem;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--gray-200);
        padding: 0.75rem 1rem;
        z-index: 50;
    }
    /* Hide search & CTA from top bar on mobile, show in hamburger menu */
    .nav-search-desktop,
    .nav-cta-desktop { display: none; }
    .nav-links.open .nav-mobile-search,
    .nav-links.open .nav-mobile-cta { display: block; }
    .nav-mobile-search { padding: 0.5rem 0; }
    .nav-mobile-cta { padding: 0.5rem 0; }
    .nav-mobile-cta .btn-primary { display: block; text-align: center; }
}


/* ══════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeUp 0.6s ease-out both; }
@media (prefers-reduced-motion: reduce) {
    .animate-fade-up { animation: none; }
}


/* ══════════════════════════════════════════════════
   404
   ══════════════════════════════════════════════════ */
.page-404 { text-align: center; padding: 6rem 1rem; }
.page-404 h1 { font-size: 6rem; color: var(--indigo-600); line-height: 1; }
.page-404 p { font-size: 1.125rem; color: var(--gray-500); margin: 1rem 0 2rem; }
