/* Research Blog Stylesheet - Clean & Direct */
:root {
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-muted: #666666;
    --bg-primary: #ffffff;
    --bg-code: #f5f5f5;
    --border-color: #dddddd;
    --max-width: 720px;
    --font-mono: 'Courier New', Courier, monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.8;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 18px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
    line-height: 1.4;
    margin-top: 2em;
    margin-bottom: 0.75em;
    color: var(--text-primary);
}

h1 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2em;
}

h3 {
    font-size: 1.25rem;
    margin-top: 1.5em;
}

p {
    margin-bottom: 1.25em;
}

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

a:hover {
    text-decoration: none;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    padding: 2rem 0 4rem;
}

/* Header & Navigation */
header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-title {
    font-size: 1.25rem;
    font-weight: normal;
    margin: 0;
}

.site-title a {
    color: var(--text-primary);
    text-decoration: none;
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

/* Article */
article {
    line-height: 1.8;
    color: var(--text-primary);
}

article h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

article h2 {
    font-size: 1.35rem;
    margin-top: 2.5em;
    margin-bottom: 0.75em;
}

article h3 {
    font-size: 1.15rem;
    margin-top: 2em;
}

/* Lists */
ul,
ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25em;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background-color: var(--bg-code);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

pre {
    background-color: #1a1a1a;
    color: #e5e5e5;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5em 0;
    line-height: 1.5;
    font-size: 0.9rem;
    border-radius: 4px;
}

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

/* Prism.js Overrides */
code[class*="language-"],
pre[class*="language-"] {
    font-family: var(--font-mono);
    text-shadow: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: bold;
}

/* Blockquotes */
blockquote {
    border-left: 3px solid var(--text-primary);
    margin: 1.5em 0;
    padding-left: 1.5em;
    font-style: italic;
    color: var(--text-secondary);
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Images */
.research-figure {
    margin: 2rem 0;
}

.image-container {
    margin: 1.5rem 0;
    text-align: center;
}

.research-image {
    max-width: 100%;
    height: auto;
}

.image-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

.image-caption strong {
    font-style: normal;
}

/* Post Meta */
.post-meta {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Intro */
.intro {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

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

.intro strong {
    color: var(--text-primary);
}

/* Blog List */
.blog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-list li {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.blog-list li:last-child {
    border-bottom: none;
}

.blog-list>li>a {
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.4rem;
}

.blog-list>li>a:hover {
    text-decoration: underline;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-to-top {
    color: var(--text-secondary);
    text-decoration: none;
}

.back-to-top:hover {
    text-decoration: underline;
}

/* Math */
.katex {
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        font-size: 17px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-list>li>a {
        font-size: 1.1rem;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print */
@media print {

    header,
    footer,
    nav {
        display: none;
    }
}