/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 18px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #2c2c2c;
    background-color: #faf8f5;
    line-height: 1.7;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

a {
    color: #2a6a6a;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === Masthead === */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.masthead {
    margin-bottom: 0.5rem;
}

.site-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.6rem;
    letter-spacing: 0.35em;
    color: #2c2c2c;
    text-decoration: none;
    text-transform: lowercase;
}

.site-title:hover {
    text-decoration: none;
    color: #2a6a6a;
}

nav {
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}

nav a {
    color: #2c2c2c;
    text-decoration: none;
    padding: 0 0.3rem;
}

nav a:hover {
    color: #2a6a6a;
}

.nav-sep {
    color: #8a8580;
    margin: 0 0.2rem;
}

.header-rule {
    border: none;
    border-top: 1px solid #ddd5cc;
    margin-top: 1rem;
}

/* === Post (single) === */
.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: normal;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.post-header time {
    font-size: 0.85rem;
    color: #8a8580;
    font-style: italic;
}

.post-body {
    margin-bottom: 2.5rem;
}

.post-body h2,
.post-body h3,
.post-body h4 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: normal;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.post-body h2 { font-size: 1.5rem; }
.post-body h3 { font-size: 1.25rem; }
.post-body h4 { font-size: 1.1rem; }

.post-body p {
    margin-bottom: 1.2rem;
}

.post-body blockquote {
    border-left: 3px solid #ddd5cc;
    padding-left: 1.2rem;
    margin: 1.5rem 0;
    color: #555;
    font-style: italic;
}

.post-body pre {
    background: #f0ece6;
    padding: 1rem 1.2rem;
    border-radius: 3px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.post-body code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85em;
}

.post-body p code {
    background: #f0ece6;
    padding: 0.15em 0.35em;
    border-radius: 3px;
}

.post-body ul, .post-body ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.post-body li {
    margin-bottom: 0.4rem;
}

.post-body em {
    font-style: italic;
}

.post-body strong {
    font-weight: 600;
}

.post-body hr {
    border: none;
    border-top: 1px solid #ddd5cc;
    margin: 2rem 0;
}

/* === Post Notes === */
.post-notes {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #8a8580;
    font-style: italic;
}

.notes-rule {
    border: none;
    border-top: 1px solid #e8e2da;
    margin-bottom: 1rem;
}

.notes-heading {
    font-style: normal;
    font-variant: small-caps;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.post-notes ul {
    list-style: disc;
    padding-left: 1.2rem;
}

.post-notes li {
    margin-bottom: 0.3rem;
}

/* === Post Navigation === */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd5cc;
    font-size: 0.9rem;
}

.post-nav-link {
    max-width: 45%;
}

.post-nav-next {
    margin-left: auto;
    text-align: right;
}

/* === Post List (homepage) === */
.post-list {
    margin-bottom: 2rem;
}

.post-preview {
    margin-bottom: 1.5rem;
}

.post-preview h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: normal;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.post-preview h2 a {
    color: #2c2c2c;
}

.post-preview h2 a:hover {
    color: #2a6a6a;
}

.post-preview time {
    display: block;
    font-size: 0.8rem;
    color: #8a8580;
    font-style: italic;
    margin-bottom: 0.4rem;
}

.excerpt {
    font-size: 0.95rem;
    color: #555;
}

.post-divider {
    text-align: center;
    color: #ccc5bb;
    font-size: 0.85rem;
    margin: 1.5rem 0;
    letter-spacing: 0.3em;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd5cc;
    font-size: 0.9rem;
}

.pagination-older {
    margin-left: auto;
}

/* === Archive === */
.archive h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 2rem;
}

.archive-year h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: normal;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: #2c2c2c;
}

.archive-month h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    font-weight: normal;
    color: #8a8580;
    font-style: italic;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
}

.archive-month ul {
    list-style: none;
    padding-left: 0;
}

.archive-month li {
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.archive-month time {
    font-size: 0.8rem;
    color: #8a8580;
    margin-left: 0.5rem;
}

/* === Footer === */
footer {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.8rem;
    color: #8a8580;
}

.footer-rule {
    border: none;
    border-top: 1px solid #ddd5cc;
    margin-bottom: 1rem;
}

.footer-site {
    font-variant: small-caps;
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}

.footer-copy {
    font-style: italic;
}

/* === Responsive === */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    body {
        padding: 1.5rem 1rem;
    }

    .site-title {
        font-size: 1.3rem;
    }

    .post-header h1 {
        font-size: 1.6rem;
    }

    .post-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-nav-link {
        max-width: 100%;
    }

    .post-nav-next {
        text-align: left;
        margin-left: 0;
    }
}

/* === Print === */
@media print {
    body {
        background: white;
        color: black;
        max-width: 100%;
    }

    nav, .pagination, .post-nav, footer {
        display: none;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
