/* Blog Post Content Styling */
/* This CSS defines the consistent styling for all blog post content */

.blog-post-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1f2937;
    max-width: 100%;
}

body.dark-mode .blog-post-content {
    color: #e5e7eb;
}

/* Headings */
.blog-post-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    margin: 2.5rem 0 1.5rem 0;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

body.dark-mode .blog-post-content h1 {
    color: #f9fafb;
}

.blog-post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 2.5rem 0 1.25rem 0;
    line-height: 1.3;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #e5e7eb;
}

body.dark-mode .blog-post-content h2 {
    color: #f3f4f6;
    border-bottom-color: #374151;
}

.blog-post-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin: 2rem 0 1rem 0;
    line-height: 1.4;
}

body.dark-mode .blog-post-content h3 {
    color: #e5e7eb;
}

.blog-post-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4b5563;
    margin: 1.75rem 0 0.875rem 0;
    line-height: 1.5;
}

body.dark-mode .blog-post-content h4 {
    color: #d1d5db;
}

.blog-post-content h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #6b7280;
    margin: 1.5rem 0 0.75rem 0;
}

body.dark-mode .blog-post-content h5 {
    color: #9ca3af;
}

.blog-post-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    margin: 1.5rem 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.dark-mode .blog-post-content h6 {
    color: #9ca3af;
}

/* Paragraphs */
.blog-post-content p {
    margin-bottom: 1.75rem;
    color: #374151;
}

body.dark-mode .blog-post-content p {
    color: #d1d5db;
}

/* Strong and Emphasis */
.blog-post-content strong {
    font-weight: 700;
    color: #111827;
}

body.dark-mode .blog-post-content strong {
    color: #f9fafb;
}

.blog-post-content em {
    font-style: italic;
    color: #4b5563;
}

body.dark-mode .blog-post-content em {
    color: #9ca3af;
}

/* Links */
.blog-post-content a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.blog-post-content a:hover {
    color: #1d4ed8;
    text-decoration-color: #1d4ed8;
}

body.dark-mode .blog-post-content a {
    color: #60a5fa;
    text-decoration-color: rgba(96, 165, 250, 0.3);
}

body.dark-mode .blog-post-content a:hover {
    color: #3b82f6;
    text-decoration-color: #3b82f6;
}

/* Lists */
.blog-post-content ul,
.blog-post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-post-content ul {
    list-style-type: disc;
}

.blog-post-content ol {
    list-style-type: decimal;
}

.blog-post-content li {
    margin-bottom: 0.75rem;
    color: #374151;
    line-height: 1.8;
}

body.dark-mode .blog-post-content li {
    color: #d1d5db;
}

.blog-post-content li > ul,
.blog-post-content li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.blog-post-content ul ul {
    list-style-type: circle;
}

.blog-post-content ul ul ul {
    list-style-type: square;
}

/* Blockquotes */
.blog-post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: #f9fafb;
    border-left: 4px solid #2563eb;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4b5563;
}

body.dark-mode .blog-post-content blockquote {
    background: #1f2937;
    border-left-color: #60a5fa;
    color: #9ca3af;
}

.blog-post-content blockquote p:last-child {
    margin-bottom: 0;
}

.blog-post-content blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-style: normal;
    color: #6b7280;
}

body.dark-mode .blog-post-content blockquote cite {
    color: #6b7280;
}

