/* =================================
   BLOG POST - EDITORIAL MAGAZINE
   Design: Literary meets Art Gallery
   ================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,400&family=Newsreader:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@400;500;700&display=swap');

:root {
    --blog-burgundy: #6B0F28;
    --blog-burgundy-light: #8B1538;
    --blog-charcoal: #1A1A1A;
    --blog-warm-white: #FFFEF9;
    --blog-cream: #F9F7F4;
    --blog-gold: #C9A961;
    --blog-sage: #8B9A7D;
    --blog-text: #2A2A2A;
    --blog-text-light: #5A5A5A;
    --blog-border: #E0DDD8;

    --font-display: 'Fraunces', serif;
    --font-body: 'Newsreader', serif;
    --font-ui: 'DM Sans', sans-serif;

    --reading-width: 680px;
    --wide-width: 1200px;
}

/* =================================
   READING PROGRESS
   ================================= */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--blog-burgundy), var(--blog-gold));
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* =================================
   POST HERO - ASYMMETRIC LAYOUT
   ================================= */

.blog-post {
    background: var(--blog-warm-white);
    position: relative;
}

.post-hero {
    position: relative;
    min-height: 85vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blog-warm-white) 0%, var(--blog-cream) 100%);
}

.post-hero-image {
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

.hero-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(107, 15, 40, 0.15) 0%,
        rgba(201, 169, 97, 0.1) 100%);
    mix-blend-mode: multiply;
}

.post-hero-content {
    padding: 8rem 6rem 6rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 10;
}

/* Decorative background element */
.post-hero-content::before {
    content: '';
    position: absolute;
    top: 15%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--blog-gold) 0%, transparent 70%);
    opacity: 0.08;
    z-index: -1;
    animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.08; }
    50% { transform: scale(1.1); opacity: 0.12; }
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    font-family: var(--font-ui);
}

.post-category {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--blog-burgundy);
    font-weight: 700;
    position: relative;
    padding-left: 3rem;
}

.post-category::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 1px;
    background: var(--blog-burgundy);
}

.post-date {
    font-size: 0.85rem;
    color: var(--blog-text-light);
    font-weight: 400;
}

/* Hero Title - Bold & Editorial */
.post-title {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.05;
    color: var(--blog-charcoal);
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    font-optical-sizing: auto;
}

.title-break {
    display: block;
    font-style: italic;
    font-weight: 400;
    color: var(--blog-burgundy);
    margin-top: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
}

/* Author Info */
.post-author {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: auto;
}

.author-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blog-burgundy), var(--blog-burgundy-light));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(107, 15, 40, 0.2);
}

.author-initial {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
}

.author-info {
    font-family: var(--font-ui);
}

.author-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blog-charcoal);
    margin-bottom: 0.25rem;
}

.author-title {
    font-size: 0.85rem;
    color: var(--blog-text-light);
    font-weight: 400;
}

/* =================================
   ARTICLE CONTENT
   ================================= */

.post-content-wrapper {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 6rem 3rem 8rem;
    position: relative;
}

/* Decorative Ornament */
.content-ornament {
    text-align: center;
    font-size: 2rem;
    color: var(--blog-gold);
    margin-bottom: 4rem;
    opacity: 0.6;
    font-family: var(--font-display);
}

.post-content {
    max-width: var(--reading-width);
    margin: 0 auto;
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--blog-text);
    position: relative;
}

/* Drop Cap - First Letter */
.drop-cap::first-letter {
    font-family: var(--font-display);
    font-size: 5.5rem;
    line-height: 0.85;
    float: left;
    margin: 0.1em 0.15em 0 0;
    color: var(--blog-burgundy);
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1.8rem;
    text-align: justify;
    hyphens: auto;
}

.post-content p:last-of-type {
    margin-bottom: 0;
}

/* Headings */
.content-heading {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--blog-charcoal);
    margin: 4rem 0 2rem;
    line-height: 1.3;
    position: relative;
    padding-top: 3rem;
}

.content-heading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--blog-burgundy), var(--blog-gold));
}

/* Pull Quotes - Overlapping */
.pull-quote {
    font-family: var(--font-display);
    font-size: 1.8rem;
    line-height: 1.4;
    font-weight: 400;
    font-style: italic;
    color: var(--blog-burgundy);
    margin: 4rem 0;
    padding: 2.5rem 3rem;
    background: var(--blog-cream);
    border-left: 4px solid var(--blog-burgundy);
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.pull-quote-left {
    margin-left: -8rem;
    margin-right: 2rem;
    float: left;
    width: 420px;
    clear: both;
}

.pull-quote-right {
    margin-right: -8rem;
    margin-left: 2rem;
    float: right;
    width: 400px;
    clear: both;
}

.quote-mark {
    font-family: var(--font-display);
    font-size: 6rem;
    line-height: 0;
    color: var(--blog-gold);
    opacity: 0.3;
    position: absolute;
    top: 1.5rem;
    left: 1rem;
}

.pull-quote p {
    margin: 0;
    position: relative;
    z-index: 2;
}

.pull-quote cite {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    font-style: normal;
    font-family: var(--font-ui);
    color: var(--blog-text-light);
    font-weight: 400;
}

/* Images */
.content-image {
    margin: 5rem 0;
    position: relative;
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.content-image-full {
    margin-left: calc(-1 * (var(--wide-width) - var(--reading-width)) / 2);
    margin-right: calc(-1 * (var(--wide-width) - var(--reading-width)) / 2);
    max-width: var(--wide-width);
}

.content-image figcaption {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--blog-text-light);
    margin-top: 1.2rem;
    text-align: center;
    font-style: italic;
    letter-spacing: 0.01em;
}

/* Margin Notes */
.margin-note {
    position: absolute;
    right: -280px;
    width: 220px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--blog-text-light);
    padding: 1.5rem;
    background: var(--blog-cream);
    border-left: 2px solid var(--blog-gold);
}

