/* Blog listing + article styles. Token-driven (see DESIGN_GUIDELINES.md / :root in style.css). */

/* ----- shared ----- */
.blog-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 96px;
}

.blog-head {
    margin-bottom: 40px;
}

.blog-title {
    font-family: var(--font-display);
    font-weight: bold;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-ink);
    margin: 0;
}

.blog-sub {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-text);
    margin: 14px 0 0;
    max-width: 620px;
}

/* tag chips (not buttons) */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 4px;
}

.post-tag {
    font-family: var(--font-display);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-strong);
    padding: 4px 11px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    white-space: nowrap;
}

/* meta row (author / date / readtime) */
.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-text-strong);
    margin: 0;
}

.post-meta .sep { color: var(--color-border); }
.post-meta .author { font-weight: 700; color: var(--color-ink); }
.post-meta .bi { margin-right: 2px; }

/* media boxes: fixed aspect ratio, cover crop, no filter */
.post-media {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--color-bg);
}

.post-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-media--placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: bold;
    font-size: 3rem;
    color: var(--color-border);
    background: var(--color-bg);
}

/* ----- featured (most recent) ----- */
.post-feature {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 0;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    margin-bottom: 48px;
}

.post-feature:hover {
    border-color: var(--color-border);
    box-shadow: 12px 16px 32px -12px rgba(0, 0, 0, 0.18);
    color: inherit;
}

.post-feature .post-media { aspect-ratio: 4 / 3; }

.post-feature__body {
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.post-feature__title {
    font-family: var(--font-display);
    font-weight: bold;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.08;
    color: var(--color-ink);
    margin: 0;
}

.post-feature__excerpt {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--color-text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ----- grid of cards ----- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 32px;
}

.post-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.post-card:hover {
    border-color: var(--color-border);
    box-shadow: 10px 12px 26px -10px rgba(0, 0, 0, 0.16);
    color: inherit;
}

.post-card .post-media { aspect-ratio: 16 / 10; }

.post-card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 24px 26px;
    flex: 1;
}

.post-card__title {
    font-family: var(--font-display);
    font-weight: bold;
    font-size: 1.3rem;
    line-height: 1.2;
    color: var(--color-ink);
    margin: 0;
}

.post-card__excerpt {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__body .post-meta { margin-top: auto; }

/* staff-only unpublished list */
.blog-unpublished {
    margin-top: 56px;
    padding-top: 20px;
    border-top: 1px dashed var(--color-border);
    font-family: var(--font-body);
    color: var(--color-text);
}

/* ===================== article (single post) ===================== */
.post-article {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.post-article .post-tags { justify-content: flex-start; margin-bottom: 18px; }

.post-title-page {
    font-family: var(--font-display);
    font-weight: bold;
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--color-ink);
    text-align: left;
    margin: 0 0 18px;
}

.post-article .post-meta { margin-bottom: 32px; }

.post-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--color-bg);
    margin: 0 0 36px;
}

.post-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-lede {
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--color-text-strong);
    margin: 0 0 28px;
}

.post-body {
    font-family: var(--font-body);
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--color-text);
}

.post-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.post-body h2, .post-body h3 { font-family: var(--font-display); color: var(--color-ink); margin-top: 2em; }
.post-body a { color: var(--color-accent); }

.post-share {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--color-border);
}

.post-share__label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text-strong);
    margin: 0 0 14px;
}

.post-share__links { display: flex; align-items: center; gap: 14px; }
.post-share__links a { display: inline-flex; line-height: 0; }
.post-share__links img {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    transition: opacity 0.2s ease;
}
.post-share__links a:hover img { opacity: 0.7; }

/* ----- responsive ----- */
@media (max-width: 768px) {
    .blog-wrap { padding: 32px 18px 64px; }
    .post-feature { grid-template-columns: 1fr; }
    .post-feature .post-media { aspect-ratio: 16 / 9; }
    .post-feature__body { padding: 28px 24px; }
    .post-grid { grid-template-columns: 1fr; gap: 24px; }
}
