/* --- Imports --- */
@import url('https://cdn.jsdelivr.net/npm/mathjax@3/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff');

/* --- Variables --- */
:root {
    --paper-bg: #FDFCF5; 
    --ink-black: #2A2A2A;
    --volume-purple: #6A4A7F;
    --code-bg: #F4F1EA;
    --border-color: #e0ddd5;
}

/* --- Base --- */
body {
    background-color: var(--paper-bg);
    color: var(--ink-black);
    font-family: "Latin Modern Roman", "Computer Modern", "Georgia", serif;
    font-size: 19px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* --- Header (The "Spine") --- */
header {
    max-width: 800px;
    margin: 3rem auto 4rem auto;
    padding: 0 1rem;
}

.site-title {
    font-size: 3.5rem;
    font-weight: bold;
    line-height: 1;
    border-top: 6px solid var(--volume-purple);
    padding-top: 1rem;
    text-transform: uppercase;
}

.site-title a {
    color: inherit;
    text-decoration: none;
    border: none;
}

.site-subtitle {
    font-family: "Inconsolata", monospace;
    font-size: 1rem;
    color: var(--volume-purple);
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--volume-purple);
    padding-bottom: 1rem;
}

/* --- Content --- */
main {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 1rem 4rem 1rem;
}

h1, h2, h3 {
    color: var(--volume-purple);
    margin-top: 2.5em;
    font-weight: bold;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3rem;
}

/* --- Code Blocks --- */
pre {
    background-color: var(--code-bg);
    border-left: 4px solid var(--volume-purple);
    padding: 1.5rem;
    overflow-x: auto;
    font-size: 0.9em;
    margin: 2rem 0;
}

code {
    font-family: "Inconsolata", monospace;
    color: #333;
    background-color: var(--code-bg);
    padding: 2px 4px;
}

/* --- Links & Meta --- */
a {
    color: var(--volume-purple);
    text-decoration: none;
    border-bottom: 1px dotted var(--volume-purple);
}

a:hover {
    background-color: var(--volume-purple);
    color: #fff;
    border-bottom: none;
}

.meta {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.section-marker {
    color: var(--volume-purple);
    font-weight: bold;
    margin-right: 0.2rem;
}

footer {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 3rem;
    font-family: "Inconsolata", monospace;
}

/* --- Table of Contents (Home Layout) --- */
.toc-container {
    margin-top: 3rem;
}

.toc-header {
    text-align: center;
    font-weight: bold;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.toc-entry {
    display: flex;
    align-items: baseline; /* Aligns text with the dots */
    margin-bottom: 0.8rem;
    font-family: "Latin Modern Roman", serif;
}

.toc-section {
    font-weight: bold;
    margin-right: 0.5rem;
    color: var(--volume-purple);
    min-width: 2rem; /* Aligns the titles */
}

.toc-title {
    color: var(--ink-black);
    font-weight: bold;
}

/* The magic "Leader Dots" */
.toc-dots {
    flex: 1; /* Takes up all available space */
    border-bottom: 1px dotted #999;
    margin: 0 0.5rem;
    position: relative;
    top: -4px; /* Adjusts vertical alignment of dots */
}

.toc-page {
    font-family: "Inconsolata", monospace;
    color: var(--volume-purple);
}

/* Hover effect for the whole row */
.toc-entry:hover .toc-title {
    color: var(--volume-purple);
}

/* --- Navigation Menu --- */
.site-nav {
    text-align: center;
    margin-top: -1.5rem; /* Pull it up closer to the subtitle line */
    margin-bottom: 3rem;
    font-family: "Inconsolata", monospace;
    font-size: 0.9rem;
    color: #666;
}

.site-nav a {
    color: #555;
    text-decoration: none;
    border-bottom: none; /* No underline for menu items */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0.5rem;
}

.site-nav a:hover {
    color: var(--volume-purple);
    background-color: transparent; /* Disable the block highlight for nav */
}

.divider {
    color: #ccc;
    font-size: 0.8em;
    vertical-align: text-bottom;
}
