: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;

  /* 🎨 Monochrome Colors (Black on White) */
  --background-color: #ffffff;      /* Pure White Background */
  --heading-color: #000000;         /* Pure Black Headings/Strong */
  --text-color: #000000;            /* Pure Black Text */

  --link-color: #000000;            /* Black Links */
  --visited-color: #000000;         /* Black Visited Links */

  --code-background-color: #eeeeee; /* Light Gray for Code Background */
  --code-color: #000000;            /* Black Code Text */

  --blockquote-color: #000000;      /* Black blockquote text */
  --blockquote-border: #888888;     /* Medium Gray border */

  --accent-color: #000000;          /* Black Accent */
  --hr-color: #000000;              /* Black HR Line */
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #01242e;
        --heading-color: #eee;
        --text-color: #ddd;
        --link-color: #8cc2dd;
        --visited-color:  #8b6fcb;
        --code-background-color: #000;
        --code-color: #ddd;
        --blockquote-color: #ccc;
    }
}

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;
}

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;
}

.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;
}

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-main);
  color: var(--text-color);
}

.blog-page span {
  min-width: 100px;
  font-weight: normal;
  color: var(--text-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(--heading-color) !important;
}