@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

/* ============================================================
   DESIGN TOKENS — Dark Mode (default)
   ============================================================ */
:root {
    /* Colors */
    --accent:           #6366f1;
    --accent-alt:       #a855f7;
    --accent-gradient:  linear-gradient(135deg, #6366f1 0%, #a855f7 100%);

    /* Backgrounds */
    --bg:               #0a0b10;
    --bg-secondary:     #0f1117;
    --surface:          rgba(255, 255, 255, 0.03);
    --surface-hover:    rgba(255, 255, 255, 0.07);

    /* Borders */
    --border:           rgba(255, 255, 255, 0.08);
    --border-hover:     rgba(99, 102, 241, 0.45);

    /* Text */
    --text-primary:     #f1f5f9;
    --text-secondary:   #8b95a7;
    --text-muted:       #5a6476;

    /* Header */
    --header-bg:        rgba(10, 11, 16, 0.85);

    /* Post body */
    --body-text:        #cbd5e1;

    /* Shadows */
    --shadow-card:      0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover:     0 20px 48px rgba(0, 0, 0, 0.55);
    --shadow-feat:      0 30px 72px rgba(0, 0, 0, 0.55);

    /* Misc */
    --radius-card:      22px;
    --radius-lg:        32px;
    --blur:             blur(14px);
    --ease:             cubic-bezier(0.4, 0, 0.2, 1);
    --transition:       all 0.3s var(--ease);

    /* Ambient glow */
    --glow-1:           rgba(99,  102, 241, 0.06);
    --glow-2:           rgba(168,  85, 247, 0.06);
}

/* ============================================================
   DESIGN TOKENS — Light Mode
   ============================================================ */
[data-theme="light"] {
    --bg:               #f5f6fa;
    --bg-secondary:     #eef0f6;
    --surface:          rgba(255, 255, 255, 0.85);
    --surface-hover:    rgba(255, 255, 255, 1);

    --border:           rgba(0, 0, 0, 0.08);
    --border-hover:     rgba(99, 102, 241, 0.4);

    --text-primary:     #0f172a;
    --text-secondary:   #475569;
    --text-muted:       #94a3b8;

    --header-bg:        rgba(245, 246, 250, 0.9);

    --body-text:        #334155;

    --shadow-card:      0 2px 16px rgba(0, 0, 0, 0.08);
    --shadow-hover:     0 16px 40px rgba(0, 0, 0, 0.14);
    --shadow-feat:      0 24px 56px rgba(0, 0, 0, 0.14);

    --glow-1:           rgba(99,  102, 241, 0.04);
    --glow-2:           rgba(168,  85, 247, 0.04);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
    background-image:
        radial-gradient(ellipse at 10% 20%, var(--glow-1) 0%, transparent 50%),
        radial-gradient(ellipse at 88% 80%, var(--glow-2) 0%, transparent 50%);
    background-attachment: fixed;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.15;
}

img {
    display: block;
    max-width: 100%;
}

/* ============================================================
   HEADER & MEGA NAV
   ============================================================ */
#sn-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: var(--header-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
    transition: background 0.35s var(--ease);
}

.sn-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
}

/* Logo */
.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

/* Nav List */
.sn-nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.sn-nav-item {
    position: static;
}

.sn-nav-link {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
    transition: var(--transition);
}

.sn-nav-link:hover,
.sn-nav-item.has-mega:hover > .sn-nav-link {
    color: var(--text-primary);
    background: var(--surface-hover);
}

/* ── Mega Menu Panel ───────────────────────── */
.mega-menu {
    position: fixed;
    top: 68px; /* header height */
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 36px 0 44px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
    z-index: 400;
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}

[data-theme="light"] .mega-menu {
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.sn-nav-item.has-mega:hover .mega-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.mega-menu-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    gap: 60px;
}

/* Column */
.mega-col {
    flex: 1;
    min-width: 0;
}

.mega-col-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.mega-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mega-primary {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 2px 0;
}

