/* Blog Post Specific Styles */
.toc {
    background: #f5f7fa;
    border-left: 4px solid #007bff;
    padding: 1em 1.5em;
    margin: 1.5em 0 2em 0;
    border-radius: 6px;
}
.toc ul {
    margin: 0;
    padding-left: 1.2em;
}

/* Illustration Placeholders (for posts waiting on custom graphics) */
.illustration-placeholder {
    background: var(--color-highlight);
    border: 1px dashed var(--color-border);
    padding: 32px;
    text-align: center;
    border-radius: 8px;
}

.illustration-placeholder p {
    margin: 0.35em 0;
}

.illustration-note {
    font-size: var(--text-sm);
    color: #666;
    line-height: 1.5;
}
.callout {
    background: #eaf6ff;
    border-left: 4px solid #2196f3;
    padding: 0.8em 1.2em;
    margin: 1.5em 0;
    border-radius: 6px;
    font-size: var(--text-base);
}
.note {
    background: #fffbe6;
    border-left: 4px solid #ffd700;
    padding: 0.8em 1.2em;
    margin: 1.5em 0;
    border-radius: 6px;
    font-size: var(--text-base);
}
.section-divider {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 2.5em 0 2em 0;
}
.pipeline-diagram {
    display: flex;
    justify-content: center;
    margin: 2em 0 1em 0;
}
.pipeline-diagram svg {
    max-width: 100%;
    height: auto;
}
.pipeline-label {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 1em;
    font-weight: bold;
    fill: #333;
}
.pipeline-step {
    fill: #f5f5f5;
    stroke: #007bff;
    stroke-width: 2;
}
.pipeline-io {
    fill: #e3f2fd;
    stroke: #1976d2;
    stroke-width: 2;
}
.pipeline-arrow {
    stroke: #1976d2;
    stroke-width: 2.5;
    marker-end: url(#arrowhead);
}
.pipeline-feedback {
    stroke: #ff9800;
    stroke-width: 2;
    stroke-dasharray: 6 4;
    marker-end: url(#arrowhead);
}
.pipeline-caption {
    text-align: center;
    color: #666;
    font-size: var(--text-base);
    margin-top: 0.5em;
    margin-bottom: 1.5em;
}
.feature-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.1em 0;
    background: #f9fbfd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    font-size: 0.9em;
    line-height: 1.35;
}
.feature-table th, .feature-table td {
    padding: 0.6em 0.75em;
    border-bottom: 1px solid #e0e6ed;
    text-align: left;
}

.feature-table th:first-child,
.feature-table td:first-child {
    width: 1%;
    white-space: nowrap;
}
.feature-table th {
    background: #e3f2fd;
    font-weight: 600;
    color: #1976d2;
}
.feature-table tr:last-child td {
    border-bottom: none;
}
.feature-table ul {
    margin: 0.3em 0 0 1.2em;
    padding: 0;
}
.feature-table td {
    vertical-align: top;
}
.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    margin: 1.5em 0;
}
.feature-card {
    flex: 1 1 260px;
    background: #f5f7fa;
    border-left: 4px solid #007bff;
    border-radius: 6px;
    padding: 1em 1.2em;
    margin-bottom: 1em;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}
.feature-card h4 {
    margin-top: 0;
    margin-bottom: 0.5em;
    color: #1976d2;
    font-size: var(--text-lg);
}
.feature-card p,
.feature-card ul,
.feature-card b {
    margin-bottom: 0.4em;
}
.feature-card ul {
    margin-top: 0;
    margin-bottom: 0.5em;
    padding-left: 1.2em;
}
.feature-table-methods {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5em 0;
    background: #f9fbfd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    font-size: 1em;
}
.feature-table-methods th, .feature-table-methods td {
    padding: 1em 1.2em;
    border-bottom: 1px solid #e0e6ed;
    text-align: left;
    vertical-align: top;
}
.feature-table-methods th {
    background: #e3f2fd;
    font-weight: 600;
    color: #1976d2;
    text-align: center;
}
.feature-table-methods tr:last-child td {
    border-bottom: none;
}
.feature-table-methods ul {
    margin: 0.3em 0 0 1.2em;
    padding: 0;
}
.feature-table-methods .method-title {
    font-size: var(--text-lg);
    color: #1976d2;
    font-weight: bold;
    margin-bottom: 0.2em;
    text-align: center;
}
.feature-table-methods .method-general {
    margin-bottom: 0.5em;
    font-size: var(--text-base);
}
/* utility classes for images previously using inline styles */
.img-flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 1.0em 0;
}
.img-60 {
    max-width: 60%;
    height: auto;
    display: block;
}
.img-30 {
    max-width: 30%;
    height: auto;
    display: block;
}
@media (max-width: 700px) {
    .pipeline-diagram svg { width: 100% !important; }
    .feature-list { flex-direction: column; }
}
@media (max-width: 900px) {
    .feature-table-methods, .feature-table-methods thead, .feature-table-methods tbody, .feature-table-methods tr, .feature-table-methods th, .feature-table-methods td {
        display: block;
        width: 100%;
    }
    .feature-table-methods th {
        text-align: left;
    }
}

