/* ==========================================================
   Data as Foundation – Minimal, Layout-Safe CSS
   (Body uses Quarto defaults; cover lives in right margin)
   ========================================================== */

/* ---------- Base Typography ---------- */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
}

h1, h2, h3, h4 {
  font-weight: 600;
  color: var(--bs-heading-color, var(--bs-body-color));
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
} 

p { margin-bottom: 1rem; }
.lead { font-size: 1.15rem; }

/* ==========================================================
   NAVBAR – Light/Dark Responsive
   ========================================================== */

/* Neutralise Quarto’s hard-coded dark attribute on <nav> 
nav.navbar[data-bs-theme="dark"] {
  background-color: inherit !important;
  color: inherit !important;
}*/

/* Light mode 
[data-bs-theme="light"] nav.navbar {
  background-color: #ffffff !important;
  color: #0b3b46 !important;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  min-height: 60px;
}
[data-bs-theme="light"] .navbar .navbar-brand,
[data-bs-theme="light"] .navbar .nav-link {
  color: #0b3b46 !important;
  font-weight: 600;
}
[data-bs-theme="light"] .navbar .nav-link:hover,
[data-bs-theme="light"] .navbar .nav-link:focus {
  color: #005f73 !important;
} */

/* Dark mode 
[data-bs-theme="dark"] nav.navbar {
  background-color: #121212 !important;
  color: #f8f9fa !important;
  border-bottom: 1px solid #333;
  min-height: 60px;
}
[data-bs-theme="dark"] .navbar .navbar-brand,
[data-bs-theme="dark"] .navbar .nav-link {
  color: #f8f9fa !important;
  font-weight: 600;
}
[data-bs-theme="dark"] .navbar .nav-link:hover,
[data-bs-theme="dark"] .navbar .nav-link:focus {
  color: #66b2ff !important;
} */

/* Keep navbar height consistent */
.navbar .container-fluid,
.navbar .navbar-container {
  min-height: 80px;
  align-items: left;
}

/* ==========================================================
   RIGHT-MARGIN COVER (above TOC)
   ========================================================== */
/* Place the cover block in the margin (you added it with .margin-content) */
#cover.margin-content,
.margin-content#cover {
  display: block;
  margin-bottom: 1.25rem;   /* space before TOC */
  text-align: center;
}

/* Image styling */
#cover img {
  width: 100%;             /* adjust if you prefer */
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
#cover img:hover { transform: scale(1.03); }

/* Link under the image */
#cover p {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--bs-secondary-color, var(--bs-body-color));
}

/* On small screens the margin stack becomes inline content;
   keep the cover centered and tidy there too */
@media (max-width: 991px) {
  #cover {
    margin: 0 0 1rem 0;
  }
  #cover img {
    width: 55%;
    margin: 0 auto;
  }
}

/* ==========================================================
   LINKS – Theme Aware
   ========================================================== */
a {
  color: var(--bs-link-color, #0b3b46);
  text-decoration: none;
  font-weight: 500;
}
a:hover {
  color: var(--bs-link-hover-color, #005f73);
  text-decoration: underline;
}
[data-bs-theme="dark"] a { color: #66b2ff; }
[data-bs-theme="dark"] a:hover { color: #a7d3ff; }

/* ==========================================================
   SUBTITLES
   ========================================================== */
.quarto-title-block .quarto-subtitle,
.quarto-title .subtitle {
  color: var(--bs-secondary-color, var(--bs-body-color));
  font-size: 1.15rem;
  margin-top: 0.25rem;
}
[data-bs-theme="dark"] .quarto-title-block .quarto-subtitle,
[data-bs-theme="dark"] .quarto-title .subtitle {
  color: #e9ecef;
  opacity: 0.95;
}

/* ==========================================================
   FOOTER
   ========================================================== */
footer, .page-footer {
  font-size: 0.9rem;
  color: var(--bs-secondary-color, var(--bs-body-color));
  border-top: 1px solid var(--bs-border-color, #ddd);
  padding-top: 0.75rem;
  margin-top: 2rem;
}
.page-footer a { color: var(--bs-link-color, #0b3b46); }
.page-footer a:hover { text-decoration: underline; }

/* ==========================================================
   IMAGE DEFAULTS
   ========================================================== */
img { max-width: 100%; height: auto; border: none; }

/* Right-margin cover styling */
#cover.column-margin {
  text-align: center;
  margin-bottom: 1.25rem;  /* space before the TOC */
}
#cover.column-margin img {
  width: 180px;            /* adjust to taste */
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
#cover.column-margin img:hover { transform: scale(1.03); }
#cover.column-margin p {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--bs-secondary-color, var(--bs-body-color));
}
