/* Academic article theme — restrained, paper-like, methodology-first. */

:root {
    --paper: #fbfbf9;
    --text: #1a1a1a;
    --text-muted: #555;
    --rule: #d8d8d0;
    --rule-strong: #333;
    --link: #0b5394;
    --code-bg: #f2f2ee;
    --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Times New Roman', serif;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --mono: 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--serif);
    background: var(--paper);
    color: var(--text);
    line-height: 1.65;
    font-size: 18px;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 5rem;
}

.breadcrumb {
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 1rem 0 2rem;
}

.breadcrumb a { color: var(--link); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.article-header {
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 2.5rem;
}

.article-header h1 {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 1rem;
}

.article-header .deck {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.55;
}

.article-meta {
    font-family: var(--sans);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1.25rem;
}

article h2 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2.75rem 0 1rem;
    color: var(--text);
}

article h3 {
    font-family: var(--serif);
    font-size: 1.12rem;
    font-weight: 700;
    font-style: italic;
    margin: 1.75rem 0 0.6rem;
    color: var(--text);
}

article p {
    margin-bottom: 1.15rem;
    color: var(--text);
}

article ul, article ol {
    margin: 0 0 1.25rem 1.6rem;
    color: var(--text);
}

article li { margin-bottom: 0.45rem; }

article strong { font-weight: 700; }

article a { color: var(--link); text-decoration: none; }
article a:hover { text-decoration: underline; }

.highlight { font-weight: 700; }

/* Booktabs-style tables: horizontal rules only. */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0 2rem;
    font-family: var(--sans);
    font-size: 0.86rem;
    line-height: 1.4;
}

table thead th {
    border-top: 2px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
}

table tbody tr:last-child td { border-bottom: 2px solid var(--rule-strong); }

th, td {
    padding: 0.5rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}

th {
    font-weight: 700;
    color: var(--text);
}

caption {
    caption-side: bottom;
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: left;
    padding-top: 0.6rem;
}

pre {
    background: var(--code-bg);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 1rem 1.15rem;
    overflow-x: auto;
    margin: 0 0 1.75rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text);
}

code {
    font-family: var(--mono);
    font-size: 0.82em;
    background: var(--code-bg);
    border-radius: 3px;
    padding: 0.08rem 0.3rem;
    color: #444;
}

pre code { background: none; padding: 0; color: inherit; }

blockquote {
    border-left: 3px solid var(--rule);
    padding-left: 1.15rem;
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-style: italic;
}

sub, sup { line-height: 0; }

.article-footer {
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
    margin-top: 3.5rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.article-footer a { color: var(--link); text-decoration: none; }
.article-footer a:hover { text-decoration: underline; }

.article-footer .references { margin-top: 1.25rem; }
.article-footer .references strong { color: var(--text); }
.article-footer ul { margin: 0.5rem 0 0 1.4rem; }
.article-footer li { margin-bottom: 0.3rem; }

@media (max-width: 600px) {
    body { font-size: 17px; }
    .article-header h1 { font-size: 1.55rem; }
    .container { padding: 1rem 1.1rem 3.5rem; }
}
