:root {
    /* 📐 Layout */
    --width: 650px;

    /* 💻 System Fonts (Modern, High-Performance) */
    --font-main: ui-sans-serif, system-ui, sans-serif;
    --font-secondary: ui-sans-serif, system-ui, sans-serif;
    --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* 📏 Sizing and Spacing */
    --font-size-base: 1em;
    --line-height-base: 1.8;

    /* 🎨 Nord Dark Theme Colors */
    --background-color: #2e3440; /* Nord Polar Night (darkest) */
    --heading-color: #a3be8c; /* Nord Snow Storm (brightest) */
    --text-color: #d8dee9; /* Nord Snow Storm (medium) */

    --link-color: #88c0d0; /* Nord Frost (cyan) */
    --visited-color: #88c0d0; /* Same as link color */

    /* Nord Aurora colors for dates and titles */
    --date-color: #d08770; /* Nord Aurora (orange) */
    --title-accent: #b48ead; /* Nord Aurora (green) */
    --code-background-color: #3b4252; /* Nord Polar Night (lighter) */
    --code-color: #e5e9f0; /* Nord Snow Storm */

    --blockquote-color: #d8dee9; /* Nord Snow Storm */
    --blockquote-border: #5e81ac; /* Nord Frost (blue) */

    --accent-color: #88c0d0; /* Nord Frost (cyan) */
    --hr-color: #4c566a; /* Nord Polar Night (border) */
}

body {
    font-family: var(--font-secondary);
    font-size: var(--font-size-base);
    margin: auto;
    padding: 20px;
    max-width: var(--width);
    text-align: left;
    background-color: var(--background-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: var(--line-height-base);
    color: var(--text-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-main);
    color: var(--heading-color);
    line-height: 1.15;
}

a {
    color: var(--link-color);
    cursor: pointer;
    text-decoration: underline; /* All links are underlined */
}

a:hover {
    text-decoration: none; /* Removes underline on hover for a cleaner effect */
}

nav a {
    margin-right: 8px;
    /* Now inherits 'text-decoration: underline;' from the global 'a' rule */
}

strong,
b {
    color: var(--heading-color);
}

button {
    margin: 0;
    cursor: pointer;
}

time {
    font-family: var(--font-code);
    font-style: normal;
    font-size: 0.9375rem;
    color: var(--date-color);
}

main {
    line-height: 1.6;
}

table {
    width: 100%;
}

hr {
    border: none;
    height: 0;
    margin-block: 2em;
    border-block-start: 2px solid var(--hr-color);
}

img {
    max-width: 100%;
}

code {
    font-family: var(--font-code);
    padding: 2px 4px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: 3px;
}

blockquote {
    border-left: 4px solid var(--blockquote-border);
    color: var(--blockquote-color);
    padding-left: 20px;
    font-style: italic;
}

footer {
    padding: 25px 0;
    text-align: center;
    font-size: 14px;
}

.title:hover {
    text-decoration: none;
}

.title h1 {
    font-size: 1.5em;
    color: var(--title-accent);
}

.inline {
    width: auto !important;
}

.highlight,
.code {
    display: block;
    padding: 15px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: 3px;
    margin-block: 1em;
    overflow-x: auto;
    white-space: pre;
}

/* blog post list */
ul.blog-posts {
    list-style-type: none;
    padding: unset;
}

ul.blog-posts li {
    display: flex;
}

ul.blog-posts li span {
    flex: 0 0 130px;
    font-family: var(--font-code);
    color: var(--date-color);
}

ul.blog-posts li a:visited {
    color: var(--visited-color);
}

/* blog.html styling */
.blog-page ul {
    list-style-type: none;
    padding: 0;
    max-width: var(--width);
}

.blog-page li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-family: var(--font-code);
    color: var(--date-color);
}

.blog-page span {
    min-width: 100px;
    font-weight: normal;
    color: var(--date-color);
}

.blog-page a {
    flex: 1;
    text-decoration: underline;
    color: var(--link-color);
    font-family: var(--font-main);
}

.blog-page a:visited {
    color: var(--visited-color);
}
.blog-page a:hover {
    text-decoration: none;
}

/* notes.html styling */
.note {
    background-color: var(--code-background-color);
    border-left: 4px solid var(--link-color);
    padding: 15px;
    margin-bottom: 20px;
}

.note-date {
    color: var(--text-color);
    font-family: var(--font-code);
    font-size: 1em;
    margin-bottom: 10px;
}

.footnotes {
    font-size: smaller;
}

h1 a {
    color: var(--title-accent) !important;
}
