.blog {
    position: relative;
    padding: 5rem 1.5rem 4rem;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.02) 0%, rgba(var(--primary-rgb), 0.06) 100%);
    overflow: hidden;
}

.blog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.3), transparent);
}

.blog-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.blog-header-content {
    position: relative;
}

.back-to-portfolio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.back-to-portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.1), transparent);
    transition: left 0.5s;
}

.back-to-portfolio:hover::before {
    left: 100%;
}

.back-to-portfolio:hover {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: rgba(var(--primary-rgb), 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.2);
}

.blog-title {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.blog-description {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.latest-post {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.blog-card {
    background: var(--bg-color);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: none;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

[data-theme="dark"] .blog-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(var(--primary-rgb), 0.15);
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--gray-600);
    flex-wrap: wrap;
}

.blog-category {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(var(--primary-rgb), 0.8) 100%);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-meta span:nth-child(2)::before {
    content: '📅';
    font-size: 1rem;
}

.blog-meta span:nth-child(3)::before {
    content: '⏱️';
    font-size: 1rem;
}

.blog-card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-excerpt {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(var(--primary-rgb), 0.8) 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.3);
    position: relative;
    overflow: hidden;
}

.blog-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.blog-link:hover::before {
    left: 100%;
}

.blog-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

.blog-link i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.blog-link:hover i {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .blog {
        padding: 3rem 1rem 2rem;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .blog-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .blog-description {
        font-size: 1rem;
        line-height: 1.5;
    }

    .blog-card {
        padding: 1.25rem;
        margin: 0 0.5rem;
        border-radius: 0.75rem;
    }

    .blog-card-title {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .blog-excerpt {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }

    .blog-meta {
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
        font-size: 0.85rem;
    }

    .blog-category {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .blog-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Table of Contents */
.blog-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.toc-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.toc-container {
    background: var(--bg-color);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.06);
}

[data-theme="dark"] .toc-container {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(var(--primary-rgb), 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.toc-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.2);
}

.toc-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-nav li {
    margin-bottom: 0.5rem;
}

.toc-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.toc-nav a:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.1);
    border-left-color: var(--primary-color);
}

.toc-nav a.active {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.15);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.toc-nav .toc-h2 {
    padding-left: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.toc-nav .toc-h3 {
    padding-left: 1rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.toc-nav .toc-h4 {
    padding-left: 1.5rem;
    font-weight: 400;
    font-size: 0.85rem;
}

.toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-nav ul ul {
    margin-top: 0.25rem;
}

.toc-nav li {
    margin-bottom: 0.25rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .toc-sidebar {
        position: static;
        order: -1;
        margin-bottom: 1rem;
    }
    
    .toc-container {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .toc-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .toc-nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Blog Navigation */
.blog-navigation {
    margin-top: 3rem;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
}

.blog-navigation .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.blog-navigation .nav-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    max-width: 1000px;
    margin: 0 auto;
}

.blog-navigation .nav-item {
    background: var(--bg-color);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.06);
    flex: 1;
    min-width: 0;
    max-width: 480px;
    height: fit-content;
}

[data-theme="dark"] .blog-navigation .nav-item {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(var(--primary-rgb), 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.blog-navigation .nav-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.15);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.blog-navigation .nav-link {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    height: 100%;
    gap: 1rem;
}

.blog-navigation .nav-prev .nav-link {
    flex-direction: row;
}

.blog-navigation .nav-next .nav-link {
    flex-direction: row-reverse;
}

.blog-navigation .nav-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    min-width: 2rem;
    text-align: center;
}

.blog-navigation .nav-content {
    flex: 1;
    min-width: 0;
}

.blog-navigation .nav-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.blog-navigation .nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    hyphens: auto;
    text-overflow: ellipsis;
    max-height: 2.6em;
    padding-right: 0.5rem;
}

.blog-navigation .nav-date {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.blog-navigation .nav-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.blog-navigation .nav-disabled:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.06);
}

/* Mobile responsiveness for blog navigation */
@media (max-width: 768px) {
    .blog-navigation {
        margin-top: 2rem;
        padding: 0 0.5rem;
    }

    .blog-navigation .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        max-width: 100%;
    }
    
    .blog-navigation .nav-item {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
    
    .blog-navigation .nav-link {
        padding: 1rem;
    }
    
    .blog-navigation .nav-title {
        font-size: 0.9rem;
        max-height: 2.4em;
    }
}

/* Pagination Styling */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    padding: 0;
}

.pagination ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    background: var(--bg-color);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.06);
}

[data-theme="dark"] .pagination ul {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(var(--primary-rgb), 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    background: transparent;
}

.pagination .page-link:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    color: var(--gray-500);
}

.pagination .page-item.disabled .page-link:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
    color: var(--gray-500);
}

/* Mobile responsiveness for pagination */
@media (max-width: 768px) {
    .pagination ul {
        padding: 0.5rem 1rem;
        gap: 0.25rem;
    }
    
    .pagination .page-link {
        min-width: 2rem;
        height: 2rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Category Filter Styling */
.category-filter {
    margin: 2rem 0;
    padding: 0 1rem;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--bg-color);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.06);
}

[data-theme="dark"] .filter-container {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(var(--primary-rgb), 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 0.75rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.3);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}

.filter-btn.active {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}

.filter-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.post-count {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 400;
}

/* Blog posts grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Blog posts filtering animation */
.blog-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    display: none;
}

