/* static/css/markdown.css */

/* 1. Article Typography Overrides */
/* Only affects H1s inside the article, not the sidebar/site title */
article h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5em;
    border-bottom: 2px solid var(--accent-color); /* Thicker underline */
}

/* 2. Blockquote Styling (Scientific Style) */
article blockquote {
    background-color: var(--code-bg);
    border-left: 4px solid var(--accent-color);
    padding: 15px 20px;
    margin: 30px 0;
    font-family: var(--font-body);
    font-style: italic;
    color: var(--text-color);
}

/* 3. Image Captions */
/* If you put text right after an image, you can style it like a caption */
article img + em {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: var(--meta-color);
    margin-top: -10px;
    margin-bottom: 30px;
}

/* 4. Tables (If you enable the extension later) */
article table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9rem;
}
article th {
    border-bottom: 2px solid var(--border-color);
    text-align: left;
    padding: 10px;
}
article td {
    border-bottom: 1px solid var(--border-color);
    padding: 10px;
}

/* IMAGE SIZING UTILITIES */

/* Default: Always fit container */
article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

/* Class: .small (Good for icons or logos) */
article img.small {
    width: 200px;
    max-width: 50%; /* Prevent overflow on tiny screens */
}

/* Class: .medium (Good for diagrams) */
article img.medium {
    width: 500px;
    max-width: 100%;
}

/* Class: .center (Centers the image) */
article img.center {
    margin: 20px auto;
}

/* --- FOOTNOTES --- */
.footnote {
    font-size: 0.85rem;
    color: var(--meta-color);
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    padding-top: 20px;
}
.footnote ol {
    padding-left: 20px;
}
.footnote li {
    margin-bottom: 10px;
}

/* --- ADMONITIONS (Note Blocks) --- */
.admonition {
    border-left: 4px solid var(--accent-color);
    background-color: var(--code-bg);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}
.admonition-title {
    font-weight: bold;
    font-family: var(--font-ui); /* Use sans-serif for UI labels */
    margin-bottom: 10px;
    color: var(--text-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}
/* Specific colors for specific types */
.admonition.warning { border-left-color: #d73a49; } /* Red */
.admonition.note { border-left-color: #004488; }    /* Blue */
.admonition.tip { border-left-color: #28a745; }     /* Green */

/* --- DEFINITION LISTS --- */
dl { margin-bottom: 20px; }
dt {
    font-weight: bold;
    margin-top: 15px;
    color: var(--text-color);
}
dd {
    margin-left: 20px;
    color: var(--meta-color);
    margin-bottom: 5px;
}

/* --- LISTS (Academic Spacing) --- */
article ul, article ol {
    margin: 20px 0;
    padding-left: 30px; /* Indent content */
    color: var(--text-color);
}

/* Add breathing room between items */
article li {
    margin-bottom: 8px; 
    line-height: 1.6;
}

/* Nested lists shouldn't have huge margins */
article li ul, article li ol {
    margin: 10px 0;
}

/* --- EXTENDED UTILITIES (Pymdownx) --- */

/* 1. Task Lists (Checkboxes) */
/* Removes the bullet point so the checkbox sits flush */
.task-list-item {
    list-style-type: none;
    margin-left: 1em; /* Pull it back to the left */
}

/* Align the checkbox box with the text */
.task-list-item input[type="checkbox"] {
    vertical-align: middle;
    margin: 0 0.5em 0.2em -1em; /* Fine-tune spacing */
    cursor: default;
}

/* 2. Strikethrough (~~text~~) */
del {
    color: var(--meta-color); /* Make deleted text lighter/grey */
    text-decoration-color: var(--accent-color); /* Make the line blue/accent */
}