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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    transition: all 0.3s ease;
    scroll-behavior: smooth;
}

/* Navbar Styles */
.navbar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.mobile-link {
    display: block;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #fbbf24;
    transform: translateX(5px);
}

/* Article Styles */
.article-container {
    max-width: 4xl;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    margin-top: 6rem;
    margin-bottom: 2rem;
}

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

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1f2937;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.article-meta::before {
    content: '📝';
    font-size: 1.2rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin: 2.5rem 0 1rem 0;
    position: relative;
    padding-left: 1rem;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #374151;
    margin: 2rem 0 1rem 0;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

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

.article-content li {
    margin-bottom: 0.5rem;
    position: relative;
}

.article-content ul li::marker {
    color: #3b82f6;
}

.article-content strong {
    color: #1f2937;
    font-weight: 600;
}

.article-content code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
    color: #dc2626;
}

/* Back to Blog Button */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.back-to-blog:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.back-to-blog::before {
    content: '←';
    font-size: 1.2rem;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #1f2937, #111827);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 6xl;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.copyright {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Light Mode Styles (Default) */
body:not(.dark) {
    background-color: #fffbeb;
    color: #1f2937;
}

:not(.dark) #blog {
    background-color: transparent;
}

:not(.dark) .bg-yellow-50 {
    background-color: #fffbeb;
}

:not(.dark) .bg-gray-100 {
    background-color: #f3f4f6;
}

:not(.dark) .bg-white {
    background-color: #ffffff;
}

/* Blog cards light mode */
:not(.dark) .blog-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

:not(.dark) .blog-card:hover {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* Text colors light mode */
:not(.dark) .text-gray-900 {
    color: #111827;
}

:not(.dark) .text-gray-800 {
    color: #1f2937;
}

:not(.dark) .text-gray-700 {
    color: #374151;
}

:not(.dark) .text-gray-600 {
    color: #4b5563;
}

:not(.dark) .text-gray-500 {
    color: #6b7280;
}

/* Search bar light mode */
:not(.dark) #blog-search {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #1f2937;
}

:not(.dark) #blog-search::placeholder {
    color: #6b7280;
}

:not(.dark) #blog-search:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Filter buttons light mode */
:not(.dark) .filter-btn {
    background-color: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

:not(.dark) .filter-btn:hover {
    background-color: #f9fafb;
}

:not(.dark) .filter-btn.active {
    background-color: #3b82f6;
    color: white;
}

/* Navbar light mode */
:not(.dark) .navbar {
    background: linear-gradient(90deg, #fffbeb, #fef3c7);
    border-bottom-color: #e5e7eb;
}

:not(.dark) .nav-link {
    color: #374151;
}

:not(.dark) .mobile-link {
    color: #374151;
}

/* Footer light mode */
:not(.dark) .footer {
    background: linear-gradient(135deg, #1f2937, #111827);
    color: white;
}

:not(.dark) footer {
    background: linear-gradient(135deg, #1f2937, #111827);
    color: white;
}

/* Borders light mode */
:not(.dark) hr {
    border-color: #e5e7eb;
}

:not(.dark) .border {
    border-color: #e5e7eb;
}

:not(.dark) .border-gray-300 {
    border-color: #d1d5db;
}

/* Shadows light mode */
:not(.dark) .shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

:not(.dark) .shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Styles */
.dark {
    background-color: #0f172a;
    color: #e2e8f0;
}

/* Dark mode body and main sections */
.dark body {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

.dark #blog {
    background-color: #0f172a !important;
}

.dark .bg-gray-100 {
    background-color: #1e293b !important;
}

.dark .bg-yellow-50 {
    background-color: #0f172a !important;
}

/* Dark mode blog cards */
.dark .blog-card {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

.dark .blog-card:hover {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.4) !important;
}

/* Dark mode text colors */
.dark .text-gray-900 {
    color: #f1f5f9 !important;
}

.dark .text-gray-800 {
    color: #e2e8f0 !important;
}

.dark .text-gray-700 {
    color: #cbd5e1 !important;
}

.dark .text-gray-600 {
    color: #94a3b8 !important;
}

.dark .text-gray-500 {
    color: #64748b !important;
}

/* Dark mode headings */
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
    color: #f1f5f9 !important;
}

.dark .blog-title {
    color: #f1f5f9 !important;
}

/* Dark mode search bar */
.dark #blog-search {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.dark #blog-search::placeholder {
    color: #94a3b8 !important;
}

.dark #blog-search:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Dark mode filter buttons */
.dark .filter-btn {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
}

.dark .filter-btn:hover {
    background-color: #334155 !important;
}

.dark .filter-btn.active {
    background-color: #3b82f6 !important;
    color: white !important;
}

/* Dark mode navbar */
.dark .navbar {
    background: linear-gradient(90deg, #1e293b, #0f172a) !important;
    border-bottom-color: #334155 !important;
}

.dark .nav-link {
    color: #e2e8f0 !important;
}

.dark .mobile-link {
    color: #e2e8f0 !important;
}

/* Dark mode buttons */
.dark .bg-blue-600 {
    background-color: #2563eb !important;
}

.dark .bg-blue-600:hover {
    background-color: #1d4ed8 !important;
}

/* Dark mode borders and dividers */
.dark hr {
    border-color: #334155 !important;
}

.dark .border {
    border-color: #334155 !important;
}

.dark .border-gray-300 {
    border-color: #334155 !important;
}

/* Dark mode footer */
.dark .footer {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
    color: #e2e8f0 !important;
}

.dark footer {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
    color: #e2e8f0 !important;
}

.dark .footer.bg-yellow-50 {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
}

.dark footer.bg-yellow-50 {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
}

.dark .copyright {
    color: #94a3b8 !important;
}

/* Dark mode shadows */
.dark .shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3) !important;
}

.dark .shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4) !important;
}

/* Dark mode for blog page body */
.dark body.bg-yellow-50 {
    background-color: #0f172a !important;
}

.dark section {
    background-color: #0f172a !important;
}

.dark .blog-grid {
    background-color: transparent !important;
}

/* Dark mode for all white backgrounds */
.dark .bg-white {
    background-color: #1e293b !important;
}

/* Override any remaining light backgrounds */
.dark * {
    scrollbar-color: #475569 #1e293b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .article-container {
        margin: 5rem 1rem 1rem 1rem;
        padding: 1.5rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

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

.article-container {
    animation: fadeInUp 0.6s ease-out;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}