/* ========================================================================== */
/* BLOG SECTION STYLES */
/* ========================================================================== */

:root {
    --blog-primary: var(--page-bg);
    --blog-accent: var(--accent);
    --blog-accent-light: rgba(59, 130, 246, 0.1);
    --blog-text: var(--text-base);
    --blog-text-muted: var(--text-muted);
    --blog-bg: var(--page-bg);
    --blog-surface: var(--surface);
    --blog-border: var(--border);
    --blog-shadow: var(--shadow-strong);
}

/* ========================================================================== */
/* HERO SECTION */
/* ========================================================================== */

.blog-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-strong) 50%, var(--page-bg) 100%);
    margin-top: 80px;
}

.blog-hero img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.4;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="80" height="80" patternUnits="userSpaceOnUse"><path d="M 80 0 L 0 0 0 80" fill="none" stroke="%23598ad4" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="1200" height="600" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.blog-hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    text-align: center;
    animation: slideUpFade 0.8s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 500;
}

.blog-search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-wrapper {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    padding: 4px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.blog-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 24px;
    color: var(--text-base);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.blog-search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-right: 4px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================================== */
/* MAIN BLOG LAYOUT */
/* ========================================================================== */

.blog-main {
    padding: 80px 0;
    background: var(--blog-bg);
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.blog-content {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* ========================================================================== */
/* FEATURED POST SECTION */
/* ========================================================================== */

.featured-post-section {
    margin-bottom: 20px;
}

.featured-post-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

featured-post-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.2);
}

.featured-image {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 350px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-post-card:hover .featured-image img {
    transform: scale(1.1);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #94a3b8;
}

.category-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: capitalize;
}

.category-badge.java-cat { background: rgba(244, 63, 94, 0.1); color: #f03f5e; }
.category-badge.web-cat { background: rgba(59, 130, 246, 0.1); color: var(--accent); }
.category-badge.ai-cat { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.category-badge.iot-cat { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.category-badge.career-cat { background: rgba(251, 146, 60, 0.1); color: #fb923c; }
.category-badge.tutorial-cat { background: rgba(59, 130, 246, 0.1); color: var(--accent); }

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.3;
}

.featured-excerpt {
    font-size: 1rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 24px;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.read-more-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* ========================================================================== */
/* BLOG GRID SECTION */
/* ========================================================================== */

.blog-grid-section {
    margin-top: 60px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--blog-border);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Blog Card */
.blog-card {
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.15);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.blog-card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    color: var(--accent);
    backdrop-filter: blur(10px);
}

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--accent);
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--blog-border);
}

.reading-time {
    font-size: 0.85rem;
    color: #64748b;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-card-link:hover {
    gap: 10px;
    color: var(--accent-strong);
}

/* ========================================================================== */
/* PAGINATION */
/* ========================================================================== */

.pagination-nav {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--blog-border);
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.pagination .active span {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    border-color: var(--accent);
}

/* ========================================================================== */
/* SIDEBAR */
/* ========================================================================== */

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--blog-border);
}

/* Categories Widget */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.category-item:last-child {
    border-bottom: none;
}

.category-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.category-link:hover {
    color: var(--accent);
}

.category-count {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Recent Posts Widget */
.recent-posts,
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-item-link {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    line-height: 1.4;
}

.post-item-link:hover {
    color: var(--accent);
    padding-left: 8px;
}

.post-item-date {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

/* Tags Cloud Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Author Widget */
.author-widget {
    padding: 0;
}

.author-card {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-radius: 16px;
}

.author-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 3px solid var(--accent);
    transition: all 0.3s ease;
}

.author-card:hover .author-image {
    transform: scale(1.05);
}

.author-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.author-bio {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 16px;
}

.author-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.author-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.author-links a:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-4px);
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
}

.newsletter-desc {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input,
.newsletter-form button {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.newsletter-form input {
    background: rgba(0, 0, 0, 0.3);
    color: #f3f4f6;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

.newsletter-form input::placeholder {
    color: #64748b;
}

.newsletter-form button {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* ========================================================================== */
/* BLOG POST ARTICLE STYLES */
/* ========================================================================== */

.post-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 80px;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-strong) 40%, var(--page-bg) 100%);
}

.post-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.35;
    transition: transform 0.7s ease;
}

.post-hero:hover img {
    transform: scale(1.03);
}

.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.18), transparent 28%),
                radial-gradient(circle at 80% 40%, rgba(34, 197, 94, 0.12), transparent 30%),
                linear-gradient(180deg, rgba(16, 25, 41, 0.7), rgba(8, 14, 24, 0.85));
    pointer-events: none;
}

