/* Simple responsive container for centered text content */
body {
    margin: 0;
    padding: 0;
    font-family:
        system-ui,
        -apple-system,
        sans-serif;
    line-height: 1.6;
}

/* Global link styles */
a {
    text-decoration: none;
    color: #3499fe;
    transition: color 0.2s ease;
}

a:hover {
    color: #003371;
}

/* Blockquote styling */
blockquote {
    margin: 0.5rem 0;
    padding: 0.5rem 0.5rem;
    padding-left: 0.5rem;
    border-left: 4px solid #e0dede;
    background: #fbfaf8;
    color: #222;
    border-radius: 2px;
}

blockquote p {
    margin: 0;
}

blockquote cite,
blockquote footer {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* markdown-it-containers */
.warning,
.info {
    padding: 0.3rem 1rem;
    margin-bottom: 1rem;
    border-left: 0.25rem solid;
    line-height: 1.5;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
        sans-serif;
    background-color: transparent;
}

.info {
    border-left-color: #0969da;
}

.warning {
    border-left-color: #d2991d;
}

.info::before,
.warning::before {
    font-size: 0.875rem;
    font-weight: 600;
    font-family: "Font Awesome 7 Free";
}

.info::before {
    content: "\f05a  Note";
    color: #0969da;
}

.warning::before {
    content: "\f071 Warning";
    color: #d2991d;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    main {
        padding: 2rem 2rem 4rem;
    }
}

/* Table of Contents */
.table-of-contents {
    background-color: #f0eee9;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents ul ul {
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.table-of-contents a {
    text-decoration: none;
    color: #555;
    transition: color 0.2s;
}

.table-of-contents a:hover {
    color: #000;
}

/* Desktop: Sticky Sidebar on the left */
@media (min-width: 1350px) {
    .table-of-contents {
        position: fixed;
        top: 4rem;
        left: 2rem;
        width: 220px;
        background: transparent;
        padding: 0;
        margin: 0;
        max-height: calc(100vh - 8rem);
        overflow-y: auto;
    }
}

/* Inline code style */
p code,
li code,
td code {
    background: #f0f1f2;
    color: #1f2328;
    padding: 0.15em 0.35em;
    border-radius: 4px;
    font-size: 0.95em;
    white-space: nowrap;
}

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

/* Code link styles */
a code {
    color: #3499fe;
    transition: color 0.2s ease;
}

a:hover code {
    color: #003371;
}

/* Make images responsive within content */
main img,
article img,
.post img,
.page img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}
