﻿/* Reset and base styles */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-color: #7c3aed;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    margin: 0;
    font-family: "Inter", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Distinctive headings with Space Grotesk */
h1, h2, h3, h4, h5, h6 {
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* Navigation */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 1rem 2rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.95);
}

.navbar-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.navbar-logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-logo img {
    height: 42px;
    margin-right: 0.75rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.navbar-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

.navbar-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.navbar-links a:hover {
    color: var(--primary-color);
}

.navbar-links a:hover::after {
    width: 100%;
}

/* Blog grid - consolidated single definition */
.blog-listing-container,
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 3rem auto 4rem auto;
    padding: 0 2rem;
}

/* Prevent underline on card content */
.blog-listing-container a:hover .blog-card-content,
.blog-listing-container a:hover .blog-card-content .date,
.blog-listing-container a:hover .blog-card-content .summary,
.blog-listing-container a:hover .blog-card-content .tags span,
.blog-grid a:hover .blog-card-content,
.blog-grid a:hover .blog-card-content .date,
.blog-grid a:hover .blog-card-content .summary,
.blog-grid a:hover .blog-card-content .tags span {
    text-decoration: none;
}

.blog-card {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card:hover h2,
.blog-card:hover h3 {
    color: var(--primary-color);
    text-decoration: none;
}

.blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blog-card-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.blog-card-content .date {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-content .date::before {
    content: '📅';
    font-size: 1rem;
}

.blog-card-content .summary {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-content .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.blog-card-content .tags span {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    color: var(--primary-color);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
}

.blog-card:hover .tags span {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-color: transparent;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: var(--bg-primary);
    text-align: center;
    padding: 3rem 2rem 2rem 2rem;
    margin-top: 4rem;
    border-top: 4px solid var(--primary-color);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer a {
    color: var(--bg-primary);
    margin: 0 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.footer a:hover {
    background: var(--primary-color);
    transform: translateY(-4px);
}

/* Blog Hero Section */
.blog-hero {
    position: relative;
    width: 100%;
    height: 450px;
    margin-bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.blog-header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.3;
    mix-blend-mode: overlay;
}

.blog-hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 2rem 3rem;
    max-width: 90%;
    width: 100%;
    z-index: 10;
    line-height: 1.2;
    letter-spacing: -0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Reading Time Badge */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    color: var(--primary-color);
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.reading-time svg {
    width: 18px;
    height: 18px;
}

/* Social Share Buttons */
.social-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 3rem 0;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    flex-wrap: wrap;
}

.social-share-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 0.5rem;
    font-size: 0.95rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    color: var(--text-secondary);
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.share-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.share-button svg {
    width: 20px;
    height: 20px;
}

.share-button[data-share="twitter"]:hover {
    background: #1DA1F2;
    color: #fff;
    border-color: #1DA1F2;
}

.share-button[data-share="bluesky"]:hover {
    background: #0085ff;
    color: #fff;
    border-color: #0085ff;
}

.share-button[data-share="mastodon"]:hover {
    background: #6364FF;
    color: #fff;
    border-color: #6364FF;
}

.share-button[data-share="linkedin"]:hover {
    background: #0077B5;
    color: #fff;
    border-color: #0077B5;
}

.share-button[data-share="facebook"]:hover {
    background: #1877F2;
    color: #fff;
    border-color: #1877F2;
}

.share-button[data-share="copy"]:hover {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.share-button.copied {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

/* Blog Page Styles - consolidated */
.blog-page {
    max-width: 900px;
    margin: -80px auto 4rem;
    padding: 3rem;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    border-radius: 16px;
    position: relative;
    overflow: visible;
    animation: fadeInUp 0.6s ease-out;
    border: 1px solid var(--border-color);
    z-index: 10;
}

/*.blog-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 16px 16px 0 0;
}*/

.blog-page h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.blog-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.blog-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    letter-spacing: -0.01em;
}

.blog-content h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.blog-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem 0;
    letter-spacing: -0.01em;
}

.blog-content p {
    margin-bottom: 1.5rem;
    text-align: left;
}

.blog-content ul,
.blog-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.blog-content a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.blog-content a:hover {
    text-decoration-color: var(--primary-color);
}

.blog-content code {
    background: var(--bg-tertiary);
    color: var(--accent-color);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-weight: 600;
}

.blog-content pre {
    background: var(--text-primary);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.blog-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-weight: 400;
}

.blog-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-page img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin: 2.5rem 0;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    will-change: transform;
    border: 1px solid var(--border-color);
}

.blog-page img:hover {
    transform: scale(1.02);
}

.blog-footer {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
}

.blog-footer p {
    margin: 0.75rem 0;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.blog-footer p:first-child::before {
    content: '👤 ';
    margin-right: 0.5rem;
}

.blog-footer p:nth-child(2)::before {
    content: '📅 ';
    margin-right: 0.5rem;
}

.blog-footer p:nth-child(3)::before {
    content: '🏷️ ';
    margin-right: 0.5rem;
}

/* Modern Circular Reading Progress Indicator */
.reading-progress {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    z-index: 1001;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.reading-progress.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.reading-progress-circle {
    position: relative;
    width: 100%;
    height: 100%;
}

.reading-progress-ring {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.reading-progress-ring-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 4;
}

.reading-progress-ring-progress {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 188.5;
    stroke-dashoffset: 188.5;
    transition: stroke-dashoffset 0.1s linear;
}

.reading-progress-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
    transition: fill 0.3s ease;
}

.reading-progress:hover .reading-progress-icon {
    fill: var(--accent-color);
}

.reading-progress-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    transition: box-shadow 0.3s ease;
}

.reading-progress:hover .reading-progress-bg {
    box-shadow: var(--shadow-xl);
}

.reading-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: "Space Grotesk", sans-serif;
    pointer-events: none;
}

/* Lightbox and Carousel */
.image-carousel {
    position: relative;
    width: 600px;
    margin: 2rem auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.carousel-image {
    display: none;
    width: 100%;
    cursor: pointer;
    border-radius: 12px;
}

.carousel-image.active {
    display: block;
}

.carousel-prev, 
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 2;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

.carousel-counter {
    position: absolute;
    bottom: 20px;
    right: 24px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    z-index: 2;
    user-select: none;
    font-weight: 600;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* Lightbox styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10000;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

/* Copy code button override */
.hljs-copy-container {
    margin-top: 50px;
}

/* Pagination Styles - Improved Accessibility */
.pagination {
    margin-top: 4rem;
    text-align: center;
    width: 100%;
    grid-column: 1 / -1;
}

.pagination-list {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.pagination-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border-color: transparent;
    pointer-events: none;
    box-shadow: var(--shadow-md);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Hide placeholder images until they're replaced */
img[src*="placeholder.png"] {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

img[src*="placeholder.png"].loaded {
    opacity: 1;
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Stagger animation for blog cards */
.blog-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.blog-card:nth-child(1) { animation-delay: 0.05s; }
.blog-card:nth-child(2) { animation-delay: 0.1s; }
.blog-card:nth-child(3) { animation-delay: 0.15s; }
.blog-card:nth-child(4) { animation-delay: 0.2s; }
.blog-card:nth-child(5) { animation-delay: 0.25s; }
.blog-card:nth-child(6) { animation-delay: 0.3s; }
.blog-card:nth-child(7) { animation-delay: 0.35s; }
.blog-card:nth-child(8) { animation-delay: 0.4s; }
.blog-card:nth-child(9) { animation-delay: 0.45s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Consolidated Media Queries */
@media (max-width: 1200px) {
    .blog-listing-container,
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }

    .blog-hero-title {
        font-size: 3rem;
        padding: 1.75rem 2.5rem;
    }
}

@media (max-width: 900px) {
    .blog-listing-container,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 1.5rem;
        gap: 1.5rem;
    }

    .blog-page {
        margin: -60px 1rem 3rem;
        padding: 2rem;
    }

    .blog-hero {
        height: 350px;
    }

    .blog-hero-title {
        font-size: 2.5rem;
        padding: 1.5rem 2rem;
        line-height: 1.25;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }

    .reading-progress {
        width: 56px;
        height: 56px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .reading-progress-icon {
        width: 20px;
        height: 20px;
    }

    .blog-hero {
        height: 300px;
    }

    .blog-hero-title {
        font-size: 2rem;
        padding: 1.25rem 1.75rem;
        line-height: 1.3;
        max-width: 92%;
    }

    .blog-page {
        margin: -50px 1rem 2rem;
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }

    .blog-page h1 {
        font-size: 2rem;
    }

    .blog-content {
        font-size: 1.0625rem;
    }

    .blog-content h2 {
        font-size: 1.625rem;
    }

    @media (max-width: 700px) {
        .navbar {
            flex-direction: column;
            align-items: flex-start;
            gap: 1rem;
        }

        .navbar-links {
            flex-direction: row;
            width: 100%;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .reading-progress {
            top: 0;
        }

        .image-carousel {
            width: 100%;
            max-width: 98vw;
            min-width: 0;
            margin: 1.5rem auto;
        }

        .carousel-image {
            max-height: 240px;
            object-fit: cover;
            border-radius: 8px;
        }

        .carousel-prev,
        .carousel-next {
            font-size: 1.25rem;
            padding: 0.5rem 0.75rem;
        }

        .carousel-counter {
            font-size: 0.875rem;
            bottom: 12px;
            right: 16px;
            padding: 0.375rem 0.75rem;
        }
    }

    @media (max-width: 600px) {
        .blog-listing-container,
        .blog-grid {
            grid-template-columns: 1fr;
            padding: 0 1rem;
            gap: 1.5rem;
            margin: 2rem auto 3rem;
        }

        .navbar-links {
            gap: 0.75rem;
        }

        .social-share {
            padding: 1.25rem;
        }

        .reading-progress {
            width: 52px;
            height: 52px;
            bottom: 1rem;
            right: 1rem;
        }

        .reading-progress-icon {
            width: 18px;
            height: 18px;
        }

        .blog-hero {
            height: 280px;
        }

        .blog-hero-title {
            font-size: 1.75rem;
            padding: 1rem 1.5rem;
            line-height: 1.35;
            max-width: 94%;
        }
    }

    @media (max-width: 480px) {
        .navbar {
            padding: 1rem;
        }

        .blog-hero {
            height: 260px;
        }

        .blog-hero-title {
            font-size: 1.5rem;
            padding: 0.875rem 1.25rem;
            line-height: 1.4;
            max-width: 95%;
        }

        .blog-page {
            margin: -40px 0.75rem 2rem;
            padding: 1.5rem 1.25rem;
        }

        .blog-page h1 {
            font-size: 1.75rem;
        }

        .share-button {
            width: 40px;
            height: 40px;
        }

        .share-button svg {
            width: 18px;
            height: 18px;
        }

        .blog-content h2 {
            font-size: 1.5rem;
            margin: 2rem 0 1rem 0;
        }
    }

    @media (max-width: 400px) {
        .blog-hero {
            height: 240px;
        }

        .blog-hero-title {
            font-size: 1.25rem;
            padding: 0.75rem 1rem;
            line-height: 1.45;
            max-width: 96%;
        }

        .carousel-image {
            max-height: 160px;
        }

        .carousel-prev,
        .carousel-next {
            font-size: 1.125rem;
            padding: 0.375rem 0.625rem;
        }

        .carousel-counter {
            font-size: 0.8125rem;
            padding: 0.25rem 0.625rem;
        }

        .navbar-logo h1 {
            font-size: 1.25rem;
        }

        .navbar-logo img {
            height: 36px;
        }
    }

    @media (max-width: 360px) {
        .blog-hero {
            height: 220px;
        }

        .blog-hero-title {
            font-size: 1.125rem;
            padding: 0.625rem 0.875rem;
            line-height: 1.5;
            max-width: 97%;
            letter-spacing: -0.01em;
        }
    }
}