.blog-section {
    min-height: calc(100vh - var(--header-height));
}

.container.blog-container {
    width: min(calc(100% - 48px), 800px);
    margin-inline: auto;
}

.blog-header {
    max-width: none;
    margin-bottom: 48px;
}

.blog-header h1 {
    font-size: clamp(34px, 4.5vw, 60px);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.045em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.blog-header p {
    max-width: 560px;
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.posts {
    display: grid;
    gap: 14px;
}

.post-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    /*background: var(--surface);*/
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition:
        transform 0.3s var(--ease-apple),
        box-shadow 0.3s var(--ease-apple),
        border-color 0.3s var(--ease-apple),
        background-color 0.4s var(--ease-apple);
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-mid);
    box-shadow: var(--shadow-card);
}

.post-meta {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-tertiary);
}

.post-card h2 {
    margin-bottom: 8px;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.post-card h2 a {
    color: var(--text-primary);
}

.post-card h2 a:hover {
    opacity: 0.6;
}

.post-card > p {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.post-tags span,
.post-tags li {
    padding: 3px 8px;
    font-size: 11px;
    color: var(--text-tertiary);
    background: var(--background-light);
    border-radius: 999px;
}

.post-back {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.post-back:hover {
    color: var(--text-primary);
}

.post-header h1 {
    margin-bottom: 12px;
    font-size: clamp(32px, 4.2vw, 52px);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.08;
    color: var(--text-primary);
}

.post-description {
    margin-bottom: 16px;
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.post-header .post-tags {
    margin-bottom: 40px;
}

.post-content {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.post-content > * + * {
    margin-top: 1.1em;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.post-content h1 {
    font-size: 1.45em;
}

.post-content h2 {
    font-size: 1.25em;
    margin-top: 1.8em;
}

.post-content h3 {
    font-size: 1.1em;
}

.post-content p,
.post-content li {
    color: var(--text-secondary);
}

.post-content ul,
.post-content ol {
    padding-left: 1.25em;
}

.post-content ul {
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content a:hover {
    opacity: 0.6;
}

.post-content img {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background-light);
}

.post-content code {
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    font-size: 0.88em;
    padding: 0.12em 0.35em;
    border-radius: 6px;
    background: var(--background-light);
    color: var(--text-primary);
}

.post-content pre {
    overflow-x: auto;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background-light);
}

.post-content pre code {
    padding: 0;
    background: transparent;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 800px) {
    .blog-header {
        margin-bottom: 32px;
    }

    .post-card {
        padding: 18px;
    }

    .post-content {
        font-size: 16px;
    }
}
/* Theme icon alignment fix */
.theme-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 100%;
}

.theme-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    line-height: 1;
}

.theme-icon-button .theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.theme-icon-button .theme-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