.note-number {
    color: var(--blog-burgundy);
    font-weight: 700;
    margin-right: 0.5rem;
}

/* Closing Statement */
.closing-statement {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--blog-burgundy);
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--blog-border);
    text-align: center;
}

/* =================================
   ARTICLE CTA
   ================================= */

.article-cta {
    margin-top: 6rem;
    padding: 4rem 3rem;
    background: linear-gradient(135deg, var(--blog-cream) 0%, #F5F2EE 100%);
    border-top: 3px solid var(--blog-burgundy);
    text-align: center;
    position: relative;
}

.cta-ornament {
    font-size: 2rem;
    color: var(--blog-gold);
    margin-bottom: 2rem;
    opacity: 0.6;
    font-family: var(--font-display);
}

.cta-heading {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--blog-charcoal);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.cta-description {
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--blog-text);
    margin: 0 auto 2.5rem;
    max-width: 600px;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--blog-burgundy);
    color: white;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(107, 15, 40, 0.25);
    letter-spacing: 0.05em;
    margin-top: 32px;
}

.cta-button:hover {
    background: var(--blog-burgundy-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(107, 15, 40, 0.35);
}

/* =================================
   TABLE OF CONTENTS - FLOATING
   ================================= */

.table-of-contents {
    position: sticky;
    top: 120px;
    left: calc(50% + var(--reading-width) / 2 + 4rem);
    width: 240px;
    padding: 2rem;
    background: white;
    border: 1px solid var(--blog-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.table-of-contents h4 {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--blog-burgundy);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.table-of-contents nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.toc-link {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--blog-text-light);
    text-decoration: none;
    padding: 0.5rem 0;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    transition: all 0.3s ease;
}

.toc-link:hover,
.toc-link.active {
    color: var(--blog-burgundy);
    border-left-color: var(--blog-burgundy);
    padding-left: 1.5rem;
}

/* =================================
   RELATED POSTS
   ================================= */

.related-posts {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 6rem 3rem 8rem;
    background: var(--blog-cream);
}

.related-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--blog-charcoal);
    text-align: center;
    margin-bottom: 4rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.related-card {
    background: white;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.related-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.related-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.related-card:hover .related-image {
    transform: scale(1.08);
}

.related-content {
    padding: 2rem;
}

.related-category {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--blog-burgundy);
    font-weight: 700;
    display: block;
    margin-bottom: 0.8rem;
}

.related-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--blog-charcoal);
    line-height: 1.3;
    margin: 0;
}

/* =================================
   SCROLL ANIMATIONS
   ================================= */

.scroll-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =================================
   RESPONSIVE
   ================================= */

@media (max-width: 1400px) {
    .table-of-contents {
        display: none;
    }

    .margin-note {
        position: relative;
        right: auto;
        width: 100%;
        margin: 2rem 0;
    }

    .pull-quote-left,
    .pull-quote-right {
        margin-left: 0;
        margin-right: 0;
        float: none;
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .post-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .post-hero-image {
        clip-path: none;
        height: 400px;
    }

    .post-hero-content {
        padding: 4rem 3rem;
    }

    .post-title {
        font-size: 3.5rem;
    }

    .content-image-full {
        margin-left: 0;
        margin-right: 0;
    }

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

@media (max-width: 768px) {
    .post-hero-content {
        padding: 3rem 1.5rem;
    }

    .post-title {
        font-size: 2.5rem;
    }

    .post-content-wrapper {
        padding: 4rem 1.5rem 6rem;
    }

    .post-content {
        font-size: 1.05rem;
    }

    .drop-cap::first-letter {
        font-size: 4rem;
    }

    .content-heading {
        font-size: 1.6rem;
        margin: 3rem 0 1.5rem;
        padding-top: 2rem;
    }

    .pull-quote {
        font-size: 1.4rem;
        padding: 2rem;
        margin: 3rem 0;
    }

    .article-cta {
        padding: 3rem 1.5rem;
    }

    .cta-heading {
        font-size: 2rem;
    }

    .cta-description {
        font-size: 1rem;
    }

    .related-posts {
        padding: 4rem 1.5rem 6rem;
    }

    .related-title {
        font-size: 2rem;
    }
}
