/* Fonts */
body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.serif {
    font-family: 'Literata', Georgia, serif;
}

/* Color System */
:root {
    /* Light theme colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #EFEEE7;
    --text-primary: #000000;
    --text-secondary: rgb(94, 93, 89);
}

.dark {
    /* Dark theme colors */
    --bg-primary: #212121;
    --bg-secondary: #212121;
    --text-primary: #FFFFFF;
    --text-secondary: rgb(240, 238, 230);
}

/* Base styles */
body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Transitions */
.theme-transition {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

/* Links - only change on hover */
a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--text-primary);
}

/* Header */
header {
    opacity: 0.95;
    backdrop-filter: blur(10px);
}

/* Borders */
.border-custom {
    border-color: var(--text-secondary);
}

/* Table of Contents */
.toc-link {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.toc-link:hover {
    color: var(--text-primary);
}

.toc-link.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* Sidebar sticky positioning */
.sidebar-sticky {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

/* Prose styles for article content */
.prose {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.2em;
    line-height: 1.8;
    color: var(--text-primary);
}

.prose p {
    margin-bottom: 1.75rem;
}

.prose h2 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    scroll-margin-top: 6rem;
    color: var(--text-primary);
}

.prose ul,
.prose ol {
    margin-bottom: 1.75rem;
}

.prose li {
    margin-bottom: 0.75rem;
}

.prose blockquote {
    border-left: 4px solid var(--text-secondary);
    padding-left: 1.5rem;
    margin: 2.5rem 0;
    font-style: italic;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.prose img {
    margin: 2.5rem 0 0.5em 0;
    border-radius: 0.5rem;
    width: 100%;
}

.prose figcaption {
    text-align: center;
    font-size: 0.9rem;
    font-family: 'IBM Plex Sans', sans-serif;
    color: var(--text-secondary);
}

.prose table {
    width: 100%;
    margin: 2.5rem 0;
    border-collapse: collapse;
    font-size: 1rem;
    font-family: 'IBM Plex Sans', sans-serif;
}

.prose th {
    background-color: var(--text-secondary);
    color: var(--bg-primary);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--text-secondary);
}

.prose td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--text-secondary);
}

/* Button hover */
.btn-hover {
    transition: background-color 0.2s ease;
}

.btn-hover:hover {
    background-color: rgba(94, 93, 89, 0.1);
}

.dark .btn-hover:hover {
    background-color: rgba(240, 238, 230, 0.1);
}

/* Scroll margin for anchors */
.scroll-mt-24 {
    scroll-margin-top: 6rem;
}

/* Date text */
.text-date {
    color: var(--text-secondary);
    opacity: 0.8;
}