/* Article Style CSS */
body {
    font-family: "Merriweather", "Georgia", "Cambria", "Times New Roman", serif;
    line-height: 1.8;
    font-size: 19px;
    color: #2c2c2c;
    background-color: #f7f7f7;
    margin: 0;
    padding: 0;
}

.markdown-body {
    box-sizing: border-box;
    max-width: 800px;
    /* Increased slightly for better breath */
    margin: 40px auto;
    /* Visible top/bottom margins */
    padding: 40px 22px 100px;
    /* Generous internal whitespace */
    background: #ffffff;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
    /* Subtle lift */
}

@media (max-width: 768px) {
    .markdown-body {
        padding: 40px 20px;
        margin: 0;
        border: none;
        box-shadow: none;
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #111;
    margin-top: 2em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

h1 {
    font-size: 2.8em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.2em;
    /* Tighter to subtitle if exists */
    border-bottom: none;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.8em;
    font-weight: 600;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 0.3em;
}

h3 {
    font-size: 1.4em;
    font-weight: 600;
}

p {
    margin-bottom: 1.5em;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: #004499;
    text-decoration-thickness: 2px;
}

strong {
    font-weight: 700;
    color: #000;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid #0066cc;
    margin: 2em 0;
    padding-left: 1.5em;
    font-style: italic;
    color: #555;
    background: transparent;
}

/* Images */
img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2em auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Lists */
ul,
ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

li {
    margin-bottom: 0.5em;
}

/* Code */
code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 0.85em;
    background-color: rgba(27, 31, 35, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

pre {
    background: #f6f8fa;
    padding: 16px;
    overflow: auto;
    border-radius: 6px;
    margin-bottom: 1.5em;
}

/* Horizontal Rule */
hr {
    border: 0;
    height: 1px;
    background: #e1e4e8;
    margin: 3em 0;
}

/* Metadata/Subtitle styling if present in P tags after H1 */
h1+p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    color: #666;
    font-size: 1.1em;
    margin-bottom: 3em;
}