*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg-color: #fdfcf8;
    --text-color: #2c2c2c;
    --accent-color: #5d6d54; /* Sage Green */
    --border-color: #e0e0e0;
    --font-serif: 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    margin: 0 auto;
    width: 100%;
    background-color: var(--bg-color);
    min-height: 100vh;
    position: relative;
}

/* Scoping to ensure it doesn't clash with other pages */
.blog-body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.7;
    margin: 0;
}

nav.blog-nav {
    max-width: 1100px; /* Increased from 1000px to fill horizontal space */
    margin: 0 auto;
    padding: 40px 20px; /* Increased top padding to anchor the top of the page */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    text-decoration: none;
    color: var(--accent-color);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

header.blog-header {
    max-width: 1000px; /* Increased from 800px to spread the logo area */
    margin: 40px auto 60px;
    padding: 0 20px;
    text-align: center;
}

.logo {
    font-family: var(--font-serif);
    font-size: 3.5rem; /* Slightly larger logo for a bolder presence */
    font-weight: 400;
    margin: 0;
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.tagline {
    text-transform: uppercase;
    letter-spacing: 4px; /* Increased spacing for an airy, premium feel */
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-top: 15px;
    display: block;
}

/* Widened the main container to 1000px for a more expansive feel */
.container {
    background-color: var(--bg-color);
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.mission {
    background: white;
    padding: 60px; /* Increased internal padding so the box feels "sturdier" */
    border: 1px solid var(--border-color);
    margin: 40px 0 80px;
    /* Subtle box shadow adds depth to the white-on-off-white look */
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.mission h2 {
    font-family: var(--font-serif);
    font-size: 1.6rem; /* Slightly larger heading */
    margin-top: 0;
    font-weight: 400;
    text-transform: lowercase;
}

.mission p {
    font-size: 1.2rem; /* Increased font size for better readability and "fullness" */
    color: #444;
    margin-bottom: 0;
    max-width: 800px; /* Caps text line-length while allowing the box to stay wide */
}

.article-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 30px; /* Wider gap between icon and text */
    margin-bottom: 70px;
    align-items: flex-start;
}

.article-card:hover h3 {
    color: var(--accent-color);
}

.icon-box {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 18px; /* Slightly larger icons */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--accent-color);
}

.article-info span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
}

.article-info h3 {
    font-family: var(--font-serif);
    font-size: 2rem; /* Substantially larger title for the "hero" look */
    margin: 10px 0;
    font-weight: 400;
    line-height: 1.2;
    text-transform: lowercase;
}

.article-info p {
    font-size: 1.1rem;
    max-width: 700px; /* Keeps post excerpts easy to read */
}

.subscribe-break {
    background: var(--accent-color);
    color: white;
    padding: 80px 40px; /* More vertical padding for impact */
    margin: 100px 0;
    text-align: center;
}

.subscribe-break h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 2.5rem;
    margin-top: 0;
    text-transform: lowercase;
}

.subscribe-form {
    display: flex;
    justify-content: center;
    align-items: center; /* Ensures vertical alignment */
    gap: 15px;
    margin-top: 35px;
    flex-wrap: wrap; /* Allows Turnstile to wrap on smaller screens */
}

.subscribe-form input {
    padding: 15px 20px;
    border: none;
    width: 100%;       /* Change from 350px to 100% */
    max-width: 350px;  /* Keeps it from getting too wide on desktop */
    font-size: 1rem;
    box-sizing: border-box; /* Ensures padding doesn't add to width */
}

.subscribe-form button {
    background: #2c2c2c;
    color: white;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    font-size: 1rem;
}

footer.blog-footer {
    text-align: center;
    padding: 100px 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 120px;
    font-size: 0.9rem;
    color: #888;
}

/* --- POST LAYOUT SPECIFIC STYLES --- */

.post-container {
    max-width: 800px; /* Slightly narrower than index for reading focus */
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styling within the post */
.post-header {
    text-align: center;
    margin: 60px auto 80px;
}

.post-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    line-height: 1.1;
    margin: 10px 0 20px;
    font-weight: 400;
    color: var(--text-color);
}

.post-meta {
    font-size: 0.85rem;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- MARKDOWN CONTENT STYLING --- */
/* This targets everything inside the {{ content }} tag */

.post-content {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
}

/* The Lede: The first paragraph is emphasized */
.post-content > p:first-of-type {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 2.5rem;
}

/* Headings from Markdown (###) */
.post-content h2,
.post-content h3 {
    font-family: var(--font-serif);
    color: var(--accent-color);
    margin-top: 3.5rem;
    margin-bottom: 1.2rem;
    font-weight: 400;
}

.post-content h2 { font-size: 2.2rem; }
.post-content h3 { font-size: 1.8rem; }

/* Body Paragraphs */
.post-content p {
    margin-bottom: 1.8rem;
}

/* Bold text inside posts */
.post-content strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Lists (1. or - in Markdown) */
.post-content ol,
.post-content ul {
    margin: 2.5rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 1.2rem;
    padding-left: 10px;
}

.post-content li::marker {
    color: var(--accent-color);
    font-family: var(--font-serif);
    font-weight: bold;
}

/* Blockquotes (> in Markdown) */
.post-content blockquote {
    margin: 4rem 0;
    padding: 10px 40px;
    border-left: 1px solid var(--accent-color);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.4rem;
    color: #555;
    background-color: #f9f9f6; /* Very subtle shift from body bg */
}

/* Images in Markdown (![alt](url)) */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 3rem auto;
    border-radius: 2px;
}

/* Post Footer CTA Styling */
.post-footer-cta {
    margin-top: 50px;
    padding: 24px;
    background-color: #f9f9f9; /* A very subtle light gray */
    border-radius: 8px;
    border-left: 4px solid var(--accent-color); /* A nice 'pop' of color */
}

.post-footer-cta p {
    margin: 0;
    line-height: 1.6;
    color: #444;
}

.post-footer-cta a {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.2s ease;
}

.post-footer-cta a:hover {
    opacity: 0.7;
}

/* Mobile Adjustments */
@media (max-width: 800px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }

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

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

    .post-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .post-content > p:first-of-type {
        font-size: 1.3rem;
    }
}