/* Timeline Tables for History Posts */
.timeline-table {
    margin: 1.5em 0;
    overflow-x: auto;
}
.timeline-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}
.timeline-table th,
.timeline-table td {
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}
.timeline-table th {
    background: var(--neutral-lighter, #f5f7fa);
    font-weight: var(--font-semibold, 600);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.timeline-table td:first-child {
    width: 80px;
    font-variant-numeric: tabular-nums;
}
.timeline-table tr.math-contrib {
    border-left: 4px solid #4caf50;
}
.timeline-table tr.neuro-contrib {
    border-left: 4px solid #ff9800;
}
.timeline-table tr.ann-contrib {
    border-left: 4px solid #2196f3;
}
.timeline-table tbody tr:hover {
    background: var(--neutral-lightest, #fafafa);
}

/* Legend Box */
.legend-box {
    background: var(--neutral-lightest, #fafafa);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    font-size: var(--text-sm);
}
.legend-box p {
    margin: 0 0 0.5em 0;
}
.legend-box ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}
.legend-box li {
    margin: 0.3em 0;
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.legend-math { color: #4caf50; font-size: 1.2em; }
.legend-neuro { color: #ff9800; font-size: 1.2em; }
.legend-ann { color: #2196f3; font-size: 1.2em; }

/* Callout Variants */
.callout-info {
    background: #e3f2fd;
    border-left-color: #2196f3;
}
.callout-success {
    background: #e8f5e9;
    border-left-color: #4caf50;
}
.callout-warning {
    background: #fff3e0;
    border-left-color: #ff9800;
}

/* References List */
.post-references {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid var(--border-color, #e0e0e0);
}
.references-list {
    font-size: var(--text-sm);
    line-height: 1.7;
    padding-left: 1.5em;
}
.references-list li {
    margin-bottom: 0.75em;
}
.references-list em {
    font-style: italic;
}

/* Citation Box */
.post-citation {
    margin-top: 2em;
    padding: 1.5em;
    background: var(--neutral-lightest, #fafafa);
    border-radius: 6px;
}
.post-citation h3 {
    margin: 0 0 1em 0;
    font-size: var(--text-base);
}
.citation-toggle {
    background: var(--text-color, #333);
    color: white;
    border: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--text-sm);
    transition: background 0.2s;
}
.citation-toggle:hover {
    background: var(--text-muted, #555);
}
.citation-bibtex {
    margin-top: 1em;
    padding: 1em;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: var(--text-xs);
    overflow-x: auto;
    white-space: pre-wrap;
}

/* Related Posts Section */
.related-posts {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid var(--color-border, #e0e0e0);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.related-posts h2 {
    font-size: var(--text-sm);
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1em;
    color: #999;
}

.related-posts .blog-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.related-posts {
    margin-top: var(--section-gap);
    margin-bottom: var(--section-gap);
}

.related-posts .blog-list-item {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.5em 0;
    background: transparent;
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
}

.related-posts .blog-list-item:hover {
    transform: none;
    box-shadow: none;
}

.related-posts .blog-list-item:hover h3 {
    color: var(--color-primary);
}

.related-posts .blog-list-thumb {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
    opacity: 0.8;
}

.related-posts .blog-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: filter 0.2s;
}

.related-posts .blog-list-item:hover .blog-list-thumb img {
    filter: grayscale(0%);
}

.related-posts .blog-list-content {
    flex: 1;
    min-width: 0;
}

.related-posts .blog-list-content h3 {
    font-size: var(--text-sm);
    font-weight: 500;
    margin: 0;
    color: var(--color-secondary);
    transition: color 0.2s;
}

.related-posts .blog-list-content p {
    display: none;
}

.related-posts .blog-list-arrow {
    font-size: 0.9em;
    color: #ccc;
    transition: color 0.2s, transform 0.2s;
}

.related-posts .blog-list-item:hover .blog-list-arrow {
    color: var(--color-primary);
    transform: translateX(2px);
}