.post-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: min(100%, 900px);
    padding: 0 24px;
    animation: slideUpFade 0.8s ease-out;
}

.post-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent);
    padding: 10px 18px;
    border-radius: 999px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
}

.post-title {
    font-size: clamp(2.8rem, 5vw, 4.25rem);
    line-height: 1.02;
    color: var(--text-strong);
    margin: 0 auto 24px;
    max-width: 900px;
}

.post-meta {
    justify-content: center;
    color: var(--text-muted);
    gap: 18px;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.post-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.post-content {
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 28px;
    box-shadow: var(--blog-shadow);
    padding: 40px;
    overflow: hidden;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--text-strong);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-content h2 { font-size: 2rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.2rem; }

.post-content p,
.post-content li,
.post-content dd {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 1.35rem;
}

.post-content ul,
.post-content ol {
    padding-left: 1.45rem;
    margin: 1.2rem 0 1.5rem;
    color: var(--text-secondary);
}

.post-content li {
    margin-bottom: 0.85rem;
}

.post-content li > p {
    margin-bottom: 0;
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.25s ease;
}

.post-content a:hover,
.post-content a:focus {
    color: var(--accent-strong);
    text-decoration: underline;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 24px 28px;
    border-left: 4px solid var(--accent);
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-base);
    font-style: italic;
    line-height: 1.8;
    border-radius: 18px;
}

.post-content pre,
.post-content code {
    font-family: 'Fira Code', 'JetBrains Mono', 'Source Code Pro', monospace;
}

.post-content pre {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 24px;
    overflow-x: auto;
    margin: 1.8rem 0;
    color: var(--text-base);
}

.post-content code {
    display: inline-block;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-base);
    padding: 0.2rem 0.45rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.8rem 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    overflow: hidden;
}

.post-content th,
.post-content td {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    color: var(--text-secondary);
}

.post-content th {
    color: var(--text-base);
    background: rgba(255, 255, 255, 0.04);
    font-weight: 700;
}

.post-content img {
    width: 100%;
    display: block;
    border-radius: 24px;
    margin: 2rem 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.toc {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 32px;
}

.toc h4 {
    margin: 0 0 18px;
    color: var(--text-strong);
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.toc li {
    margin-bottom: 12px;
}

.toc li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.25s ease;
}

.toc li a:hover {
    color: var(--accent);
}

.share-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 2rem 0 0;
}

.share-btn {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-strong);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.15);
}

.author-box {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    margin: 2rem 0 0;
}

.author-box-image {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.author-box-content h3 {
    font-size: 1.2rem;
    color: var(--text-strong);
    margin-bottom: 10px;
}

.author-box-content p {
    margin-bottom: 0.5rem;
}

.post-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: space-between;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 28px;
}

.nav-post {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 24px;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 22px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.nav-post:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.08);
}

.nav-post small {
    display: inline-flex;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.nav-title {
    color: var(--text-strong);
    font-weight: 700;
}

.nav-post-right {
    margin-left: auto;
}

.accent-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.accent-link:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

.blog-sidebar {
    position: sticky;
    top: 100px;
}

@media (max-width: 1024px) {
    .post-wrapper {
        grid-template-columns: 1fr;
    }

    .post-meta {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .post-hero {
        min-height: 420px;
        margin-top: 60px;
    }

    .post-wrapper {
        gap: 24px;
    }

    .post-content {
        padding: 28px;
        border-radius: 24px;
    }

    .author-box {
        grid-template-columns: 1fr;
    }

    .author-box-image {
        justify-self: center;
    }

    .post-navigation {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-post {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .post-title {
        font-size: 2.3rem;
    }

    .post-content {
        padding: 22px;
    }

    .post-meta {
        gap: 10px;
        font-size: 0.85rem;
    }

    .toc,
    .author-box,
    .sidebar-widget {
        padding: 20px;
    }
}

/* ========================================================================== */

@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .featured-post-card {
        grid-template-columns: 1fr;
    }

    .featured-image {
        min-height: 250px;
    }

    .featured-content {
        padding: 24px;
    }

    .featured-title {
        font-size: 1.5rem;
    }

    .featured-excerpt {
        font-size: 0.95rem;
    }

    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .blog-sidebar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .blog-hero {
        min-height: 400px;
        margin-top: 60px;
    }

    .blog-main {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .blog-search-input {
        padding: 12px 16px;
    }

    .search-btn {
        padding: 12px 20px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card-content {
        padding: 16px;
    }

    .sidebar-widget {
        padding: 16px;
    }

    .featured-content {
        padding: 16px;
    }

    .featured-title {
        font-size: 1.2rem;
    }

    .post-meta {
        font-size: 0.8rem;
    }
}
