/* ============================================
   BLOG — Scandinavian Minimalist
   Shared by blog index + individual posts
   ============================================ */

/* ── Blog Index: Hero ── */
.blog-hero {
    padding: 80px 0 56px;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    background: var(--primary-bg);
}

.blog-hero .eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--highlight-color);
    margin-bottom: 16px;
}

.blog-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 16px;
}

.blog-hero p {
    font-size: 1.125rem;
    color: var(--secondary-text);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Blog Container ── */
.blog-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Featured Post ── */
.featured-section {
    padding: 64px 0 48px;
}

.featured-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary-text);
    margin-bottom: 20px;
}

.featured-label::before {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--highlight-color);
    border-radius: 2px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
    text-decoration: none;
    color: inherit;
}

.featured-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
}

.featured-visual {
    position: relative;
    min-height: 340px;
    background: linear-gradient(135deg, #1a1033 0%, #2d1854 40%, #D14D6A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.featured-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(115, 83, 186, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(209, 77, 106, 0.4) 0%, transparent 50%);
}

.featured-visual-icon {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-visual-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.featured-content {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--highlight-color);
    background: rgba(209, 77, 106, 0.08);
    border: 1px solid rgba(209, 77, 106, 0.2);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    width: fit-content;
}

.featured-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin: 0 0 16px;
}

.featured-content .excerpt {
    font-size: 1rem;
    color: var(--secondary-text);
    line-height: 1.7;
    margin-bottom: 28px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--muted-text);
    margin-bottom: 24px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-meta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.read-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--highlight-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.read-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.featured-card:hover .read-link svg,
.post-card:hover .read-link svg {
    transform: translateX(4px);
}

/* ── Posts Grid ── */
.posts-section {
    padding: 0 0 80px;
}

.posts-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.posts-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--secondary-text);
}

.posts-section-line {
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--secondary-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-slow);
    box-shadow: var(--shadow-sm);
    animation: cardEntrance 0.5s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(209, 77, 106, 0.2);
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s;  }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s;  }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s;  }

.card-top-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--highlight-color), var(--purple-accent));
}

.card-body {
    padding: 28px 28px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: -0.015em;
    line-height: 1.35;
    margin: 0 0 10px;
    transition: color 0.15s ease;
}

.post-card:hover .card-body h3 {
    color: var(--highlight-color);
}

.card-excerpt {
    font-size: 0.875rem;
    color: var(--secondary-text);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    gap: 12px;
}

/* ── Newsletter Section ── */
.newsletter-section {
    background: var(--secondary-bg);
    border-top: 1px solid var(--glass-border);
    padding: 72px 0;
}

.newsletter-inner {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-inner h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: -0.025em;
    margin-bottom: 10px;
}

.newsletter-inner p {
    color: var(--secondary-text);
    margin-bottom: 28px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--primary-bg);
    color: var(--primary-text);
    outline: none;
    transition: border-color 0.2s ease;
}

.newsletter-form input:focus {
    border-color: var(--highlight-color);
}

.newsletter-form button {
    padding: 12px 20px;
    background: var(--highlight-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: var(--highlight-hover);
}

/* ══════════════════════════════════════════
   BLOG POST PAGE
   ══════════════════════════════════════════ */

/* ── Progress Bar ── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--highlight-color), var(--purple-accent));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ── Post Hero ── */
.post-hero {
    padding: 72px 0 56px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--primary-bg);
}

.post-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 32px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--secondary-text);
    text-decoration: none;
    margin-bottom: 28px;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: var(--primary-text);
}

.back-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

.post-hero h1 {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 16px 0 20px;
}

.post-hero .lead {
    font-size: 1.125rem;
    color: var(--secondary-text);
    line-height: 1.7;
    margin-bottom: 32px;
}

.post-author-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--highlight-color), var(--purple-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.author-info strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-text);
    line-height: 1.2;
}

.author-info span {
    font-size: 0.8rem;
    color: var(--muted-text);
}

.post-meta-divider {
    width: 1px;
    height: 28px;
    background: var(--glass-border);
}

/* ── Post Body ── */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 48px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 56px 32px 80px;
    align-items: start;
}

.post-article {
    min-width: 0;
}

.post-article h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 2.5em 0 0.75em;
    padding-left: 16px;
    border-left: 3px solid var(--highlight-color);
}

.post-article h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-text);
    letter-spacing: -0.01em;
    margin: 1.75em 0 0.5em;
}

.post-article p {
    font-size: 1.0625rem;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 1.25em;
}

.post-article ul, .post-article ol {
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}

