/* Custom Variables */
:root {
    --my-font-serif: 'JetBrains Mono', Consolas, Monaco, 'Courier New', monospace;;
}

/* Base Styles */
body {
    font-family: var(--my-font-serif);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--my-font-serif);
    font-weight: 600;
    line-height: 1.3;
}

.display-6 {
    font-weight: 700;
}

/* Code blocks and inline code */
code {
    background-color: var(--bs-gray-100);
    color: var(--bs-danger);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: var(--my-font-serif);
}

pre {
    background-color: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-300);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

/* Dark mode overrides */
[data-bs-theme="dark"] {
    --bs-body-bg: #0d1117;
    --bs-body-color: #f0f6fc;
    --bs-gray-100: #21262d;
    --bs-gray-300: #30363d;
    --bs-border-color: #21262d;
}

[data-bs-theme="dark"] code {
    background-color: #21262d;
    color: #f85149;
}

[data-bs-theme="dark"] pre {
    background-color: #0d1117;
    border-color: #30363d;
}

[data-bs-theme="dark"] .card {
    --bs-card-bg: #161b22;
    --bs-card-border-color: #21262d;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: #f0f6fc;
    --bs-btn-border-color: #30363d;
    --bs-btn-hover-color: #f0f6fc;
    --bs-btn-hover-bg: #21262d;
    --bs-btn-hover-border-color: #30363d;
}

[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-hover-color: #f0f6fc;
}

[data-bs-theme="dark"] .badge.bg-light {
    --bs-badge-color: #0d1117;
    background-color: #f0f6fc !important;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Cards */
.card {
    transition: box-shadow 0.15s ease-in-out;
    border: 1px solid var(--bs-border-color);
}

.card:hover {
    box-shadow: 0 0.125rem 0.75rem rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="dark"] .card:hover {
    box-shadow: 0 0.125rem 0.75rem rgba(255, 255, 255, 0.05) !important;
}

/* Content styles */
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content h1:first-child,
.content h2:first-child,
.content h3:first-child,
.content h4:first-child,
.content h5:first-child,
.content h6:first-child {
    margin-top: 0;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.content blockquote {
    border-left: 0.25rem solid var(--bs-primary);
    margin: 1rem 0;
    padding-left: 1rem;
    color: var(--bs-secondary-color);
}

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

/* Pagination */
.page-link {
    font-family: var(--my-font-serif);
}

/* Theme toggle button */
#theme-toggle {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        font-size: 0.85rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .display-6 {
        font-size: 1.75rem;
    }
}

/* Utility classes */
.text-monospace {
    font-family: var(--my-font-serif) !important;
}

/* Article navigation buttons responsive */
@media (max-width: 768px) {
    .col-md-6 .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Smooth transitions */
* {
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
