/* A minimal, monochrome theme for a technical blog */

:root {
    /* Define colors and fonts for easy changes */
    --color-background: #ffffff;
    --color-text: #111111;
    --color-text-light: #555555;
    --color-border: #eeeeee;
    --color-accent: #007acc; /* A single, muted accent for links */

    /* Using specific web fonts for a consistent, high-quality look */
    --font-sans: "Inter", sans-serif;
    --font-mono: "IBM Plex Mono", monospace;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    line-height: 1.7; /* Generous line height for readability */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Layout --- */

.header,
.footer {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.footer {
    border-top: 1px solid var(--color-border);
    border-bottom: none;
    margin-top: 4rem;
}

.header-content,
.footer-content,
.main-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.header-content,
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-content {
    padding: 2rem 1rem;
    min-height: 70vh;
}

/* --- Typography --- */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mono);
    font-weight: 600;
    line-height: 1.3;
    margin: 2rem 0 1rem 0;
    color: var(--color-accent);
}

h1 {
    font-size: 2.2rem;
}
h2 {
    font-size: 1.8rem;
}
h3 {
    font-size: 1.4rem;
}

p {
    margin: 0 0 1rem 0;
    text-align: left; /* Justify is poor for screen readability */
}

a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
}

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

/* --- Header & Footer Specifics --- */

.blog-title {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}
.blog-title a {
    text-decoration: none;
}

.nav-menu a,
.social-links a {
    margin-left: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-decoration: none;
}
.nav-menu a:hover,
.social-links a:hover {
    text-decoration: underline;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    text-decoration: none;
}

.social-icons img {
    width: 24px;
    height: 24px;
}

.copyright {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0;
}

/* --- Post & Content Styling --- */

.post-title {
    margin-top: 0;
}

.post-date {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: -1rem 0 2rem 0;
}

/* Control all images within the content */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px; /* A very subtle rounding */
    border: 1px solid var(--color-border); /* A clean, thin border */
}

/* Specifically style the main featured image */
.featured-image {
    display: block;
    max-width: 85%; /* Don't let it be full-width */
    margin: 0 auto 2rem auto; /* Center it and add space below */
}

figcaption,
.featured-image-caption {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: -1.5rem; /* Pull caption closer to the image */
    margin-bottom: 2rem;
}

/* Code block and inline code styling */
pre,
code,
kbd,
samp {
    font-family: var(--font-mono);
    font-size: 0.95em;
}

/* Inline code */
:not(pre) > code {
    background-color: #f5f5f5;
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 3px;
    border: 1px solid var(--color-border);
}

/* Code blocks */
.highlight {
    background-color: #f9f9f9;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1em;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}
