/* Blog index */
.rh-blog__title {
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: .5rem;
}

.rh-blog__intro {
    font-size: 1.125rem;
    color: var(--bs-secondary-color);
    margin-bottom: 2rem;
}

.rh-blog__controls {
    padding: 1rem;
    border-radius: 1rem;
    background: var(--rh-surface);
}

.rh-blog__list {
    gap: 2rem !important;
}

/* Post cards */
.rh-postcard {
    border-radius: 1.25rem;
    background: var(--bs-body-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.rh-postcard__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rh-postcard .card-body {
    border-radius: 1rem;
}

.rh-postcard h2 {
    font-weight: 600;
    line-height: 1.25;
}

.rh-postcard h2 a {
    color: var(--bs-heading-color);
}

.rh-postcard h2 a:hover {
    color: var(--bs-primary);
}

@media (prefers-reduced-motion: no-preference) {
    .rh-postcard {
        transition: transform 160ms ease, box-shadow 160ms ease;
    }

    .rh-postcard:hover {
        transform: translateY(-3px);
        box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.05);
    }
}

.rh-postcard__tags .badge {
    background: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
    border: none;
    font-weight: 500;
    padding: .4em .7em;
}

/* Post typography */
.rh-post__title {
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.rh-post__content {
    max-width: 72ch;
    font-size: 1.125rem;
    line-height: 1.75;
}

.rh-post__content p,
.rh-post__content ul,
.rh-post__content ol {
    line-height: 1.7;
}

.rh-post__content p {
    margin-bottom: 1rem;
}


.rh-post__content li {
    margin-bottom: .35rem;
}

.rh-post__content h2 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    scroll-margin-top: 6rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.rh-post__content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    scroll-margin-top: 6rem;
    margin-top: 2rem;
    margin-bottom: .75rem;
    color: var(--rh-accent-strong);
}

.rh-post__content p + h2 {
    margin-top: 3rem;
}

/* Links */
.rh-post__content a {
    text-underline-offset: .18em;
    text-decoration-thickness: .08em;
}

/* Markdown horizontal rules */
.rh-post__content hr {
    margin: 2rem 0;
    opacity: .15;
}

.rh-post__content hr + h2 {
    margin-top: 1.25rem;
}

/* Blockquotes */
.rh-post__content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1rem 1rem 1.25rem;
    border-left: 4px solid var(--rh-callout-border);
    background: var(--rh-callout-bg);
    border-radius: .75rem;
}

.rh-post__content blockquote p:last-child {
    margin-bottom: 0;
}

/* Inline code + code blocks */
.rh-post__content code {
    padding: .1rem .35rem;
    border-radius: .5rem;
    background: var(--rh-editorial-bg);
}

.rh-post__content pre {
    padding: 1rem;
    border-radius: 1rem;
    background: var(--rh-editorial-bg);
    overflow: auto;
}

.rh-post__content pre code {
    padding: 0;
    background: transparent;
}

/* TOC */
.rh-toc__link {
    display: block;
    padding: .35rem .25rem;
    border-radius: .5rem;
    text-decoration: none;
}

.rh-toc__link:hover,
.rh-toc__link:focus-visible {
    background: rgba(var(--bs-primary-rgb), 0.08);
}

/* Hide TOC container when JS finds < 2 headings */
.rh-toc:empty { display: none; }

/* Bridge CTA */
.rh-post__bridge {
    background: var(--rh-editorial-bg);
    border-left: 4px solid var(--rh-editorial-border);
    border-radius: .75rem;
}

/* Post tag badges */
.rh-post__tags .badge {
    background: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
    border: none;
    font-weight: 500;
    padding: .4em .7em;
}

/* Readable container */
.rh-container--readable {
    max-width: 76ch;
}

/* Wide index container */
.rh-container--wide {
    max-width: 960px;
}
