.blog-image-preview, .blog-list-image {
    display: block;
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
}

.blog-language-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.blog-language-tabs button {
    border: 1px solid #666;
    background: white;
    color: #222;
    padding: 0.6rem 1rem;
    cursor: pointer;
}

.blog-language-tabs button[aria-selected="true"] {
    background: #0b486b;
    color: white;
    font-weight: bold;
}

.blog-language-tabs[hidden], #blog-form [role="tabpanel"][hidden] {
    display: none !important;
}

.blog-hero {
    padding-top: 64px;
}

.blog-cover {
    display: block;
    width: 100%;
    max-height: 3in;
    object-fit: cover;
}

.blog-page {
    display: grid;
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    padding: 0 16px 4rem;
}

.blog-page-plain {
    padding-top: 96px;
}

.blog-page-overlap .blog-author-card {
    margin-top: -3rem;
}

.blog-aside {
    min-width: 0;
}

.blog-sections {
    position: sticky;
    top: 4.5rem;
    margin-top: 2rem;
    max-height: calc(100vh - 6rem);
    overflow: auto;
    font-size: 0.85rem;
}

.blog-sections ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-sections a {
    display: block;
    padding: 0.4rem 0.6rem;
    border-radius: 0.3rem;
    color: inherit;
    text-decoration: none;
}

.blog-sections a:hover {
    background: rgba(128, 128, 128, 0.2);
}

.blog-sections a[aria-current="location"] {
    font-weight: bold;
    background: rgba(128, 128, 128, 0.3);
}

.blog-section-level-2, .blog-section-level-3, .blog-section-level-4,
.blog-section-level-5, .blog-section-level-6 {
    margin-left: 1rem;
}

.blog-post-content h1, .blog-post-content h2, .blog-post-content h3,
.blog-post-content h4, .blog-post-content h5, .blog-post-content h6 {
    scroll-margin-top: 2rem;
}

@media (max-width: 700px) {
    .blog-page { display: block; }
    .blog-sections { position: static; max-height: none; }
}

.blog-index {
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 24px 4rem;
}

.blog-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.5rem;
    margin: 1.5rem 0 2.5rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.5);
}

.blog-filter a {
    padding: 0.6rem 0.2rem;
    border-bottom: 2px solid transparent;
    color: inherit;
    opacity: 0.7;
    text-decoration: none;
    text-transform: capitalize;
}

.blog-filter a:hover, .blog-filter a[aria-current="page"] {
    opacity: 1;
    border-bottom-color: #e0533d;
}

.blog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem 2rem;
}

.blog-card {
    text-align: center;
}

.blog-card-image {
    display: block;
    margin-bottom: 1.25rem;
    overflow: hidden;
    border-radius: 6px;
}

.blog-card-image img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card-image:hover img {
    transform: scale(1.04);
}

.blog-card h2 {
    margin: 0.4rem 0 0.6rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

.blog-card h2 a {
    color: inherit;
    text-decoration: none;
}

.blog-card h2 a:hover {
    text-decoration: underline;
}

.blog-badge {
    display: inline-block;
    padding: 0.15rem 0.8rem;
    border-radius: 1rem;
    background: rgba(224, 83, 61, 0.15);
    color: #e0533d;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.blog-badge:hover {
    background: #e0533d;
    color: white;
}

.blog-meta {
    margin: 0 0 0.6rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.blog-excerpt {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
}

.blog-meta time + span::before {
    content: " · ";
}

.blog-author-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 18rem;
    max-width: 100%;
    padding: 1rem 1.25rem;
    background: white;
    color: #222;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.blog-avatar {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #0b486b;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.blog-author-name, .blog-author-bio {
    display: block;
}

.blog-author-bio {
    font-size: 0.85rem;
    color: #667;
}

.blog-posted {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
}
