/* ============================================
   Code by Keyur - Blog Design System
   Modern, Minimal, Developer-Focused
   ============================================ */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Light Mode Colors */
    --bg-primary: #FAFAFA;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F4F4F5;
    --bg-code: #1E1E2E;
    
    --text-primary: #18181B;
    --text-secondary: #52525B;
    --text-muted: #A1A1AA;
    --text-inverse: #FAFAFA;
    
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-light: #DBEAFE;
    
    --border: #E4E4E7;
    --border-hover: #D4D4D8;
    
    /* Category Colors */
    --python: #3776AB;
    --javascript: #F7DF1E;
    --django: #092E20;
    --flask: #000000;
    --ai: #FF6F61;
    --tips: #10B981;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Spacing */
    --nav-height: 64px;
    --content-width: 768px;
    --wide-width: 1200px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* Dark Mode */
.dark {
    --bg-primary: #09090B;
    --bg-secondary: #18181B;
    --bg-tertiary: #27272A;
    --bg-code: #0D0D0F;
    
    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-muted: #52525B;
    --text-inverse: #18181B;
    
    --accent: #3B82F6;
    --accent-hover: #60A5FA;
    --accent-light: #1E3A5F;
    
    --border: #27272A;
    --border-hover: #3F3F46;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

/* ============================================
   Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 2rem);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Selection */
::selection {
    background-color: var(--accent);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.75rem; }
}

p {
    color: var(--text-secondary);
    line-height: 1.75;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: transform var(--transition-base), 
                background-color var(--transition-base),
                box-shadow var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.navbar-container {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar-brand:hover {
    color: var(--text-primary);
}

.navbar-brand span {
    color: var(--accent);
}

.navbar-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .navbar-links {
        display: flex;
    }
}

.navbar-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.navbar-link:hover,
.navbar-link.active {
    color: var(--text-primary);
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-base);
}

.navbar-link:hover::after,
.navbar-link.active::after {
    width: 100%;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.dark .theme-toggle .icon-sun { display: block; }
.dark .theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    padding: 2rem;
    z-index: 99;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-link {
    display: block;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    color: var(--accent);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.card-content {
    padding: 1.5rem;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

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

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

.card-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================
   Tags
   ============================================ */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.tag-python { background: #3776AB20; color: #3776AB; }
.tag-javascript { background: #F7DF1E20; color: #B8A100; }
.tag-django { background: #092E2020; color: #092E20; }
.tag-flask { background: #00000015; color: #333; }
.tag-ai { background: #FF6F6120; color: #FF6F61; }
.tag-tutorial { background: #10B98120; color: #10B981; }

.dark .tag-python { background: #3776AB30; color: #5A9BD5; }
.dark .tag-javascript { background: #F7DF1E20; color: #F7DF1E; }
.dark .tag-django { background: #09804020; color: #0D9B48; }
.dark .tag-flask { background: #ffffff20; color: #ccc; }

/* ============================================
   Category Pills
   ============================================ */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.category-pill:hover,
.category-pill.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: calc(var(--nav-height) + 4rem) 1.5rem 4rem;
    text-align: center;
}

.hero-container {
    max-width: var(--content-width);
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ============================================
   Section Styles
   ============================================ */
.section {
    padding: 4rem 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.section-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.section-link:hover {
    gap: 0.5rem;
}

/* ============================================
   Article Grid
   ============================================ */
.article-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Featured Article */
.featured-card {
    grid-column: 1 / -1;
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .featured-card {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.featured-card .card-image {
    aspect-ratio: 16/10;
    border-radius: 1rem;
}

.featured-card .card-title {
    font-size: 1.75rem;
}

.featured-card .card-excerpt {
    -webkit-line-clamp: 4;
}

/* ============================================
   Categories Section
   ============================================ */
.categories-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.category-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.category-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.category-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================
   Article Page
   ============================================ */
.article-header {
    padding: calc(var(--nav-height) + 3rem) 1.5rem 2rem;
    text-align: center;
}

.article-header-container {
    max-width: var(--content-width);
    margin: 0 auto;
}

.article-category {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.article-header h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .article-header h1 {
        font-size: 2.75rem;
    }
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* Article Content */
.article-content-wrapper {
    display: grid;
    gap: 2rem;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 1024px) {
    .article-content-wrapper {
        grid-template-columns: 1fr 250px;
    }
}

.article-content {
    max-width: var(--content-width);
}

.article-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.article-content h3 {
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--accent);
    background: var(--bg-tertiary);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

/* ============================================
   Code Blocks
   ============================================ */
.code-block-wrapper {
    position: relative;
    margin: 2rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--bg-code);
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-language {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.copy-btn.copied {
    background: #10B981;
    color: white;
}

pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
}

pre code {
    font-family: inherit;
    color: #E4E4E7;
}

/* Inline Code */
.article-content code:not(pre code) {
    padding: 0.2em 0.4em;
    font-size: 0.875em;
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    border-radius: 0.25rem;
    color: var(--accent);
}

/* Line Numbers */
.line-numbers {
    counter-reset: line;
}

.line-numbers .line::before {
    counter-increment: line;
    content: counter(line);
    display: inline-block;
    width: 2rem;
    margin-right: 1rem;
    text-align: right;
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
}

/* ============================================
   Table of Contents
   ============================================ */
.toc {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    max-height: calc(100vh - var(--nav-height) - 4rem);
    overflow-y: auto;
}

.toc-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

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

.toc-link {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-left: 2px solid transparent;
    padding-left: 1rem;
    margin-left: -1rem;
    transition: all var(--transition-fast);
}

.toc-link:hover {
    color: var(--text-primary);
}

.toc-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-light);
}

.toc-link.toc-h3 {
    padding-left: 2rem;
    font-size: 0.8125rem;
}

/* ============================================
   Author Box
   ============================================ */
.author-box {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    margin-top: 3rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.author-bio {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.author-links {
    display: flex;
    gap: 0.75rem;
}

.author-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.author-link:hover {
    background: var(--accent);
    color: white;
}

/* ============================================
   Related Posts
   ============================================ */
.related-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 4rem 1.5rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: var(--wide-width);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-brand span {
    color: var(--accent);
}

.footer-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 300px;
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

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

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-social a:hover {
    color: var(--accent);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Utility Classes
   ============================================ */
.container {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Reading Time Badge */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.reading-time svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   Code Snippet Article Specific
   ============================================ */
.snippet-section {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
}

.snippet-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.snippet-section-title::before {
    content: '';
    width: 4px;
    height: 1em;
    background: var(--accent);
    border-radius: 2px;
}

.problem-section { border-left: 4px solid #EF4444; }
.solution-section { border-left: 4px solid #10B981; }
.code-section { border-left: 4px solid #3B82F6; }
.explanation-section { border-left: 4px solid #F59E0B; }
.output-section { border-left: 4px solid #8B5CF6; }

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .navbar,
    .footer,
    .toc,
    .copy-btn {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .article-content {
        max-width: 100%;
    }
}
