/* Reset & Base Styles */
:root {
    --layout-max-width: 1440px;
    --sidebar-width: 280px;
    --layout-side-padding: clamp(1.25rem, 3vw, 2.5rem);
    --layout-gap: clamp(2.5rem, 5vw, 3.75rem);
    --content-padding: clamp(2.25rem, 4vw, 3.5rem);
    
    /* Light mode colors */
    --bg-primary: #f9fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-primary: #e5e7eb;
    --border-secondary: #d1d5db;
    --shadow-primary: rgba(0, 0, 0, 0.08);
    --shadow-secondary: rgba(0, 0, 0, 0.12);
    --accent-primary: #4f46e5;
    --accent-secondary: #6366f1;
}

/* Dark mode colors */
[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    --text-tertiary: #d1d5db;
    --border-primary: #374151;
    --border-secondary: #4b5563;
    --shadow-primary: rgba(0, 0, 0, 0.25);
    --shadow-secondary: rgba(0, 0, 0, 0.4);
    --accent-primary: #6366f1;
    --accent-secondary: #818cf8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme transition class for smooth changes */
.theme-transition * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 3px;
}

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

/* H1 styles for post listings (cards, category pages) */
.post-card h1,
.post-item h1,
.category-posts h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    border-bottom: none;
    padding: 0;
}

/* H1 styles for post content (inside articles) */
.post-content h1 {
    font-size: 2em;
    font-weight: 600;
    line-height: 1.25;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--text-primary);
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.3em;
}

/* GitHub-style Markdown Headings for other levels */
h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--text-primary);
}

/* H2 styles for post listings (cards, category pages) */
.post-card h2,
.post-item h2,
.category-posts h2 {
    font-size: 1.25em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    border-bottom: none;
    padding: 0;
}

/* H2 styles for post content (inside articles) */
.post-content h2 {
    font-size: 1.7em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5em 0 0.5em 0;
    border-bottom: none;
    padding: 0;
}

.post-content h2::after {
    display: none !important;
    content: none !important;
}

h3 {
    font-size: 1.25em;
}

h4 {
    font-size: 1em;
}

h5 {
    font-size: 0.875em;
}

h6 {
    font-size: 0.85em;
    color: #6b7280;
}

/* GitHub-style content */
.post-content {
    max-width: 100%;
    word-wrap: break-word;
}

.post-content h1:first-child,
.post-content h2:first-child {
    margin-top: 0;
}

/* GitHub-style lists */
.post-content ul,
.post-content ol {
    margin: 0.5em 0;
    padding-left: 2em;
}

.post-content li {
    margin: 0.25em 0;
}

/* GitHub-style blockquotes */
.post-content blockquote {
    margin: 1em 0;
    padding: 0 1em;
    color: #6b7280;
    border-left: 0.25em solid #d1d5db;
    background: #f9fafb;
}

/* GitHub-style code */
.post-content code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(175, 184, 193, 0.2);
    border-radius: 6px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.post-content pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 6px;
    margin: 1em 0;
}

