/* Shared styles for the blog index and individual posts */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Times New Roman', Times, serif;
    font-size: 15px;
    line-height: 1.7;
    background: #fff;
    color: #000;
    padding: 40px 60px;
    max-width: 960px;
    margin: 0 auto;
}

a { color: #1772d0; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── top nav ── */
.nav-bar {
    text-align: right;
    font-size: 13px;
    margin-bottom: 14px;
    font-family: Arial, Helvetica, sans-serif;
}
.nav-bar a { color: #0000EE; text-decoration: underline; }
.nav-bar a:hover { color: #551A8B; }

hr.rule {
    border: none;
    border-top: 1px solid #000;
    margin: 0 0 30px 0;
}

.page-title {
    text-align: center;
    font-size: 32px;
    font-weight: normal;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-family: 'Times New Roman', Times, serif;
}

.page-subtitle {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-bottom: 30px;
    font-family: Arial, Helvetica, sans-serif;
}

/* ── blog index list ── */
.post-list { list-style: none; padding: 0; }

.post-list li {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid #eee;
}
.post-list li:last-child { border-bottom: none; }

.post-list .post-link {
    font-size: 19px;
    font-weight: bold;
}

.post-list .post-date {
    font-size: 13px;
    color: #777;
    font-family: Arial, Helvetica, sans-serif;
    margin: 2px 0 6px 0;
}

.post-list .post-excerpt {
    font-size: 14px;
    color: #333;
}

/* ── individual post ── */
.post h1 {
    font-size: 28px;
    font-weight: normal;
    margin-bottom: 4px;
    line-height: 1.3;
}

.post-meta {
    font-size: 13px;
    color: #777;
    font-family: Arial, Helvetica, sans-serif;
    margin-bottom: 22px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.post p { margin-bottom: 14px; }

.post h2 {
    font-size: 20px;
    font-weight: bold;
    margin: 22px 0 8px 0;
}

.post h3 {
    font-size: 17px;
    font-weight: bold;
    margin: 18px 0 8px 0;
}

/* ── code blocks ── */
pre[class*="language-"] {
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin: 14px 0;
}
code { font-family: 'Consolas', 'Menlo', monospace; }
p > code, li > code {
    background: #f3f3f3;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 13px;
}

/* ── display math scroll on mobile ── */
mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; }

/* ── embedded interactive pages (:::embed … :::) ── */
.embed { margin: 20px 0; }

.embed-frame {
    display: block;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.embed figcaption {
    font-size: 13px;
    color: #555;
    margin-top: 6px;
    font-family: Arial, Helvetica, sans-serif;
}
.embed figcaption p { margin-bottom: 4px; }
.embed-open { font-size: 12px; }

/* ── theorem-style blocks (:::definition … :::) ── */
.callout {
    margin: 16px 0;
    padding: 10px 14px;
    border-left: 3px solid #999;
    background: #fafafa;
}
.callout p { margin-bottom: 8px; }
.callout > *:last-child { margin-bottom: 0; }

.callout-label { font-weight: bold; }
.callout-name  { font-weight: normal; font-style: italic; }

/* light blue — definitions */
.callout-definition  { border-left-color: #4a90d9; background: #e8f2fc; }
.callout-definition .callout-label { color: #1a5c9c; }

/* light yellow — theorem family (statements set in italics, as in a paper) */
.callout-theorem,
.callout-lemma,
.callout-proposition,
.callout-corollary,
.callout-claim       { border-left-color: #e0b23c; background: #fdf6dd; }
.callout-theorem .callout-label,
.callout-lemma .callout-label,
.callout-proposition .callout-label,
.callout-corollary .callout-label,
.callout-claim .callout-label { color: #8a6412; }
.callout-theorem p,
.callout-lemma p,
.callout-proposition p,
.callout-corollary p,
.callout-claim p     { font-style: italic; }

/* light green — examples */
.callout-example,
.callout-exercise    { border-left-color: #5aa46a; background: #ebf7ed; }
.callout-example .callout-label,
.callout-exercise .callout-label { color: #2f6b3c; }

/* light purple — asides */
.callout-remark,
.callout-note        { border-left-color: #9b8ac4; background: #f2effa; }
.callout-remark .callout-label,
.callout-note .callout-label { color: #5c4b8a; }

/* a proof is set plain, closed with a tombstone */
.callout-proof {
    border-left: none;
    background: none;
    padding: 0;
    margin: 14px 0;
}
.callout-proof .callout-label { font-weight: normal; font-style: italic; }
.callout-qed { float: right; }
.callout::after { content: ""; display: block; clear: both; }

blockquote {
    border-left: 3px solid #ccc;
    padding-left: 14px;
    color: #444;
    margin: 14px 0;
    font-style: italic;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
}

/* ── footer ── */
.footer {
    font-size: 12px;
    color: #777;
    text-align: center;
    margin-top: 8px;
    font-family: Arial, Helvetica, sans-serif;
}

@media (max-width: 640px) {
    body { padding: 20px 18px; }
}
