/* ===== Blog list ===== */
.post-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    text-align: left;
}

.post-card {
    position: relative;            /* so the whole card can be clickable */
    display: flex;
    flex-direction: column;
    border-radius: 1.25rem;
    background: var(--cream);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover,
.post-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(70, 79, 70, 0.15);
}

.post-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.post-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
    padding: 1.5rem;
}

.post-card time,
.post time {
    font-size: 0.85rem;
    opacity: 0.75;
}

.post-card h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    line-height: 1.2;
}

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

/* The trick: the title link stretches over the whole card */
.post-card h2 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.post-card h2 a:focus-visible {
    outline: none;
}

.post-card:focus-within {
    outline: 3px solid var(--sage);
    outline-offset: 3px;
}

.post-card p {
    line-height: 1.6;
}

.post-more {
    margin-top: auto;
    padding-top: 0.5rem;
    font-weight: 600;
}

.blog-empty {
    margin-top: 3rem;
    font-size: 1.1rem;
}

/* ===== A single post ===== */
.post-inner {
    max-width: 46rem;
    text-align: left;
}

.post-back {
    display: inline-block;
    margin-bottom: 2rem;
    font-weight: 500;
    text-decoration: none;
}

.post-back:hover,
.post-back:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

.post-header .section-title {
    margin-bottom: 0.75rem;
}

.post-cover {
    width: 100%;
    height: auto;
    margin-bottom: 2.5rem;
    border-radius: 1.5rem;
}

/* ----- Your Markdown, beautifully styled ----- */
.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-body > * + * {
    margin-top: 1.25rem;           /* space between every paragraph, list, heading... */
}

.post-body h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.2;
    margin-top: 2.5rem;
}

.post-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
}

.post-body ul,
.post-body ol {
    padding-left: 1.5rem;
}

.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }

.post-body li + li {
    margin-top: 0.4rem;
}

.post-body a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.post-body blockquote {
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--mint);
    background: var(--cream);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    border-radius: 0;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
}

.post-body code {
    padding: 0.1rem 0.4rem;
    border-radius: 0.4rem;
    background: var(--cream);
    font-size: 0.9em;
}

/* ----- "Let's talk" box at the end of every post ----- */
.post-cta {
    margin-top: 4rem;
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    background: var(--mint);
    text-align: center;
}

.post-cta h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.post-cta p {
    margin-bottom: 1.5rem;
}