/* Blog-specific styles extending the Mary Blair design system */

/* ============================================
   BLOG HEADER
   ============================================ */
.blog-header {
    padding: 40px 20px 30px;
}

.site-title-link {
    text-decoration: none;
}

.site-title-link:hover .title-line-1 {
    color: var(--turquoise);
}

.site-title-link:hover .title-line-2 {
    color: var(--coral);
}

.blog-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.nav-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--deep-teal);
    text-decoration: none;
    padding: 10px 20px;
    border: 3px solid var(--charcoal);
    background: white;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--charcoal);
    color: white;
}

/* ============================================
   BLOG POST LIST
   ============================================ */
.blog-section {
    margin-bottom: 50px;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.blog-post-card {
    background: white;
    border: 3px solid var(--charcoal);
    padding: 30px;
    position: relative;
    transition: all 0.3s ease;
}

.blog-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--turquoise);
}

.blog-post-card:hover {
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
    transform: translate(-3px, -3px);
}

.blog-post-card .project-title a {
    color: var(--deep-teal);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-card .project-title a:hover {
    color: var(--coral);
}

.post-date {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--charcoal);
    opacity: 0.6;
    margin-bottom: 8px;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* ============================================
   BLOG POST SINGLE
   ============================================ */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-header {
    margin-bottom: 40px;
}

.blog-post-header .section-header {
    margin-bottom: 20px;
}

.blog-post-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.2;
    margin: 0;
}

/* ============================================
   BLOG POST CONTENT
   ============================================ */
.blog-post-content {
    background: white;
    border: 3px solid var(--charcoal);
    padding: 40px;
    position: relative;
}

.blog-post-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--turquoise), var(--gold));
}

/* Typography within post content */
.blog-post-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--deep-teal);
    margin: 40px 0 20px 0;
    line-height: 1.3;
}

.blog-post-content h2:first-child {
    margin-top: 0;
}

.blog-post-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--charcoal);
    margin: 30px 0 15px 0;
    line-height: 1.3;
}

.blog-post-content h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--charcoal);
    margin: 25px 0 12px 0;
}

.blog-post-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 20px;
    padding-left: 0;
    list-style: none;
}

.blog-post-content li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--charcoal);
}

.blog-post-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--gold);
}

.blog-post-content ol {
    counter-reset: list-counter;
}

.blog-post-content ol li {
    counter-increment: list-counter;
}

.blog-post-content ol li::before {
    content: counter(list-counter) '.';
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--coral);
}

.blog-post-content a {
    color: var(--deep-teal);
    text-decoration: none;
    border-bottom: 2px solid var(--turquoise);
    transition: all 0.3s ease;
}

.blog-post-content a:hover {
    color: var(--coral);
    border-bottom-color: var(--coral);
}

.blog-post-content strong {
    font-weight: 700;
    color: var(--charcoal);
}

.blog-post-content em {
    font-style: italic;
}

.blog-post-content blockquote {
    border-left: 5px solid var(--coral);
    padding-left: 25px;
    margin: 30px 0;
    font-style: italic;
    color: var(--charcoal);
    opacity: 0.9;
}

.blog-post-content hr {
    border: none;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--coral),
        var(--turquoise),
        var(--gold)
    );
    margin: 40px 0;
}

/* Images */
.blog-post-content img {
    max-width: 800px;
    width: 100%;
    height: auto;
    margin: 30px auto;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-post-content img:hover {
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    transform: translate(-2px, -2px);
}

.blog-post-content figure {
    margin: 30px 0;
}

.blog-post-content figcaption {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    opacity: 0.7;
    margin-top: 10px;
    text-align: center;
}

/* Code blocks */
.blog-post-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    background: var(--light-gray);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--charcoal);
}

.blog-post-content pre {
    background: var(--charcoal);
    border: 3px solid var(--charcoal);
    padding: 20px;
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 0;
}

.blog-post-content pre code {
    background: transparent;
    padding: 0;
    color: var(--warm-white);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Syntax highlighting adjustments for monokai */
.blog-post-content .highlight {
    margin: 25px 0;
}

.blog-post-content .highlight pre {
    margin: 0;
}

/* ============================================
   BLOG POST NAVIGATION
   ============================================ */
.blog-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.post-nav-prev,
.post-nav-next {
    flex: 1 1 200px;
}

.post-nav-index {
    flex: 0 1 auto;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .blog-post-title {
        font-size: 2rem;
    }

    .blog-post-content {
        padding: 30px 25px;
    }

    .blog-post-content h2 {
        font-size: 1.5rem;
    }

    .blog-post-content h3 {
        font-size: 1.2rem;
    }

    .blog-nav {
        flex-direction: column;
        align-items: center;
    }

    .nav-link {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    .blog-post-nav {
        flex-direction: column;
    }

    .post-nav-prev,
    .post-nav-next,
    .post-nav-index {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ============================================
   IMAGE LIGHTBOX
   ============================================ */
.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 42, 42, 0.95);
    z-index: 9999;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-lightbox.active {
    display: flex;
}

.image-lightbox img {
    max-width: 95%;
    max-height: 95vh;
    width: auto;
    height: auto;
    margin: 0;
    border: 4px solid var(--warm-white);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.image-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: var(--warm-white);
    cursor: pointer;
    font-weight: 300;
    line-height: 1;
    transition: color 0.3s ease;
    z-index: 10000;
}

.image-lightbox-close:hover {
    color: var(--coral);
}

@media (max-width: 480px) {
    .blog-post-content {
        padding: 25px 20px;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
}