.mega-secondary {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 2px 0;
}

.mega-primary:hover,
.mega-secondary:hover {
    color: var(--accent);
}

/* Overlay dim */
.mega-overlay {
    position: fixed;
    inset: 68px 0 0 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    z-index: 399;
    transition: opacity 0.25s var(--ease), visibility 0.25s;
    pointer-events: none;
}

.mega-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Right controls */
.sn-header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ── Search Box ─────────────────────────────── */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Magnifier icon injected via pseudo-element */
.search-container::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.78rem;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s var(--ease);
}

.search-container:focus-within::before {
    color: var(--accent);
}

.search-input {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 100px;
    padding: 9px 18px 9px 38px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    width: 185px;
    transition: width 0.3s var(--ease),
                border-color 0.2s var(--ease),
                box-shadow 0.2s var(--ease),
                background 0.2s var(--ease);
    letter-spacing: 0.01em;
}

.search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-input:focus {
    outline: none;
    width: 240px;
    border-color: var(--accent);
    background: var(--surface-hover);
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.12),
        0 2px 8px rgba(99, 102, 241, 0.08);
}

/* Light mode adjustments */
[data-theme="light"] .search-input {
    background: rgba(255,255,255,0.9);
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

[data-theme="light"] .search-input:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.12),
        0 2px 8px rgba(99, 102, 241, 0.08);
}

/* ── Theme Toggle (sliding pill switch) ─────── */
.theme-toggle {
    /* Track */
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 52px;
    height: 28px;
    border-radius: 100px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    transition:
        background 0.3s var(--ease),
        border-color 0.3s var(--ease),
        box-shadow 0.2s var(--ease);
    padding: 0;
    outline: none;
    overflow: visible;
}

/* Icon inside the knob — handled by .theme-toggle i */
.theme-toggle i {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    color: #f59e0b; /* sun = amber */
    transition:
        left 0.3s var(--ease),
        color 0.3s var(--ease),
        transform 0.3s var(--ease);
    z-index: 2;
    pointer-events: none;
}

/* Sliding knob */
.theme-toggle::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-gradient);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    transition: left 0.3s var(--ease), box-shadow 0.2s var(--ease);
}

/* Dark mode = sun icon on left, knob on left */
.theme-toggle:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* Light mode: knob slides right, icon moves right, color → indigo */
[data-theme="light"] .theme-toggle {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .theme-toggle::after {
    left: calc(100% - 23px); /* knob to the right */
}

[data-theme="light"] .theme-toggle i {
    left: calc(100% - 21px); /* icon to the right */
    color: #6366f1; /* moon = indigo */
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding: 90px 5% 56px;
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.2rem, 7vw, 4.2rem);
    letter-spacing: -2px;
    margin-bottom: 1.2rem;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    padding: 32px 5% 100px;
    max-width: 1360px;
    margin: 0 auto;
}

/* ============================================================
   BLOG GRID
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* ============================================================
   POST CARD
   ============================================================ */
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.post-card > img,
.post-card .post-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.post-card:hover > img,
.post-card:hover .post-image {
    transform: scale(1.04);
}

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

.post-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent);
    margin-bottom: 10px;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 100px;
}

[data-theme="light"] .post-category {
    background: rgba(99, 102, 241, 0.12);
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    transition: color 0.2s;
}

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

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

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   FEATURED POST
   ============================================================ */
.featured-section {
    margin-bottom: 56px;
}

.featured-post {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 440px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
}

.featured-post:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-feat);
    transform: translateY(-4px);
}

.featured-image {
    height: 100%;
    min-height: 380px;
    overflow: hidden;
}

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

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

.featured-content {
    padding: 56px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.featured-content .post-title {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.2;
}

.featured-content .post-excerpt {
    font-size: 1rem;
    margin-bottom: 28px;
    -webkit-line-clamp: 4;
}

/* ============================================================
   POST DETAIL
   ============================================================ */
.post-detail {
    max-width: 760px;
    margin: 72px auto;
    padding: 0 5%;
}

.post-detail > img {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 36px;
    box-shadow: var(--shadow-feat);
}

.post-detail h1 {
    font-size: clamp(1.8rem, 5.5vw, 3.2rem);
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--body-text);
}