.post-content pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* Post-specific styles */
.post {
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 0;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Post title for individual post pages */
.post-header .post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.edit-post-btn {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.edit-post-btn:hover {
    background-color: #f3f4f6;
    text-decoration: none;
}

/* Site Header */
.site-header {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid #e2e8f0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 1rem var(--layout-side-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-title a:hover {
    color: #4f46e5;
}

.main-nav {
    display: flex;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #4f46e5;
}

/* Layout Wrapper */
.layout-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 0 var(--layout-side-padding);
    column-gap: var(--layout-gap);
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    padding: 2rem 0 0 0;
}

/* Profile Section */
.profile-section {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.profile-avatar {
    text-align: center;
    margin-bottom: 1rem;
}

.avatar-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    object-fit: cover;
    object-position: center;
    filter: brightness(0.85) contrast(1.1);
}

.profile-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.profile-title {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.profile-description {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.5;
}

.profile-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.profile-link:hover {
    background: #e0e7ff;
    color: #4f46e5;
    transform: translateX(2px);
}

.profile-icon {
    font-size: 1.1rem;
}

/* Category Section */
.category-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-item:hover {
    background: #f0f9ff;
    color: #4f46e5;
    border-color: #dbeafe;
    transform: translateX(2px);
}

.category-icon {
    font-size: 1.1rem;
}

.category-name {
    flex: 1;
}

.category-count {
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Write Section */
/* Main Content */
.main-content {
    width: 100%;
    max-width: calc(var(--layout-max-width) - var(--sidebar-width) - var(--layout-gap));
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Hero Section */
.hero-section {
    background: #f8f9fb;
    color: var(--text-primary);
    padding: 3.5rem var(--content-padding);
    margin-bottom: 3rem;
    text-align: center;
}

.hero-content {
    max-width: none;
    margin: 0;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: var(--text-primary);
}

.hero-title .highlight {
    color: #4f46e5;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    color: #6b7280;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    background: var(--bg-secondary);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    text-align: center;
    min-width: 120px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Typography */
h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-inline: var(--content-padding);
}

h2::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: #4f46e5;
    margin-top: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

a {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #3730a3;
}

.main-content > h2 {
    padding: 0 var(--content-padding);
}

/* Posts List */
.posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(2rem, 4vw, 3rem);
    padding: 0 var(--content-padding);
}

/* Post Cards */
.post-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 1.5rem 1.75rem 1.5rem 1.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Post title for post listings (cards, category pages) */
.post-card .post-title,
.post-item .post-title,
.category-posts .post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    border-bottom: none;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
}

.post-title a {
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: #4f46e5;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.post-date {
    color: #9ca3af;
}

.post-category {
    background: #4f46e5;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-excerpt {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.read-more {
    color: #4f46e5;
    font-weight: 500;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #3730a3;
}

/* Category Content */
.category-content {
    max-width: clamp(980px, 75vw, 1120px);
    margin: 0 auto;
    padding-inline: var(--content-padding);
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-content {
        padding: 1rem 1.5rem;
    }
    
    .layout-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 0 auto;
        padding: 0 1.5rem;
    }
    
    .sidebar {
        position: static;
        padding: 1rem 2rem;
        background: var(--bg-tertiary);
        border-bottom: 1px solid #e2e8f0;
    }
    
    .main-content {
        max-width: none;
        padding: 2rem 1.5rem 3rem;
        gap: 2.5rem;
    }
    
    .hero-section,
    .posts-list,
    .main-content h2 {
        padding-inline: 1.5rem;
    }
    
    .post-card {
        padding: 1.25rem 1.5rem 1.25rem 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .hero-section {
        padding: 3rem 0;
        margin-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .stat-item {
        min-width: 100px;
        padding: 1rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
}

/* Mobile Sidebar Toggle */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 60;
        background: #4f46e5;
        color: white;
        border: none;
        border-radius: 8px;
        padding: 0.75rem;
        cursor: pointer;
        font-size: 1.2rem;
        transition: background-color 0.2s ease;
    }
    
    .sidebar-toggle:hover {
        background: #3730a3;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 80px;
        width: 280px;
        height: calc(100vh - 80px);
        z-index: 50;
        transition: left 0.3s ease;
        overflow-y: auto;
        background: var(--bg-tertiary);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 40;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (min-width: 1025px) {
    .sidebar-toggle {
        display: none;
    }
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 50px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.dark-mode-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-secondary);
}

.dark-mode-toggle .toggle-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.dark-mode-toggle .sun-icon {
    display: block;
}

.dark-mode-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .dark-mode-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .dark-mode-toggle .moon-icon {
    display: block;
}

/* Dark mode specific styles for components */
[data-theme="dark"] .site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
}

[data-theme="dark"] .site-title a {
    color: var(--text-primary);
}

[data-theme="dark"] .nav-link {
    color: var(--text-secondary);
}

[data-theme="dark"] .nav-link:hover {
    color: var(--accent-primary);
}

[data-theme="dark"] .sidebar {
    background: #1f2937 !important;
    border-right: 1px solid var(--border-primary);
}

[data-theme="dark"] .sidebar h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar a {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .sidebar a:hover {
    color: var(--accent-primary) !important;
}

[data-theme="dark"] .sidebar .btn {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-primary);
    color: var(--text-primary) !important;
}

[data-theme="dark"] .sidebar .btn:hover {
    background: var(--bg-secondary) !important;
    border-color: var(--accent-primary);
    color: var(--accent-primary) !important;
}

/* Social links buttons in sidebar */
[data-theme="dark"] .sidebar .profile-link {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-primary);
    color: var(--text-primary) !important;
}

[data-theme="dark"] .sidebar .profile-link:hover {
    background: var(--bg-secondary) !important;
    border-color: var(--accent-primary);
    color: var(--accent-primary) !important;
}

[data-theme="dark"] .post-card,
[data-theme="dark"] .post-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    box-shadow: 0 2px 8px var(--shadow-primary);
}

