/* Andromeda additions: collapsible article navigation and expanded footer.
   Loaded after main.css, so plain-specificity rules here win.
   Colours mirror themes/andromeda/sass/_colors.scss:
     dark #222222, light #e7e7e7, light-dark #a4a4a4,
     link #83c2ef, link-dark #53aeef */

/* ---------------------------------------------------------------
   Collapsible navigation (article pages)
   --------------------------------------------------------------- */

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 60;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border-radius: 4px;
  cursor: pointer;
  background-color: rgba(34, 34, 34, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background-color 0.3s ease;
}

.nav-toggle-label:hover {
  background-color: rgba(34, 34, 34, 0.92);
}

.nav-toggle-label span {
  display: block;
  width: 1.4rem;
  height: 2px;
  background-color: #e7e7e7;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 2px solid #83c2ef;
  outline-offset: 2px;
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(1) {
  transform: translateY(0.425rem) rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(2) {
  opacity: 0;
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(3) {
  transform: translateY(-0.425rem) rotate(-45deg);
}

.page-nav {
  position: fixed;
  top: 4.25rem;
  right: 1rem;
  z-index: 59;
  min-width: 11rem;
  padding: 0.4rem 0;
  border-radius: 4px;
  background-color: rgba(34, 34, 34, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-0.5rem);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.page-nav a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: #e7e7e7;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 1.05em;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.page-nav a:hover {
  color: #a4a4a4;
  background-color: rgba(255, 255, 255, 0.06);
}

.nav-toggle:checked ~ .page-nav {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-label span,
  .page-nav {
    transition: none;
  }
}

/* ---------------------------------------------------------------
   Sticky footer

   The theme sets html, body { min-height: 100vh }, which leaves a
   white strip below the footer on short pages. Column flex on the
   body pushes the footer to the bottom instead.
   --------------------------------------------------------------- */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > * {
  flex-shrink: 0;
}

body > footer {
  margin-top: auto;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

.footer-black {
  height: auto;
  min-height: 9em;
  padding-bottom: 2em;
}

.footer-black .text-block .footer-quote {
  max-width: 44em;
  margin: 0 auto;
  padding: 1.25em 1.5em 0.75em;
  font-family: "Handlee", cursive;
  font-size: 1.1em;
  line-height: 1.6;
  font-style: italic;
  color: #e7e7e7;
  border: 0;
}

.footer-black .text-block .footer-quote-author {
  display: block;
  margin-top: 0.6em;
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-size: 0.8em;
  color: #a4a4a4;
}

.footer-black .text-block .footer-links {
  padding: 0.6em 1em 0;
}

.footer-black .text-block .footer-links a {
  display: inline-block;
  margin: 0.2em 0.7em;
  font-family: "Montserrat", sans-serif;
}

.footer-black .text-block .footer-social a {
  font-size: 0.95em;
}

.footer-black .text-block .footer-legal {
  padding-top: 0.9em;
  font-size: 0.85em;
}

.footer-black .text-block .footer-legal a {
  margin: 0 0.6em;
  color: #a4a4a4;
}

.footer-black .text-block .footer-legal a:hover {
  color: #e7e7e7;
}

@media only screen and (max-width: 640px) {
  .footer-black .text-block .footer-quote {
    font-size: 1em;
    padding: 1em 1.25em 0.5em;
  }
  .footer-black .text-block .footer-links a {
    margin: 0.35em 0.6em;
  }
}
