/* ── Post Header ──────────────────────────────────── */
.post-header {
    padding: 7rem 0 2.5rem;
    background: var(--mantle);
    border-bottom: 1px solid var(--surface0);
}

.back-link {
    display: inline-block;
    color: var(--blue);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.7;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.post-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: 780px;
}

/* ── Post Body ────────────────────────────────────── */
.post-body {
    padding: 3.5rem 0 6rem;
}

.post-container {
    max-width: 780px;
}

.loading-text {
    color: var(--subtext);
    font-size: 0.9rem;
}

/* ── Article Typography ───────────────────────────── */
.post-article img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--surface1);
    margin: 1.75rem 0;
    display: block;
}

.post-article h1,
.post-article h2,
.post-article h3,
.post-article h4 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.post-article h1 {
    font-size: 1.75rem;
    margin: 2.5rem 0 0.85rem;
    color: var(--text);
}

.post-article h2 {
    font-size: 1.3rem;
    margin: 2.5rem 0 0.85rem;
    color: var(--text);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--surface1);
}

.post-article h3 {
    font-size: 1.05rem;
    margin: 2rem 0 0.65rem;
    color: var(--blue);
}

.post-article h4 {
    font-size: 0.95rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--subtext);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.post-article p {
    color: var(--subtext);
    font-size: 0.95rem;
    line-height: 1.9;
    margin-bottom: 1.25rem;
}

.post-article a {
    color: var(--blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(137, 180, 250, 0.3);
    transition: border-color 0.2s, color 0.2s;
}

.post-article a:hover {
    border-color: var(--blue);
    color: #a6c8ff;
}

.post-article ul,
.post-article ol {
    color: var(--subtext);
    font-size: 0.95rem;
    line-height: 1.85;
    margin: 0.25rem 0 1.25rem 1.5rem;
}

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

.post-article li strong {
    color: var(--text);
}

/* Inline code */
.post-article code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    background: var(--surface0);
    color: var(--red);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid var(--surface1);
}

/* Code blocks */
.post-article pre {
    background: var(--crust);
    border: 1px solid var(--surface1);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-article pre code {
    background: none;
    color: var(--text);
    padding: 0;
    border: none;
    font-size: 0.875rem;
    line-height: 1.65;
}

.post-article blockquote {
    border-left: 3px solid var(--blue);
    padding: 0.5rem 0 0.5rem 1.25rem;
    margin: 1.75rem 0;
    color: var(--subtext);
    font-style: italic;
}

.post-article strong {
    color: var(--text);
    font-weight: 600;
}

.post-article hr {
    border: none;
    border-top: 1px solid var(--surface1);
    margin: 2.5rem 0;
}

/* ── IOC section — make inline code stand out ─────── */
.post-article h2 + ul li code,
.post-article h2 + ul li strong {
    color: var(--red);
}
