/* Base Styles */
body {
    font-family: 'Inter', sans-serif; /* Modern, clean sans-serif font */
    line-height: 1.6;
    margin: 0;
    background-color: #f8f8f8; /* Light background for a clean feel */
    color: #333; /* Soft black for readability */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background-color: #fff;
    padding: 2em 0;
    text-align: center;
    border-bottom: 1px solid #eee; /* Subtle border */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Light shadow for depth */
}

.site-title {
    font-size: 2.8em;
    color: #222;
    margin: 0;
    font-weight: 700;
}

/* Main Content Area */
main {
    flex-grow: 1;
    max-width: 800px; /* Optimal reading width */
    margin: 2em auto;
    padding: 0 1.5em;
}

/* Article Styling */
article {
    background-color: #fff;
    padding: 2.5em;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* More pronounced shadow for content */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #222;
    font-weight: 700;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    line-height: 1.2;
}

h1 {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 1em;
}

h2 {
    font-size: 1.8em;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.4em;
}

h3 {
    font-size: 1.4em;
}

h4 {
    font-size: 1.1em;
}

h5 {
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

h6 {
    font-size: 0.9em;
    color: #888;
}

p {
    margin-bottom: 1em;
}

/* Links */
a {
    color: #007bff; /* Standard blue for links */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Horizontal Rules */
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 3em 0;
}

/* Code Styling */
code {
    font-family: 'Fira Code', 'SFMono-Regular', Consolas, "Liberation Mono", Menlo, Courier, monospace; /* Monospaced font */
    background-color: #e9ecef; /* Light grey background */
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: #c0392b; /* Reddish color for inline code */
}

pre code {
    display: block;
    padding: 1.5em;
    overflow-x: auto;
    background-color: #282c34; /* Dark background for code blocks */
    color: #abb2bf; /* Light text color */
    border-radius: 6px;
    margin-bottom: 1.5em;
    line-height: 1.4;
}

/* Chroma (Syntax Highlighting) Styles */
.chroma .c  { color: #555; } /* Comment */
.chroma .err { color: #f6f6f6; background-color: #f00; } /* Error */
.chroma .k  { color: #007bff; } /* Keyword */
.chroma .l  { color: #007bff; } /* Literal */
.chroma .n  { color: #f6f6f6; } /* Name */
.chroma .o  { color: #f6f6f6; } /* Operator */
.chroma .p  { color: #f6f6f6; } /* Punctuation */
.chroma .cm { color: #555; } /* Comment.Multiline */
.chroma .cp { color: #007bff; } /* Comment.Preproc */
.chroma .c1 { color: #555; } /* Comment.Single */
.chroma .cs { color: #007bff; } /* Comment.Special */
.chroma .gd { color: #f6f6f6; background-color: #f00; } /* Generic.Deleted */
.chroma .ge { color: #f6f6f6; font-style: italic; } /* Generic.Emph */
.chroma .gr { color: #f6f6f6; background-color: #f00; } /* Generic.Error */
.chroma .gh { color: #f6f6f6; } /* Generic.Heading */
.chroma .gi { color: #f6f6f6; background-color: #0f0; } /* Generic.Inserted */
.chroma .go { color: #444; } /* Generic.Output */
.chroma .gp { color: #555; } /* Generic.Prompt */
.chroma .gs { color: #f6f6f6; font-weight: bold; } /* Generic.Strong */
.chroma .gu { color: #007bff; } /* Generic.Subheading */
.chroma .gt { color: #f6f6f6; background-color: #f00; } /* Generic.Traceback */
.chroma .kc { color: #007bff; } /* Keyword.Constant */
.chroma .kd { color: #007bff; } /* Keyword.Declaration */
.chroma .kn { color: #007bff; } /* Keyword.Namespace */
.chroma .kp { color: #007bff; } /* Keyword.Pseudo */
.chroma .kr { color: #007bff; } /* Keyword.Reserved */
.chroma .kt { color: #007bff; } /* Keyword.Type */
.chroma .ld { color: #007bff; } /* Literal.Date */
.chroma .m  { color: #007bff; } /* Literal.Number */
.chroma .s  { color: #007bff; } /* Literal.String */
.chroma .na { color: #f6f6f6; } /* Name.Attribute */
.chroma .nb { color: #f6f6f6; } /* Name.Builtin */
.chroma .nc { color: #f6f6f6; } /* Name.Class */
.chroma .no { color: #007bff; } /* Name.Constant */
.chroma .nd { color: #f6f6f6; } /* Name.Decorator */
.chroma .ni { color: #f6f6f6; } /* Name.Entity */
.chroma .ne { color: #f6f6f6; } /* Name.Exception */
.chroma .nf { color: #f6f6f6; } /* Name.Function */
.chroma .nl { color: #f6f6f6; } /* Name.Label */
.chroma .nn { color: #f6f6f6; } /* Name.Namespace */
.chroma .nx { color: #f6f6f6; } /* Name.Other */
.chroma .py { color: #f6f6f6; } /* Name.Property */
.chroma .nt { color: #007bff; } /* Name.Tag */
.chroma .nv { color: #007bff; } /* Name.Variable */
.chroma .ow { color: #f6f6f6; } /* Operator.Word */
.chroma .w  { color: #f6f6f6; } /* Text.Whitespace */
.chroma .mf { color: #007bff; } /* Literal.Number.Float */
.chroma .mh { color: #007bff; } /* Literal.Number.Hex */
.chroma .mi { color: #007bff; } /* Literal.Number.Integer */
.chroma .mo { color: #007bff; } /* Literal.Number.Oct */
.chroma .sb { color: #007bff; } /* Literal.String.Backtick */
.chroma .sc { color: #007bff; } /* Literal.String.Char */
.chroma .sd { color: #007bff; } /* Literal.String.Doc */
.chroma .s2 { color: #007bff; } /* Literal.String.Double */
.chroma .se { color: #007bff; } /* Literal.String.Escape */
.chroma .sh { color: #007bff; } /* Literal.String.Heredoc */
.chroma .si { color: #007bff; } /* Literal.String.Interpol */
.chroma .sx { color: #007bff; } /* Literal.String.Other */
.chroma .sr { color: #007bff; } /* Literal.String.Regex */
.chroma .s1 { color: #007bff; } /* Literal.String.Single */
.chroma .ss { color: #007bff; } /* Literal.String.Symbol */
.chroma .bp { color: #f6f6f6; } /* Name.Builtin.Pseudo */
.chroma .vc { color: #007bff; } /* Name.Variable.Class */
.chroma .vg { color: #007bff; } /* Name.Variable.Global */
.chroma .vi { color: #007bff; } /* Name.Variable.Instance */
.chroma .il { color: #007bff; } /* Literal.Number.Integer.Long */

/* Blockquotes */
blockquote {
    border-left: 4px solid #007bff; /* Accent color for the border */
    margin: 1.8em 0;
    padding: 0.8em 1.5em;
    background-color: #f0f8ff; /* Very light blue background */
    color: #555;
    border-radius: 4px;
}

/* Lists */
ul,
ol {
    margin-bottom: 1em;
    padding-left: 1.8em; /* Indent lists */
}

ul li,
ol li {
    background-color: transparent; /* Remove background from list items */
    box-shadow: none;
    padding: 0;
    margin-bottom: 0.6em;
    max-width: none;
    min-width: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden; /* Ensures rounded corners apply to content */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

th, td {
    border: 1px solid #eee;
    padding: 1em;
    text-align: left;
}

th {
    background-color: #f0f0f0;
    font-weight: bold;
    color: #444;
}

tr:nth-child(even) {
    background-color: #fdfdfd;
}

/* Footnotes */
.footnotes {
    margin-top: 3em;
    border-top: 1px solid #eee;
    padding-top: 1.5em;
    font-size: 0.85em;
    color: #777;
}

.footnotes ol {
    list-style: decimal;
    padding-left: 1.5em;
}

.footnotes li {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0.5em;
}

/* Task Lists */
input[type="checkbox"] {
    margin-right: 0.6em;
    /* Basic styling for checkboxes */
    width: 1.1em;
    height: 1.1em;
    vertical-align: middle;
    cursor: pointer;
}

/* Definition Lists */
dl {
    margin-bottom: 1.5em;
}

dt {
    font-weight: bold;
    margin-top: 1em;
    color: #222;
}

dd {
    margin-left: 2em;
    margin-bottom: 0.5em;
    color: #555;
}

/* Footer */
footer {
    text-align: center;
    padding: 2em 0;
    color: #777;
    font-size: 0.9em;
    margin-top: 3em;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    main {
        padding: 0 1em;
    }

    article {
        padding: 1.5em;
    }

    .site-title {
        font-size: 2.2em;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.8em;
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.3em;
    }

    h3 {
        font-size: 1.1em;
    }

    article {
        padding: 1em;
    }
}