/* Reset — strip browser defaults */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base — single centered column, generous line height */
html {
    font-size: 18px;
    line-height: 1.7;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: #ffffff;
    color: #000000;
    max-width: 660px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Links — black, underlined, no hover decoration */
a {
    color: #000000;
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

/* ─── Homepage header ─── */

.site-header {
    text-align: center;
    padding-top: 3.5rem;
    margin-bottom: 4rem;
}

/* Egg image: 100px tall, centered */
.site-logo img {
    height: 100px;
    width: auto;
    display: block;
    margin: 0 auto 1.75rem;
}

.site-title {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 1.1rem;
}

/* Navigation — Ghost renders {{navigation}} as a <ul class="nav"> */
.site-nav {
    font-size: 0.9rem;
}

.site-nav .nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 0.3rem;
}

/* Insert | divider between items using CSS */
.site-nav .nav li + li::before {
    content: "|";
    color: #ccc;
    margin-right: 0.3rem;
}

.site-nav .nav a {
    text-decoration: none;
}

.site-nav .nav a:hover {
    text-decoration: underline;
}

/* ─── Post (shared between homepage latest post, post.hbs, page-posts.hbs) ─── */

.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.4rem;
}

/* Title links: no underline by default, underline on hover */
.post-title a {
    text-decoration: none;
}

.post-title a:hover {
    text-decoration: underline;
}

.post-date {
    font-size: 0.82rem;
    color: #777;
    display: block;
}

/* ─── Post body typography ─── */

.post-content {
    margin-top: 1.5rem;
}

.post-content p {
    margin-bottom: 1.4rem;
}

.post-content h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 2.2rem 0 0.7rem;
}

.post-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.8rem 0 0.5rem;
}

.post-content blockquote {
    border-left: 2px solid #000;
    padding-left: 1.1rem;
    margin: 1.8rem 0;
    color: #333;
    font-style: italic;
}

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

.post-content li {
    margin-bottom: 0.35rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
}

.post-content pre {
    background: #f5f5f5;
    padding: 1rem 1.2rem;
    overflow-x: auto;
    font-size: 0.82rem;
    margin-bottom: 1.4rem;
    line-height: 1.5;
}

.post-content code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.88em;
    background: #f5f5f5;
    padding: 0.1em 0.35em;
    border-radius: 2px;
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

.post-content hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 2.5rem 0;
}

/* ─── Ghost Koenig editor card widths (required by Ghost theme validator) ─── */
/* Wide cards break slightly outside the content column */
.kg-width-wide {
    margin-left: -3rem;
    margin-right: -3rem;
}

/* Full-bleed cards stretch edge to edge */
.kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
}

/* ─── "All posts" link below homepage latest post ─── */

.all-posts-link {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ebebeb;
}

.all-posts-link a {
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
}

.all-posts-link a:hover {
    text-decoration: underline;
}

/* ─── Archive page (page-posts.hbs) ─── */

.page-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-card {
    padding: 1.6rem 0;
    border-bottom: 1px solid #ebebeb;
}

.post-card:first-child {
    border-top: 1px solid #ebebeb;
}

.post-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.post-card-title a {
    text-decoration: none;
}

.post-card-title a:hover {
    text-decoration: underline;
}

.post-card-date {
    font-size: 0.78rem;
    color: #777;
    display: block;
    margin-bottom: 0.5rem;
}

.post-card-excerpt {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.55;
}

/* ─── Pagination ─── */

.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.pagination a {
    text-decoration: none;
}

.pagination a:hover {
    text-decoration: underline;
}

/* ─── Footer ─── */

.site-footer {
    margin-top: 5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ebebeb;
    font-size: 0.78rem;
    color: #aaa;
    text-align: center;
}

/* ─── Responsive: tighten on small screens ─── */

@media (max-width: 600px) {
    html {
        font-size: 17px;
    }

    body {
        padding: 1.5rem 1.1rem 3rem;
    }

    .site-header {
        padding-top: 2rem;
        margin-bottom: 3rem;
    }

    .post-title {
        font-size: 1.3rem;
    }
}