[data-theme="dark"] .post-card:hover,
[data-theme="dark"] .post-item:hover {
    box-shadow: 0 6px 12px var(--shadow-secondary);
    transform: translateY(-2px);
}

[data-theme="dark"] .post-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .post-title a {
    color: #ffffff !important;
}

[data-theme="dark"] .post-title a:hover {
    color: var(--accent-primary) !important;
}

[data-theme="dark"] .post-meta {
    color: var(--text-tertiary);
}

[data-theme="dark"] .post-excerpt {
    color: var(--text-secondary);
}

[data-theme="dark"] .profile-section {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .profile-section h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .profile-section p {
    color: var(--text-secondary);
}

[data-theme="dark"] .category-page {
    background: var(--bg-primary);
}

[data-theme="dark"] .category-title {
    color: var(--text-primary);
}

[data-theme="dark"] .category-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .post-content {
    background: var(--bg-secondary);
}

[data-theme="dark"] .post-content h1,
[data-theme="dark"] .post-content h2,
[data-theme="dark"] .post-content h3,
[data-theme="dark"] .post-content h4,
[data-theme="dark"] .post-content h5,
[data-theme="dark"] .post-content h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .post-content p,
[data-theme="dark"] .post-content li {
    color: var(--text-secondary);
}

[data-theme="dark"] .post-content code {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .post-content pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .post-content blockquote {
    border-left: 4px solid var(--accent-primary);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

[data-theme="dark"] .post-content table {
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .post-content th,
[data-theme="dark"] .post-content td {
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

[data-theme="dark"] .post-content th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .edit-post-btn {
    background: var(--accent-primary);
    color: white;
    border: 1px solid var(--accent-primary);
}

[data-theme="dark"] .edit-post-btn:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

/* Dark mode main page specific styles */
[data-theme="dark"] .hero-title {
    color: var(--text-primary) !important;
    font-weight: 700;
}

[data-theme="dark"] .hero-title .highlight {
    color: var(--accent-primary) !important;
    font-weight: 700;
}

[data-theme="dark"] .hero-description {
    color: var(--text-secondary) !important;
    font-weight: 400;
}

[data-theme="dark"] .hero-description strong {
    color: var(--text-primary) !important;
    font-weight: 600;
}

[data-theme="dark"] .stat-item {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .stat-number {
    color: var(--accent-primary) !important;
    font-weight: 700;
}

[data-theme="dark"] .stat-label {
    color: var(--text-secondary) !important;
    font-weight: 500;
}

[data-theme="dark"] .hero-section {
    background: var(--bg-primary);
}

[data-theme="dark"] .hero-content {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--shadow-primary);
}

/* Dark mode recent posts section */
[data-theme="dark"] h2 {
    color: var(--text-primary) !important;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .read-more {
    color: var(--accent-primary) !important;
    font-weight: 500;
}

[data-theme="dark"] .read-more:hover {
    color: var(--accent-secondary) !important;
}

/* Dark mode link styles */
[data-theme="dark"] a {
    color: var(--accent-primary);
}

[data-theme="dark"] a:hover {
    color: var(--accent-secondary);
}

/* Dark mode button styles */
[data-theme="dark"] .btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Dark mode form elements */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Dark mode scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