.blog-card.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Minimal filter chips */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 1rem;
    padding: 0 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.filter-label {
    font-size: .9rem;
    opacity: .8;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.chip {
    appearance: none;
    -webkit-appearance: none;
    padding: .4rem .7rem;
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    border-radius: 999px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: .9rem;
    transition: all .2s ease;
}

.chip:hover {
    border-color: rgba(var(--primary-rgb), 0.5);
    transform: translateY(-1px);
}

.chip.active {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.6);
    color: var(--primary-color);
}

[data-theme="dark"] .chip.active {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: .75rem;
    }
}

/* Minimal search + select bar */
.search-bar {
    display: flex;
    gap: .5rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 1rem;
    padding: 0 1rem;
}

.search-input {
    flex: 1 1 auto;
    padding: .55rem .8rem;
    border-radius: .5rem;
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    background: transparent;
    color: var(--text-color);
    outline: none;
}

.search-input:focus {
    border-color: rgba(var(--primary-rgb), 0.6);
}

.filter-select {
    flex: 0 0 auto;
    padding: .5rem 2rem .5rem .6rem;
    border-radius: .5rem;
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    background-color: var(--bg-color);
    color: var(--text-color);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23aaaaaa' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;
    background-size: 16px 16px;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-select {
        width: 100%;
        font-size: 16px; /* avoid iOS zoom */
    }
}

/* Ensure dropdown menus use theme colors where supported */
.filter-select option {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.filter-select:focus-visible,
.search-input:focus-visible {
    outline: 2px solid rgba(var(--primary-rgb), 0.5);
    outline-offset: 2px;
}

/* Dark theme hints */
[data-theme="dark"] .filter-select,
[data-theme="dark"] .search-input {
    color-scheme: dark;
}

/* Share Buttons */
.post-share {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.06);
}

[data-theme="dark"] .post-share {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(var(--primary-rgb), 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.post-share .share-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
}

.post-share .share-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.post-share .share-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 0.75rem;
    background: transparent;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.post-share .share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.1), transparent);
    transition: left 0.5s;
}

.post-share .share-btn:hover::before {
    left: 100%;
}

.post-share .share-btn:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.3);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}

.post-share .share-fb:hover {
    background: rgba(24, 119, 242, 0.1);
    border-color: rgba(24, 119, 242, 0.3);
    color: #1877f2;
}

.post-share .share-wa:hover {
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.3);
    color: #25d366;
}

.post-share .share-web:hover {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.post-share .share-copy:hover {
    background: rgba(108, 117, 125, 0.1);
    border-color: rgba(108, 117, 125, 0.3);
    color: #6c757d;
}

[data-theme="dark"] .post-share .share-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
    .post-share {
        padding: 1rem;
    }
    
    .post-share .share-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .post-share .share-btn {
        width: 100%;
        min-width: auto;
        justify-content: center;
    }
}

/* Mobile responsiveness for category filter */
@media (max-width: 768px) {
    .category-filter {
        margin: 1.5rem 0;
        padding: 0 0.5rem;
    }

    .filter-container {
        padding: 1rem;
        gap: 0.5rem;
        margin: 0 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .filter-icon {
        font-size: 0.9rem;
    }
    
    .post-count {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .blog {
        padding: 2rem 0.5rem 1.5rem;
    }

    .blog-card {
        padding: 1rem;
        margin: 0 0.25rem;
    }

    .blog-card-title {
        font-size: 1.2rem;
        line-height: 1.2;
    }

    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .filter-container {
        flex-direction: column;
        align-items: center;
        padding: 0.75rem;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
        max-width: 200px;
    }

    .post-share {
        padding: 1rem;
        margin: 1.5rem 0.5rem 0;
    }

    .post-share .share-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-color);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.06);
}

[data-theme="dark"] table {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(var(--primary-rgb), 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

table th {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--text-color);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.2);
    font-size: 0.95rem;
}

[data-theme="dark"] table th {
    background: rgba(255, 255, 255, 0.05);
    border-bottom-color: rgba(var(--primary-rgb), 0.3);
}

table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

[data-theme="dark"] table td {
    border-bottom-color: rgba(var(--primary-rgb), 0.15);
}

table tr:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

[data-theme="dark"] table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

table tr:last-child td {
    border-bottom: none;
}

/* Mobile responsiveness for tables */
@media (max-width: 768px) {
    table {
        font-size: 0.85rem;
        margin: 1rem 0;
    }
    
    table th,
    table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Make tables horizontally scrollable on mobile */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 1rem 0;
    }
    
    .table-container table {
        min-width: 100%;
        margin: 0;
    }
}

/* Blog Content Images - Mobile Responsive */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
    transition: transform 0.3s ease;
}

[data-theme="dark"] .post-content img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.post-content img:hover {
    transform: scale(1.02);
}

/* Ensure images don't overflow on mobile */
@media (max-width: 768px) {
    .post-content img {
        max-width: 100%;
        width: 100%;
        height: auto;
        margin: 1rem auto;
        padding: 0 0.5rem;
        box-sizing: border-box;
    }
    
    /* Prevent horizontal scroll caused by images */
    .post-content {
        overflow-x: hidden;
        word-wrap: break-word;
    }
}

@media (max-width: 480px) {
    .post-content img {
        margin: 0.75rem auto;
        padding: 0 0.25rem;
        border-radius: 0.25rem;
    }
}

/* External Links - Open in New Tab */
.post-content a[href^="http"]:not([href*="blog.glitchidea.com"]) {
    position: relative;
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s ease;
}

.post-content a[href^="http"]:not([href*="blog.glitchidea.com"]):hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}

/* Add external link icon */
.post-content a[href^="http"]:not([href*="blog.glitchidea.com"])::after {
    content: "↗";
    font-size: 0.8em;
    margin-left: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.post-content a[href^="http"]:not([href*="blog.glitchidea.com"]):hover::after {
    opacity: 1;
}