/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Montserrat:wght@400;700&family=Source+Serif+Pro:wght@400;700&display=swap');

/* --- CSS Variables (Root) --- */
:root {
    --font-body: 'Source Serif Pro', serif;
    --font-header: 'Montserrat', sans-serif;
    --font-brand: 'Dancing Script', cursive;
    --color-bg: #ffffff;
    --color-text: #333333;
    --color-text-bold: #000000;
    --color-border: #e0e0e0;
    --color-accent: #0056b3;
    --color-code-bg: #f5f5f5;
    --content-width: 720px;
}

/* --- Basic Reset & Body --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 18px;
    line-height: 1.7;
    letter-spacing: 0.5px;
}

/* --- Main Layout Containers --- */
.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header#site-header {
    text-align: center;
    /* Reduced top padding to move content closer to the top */
    padding: 1rem 1rem 2rem;
    border-bottom: 1px solid var(--color-border);
}

main#site-content {
    padding: 3rem 0;
}

footer#site-footer {
    text-align: center;
    padding: 3rem 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: #555;
}

/* --- Header & Navigation --- */
header#site-header .brand a {
    font-family: var(--font-brand);
    font-size: 1.75rem; /* Made even smaller */
    color: var(--color-text-bold);
    text-decoration: none;
}

header#site-header nav {
    margin-top: 1rem;
}

header#site-header nav ul {
    list-style: none;
}

header#site-header nav ul li {
    display: inline-block;
    min-width: 120px;
    margin: 0 1rem;
    text-align: center;
}

header#site-header nav a {
    font-family: var(--font-header);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

header#site-header nav a:hover {
    color: var(--color-accent);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    color: var(--color-text-bold);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 3rem; }
h3 { font-size: 1.5rem; margin-top: 2.5rem; }

p {
    margin-bottom: 1.5rem;
}

hr {
    margin-bottom: 1.5rem;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--color-text-bold);
}

strong, b {
    color: var(--color-text-bold);
    font-weight: 700;
}

/* --- Code Blocks & Inline Code --- */
code {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--color-code-bg);
    border: 1px solid var(--color-border);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    color: #c7254e;
}

.post-content img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    margin-top: 2em;
    margin-bottom: 2em;
}

pre {
    background-color: var(--color-code-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1em;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

pre code {
    background-color: transparent;
    border: none;
    padding: 0;
    color: var(--color-text);
}

/* --- Blockquotes --- */
blockquote {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    border-left: 3px solid var(--color-border);
    font-style: italic;
    color: #666;
}

/* --- Index Page: Post List --- */
.post-list {
    list-style: none;
}

.post-list-item {
    margin-bottom: 3.5rem;
}

.post-list-item h2 a {
    color: var(--color-text-bold);
}

.post-list-item h2 a:hover {
    color: var(--color-accent);
}

.post-list-item .post-meta {
    font-family: var(--font-header);
    font-size: 0.8rem;
    color: #777;
    margin-top: -0.5rem;
}

.post-list-item .post-summary {
    margin-top: 0.75rem;
}

/* --- Post Page: Article Styles --- */
.post-full .post-meta {
    font-family: var(--font-header);
    font-size: 0.9rem;
    color: #777;
    margin-top: -1rem;
    margin-bottom: 2.5rem;
}

.post-full .post-content ul, .post-full .post-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

/* --- Footer --- */
.footer-links {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.footer-links li {
    display: inline-block;
    margin: 0 0.75rem;
}

.footer-links a {
    color: #555;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-links svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    vertical-align: middle;
    transition: fill 0.2s ease-in-out;
}

.chapter-nav {
    display: flex;
    align-items: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-family: var(--font-header);
    font-weight: 700;
}

.chapter-nav a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.chapter-nav a:hover {
    background-color: var(--color-code-bg);
    border-color: var(--color-text);
}

.chapter-nav .next-link {
    margin-left: auto;
}

/* --- Responsive Design --- */
/* --- Poetry Formatting --- */
.poem-content {
    white-space: pre-line; /* Preserves line breaks but collapses multiple spaces */
    line-height: 1.8; /* Slightly tighter than body text for poetry */
}

.poem-content p {
    margin-bottom: 0rem; /* Need to do this due to how the white-space property works */
    line-height: 1.8; /* Lines within stanza */
}

.poem-content p:first-child {
    margin-top: 0; /* Remove top margin from first paragraph */
}

/* For poems that need preserved indentation */
.poem-content.preserve-indent {
    white-space: pre-wrap; /* Preserves both line breaks AND leading spaces */
}

@media (max-width: 768px) {
    body { font-size: 16px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