.post-article li {
    font-size: 1.0625rem;
    color: #374151;
    line-height: 1.75;
    margin-bottom: 0.5em;
}

.post-article strong {
    font-weight: 600;
    color: var(--primary-text);
}

/* Callout box */
.post-callout {
    background: linear-gradient(135deg, rgba(209, 77, 106, 0.04), rgba(115, 83, 186, 0.04));
    border: 1px solid rgba(209, 77, 106, 0.15);
    border-left: 4px solid var(--highlight-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 2em 0;
}

.post-callout p {
    margin: 0;
    font-size: 1rem;
    color: var(--primary-text);
    font-style: italic;
    line-height: 1.7;
}

/* ── TOC (Sidebar) ── */
.post-toc {
    position: sticky;
    top: 88px;
    background: var(--secondary-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px 20px 16px;
    font-size: 0.82rem;
}

.toc-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-text);
    margin-bottom: 12px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc-list li a {
    display: block;
    padding: 5px 8px;
    color: var(--secondary-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    line-height: 1.4;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}

.toc-list li a:hover,
.toc-list li a.active {
    color: var(--highlight-color);
    background: rgba(209, 77, 106, 0.05);
    border-left-color: var(--highlight-color);
}

/* ── Post CTA ── */
.post-cta {
    margin-top: 3em;
    padding: 36px 40px;
    background: linear-gradient(135deg, rgba(209, 77, 106, 0.06) 0%, rgba(115, 83, 186, 0.06) 100%);
    border: 1px solid rgba(209, 77, 106, 0.15);
    border-radius: var(--radius-xl);
    text-align: center;
}

.post-cta h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.post-cta p {
    color: var(--secondary-text);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.post-cta .cta-btn {
    display: inline-block;
    padding: 13px 28px;
    background: var(--highlight-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease, transform 0.15s ease;
}

.post-cta .cta-btn:hover {
    background: var(--highlight-hover);
    transform: translateY(-1px);
}

/* ── Share Row ── */
.post-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--secondary-text);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--secondary-text);
    text-decoration: none;
    background: var(--secondary-bg);
    transition: all 0.15s ease;
    cursor: pointer;
}

.share-btn:hover {
    border-color: var(--primary-text);
    color: var(--primary-text);
}

.share-btn svg {
    width: 13px;
    height: 13px;
}

/* ── Related Posts ── */
.related-posts {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--glass-border);
}

.related-posts h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 20px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.related-post-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--secondary-bg);
}

.related-post-card:hover {
    border-color: var(--highlight-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.related-post-card .related-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--highlight-color);
}

.related-post-card .related-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--primary-text);
    line-height: 1.4;
}

.related-post-card .related-meta {
    font-size: 0.78rem;
    color: var(--secondary-text);
}

@media (max-width: 600px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-visual {
        min-height: 220px;
    }
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .post-layout {
        grid-template-columns: 1fr;
    }
    .post-toc {
        position: static;
        order: -1;
    }
}

@media (max-width: 600px) {
    .featured-content {
        padding: 32px 24px;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .blog-container {
        padding: 0 20px;
    }
    .newsletter-form {
        flex-direction: column;
    }
    .post-hero-inner {
        padding: 0 20px;
    }
    .post-layout {
        padding: 40px 20px 60px;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 60px 0 40px;
    }
    .blog-hero h1 {
        font-size: 1.8rem;
    }
    .blog-hero p {
        font-size: 1rem;
    }
    .blog-container {
        padding: 0 16px;
    }
    .featured-content {
        padding: 24px 18px;
    }
    .featured-content h2 {
        font-size: 1.25rem;
    }
    .featured-content .excerpt {
        font-size: 0.9rem;
    }
    .card-body {
        padding: 20px 18px 18px;
    }
    .card-body h3 {
        font-size: 1rem;
    }
    .newsletter-section {
        padding: 48px 0;
    }
    .newsletter-inner h2 {
        font-size: 1.4rem;
    }
    /* Post page */
    .post-hero {
        padding: 56px 0 40px;
    }
    .post-hero h1 {
        font-size: 1.6rem;
    }
    .post-hero .lead {
        font-size: 1rem;
    }
    .post-author-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .post-meta-divider {
        display: none;
    }
    .post-article h2 {
        font-size: 1.2rem;
    }
    .post-article p,
    .post-article li {
        font-size: 0.95rem;
    }
    .post-cta {
        padding: 28px 20px;
    }
    .post-cta h3 {
        font-size: 1.15rem;
    }
    .post-share {
        flex-wrap: wrap;
    }
}
