/* Center all content in the header */
.site-header { text-align: center; }

h1, h2, h3, h4, h5, h6, nav {
  font-family: var(--font_monospace_slab_serif);
/*  text-transform: uppercase; */
  font-weight: normal;
}

h1,h2 {
  font-weight: 500;
}

/* Hide the hash link by default on ALL headings */
h1 > .heading-anchor,
h2 > .heading-anchor,
h3 > .heading-anchor,
h4 > .heading-anchor,
h5 > .heading-anchor,
h6 > .heading-anchor {
  display: inline-flex;
  align-items: baseline;   /* baseline-aligns with heading text */
  margin-left: .4rem;
  text-decoration: none;
  opacity: 0 !important;   /* win any specificity battles */
  transition: opacity .15s ease-in-out;
  vertical-align: baseline;
  white-space: nowrap;     /* keep icon glued to the end line */
}

/* Reveal on hover/focus */
h1:hover > .heading-anchor,
h2:hover > .heading-anchor,
h3:hover > .heading-anchor,
h4:hover > .heading-anchor,
h5:hover > .heading-anchor,
h6:hover > .heading-anchor,
.heading-anchor:focus {
  opacity: .6 !important;
}

.heading-anchor:hover { opacity: 1 !important; }
/* Center all content in the header */
.site-header { text-align: center; }

body {
  font-family: var(--font_transitional);
}

/* Hide the hash link by default on ALL headings */
h1 > .heading-anchor,
h2 > .heading-anchor,
h3 > .heading-anchor,
h4 > .heading-anchor,
h5 > .heading-anchor,
h6 > .heading-anchor {
  display: inline-flex;
  align-items: baseline;   /* baseline-aligns with heading text */
  margin-left: .4rem;
  text-decoration: none;
  opacity: 0 !important;   /* win any specificity battles */
  transition: opacity .15s ease-in-out;
  vertical-align: baseline;
  white-space: nowrap;     /* keep icon glued to the end line */
}

/* Reveal on hover/focus */
h1:hover > .heading-anchor,
h2:hover > .heading-anchor,
h3:hover > .heading-anchor,
h4:hover > .heading-anchor,
h5:hover > .heading-anchor,
h6:hover > .heading-anchor,
.heading-anchor:focus {
  opacity: .6 !important;
}

.heading-anchor:hover { opacity: 1 !important; }

/* Hash size/color matches heading */
.heading-anchor__icon {
  font-size: .85em;
  line-height: 1;
  color: inherit;
}

/* ====== NAVIGATION LINKS (light mode) ====== */
nav.site-nav a,
nav.site-nav a:visited {
  all: unset;                        /* remove theme's button styles */
  display: inline-block;
  cursor: pointer;

  margin: 0 0.3em;
  padding: 0.2em 0.5em;
  font-weight: 600;
  font-size: 1.1em;
  color: #0077cc;                    /* blue default */
  text-decoration: none;
  position: relative;
  letter-spacing: 0.5px;
  font-variant: small-caps;
}

/* Underline (hidden by default) */
nav.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: rgba(0,119,204,0.6);   /* faded blue */
  transform: scaleX(0);
  opacity: 0;
}

/* Hover */
nav.site-nav a:hover,
nav.site-nav a:focus {
  color: #000;                       /* black text */
}
nav.site-nav a:hover::after,
nav.site-nav a:focus::after {
  transform: scaleX(1);
  opacity: 1;
}

/* Active/current page */
nav.site-nav a.current,
nav.site-nav a.active {
  color: #000;
  font-weight: 700;
}
nav.site-nav a.current::after,
nav.site-nav a.active::after {
  transform: scaleX(1);
  opacity: 1;
}

/* ====== DARK MODE ====== */
@media (prefers-color-scheme: dark) {
  nav.site-nav a,
  nav.site-nav a:visited {
    color: #66aaff;                  /* lighter blue for dark bg */
  }

  nav.site-nav a::after {
    background: rgba(102,170,255,0.6); /* faded lighter blue */
  }

  nav.site-nav a:hover,
  nav.site-nav a:focus {
    color: #fff;                      /* white text on hover */
  }
}

  nav.site-nav a.current,
  nav.site-nav a.active {
    color: #fff;                      /* active = white */
    font-weight: 700;
  }
}


/* Remove any existing border from the footer first */
footer {
  border: none;
}

/* Add a single horizontal line at the top of the footer */
footer {
  border-top: 1px solid #e0e0e0; /* Light mode */
  margin-top: 2em;
  padding-top: 1.5em;
}

@media (prefers-color-scheme: dark) {
  footer {
    border-top: 1px solid #333a42; /* Dark mode */
  }
}

.footer, #footer, .site-footer {
  border: none !important;
}

/* Center the newsletter prompt and form */
form, .newsletter-form, .newsletter-signup, .newsletter-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  width: 100%;
  max-width: 400px;
  padding: 0 1em;
}

/* Center the "Add your email..." text if it's not inside a form */
.newsletter-prompt, .newsletter-signup, .newsletter-message {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 400px;
  padding: 0 1em;
}

/* Center the footer and add padding */
footer {
  text-align: center;
  padding-left: 1em;
  padding-right: 1em;
}

/* Newsletter input responsive fix */
.site-footer .newsletter-form input[type="email"] {
  width: 100%;          /* always take full width of form */
  max-width: 320px;     /* limit on large screens */
  box-sizing: border-box;
  text-align: center;
  margin: 0 auto;       /* center when narrower than 100% */
  padding: 0.6em;       /* ensure consistent padding */
}

/* On very small screens, drop the max-width so it aligns with content edges */
@media (max-width: 480px) {
  .site-footer .newsletter-form input[type="email"] {
    max-width: 100%;
  }
}



