/* ----------------------------------------------------------------
 * jmalmsten.com — central stylesheet
 * Version: 1.0.0
 * ---------------------------------------------------------------- */

:root {
    --bg:    #FAFAFA;
    --ink:   #1A1A1A;
    --rule:  #1A1A1A;
    --muted: #666;

    --font-mono: 'Courier Prime', 'Courier New', Courier, monospace;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.6;
}

main {
    max-width: 70ch;
    margin: 0 auto;
    padding: 3rem 1.5rem 6rem;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: 0.02em;
}

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}
a:hover {
    background: var(--ink);
    color: var(--bg);
    text-decoration: none;
}

time {
    color: var(--muted);
    font-size: 0.9rem;
}

/* --- Pinned splash on homepage --- */
.pinned {
    border: 1px solid var(--rule);
    padding: 1.5rem 1.5rem 2rem;
    margin-bottom: 3rem;
}
.pinned-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-bottom: 1rem;
}
.pinned img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}
.pinned h2 {
    margin: 0 0 0.25rem;
}
.pinned-body {
    margin-top: 1rem;
}

/* --- Section heading (small uppercase rule above lists) --- */
.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    border-top: 1px solid var(--rule);
    padding-top: 1rem;
    margin-bottom: 1rem;
}

/* --- Post list --- */
ul.posts {
    list-style: none;
    padding: 0;
    margin: 0;
}
ul.posts li {
    padding: 0.6rem 0;
    border-bottom: 1px dotted #ccc;
}
ul.posts a {
    font-weight: 700;
}
ul.posts time {
    display: inline-block;
    margin-left: 0.5rem;
}

/* --- Pagination footer --- */
nav.pager {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}
nav.pager .spacer {
    color: transparent;
}

/* --- Single post (used by [slug].astro) --- */
article.post h1 {
    margin-bottom: 0.25rem;
}
article.post .featured-image {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0 2rem;
}
article.post .post-body {
    margin-top: 2rem;
}
article.post .post-body img {
    max-width: 100%;
    height: auto;
}