/* Code - Inline */
.blog-post-content code {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.875em;
    background: #f3f4f6;
    color: #dc2626;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

body.dark-mode .blog-post-content code {
    background: #374151;
    color: #fca5a5;
    border-color: #4b5563;
}

/* Code - Block */
.blog-post-content pre {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #1f2937;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .blog-post-content pre {
    background: #111827;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.blog-post-content pre code {
    background: none;
    color: #e5e7eb;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Syntax Highlighting - Light Theme */
.blog-post-content pre .hljs-comment,
.blog-post-content pre .hljs-quote {
    color: #6b7280;
    font-style: italic;
}

.blog-post-content pre .hljs-keyword,
.blog-post-content pre .hljs-selector-tag,
.blog-post-content pre .hljs-subst {
    color: #c084fc;
}

.blog-post-content pre .hljs-number,
.blog-post-content pre .hljs-literal,
.blog-post-content pre .hljs-variable {
    color: #fbbf24;
}

.blog-post-content pre .hljs-string,
.blog-post-content pre .hljs-doctag {
    color: #34d399;
}

.blog-post-content pre .hljs-title,
.blog-post-content pre .hljs-section,
.blog-post-content pre .hljs-selector-id {
    color: #60a5fa;
}

.blog-post-content pre .hljs-type,
.blog-post-content pre .hljs-class .hljs-title {
    color: #fbbf24;
}

.blog-post-content pre .hljs-tag,
.blog-post-content pre .hljs-name,
.blog-post-content pre .hljs-attribute {
    color: #f87171;
}

.blog-post-content pre .hljs-regexp,
.blog-post-content pre .hljs-link {
    color: #34d399;
}

.blog-post-content pre .hljs-symbol,
.blog-post-content pre .hljs-bullet {
    color: #c084fc;
}

.blog-post-content pre .hljs-built_in,
.blog-post-content pre .hljs-builtin-name {
    color: #60a5fa;
}

/* Horizontal Rule */
.blog-post-content hr {
    margin: 3rem 0;
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
}

body.dark-mode .blog-post-content hr {
    background: linear-gradient(to right, transparent, #374151, transparent);
}

/* Images */
.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .blog-post-content img {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Tables */
.blog-post-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.blog-post-content thead {
    background: #f3f4f6;
}

body.dark-mode .blog-post-content thead {
    background: #374151;
}

.blog-post-content th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
}

body.dark-mode .blog-post-content th {
    color: #f9fafb;
    border-bottom-color: #4b5563;
}

.blog-post-content td {
    padding: 1rem;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

body.dark-mode .blog-post-content td {
    color: #d1d5db;
    border-bottom-color: #374151;
}

.blog-post-content tbody tr:hover {
    background: #f9fafb;
}

body.dark-mode .blog-post-content tbody tr:hover {
    background: #1f2937;
}

/* Special Elements */
.blog-post-content kbd {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.875em;
    background: #f3f4f6;
    color: #1f2937;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 0 #d1d5db;
}

body.dark-mode .blog-post-content kbd {
    background: #374151;
    color: #e5e7eb;
    border-color: #4b5563;
    box-shadow: 0 2px 0 #4b5563;
}

.blog-post-content mark {
    background: #fef08a;
    color: #1f2937;
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

body.dark-mode .blog-post-content mark {
    background: #854d0e;
    color: #fef3c7;
}

.blog-post-content del {
    text-decoration: line-through;
    color: #9ca3af;
}

.blog-post-content ins {
    text-decoration: underline;
    color: #059669;
}

body.dark-mode .blog-post-content ins {
    color: #34d399;
}

/* First paragraph special styling */
.blog-post-content > p:first-of-type {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #1f2937;
}

body.dark-mode .blog-post-content > p:first-of-type {
    color: #e5e7eb;
}

/* Footnotes */
.blog-post-content .footnotes {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
    font-size: 0.875rem;
}

body.dark-mode .blog-post-content .footnotes {
    border-top-color: #374151;
}

/* Scrollbar for code blocks */
.blog-post-content pre::-webkit-scrollbar {
    height: 8px;
}

.blog-post-content pre::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 4px;
}

.blog-post-content pre::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 4px;
}

.blog-post-content pre::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-post-content {
        font-size: 1rem;
    }

    .blog-post-content h1 {
        font-size: 2rem;
    }

    .blog-post-content h2 {
        font-size: 1.5rem;
    }

    .blog-post-content h3 {
        font-size: 1.25rem;
    }

    .blog-post-content h4 {
        font-size: 1.125rem;
    }

    .blog-post-content > p:first-of-type {
        font-size: 1.125rem;
    }

    .blog-post-content ul,
    .blog-post-content ol {
        padding-left: 1.5rem;
    }

    .blog-post-content pre {
        padding: 1rem;
        margin: 1.5rem -1rem;
        border-radius: 0;
    }

    .blog-post-content blockquote {
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
    }

    .blog-post-content table {
        font-size: 0.875rem;
    }

    .blog-post-content th,
    .blog-post-content td {
        padding: 0.75rem 0.5rem;
    }
}
