/* Reset default styles */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

/* Light mode (default) */
body {
    background-color: #f5f5f5;
    color: #333;
}

/* Dark mode */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Container */
section {
    margin-bottom: 30px; 
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    text-align: center;
}

body.dark-mode header {
    background-color: #0052cc;
}

/* Navigation */
header nav a {
    color: #ffffff; /* White for high contrast in light mode */
    text-decoration: none;
    margin: 0 10px;
}

body.dark-mode header nav a {
    color: #4da8ff;
}

header nav a:hover {
    text-decoration: underline;
}

/* Headings */
h1, h2 {
    font-weight: 600;
}

h1 {
    font-size: 2em;
}

h2 {
    font-size: 1.5em;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
}

body.dark-mode a {
    color: #4da8ff;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin-bottom: 20px;
}

/* Post metadata */
.post-meta {
    font-size: 0.9em; /* Smaller font size for date, category, tags */
    margin: 5px 0 0 0; /* Minimal top margin, no bottom margin */
    line-height: 1.2; /* Reduced line height for compactness */
}

/* Inline display for category and tags */
.post-meta a {
    margin-right: 5px;
}

/* Disclaimer */
.disclaimer {
    font-size: 0.9em; /* Smaller font size */
    font-style: italic; /* Italicized text */
}

/* Buttons */
button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
}

body.dark-mode button {
    background-color: #4da8ff;
}

button:hover {
    background-color: #0056b3;
}

body.dark-mode button:hover {
    background-color: #003d99;
}

/* Footer */
footer {
    text-align: center;
    padding: 10px;
    background-color: #e9ecef;
    margin-top: 20px;
}

body.dark-mode footer {
    background-color: #2c2c2c;
}

/* New Styles: Content Container */
.content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

body.dark-mode .content {
    background: #2c2c2c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* New Styles: Code Blocks */
pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.95em;
    line-height: 1.5;
    border: 1px solid #e0e0e0;
    margin: 1rem 0;
}

body.dark-mode pre {
    background: #2d2d2d;
    border: 1px solid #444;
}

code {
    font-family: 'Fira Code', 'Source Code Pro', 'Consolas', monospace;
    font-size: 0.95em;
    color: #333;
}

body.dark-mode code {
    color: #e0e0e0;
}

/* New Styles: Additional Headings and Paragraphs */
h3, h4, h5, h6 {
    font-weight: 500;
    color: #333;
    margin-top: 1.5rem;
}

body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mod
e h6 {
    color: #e0e0e0;
}

h3 {
    font-size: 1.3em;
}

h4 {
    font-size: 1.2em;
}

p {
    margin: 1rem 0;
    color: #444;
}

body.dark-mode p {
    color: #d0d0d0;
}

/* New Styles: Lists with Markers */
ul:not(.post-meta) {
    list-style-type: disc;
    padding-left: 2rem;
}

ol {
    padding-left: 2rem;
    margin: 1rem 0;
    list-style-type: decimal;
}

ol li {
    margin-bottom: 1rem;
    color: #333;
}

body.dark-mode ol li {
    color: #e0e0e0;
}

/* Ensure nested code blocks in lists are styled */
ol li pre {
    margin-left: 0;
}

/* New Styles: Blockquotes */
blockquote {
    border-left: 4px solid #007bff;
    padding: 1rem;
    margin: 1rem 0;
    background: #f8f9fa;
    font-style: italic;
}

body.dark-mode blockquote {
    border-left-color: #4da8ff;
    background: #2d2d2d;
}

/* New Styles: References Section */
.references {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

body.dark-mode .references {
    border-top-color: #444;
}

.references ul {
    list-style-type: none;
    padding: 0;
}

.references li {
    margin-bottom: 0.5rem;
}

/* New Styles: Post List (for blog.html) */
.post-list {
    margin-top: 2rem;
}

.post-list-item {
    background: #ffffff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.dark-mode .post-list-item {
    background: #2c2c2c;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.post-list-item h3 {
    margin-top: 0;
    font-size: 1.4em;
}

.post-list-item .post-meta {
    color: #666;
}

body.dark-mode .post-list-item .post-meta {
    color: #aaa;
}

/* Responsive design */
@media (max-width: 600px) {
    section {
        padding: 10px;
    }
    h1 {
        font-size: 1.5em;
    }
    h2 {
        font-size: 1.2em;
    }
    h3 {
        font-size: 1.1em;
    }
    h4 {
        font-size: 1em;
    }
    .post-meta {
        font-size: 0.8em;
    }
    .disclaimer {
        font-size: 0.8em; /* Even smaller on mobile */
    }
    .content {
        padding: 1rem;
    }
    pre {
        font-size: 0.9em;
        padding: 0.75rem;
    }
    blockquote {
        padding: 0.5rem;
    }
    .post-list-item {
        padding: 1rem;
    }
    ol {
        padding-left: 1.5rem;
    }
    ol li pre {
        margin-left: 0;
    }
}
