.blog-section {
    margin-top: 40px;
}

.blog-post {
    display: grid;
    grid-template-columns: 60px 0.9fr 110px;
    gap: 6px;
    align-items: baseline;
    padding: 4px 0;
}

.blog-post.new-year {
    padding-top: 25px;
}

.blog-year {
    font-size: clamp(0.75rem, 1.2vw + 0.4rem, 0.9rem);
    color: rgb(115, 115, 115);
    font-weight: 500;
    text-align: center;
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Consolas', monospace;
}

.blog-title {
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
}

.blog-title a {
    font-size: clamp(0.85rem, 1.4vw + 0.5rem, 0.97rem);
    color: var(--main-text-color);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-block;
}

.blog-post:hover .blog-title a {
    background-color: rgba(128, 128, 128, 0.25);
}

.blog-tag {
    font-size: clamp(0.75rem, 1.2vw + 0.4rem, 0.9rem);
    color: rgb(115, 115, 115);
    text-align: right;
    font-weight: 500;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary, #666);
}

.error {
    text-align: center;
    padding: 3rem;
    color: var(--error-color, #d32f2f);
}

.no-posts {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary, #666);
}

/* Dark mode adjustments */
body.dark-mode .blog-title a {
    color: rgb(163, 163, 163);
}

body.dark-mode .blog-post:hover .blog-title a {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Tag Filter Styles */
.filter-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px auto;
    padding: 0 16px;
    background-color: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    width: 208px;
    height: 36px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.filter-container:hover {
    background-color: #e8e8e8;
    border-color: #d0d0d0;
}

body.dark-mode .filter-container {
    background-color: #2a2a2a;
    border-color: #404040;
}

body.dark-mode .filter-container:hover {
    background-color: #353535;
    border-color: #505050;
}

/* Custom Tooltip */
.filter-tooltip {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.filter-container:hover .filter-tooltip {
    opacity: 1;
}

body.dark-mode .filter-tooltip {
    background-color: #555;
}

.filter-tag-text {
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
    font-weight: 500;
    color: var(--main-text-color);
}

body.dark-mode .filter-tag-text {
    color: rgb(163, 163, 163);
}

/* Make tags clickable */
.blog-tag {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.blog-tag:hover {
    opacity: 0.7;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .blog-post {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 1px 0;
        margin-bottom: 2px;
    }

    .blog-post.new-year {
        padding-top: 32px;
    }

    .blog-year {
        text-align: left;
        font-size: clamp(0.85rem, 2vw + 0.4rem, 1rem);
        font-weight: 600;
        margin-bottom: 4px;
        padding-left: 0;
    }

    .blog-title {
        margin-bottom: 2px;
        display: flex;
        align-items: baseline;
    }

    .blog-title::before {
        content: '•';
        color: rgb(115, 115, 115);
        font-size: 1.2rem;
        margin-right: 8px;
        flex-shrink: 0;
    }

    .blog-title a {
        padding: 0;
        font-size: clamp(0.9rem, 2.5vw + 0.5rem, 1rem);
    }

    .blog-tag {
        display: none;
    }

    body.dark-mode .blog-title::before {
        color: rgb(163, 163, 163);
    }
}
