/* Global Resets & Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding-top: 65px; /* Account for fixed header */
    background-color: #f4f7f6; /* Light, neutral background */
    color: #5d5d5d; /* Dark grey for text, consistent with index.html */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-align: center; /* For centering main-container */
}

main {
    flex-grow: 1;
    padding-bottom: 40px; /* Ensure footer doesn't overlap content */
}

a {
    color: #007bff; /* Professional and accessible blue */
    text-decoration: none;
    transition: color 0.3s ease;
} 

a:hover, a:focus {
    color: #0056b3; /* Darker blue on hover */
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Arial Rounded MT Bold', 'Helvetica Rounded', Arial, sans-serif; /* A slightly rounded, friendly font for headers */
    color: #2c3e50; /* A deep, slate blue for headings */
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid #ffc107; /* Fun yellow accent */
    padding-bottom: 0.3em;
    display: inline-block;
}

h2 {
    font-size: 2rem;
}

/* Default paragraph styling */
p {
    margin-bottom: 1em;
}

/* Header Styling */
.site-header {
    background-color: #ffffff; /* White background, consistent with main site */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06); /* Soft shadow */
    padding: 0 30px; /* Horizontal padding */
    box-sizing: border-box; /* Include padding in width */
    position: fixed; /* Fixed at the top */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Ensure it's above other content */
    display: flex;
    justify-content: center; /* Center the header content */
}

.header-content {
    display: flex;
    justify-content: space-between; /* Space out title and nav */
    align-items: center;
    width: 100%;
    max-width: 800px; /* Aligns with main-container */
    height: 65px; /* Fixed height for header */
}

.site-header .site-title {
    font-size: 1.6em;
    font-weight: 700;
    color: #3498db; /* Blue color for site title */
    text-decoration: none;
}

.site-header nav a {
    font-weight: 600;
    color: #5d5d5d; /* Dark grey for nav links */
    text-decoration: none;
    margin-left: 25px; /* Spacing between nav items */
    transition: color 0.2s ease-in-out;
}

.site-header nav a:hover {
    color: #2980b9; /* Darker blue on hover */
}
 
/* Main Content Area */
.main-container {
    max-width: 800px;
    margin: 2em auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px; /* Rounded corners for a softer, modern look */
    box-shadow: 0 0 15px rgba(0,0,0,0.07);
}

/* Blog Listing Specifics */
/* Space between header and content, and bottom padding */
.blog-listing {
    text-align: center; /* Center the H1 and the "No posts" message */
}

.blog-listing .sub-header {
    font-size: 1.2em;
   color: #555;
    margin-bottom: 2em;
    text-align: center;
}

.post-list {
    list-style: none;
    padding: 0;
    text-align: left; /* Ensure post list items content is left-aligned */
}

.post-list-item {
    background-color: #fdfdfd; /* White background for post cards */
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.post-list-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.post-list-item h2 a {
    color: #3498db;
}

.post-list-item h2 a:hover {
    text-decoration: underline;
}

.post-meta {
    font-size: 0.9em;
    color: #7f8c8d; /* Muted grey for meta info */
    margin-bottom: 15px;
}

.post-excerpt {
    color: #5d5d5d; /* Dark grey for excerpt text */
    line-height: 1.6;
}

/* Blog Post Content Specifics */
.blog-post-content .post-meta {
    margin-bottom: 1.5em;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 1em;
}

.post-tags {
    margin-top: 0.5em; /* Adjusted from post.njk where it was on its own line */
    font-size: 0.9em;
}

.tag {
    display: inline-block;
    background-color: #eaf4fc; /* Light blue for tags */
    color: #333;
    padding: 0.3em 0.7em;
    margin-right: 5px;
    border-radius: 15px; /* Pill-shaped tags */
    font-size: 0.85em;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tag:hover {
    background-color: #d0e7fb;
    color: #000;
    text-decoration: none;
}

/* Code Blocks Styling */
pre {
    background-color: #2d2d2d; /* Dark background for code */
    color: #f8f8f2; /* Light text for contrast */
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto; /* Handle long lines of code */
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) inset;
}

code {
    background-color: #eef1f3; /* Light background for inline code */
    color: #c7254e; /* A common color for inline code */
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}

pre code { /* Reset for code inside pre */
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
    border-radius: 0;
}

/* Footer Styling */
footer {
    background-color: #2c3e50; /* Dark, professional footer */
    color: #ecf0f1; /* Light text for footer */
    text-align: center;
    padding: 1.5em 0;
    margin-top: auto; /* Pushes footer to the bottom */
}

.footer-note {
    margin: 0;
    font-size: 0.9em;
}

.footer-note strong {
    color: #ffc107; /* Highlight with accent color */
}