.post-body p { margin-bottom: 1.5em; }
.post-body h2 { font-size: 1.6rem; margin: 2em 0 0.75em; }
.post-body h3 { font-size: 1.3rem; margin: 1.75em 0 0.6em; }
.post-body a  { color: var(--accent); text-decoration: underline; }

/* ============================================================
   SHARE SECTION
   ============================================================ */
.share-section {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.share-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
}

.share-btn i { font-size: 1rem; }

.share-btn:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.share-btn.twitter:hover  { color: #1DA1F2; border-color: rgba(29, 161, 242, 0.4); }
.share-btn.linkedin:hover { color: #0A66C2; border-color: rgba(10, 102, 194, 0.4); }
.share-btn.facebook:hover { color: #1877F2; border-color: rgba(24, 119, 242, 0.4); }
.share-btn.copy:hover     { color: var(--accent); }

/* ============================================================
   CATEGORIES PAGE
   ============================================================ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
}

.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 40px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
}

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

.cat-card i {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 16px;
    transition: transform 0.3s var(--ease);
}

.cat-card:hover i { transform: scale(1.15) rotate(-5deg); }
.cat-card h2 { font-size: 1.2rem; font-weight: 700; }

/* ============================================================
   SEARCH RESULTS DIVIDER
   ============================================================ */
#searchResults h2 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 600;
}

#searchResults hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    padding: 56px 5%;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 80px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================================
   POST NAVIGATION (Prev / Next)
   ============================================================ */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.post-nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    min-width: 0;
    box-shadow: var(--shadow-card);
}

.post-nav-link:hover {
    border-color: var(--border-hover);
    background: var(--surface-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.post-nav-link.prev { flex-direction: row; }
.post-nav-link.next { flex-direction: row-reverse; text-align: right; }

.post-nav-link:hover .post-nav-arrow {
    color: var(--accent);
    transform: translateX(-4px);
}

.post-nav-link.next:hover .post-nav-arrow {
    transform: translateX(4px);
}

.post-nav-arrow {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.post-nav-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.post-nav-info {
    min-width: 0;
    flex: 1;
}

.post-nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.post-nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.post-nav-link:hover .post-nav-title {
    color: var(--accent);
}

@media (max-width: 640px) {
    .post-nav {
        grid-template-columns: 1fr;
    }
    .post-nav-link.next {
        flex-direction: row;
        text-align: left;
    }
    .post-nav-link.next:hover .post-nav-arrow {
        transform: translateX(-4px);
    }
}

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 92px; /* header height + gap */
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Widget */
.widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.widget-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-header i {
    color: var(--accent);
    font-size: 0.95rem;
}

.widget-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
}

/* Latest Posts Widget */
.sidebar-post {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.sidebar-post:last-child {
    border-bottom: none;
}

.sidebar-post:hover {
    background: var(--surface-hover);
}

.sidebar-post:hover .sidebar-post-title {
    color: var(--accent);
}

.sidebar-post-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-post-info {
    flex: 1;
    min-width: 0;
}

.sidebar-post-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 4px;
    color: var(--text-primary);
    transition: color 0.2s;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-post-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Categories Widget */
.sidebar-cats {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-cat-link:hover {
    background: var(--surface-hover);
    color: var(--accent);
}

.sidebar-cat-link i {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.2s var(--ease);
}

.sidebar-cat-link:hover i {
    transform: translateX(4px);
    color: var(--accent);
}

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

.animate-fade-up {
    animation: fadeInUp 0.65s var(--ease) both;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}

@media (max-width: 992px) {
    .featured-post {
        grid-template-columns: 1fr;
    }
    .featured-image {
        height: 280px;
        min-height: 280px;
    }
    .featured-content {
        padding: 36px 30px;
    }
}

@media (max-width: 768px) {
    header { padding: 0 20px; height: 64px; }
    .search-input { width: 140px; }
    .search-input:focus { width: 180px; }
    .hero { padding: 64px 5% 40px; }
    .hero h1 { letter-spacing: -1.5px; }
    .blog-grid { grid-template-columns: 1fr; gap: 20px; }
    .featured-content { padding: 28px 24px; }
    .post-detail { margin: 48px auto; }
    nav a { padding: 6px 10px; }
}

@media (max-width: 480px) {
    .header-right { gap: 10px; }
    .search-container { display: none; }
    .share-btn span { display: none; }
    .share-btn { padding: 10px 14px; }
}

/* Mobile and Tablet Styles (max-width: 833px) */
@media (max-width: 833px) {
    /* Header Container Adjustments */
       /* Header Container Adjustments */
    .sn-nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        position: relative;
        background: inherit;
    }

    /* Redesigned Mobile Menu Toggle Button */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.05); /* Soft background for better tap target */
        border: none;
        border-radius: 8px;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        transition: background 0.2s ease;
        position: relative; /* Ensure relative positioning for internal alignment */
    }

    .mobile-menu-btn:hover {
        background: rgba(0, 0, 0, 0.1);
    }

    .mobile-menu-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: #333; /* Default dark color */
        border-radius: 2px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.3s ease;
        position: absolute; /* Stack them to ensure perfect X center */
        left: 10px; /* Center horizontally within the 44px button ( (44-24)/2 ) */
    }

    /* Positioning the two spans while inactive */
    .mobile-menu-btn span:first-child {
        top: 18px; /* Offset from center */
    }

    .mobile-menu-btn span:last-child {
        top: 26px; /* Offset from center */
    }

    /* Animation when active (.active class toggled by JS) */
    .mobile-menu-btn.active {
        background: transparent; /* Clean look when drawer is open */
    }

    /* Force them to the exact center (21px is middle of 44px height for 2px thick line) */
    .mobile-menu-btn.active span:first-child {
        top: 21px;
        transform: rotate(45deg);
    }

    .mobile-menu-btn.active span:last-child {
        top: 21px;
        transform: rotate(-45deg);
    }

    /* Side Navigation Drawer */
    .sn-nav-list {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: #ffffff;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 90px 0 40px 0;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 1000;
        margin: 0;
        list-style: none;
    }

    .sn-nav-list.show {
        left: 0;
    }

    .sn-nav-item {
        width: 100%;
        border-bottom: 1px solid #f5f5f5;
    }

    .sn-nav-link {
        display: block;
        padding: 16px 25px;
        width: 100%;
        font-weight: 600;
        font-size: 17px;
        color: #1a1a1a;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    /* Responsive Mega Menu (Accordion Style) */
    .mega-menu {
        position: static;
        width: 100%;
        display: none; 
        box-shadow: none;
        border-top: 1px solid #eee;
        padding: 0;
        background: #fafafa;
    }

    .sn-nav-item.active .mega-menu {
        display: block;
    }

    .mega-menu-inner {
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    .mega-col {
        width: 100%;
        padding: 20px 25px;
        border-bottom: 1px solid #eee;
    }

    .mega-col:last-child {
        border-bottom: none;
    }

    .mega-col-title {
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 12px;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 1.2px;
    }

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

    .mega-col ul li a {
        padding: 10px 0;
        font-size: 15px;
        display: block;
        color: #444;
        text-decoration: none;
    }

    /* Controls (Search & Theme) */
    .sn-header-controls {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .search-input {
        max-width: 130px;
        padding: 8px 12px;
        border-radius: 20px;
        border: 1px solid #ddd;
        font-size: 14px;
    }

    .theme-toggle {
        background: none;
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
        padding: 5px;
    }

    /* Overlay */
    .mega-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(2px);
        z-index: 999;
    }

    .mega-overlay.show {
        display: block;
    }
}