/* General Body & Typography */
body {
    font-family: 'Merriweather', serif;
    background-color: #f8fafc; /* Tailwind slate-50 */
    color: #334155; /* Tailwind slate-700 */
}

.font-sans {
    font-family: 'Inter', sans-serif;
}

/* Main Content Area */
main {
    transition: margin-left 0.3s ease-in-out;
}

/* Custom Prose styles for readability and aesthetics */
.prose {
    --tw-prose-body: #334155; /* slate-700 */
    --tw-prose-headings: #0f172a; /* slate-900 */
    --tw-prose-lead: #475569; /* slate-600 */
    --tw-prose-links: #0f172a; /* slate-900 */
    --tw-prose-bold: #0f172a; /* slate-900 */
    --tw-prose-counters: #64748b; /* slate-500 */
    --tw-prose-bullets: #94a3b8; /* slate-400 */
    --tw-prose-hr: #e2e8f0; /* slate-200 */
    --tw-prose-quotes: #0f172a; /* slate-900 */
    --tw-prose-quote-borders: #cbd5e1; /* slate-300 */
    --tw-prose-captions: #64748b; /* slate-500 */
    --tw-prose-code: #0f172a; /* slate-900 */
    --tw-prose-pre-code: #e2e8f0; /* slate-200 */
    --tw-prose-pre-bg: #0f172a; /* slate-900 */
    --tw-prose-th-borders: #cbd5e1; /* slate-300 */
    --tw-prose-td-borders: #e2e8f0; /* slate-200 */
}

.prose p {
    line-height: 1.75;
}

.prose a {
    text-decoration: underline;
    text-decoration-color: #94a3b8; /* slate-400 */
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.2s ease-in-out;
}

.prose a:hover {
    color: #020617; /* slate-950 */
    text-decoration-color: #0f172a; /* slate-900 */
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    font-family: 'Inter', sans-serif;
    scroll-margin-top: 5rem;
}

.prose h2 {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0; /* slate-200 */
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.prose blockquote {
    border-left-width: 3px;
    border-left-color: #475569; /* slate-600 */
    color: #475569; /* slate-600 */
    background-color: #f8fafc; /* slate-50 */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.prose table {
    width: 100%;
    font-size: 0.9em;
}

.prose th {
    background-color: #f1f5f9; /* slate-100 */
    font-weight: 600;
    color: #0f172a; /* slate-900 */
}

.prose tr:nth-child(even) {
    background-color: transparent;
}


/* Sidebar & Table of Contents Refinement */
#sidebar {
    background-color: #f1f5f9; /* slate-100 */
    border-right-color: #e2e8f0; /* slate-200 */
    box-shadow: inset -1px 0 0 #e2e8f0;
}

#toc a {
    display: block;
    padding: 0.6rem 1rem 0.6rem 1.5rem;
    border-radius: 0.375rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569; /* slate-600 */
    transition: all 0.2s ease-in-out;
    position: relative;
    border-left: 3px solid transparent;
}

#toc a::before {
    content: none;
}

#toc a:hover {
    background-color: #e2e8f0; /* slate-200 */
    color: #1e293b; /* slate-800 */
}

#toc a.active {
    background-color: #e2e8f0; /* slate-200 */
    color: #0f172a; /* slate-900 */
    font-weight: 600;
    border-left-color: #0f172a; /* slate-900 */
}


/* Custom scrollbar for sidebar */
#sidebar::-webkit-scrollbar {
    width: 10px;
}
#sidebar::-webkit-scrollbar-track {
    background: transparent;
}
#sidebar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1; /* slate-300 */
    border-radius: 20px;
    border: 3px solid #f1f5f9; /* slate-100 */
}
#sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8; /* slate-400 */
}

/* Mobile Header Refinement */
.lg\\:hidden.fixed.top-0 {
    background-color: rgba(241, 245, 249, 0.85); /* slate-100 with opacity */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom-color: #e2e8f0; /* slate-200 */
}
