:root,
::backdrop {
  --sans-font: Lora, Georgia, serif; /* For body */
  --mono-font: 'Fira Code', Consolas, monospace; /* For code blocks */
  --heading-font: Montserrat, 'Helvetica Neue', sans-serif; /* For headings */
  --standard-border-radius: 5px;

  /* Default (light) theme */
  --bg: #fbfcfe; /* very pale blue/white */
  --accent-bg: #eef6ff; /* pale blue panels */
  --text: #072033; /* deep navy text */
  --text-light: #596877; /* muted slate */
  --border: #c9d7e9; /* soft blue-gray */
  --accent: #0b4f88; /* deep blue accent */
  --accent-hover: #063a66; /* darker on hover */
  --accent-text: #ffffff; /* white text on accent */
  --code: #b3592b; /* warm accent for inline code */
  --preformatted: #333333;
  --marked: #ffd966; /* warm yellow highlight */
  --disabled: #f0edf0;
  --nav-active-bg: var(--bg);
  --nav-acive-text: var(--text);
  --button-bg: var(--accent);
  --button-text: var(--accent-text);
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root,
  ::backdrop {
    color-scheme: dark;
    --bg: #071428; /* deep navy background */
    --accent-bg: #0b2f4a; /* panels: darker navy */
    --text: #f5ecd8; /* warm off-white text */
    --text-light: #d6cfae; /* soft yellowish text */
    --border: #164459; /* subtle blue border */
    --accent: #0e5ec2; /* vivid blue accent */
    --accent-hover: #0b4fb0; /* hover accent */
    --accent-text: #ffffff; /* white on accent */
    --code: #ffd28a; /* warm code highlight */
    --preformatted: #e6e6e6;
    --marked: #ffd966; /* consistent yellow highlight */
    --disabled: #0b1220;
    --nav-active-bg: var(--accent);
    --nav-acive-text: var(--text);
    --button-bg: var(--accent);
    --button-text: var(--accent-text);
  }
  /* Add a bit of transparency so light media isn't so glaring in dark mode */
  img,
  video {
    opacity: 0.9;
  }
}

.text-icon {
  vertical-align: -0.25em; /* Adjust to lift the icon slightly */
  margin-right: 0.1em; /* Spacing between the icon and the text */
  margin-left: 1em;
}

.tag-icon {
  vertical-align: -0.4em; /* Adjust to lift the icon slightly */
  margin-right: 0.1em; /* Spacing between the icon and the text */
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.post-meta span {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.post-meta a {
  text-decoration: none;
}

.post-meta a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--heading-font);
}


button,
.button,
a.button, /* extra specificity to override a */
input[type="submit"],
input[type="reset"],
input[type="button"] {
  border: 1px solid var(--button-bg);
  background-color: var(--button-bg);
  color: var(--button-text);
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  line-height: normal;
}

/* Highlight active navigation link */
.nav-link.active {
    font-weight: bold; /* Make it bold */
    background-color: var(--nav-active-bg); /* Use a custom background color */
    color: var(--nav-acive-text); /* Use a custom color*/
}


/* Reduce nav side on mobile */
@media only screen and (max-width: 720px) {
    .nav-link.active {
      background-color: transparent;
    }
  }
  

  body > footer {
    margin-top: 4rem;
    padding: 2rem 1rem 1.5rem 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: left;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
  }

  .footer-left,
  .footer-right {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-left p,
  .footer-right p {
    margin: 0;
    padding: 0;
    line-height: 1.2;
  }

  @media (max-width: 720px) {
    body > footer {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .footer-left,
    .footer-right {
        align-items: center;
    }
  }


@font-face {
    font-family: "Lora";
    src: url("/fonts/Lora.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
  font-family: "Lora";
  src: url("/fonts/Lora-italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
}

@font-face {
  font-family: 'Fira Code';
  src: url('/fonts/FiraCode-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
}

.webmention-form {
  margin-top: 2em;
  padding: 1em;
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.webmention-form h3 {
  margin-top: 0;
  font-size: 1.25em;
}

.webmention-form input[type="url"] {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0.5em 0;
  padding: 0.5em;
  font-size: 1em;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.webmention-form button {
  padding: 0.5em 1em;
  font-size: 1em;
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.webmention-form button:hover {
  background: var(--accent-hover);
}

.webmention-form .form-help {
  font-size: 0.9em;
  color: var(--text-light);
  margin-top: 1em;
}


.webmentions {
  margin-top: 3rem;
  border-top: 1px solid #ccc;
  padding-top: 2rem;
}

.webmentions h3 {
  margin-top: 1.5rem;
}

.facepile {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.mention-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}

.mention-avatar.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.mention-comments,
.mention-mentions {
  list-style: none;
  padding: 0;
}

.mention-comments li,
.mention-mentions li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.4em 1em;
  font-size: 0.95em;
  margin: 0 0.2em 0.2em 0;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tag:hover,
.tag:focus {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent-hover);
  text-decoration: none;
  outline: none;
}

hr.footnotes-sep {
  display: none;
}
