/* =========================================================
   Portfolio & Learning Hub — Consolidated Professional Blue
   Clean replacement stylesheet (no stacked V3.x patches)
   ========================================================= */

:root {
  --page: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f3f6fa;
  --surface-blue: #edf4ff;
  --ink: #152033;
  --ink-strong: #0b1220;
  --muted: #607086;
  --muted-light: #8793a3;
  --blue: #1769e0;
  --blue-dark: #0f56bd;
  --line: #dde5ef;
  --line-strong: #c9d4e2;
  --radius: 12px;
  --radius-lg: 22px;
  --content-width: 1120px;
  --shadow-soft: 0 10px 30px rgba(20, 35, 60, 0.06);

  /* Typography */
  --font-sans:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  --text-body: 1rem;        /* 16px */
  --text-lead: 1.06rem;     /* ~17px */
  --text-small: 0.88rem;    /* ~14px */
  --text-card: 0.82rem;     /* ~13px */
  --text-meta: 0.70rem;     /* ~11px */

  --line-body: 1.64;
  --line-lead: 1.62;
  --line-compact: 1.45;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", -apple-system,
    BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p {
  color: var(--muted);
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
}

strong {
  color: var(--ink-strong);
  font-weight: 700;
}

h1, h2, h3, h4 {
  color: var(--ink-strong);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 740;
}

h2 {
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 720;
}

h3 {
  font-size: 1.12rem;
  font-weight: 700;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

#quarto-header {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  z-index: 1100 !important;
}

/* Prevent Quarto headroom from hiding the pinned header. */
#quarto-header.headroom,
#quarto-header.headroom--top,
#quarto-header.headroom--not-top,
#quarto-header.headroom--pinned,
#quarto-header.headroom--unpinned {
  transform: translateY(0) !important;
  transition: none !important;
}

.navbar,
.navbar.navbar-expand-lg {
  min-height: 50px !important;
  background: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid rgba(221, 229, 239, 0.95) !important;
  box-shadow: 0 3px 14px rgba(20, 35, 60, 0.035) !important;
  backdrop-filter: saturate(170%) blur(18px);
}

.navbar .navbar-container,
.navbar .container-fluid {
  position: relative !important;
  width: 100% !important;
  max-width: var(--content-width) !important;
  min-height: 50px !important;
  margin: 0 auto !important;
  padding: 0 1rem !important;
}

.navbar .navbar-brand {
  color: var(--ink-strong) !important;
  font-size: 0.95rem !important;
  font-weight: 690 !important;
  letter-spacing: -0.015em;
}

.navbar .navbar-nav .nav-link {
  color: #344054 !important;
  font-size: 0.79rem !important;
  font-weight: 550 !important;
  padding: 0.88rem 0.05rem 0.78rem !important;
  margin: 0 0.46rem !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  /* Stable underline that does not touch Bootstrap's dropdown caret. */
  box-shadow: inset 0 -1.5px 0 transparent;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
  color: var(--blue-dark) !important;
  box-shadow: inset 0 -1.5px 0 var(--blue);
}

/* Leave Bootstrap's Topics caret intact; only stabilize spacing. */
.navbar .dropdown-toggle {
  white-space: nowrap !important;
}

.navbar .dropdown-toggle::after {
  margin-left: 0.30rem !important;
  vertical-align: 0.15em !important;
  transition: none !important;
}

.navbar .dropdown-menu {
  min-width: 11.5rem !important;
  padding: 0.28rem !important;
  margin-top: 0.1rem !important;
  background: rgba(255, 255, 255, 0.99) !important;
  border: 1px solid var(--line) !important;
  border-radius: 9px !important;
  box-shadow: 0 10px 26px rgba(20, 35, 60, 0.10) !important;
}

.navbar .dropdown-menu .dropdown-item {
  padding: 0.42rem 0.58rem !important;
  border-radius: 6px !important;
  color: #344054 !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
  color: var(--blue-dark) !important;
  background: #f2f6fc !important;
}

/* Desktop: brand left, nav centered, tools/search right. */
@media (min-width: 992px) {
  .navbar .navbar-container,
  .navbar .container-fluid {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .navbar .navbar-brand-container {
    position: absolute !important;
    left: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
  }

  .navbar .navbar-collapse {
    position: static !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .navbar .navbar-nav.navbar-nav-scroll,
  .navbar .navbar-collapse > .navbar-nav:first-child {
    position: static !important;
    margin: 0 !important;
    transform: none !important;
    white-space: nowrap;
  }

  .navbar .quarto-navbar-tools {
    position: absolute !important;
    right: 3.2rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.58rem !important;
    margin: 0 !important;
  }

  #quarto-search {
    position: absolute !important;
    right: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
  }
}

.navbar .quarto-navbar-tools .quarto-navigation-tool,
#quarto-search {
  color: #344054 !important;
}

/* =========================================================
   PAGE LAYOUT STRATEGY
   ========================================================= */

/*
   We intentionally use only two layout modes:

   1) Pages WITH an "On this page" TOC:
      leave Quarto's native article grid untouched.

   2) Pages WITHOUT a TOC (Portfolio, Learning Hub, Topics, About):
      reclaim the unused margin area and center content at 1120px.

   Modern Edge/Chrome supports :has().
*/

/* Wide non-article pages: only when no doc TOC exists. */
body:not(.home-page):not(:has(nav[role="doc-toc"])) .page-columns .content {
  grid-column: screen-start / screen-end !important;
}

body:not(.home-page):not(:has(nav[role="doc-toc"])) main.content {
  width: 100% !important;
  max-width: var(--content-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* Article pages: do NOT redefine Quarto's grid columns. */
body:has(nav[role="doc-toc"]) .margin-sidebar {
  padding-left: 0 !important;
}

/* =========================================================
   SITE-WIDE AI TRANSPARENCY
   ========================================================= */

.ai-transparency {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.22fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  width: 100%;
  max-width: var(--content-width);
  margin: 1.1rem auto 1.8rem;
  padding: 0;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cfddf2;
  border-left: 5px solid #3979e8;
  border-radius: var(--radius);
  box-shadow: 0 9px 26px rgba(28, 73, 137, 0.07);
}

.ai-transparency__heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  color: var(--blue-dark);
  background: #ffffff;
  border-right: 1px solid #dce6f3;
}

.ai-transparency__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  color: var(--blue-dark);
  background: #e7f0ff;
  border: 1px solid #d0e0f7;
  border-radius: 9px;
  box-shadow: none;
  font-size: 0.78rem;
}

.ai-transparency__label {
  margin: 0;
  color: var(--ink-strong);
  font-size: 0.73rem;
  font-weight: 760;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.ai-transparency__content {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0.85rem 1.05rem;
  background: #ffffff;
}

.ai-transparency p {
  max-width: none;
  margin: 0;
  color: #52657b;
  font-size: 0.84rem;
  line-height: 1.62;
}

.ai-ribbon {
  display: inline;
  padding: 0.04em 0.3em 0.1em;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: inherit;
}

.ai-ribbon--visuals {
  color: #ffffff;
  background: #990f02;
}

.ai-ribbon--ownership {
  color: #ffffff;
  background: #1769e0;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */

.access-card {
  position: relative;
  width: 100%;
  max-width: none;
  margin-top: 1.6rem;
  padding: clamp(1.25rem, 2.2vw, 1.7rem);
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 78%, #f7faff 100%);
  border: 1px solid #cfdbed;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(24, 52, 91, 0.075);
}

.access-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  content: "";
  background: linear-gradient(180deg, #4f7fe8, #1769e0);
}

.access-card__heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.access-card__heading-main {
  display: flex;
  min-width: 0;
  gap: 0.85rem;
  align-items: center;
}

.access-card__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  color: #ffffff;
  background: linear-gradient(145deg, #4f7fe8, #1769e0);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 11px;
  box-shadow: 0 7px 17px rgba(23, 105, 224, 0.18);
}

.access-card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.access-card__eyebrow {
  margin: 0 0 0.18rem;
  color: var(--blue-dark);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}

.access-card__heading h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.access-card__cloudflare-badge {
  display: block;
  flex: 0 0 auto;
  width: clamp(8.75rem, 13vw, 11.5rem);
  height: auto;
}

.access-card__summary {
  max-width: none;
  margin: 1.05rem 0 0.85rem;
  color: #45566d;
  font-size: 0.96rem;
  line-height: 1.62;
}

.access-card__notice {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  max-width: none;
  padding: 0.72rem 0;
  background: transparent;
  border-top: 1px solid #dce6f3;
  border-bottom: 1px solid #dce6f3;
}

.access-card__notice-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--blue-dark);
  background: #e8f1ff;
  border: 1px solid #cbdcf7;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 750;
}

.access-card__notice p {
  margin: 0;
  color: #53657b;
  font-size: 0.86rem;
  line-height: 1.5;
}

.access-card__notice p span {
  color: var(--ink-strong);
  font-weight: 700;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.access-button {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 680;
  line-height: 1.2;
  transition: color 150ms ease, background-color 150ms ease,
    border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.access-button--primary,
.access-button--primary:hover {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.access-button--primary {
  box-shadow: 0 9px 20px rgba(23, 105, 224, 0.20);
}

.access-button--primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  box-shadow: 0 11px 24px rgba(15, 86, 189, 0.25);
  transform: translateY(-1px);
}

.access-button--primary svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.access-button--secondary {
  color: #34547c;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.access-button--secondary:hover {
  color: var(--blue-dark);
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.access-card__assurance {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 1.15rem 0 0;
  color: #66778c;
  font-size: 0.82rem;
  line-height: 1.5;
}

.access-card__assurance svg {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: #2f7c5c;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 600px) {
  .access-card {
    border-radius: 14px;
  }

  .access-card__heading {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .access-card__heading-main {
    align-items: flex-start;
  }

  .access-card__cloudflare-badge {
    width: 9.25rem;
    margin-left: 3.15rem;
  }

  .access-actions {
    width: 100%;
  }

  .access-button--primary {
    width: 100%;
  }

  .access-button--secondary {
    min-height: auto;
    padding: 0.35rem 0.1rem;
  }
}

.protected-session-status {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1.15rem;
  padding: 0.7rem 0.85rem;
  color: #275d49;
  background: #f0f8f4;
  border: 1px solid #c9e2d6;
  border-radius: 10px;
  box-shadow: 0 7px 18px rgba(34, 93, 69, 0.06);
  font-size: 0.82rem;
  line-height: 1.35;
}

/* Match the protected-session banner to the Home hero's inner content edges. */
.home-page main.content > .protected-session-status {
  width: calc(100% - 2rem);
  max-width: calc(var(--content-width) - 2rem);
}

.protected-session-status__identity {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.protected-session-status__identity svg {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: #2f7c5c;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.protected-session-status__verified {
  color: #1f5c43;
  font-weight: 720;
}

.protected-session-status__scope::before {
  margin-right: 0.5rem;
  color: #86a798;
  content: "·";
}

.protected-session-status__logout {
  color: #315f76;
  font-weight: 650;
  white-space: nowrap;
}

.protected-session-status__logout:hover {
  color: var(--blue-dark);
}

@media (max-width: 520px) {
  .protected-session-status {
    align-items: flex-start;
  }

  .protected-session-status__identity {
    flex-wrap: wrap;
  }

  .protected-session-status__scope {
    flex-basis: 100%;
    padding-left: 1.55rem;
  }

  .protected-session-status__scope::before {
    display: none;
  }
}

.back-to-top {
  position: fixed;
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 1050;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: #ffffff;
  background: linear-gradient(145deg, #1769e0, #0f56bd);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(15, 86, 189, 0.28);
  opacity: 0;
  transform: translateY(0.65rem);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.back-to-top svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 86, 189, 0.38);
  transform: translateY(-2px);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.28);
  outline-offset: 3px;
}

@media (max-width: 575px) {
  .ai-transparency {
    grid-template-columns: 1fr;
    margin-top: 1rem;
    margin-bottom: 1.75rem;
    padding: 0;
  }

  .ai-transparency__heading {
    padding: 0.7rem 0.85rem;
    border-right: 0;
    border-bottom: 1px solid #dce6f3;
  }

  .ai-transparency__content {
    padding: 0.75rem 0.85rem;
  }

  .back-to-top {
    right: 0.9rem;
    bottom: 0.9rem;
    width: 2.6rem;
    height: 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}

@media (min-width: 992px) {
  body:has(nav[role="doc-toc"]) nav[role="doc-toc"] {
    position: sticky !important;
    top: 68px !important;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    padding-left: 0.85rem;
    padding-right: 0.25rem;
  }
}

/* =========================================================
   HOME PAGE
   ========================================================= */

.home-page #title-block-header,
.home-page .quarto-title-block {
  display: none !important;
}

.home-page .page-columns .content {
  grid-column: screen-start / screen-end !important;
}

.home-page main.content {
  max-width: none !important;
  padding: 0 !important;
}

.home-page main.content > * {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

/* Match the transparency panel to the Home hero's inner content edges. */
.home-page main.content > .ai-transparency {
  width: calc(100% - 2rem);
  max-width: calc(var(--content-width) - 2rem);
}

.section-label,
.eyebrow,
.featured-label {
  display: inline-block;
  color: var(--blue-dark);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.70fr);
  gap: 3.2rem;
  align-items: center;
  padding: 2.5rem 1rem 3.6rem;
}

.hero-main {
  max-width: 720px;
}

.hero-main h1 {
  margin: 0.8rem 0 0.5rem;
  font-size: clamp(2.4rem, 4.2vw, 3.2rem);
  font-weight: 735;
  line-height: 1.04;
}

.profile-line {
  color: #3f5066;
  font-size: clamp(0.96rem, 1.5vw, 1.08rem);
  font-weight: 560;
  line-height: 1.45;
  margin-bottom: 1.15rem;
}

.hero-main > p {
  max-width: 720px;
  color: #617186;
  font-size: 0.95rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-top: 1.7rem;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 1.05rem;
  border-radius: 10px;
  color: #ffffff !important;
  background: var(--blue);
  border: 1px solid var(--blue);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 150ms ease, background-color 150ms ease,
    box-shadow 150ms ease;
}

.button-primary:hover {
  color: #ffffff !important;
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(23, 105, 224, 0.16);
}

.text-action,
.section-link,
.card-link {
  display: inline-flex;
  align-items: center;
  color: var(--blue-dark) !important;
  font-weight: 680;
}

.text-action::after,
.section-link::after,
.card-link::after {
  content: "→";
  margin-left: 0.38rem;
  transition: transform 150ms ease;
}

.text-action:hover::after,
.section-link:hover::after,
.card-link:hover::after {
  transform: translateX(3px);
}

.current-building {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.55rem 1.65rem;
  box-shadow: var(--shadow-soft);
}

.current-building h3 {
  margin: 0.62rem 0 0.65rem;
  font-size: 1.16rem;
  font-weight: 700;
}

.current-building p,
.current-building li {
  color: #68778a;
  font-size: 0.86rem;
  line-height: 1.55;
}

.current-building ul {
  margin: 0.52rem 0 0.75rem;
  padding-left: 1.1rem;
}

.featured-rule {
  height: 1px;
  background: var(--line);
  margin: 1.1rem 0 0.95rem;
}

.site-note {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 0.74rem;
  font-weight: 520;
}

.home-section {
  padding: 4.4rem 1rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 1.8rem;
}

.section-heading h2 {
  margin: 0.45rem 0 0.55rem;
}

.section-heading p {
  color: var(--muted);
  font-size: 0.94rem;
}

.recent-writing {
  max-width: none !important;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.recent-writing > * {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 4rem;
  border-top: 1px solid var(--line-strong);
}

.topic-item {
  padding: 1.5rem 0 1.7rem;
  border-bottom: 1px solid var(--line);
}

.topic-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.topic-item p {
  max-width: 470px;
  margin-bottom: 0.7rem;
  font-size: 0.91rem;
}

.home-about {
  max-width: none !important;
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 4rem;
  align-items: start;
  background: var(--surface-blue);
  border-top: 1px solid #d4e3f8;
  padding: 4rem max(1rem, calc((100vw - var(--content-width)) / 2));
}

.about-heading h2 {
  margin: 0.45rem 0 0;
  font-size: 1.55rem;
}

.about-copy {
  max-width: 650px !important;
}

.about-copy p {
  color: #4f6076;
  font-size: 0.96rem;
  line-height: 1.7;
}

/* =========================================================
   LISTINGS / LEARNING HUB
   ========================================================= */

.quarto-listing {
  margin-top: 1rem;
}

.quarto-listing .card,
.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
  transition: transform 150ms ease, border-color 150ms ease,
    box-shadow 150ms ease;
}

.quarto-listing .card:hover,
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(20, 35, 60, 0.065);
}

.quarto-listing .card-img-top,
.card-img-top {
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.quarto-listing .card-body {
  padding: 0.95rem 1rem 0.9rem;
}

.card-title,
.listing-title,
.quarto-listing .listing-title {
  color: var(--ink-strong);
  font-size: 0.96rem;
  font-weight: 675;
  line-height: 1.28;
}

.card-text,
.listing-description,
.quarto-listing .listing-description {
  color: #718096;
  font-size: 0.81rem;
  font-weight: 400;
  line-height: 1.46;
}

.quarto-listing .listing-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quarto-listing .listing-date,
.listing-date {
  color: #98a2b3;
  font-size: 0.71rem;
  font-weight: 500;
}

/* Article access metadata stays compact, while Private reference codes get a full row. */
.quarto-listing .card-body {
  display: flex;
  flex-direction: column;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid #edf1f6;
}

.article-card-meta--private {
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.article-card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.article-status {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.45rem;
  padding: 0.16rem 0.42rem;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 0.58rem;
  font-weight: 760;
  letter-spacing: 0.045em;
  line-height: 1.15;
}

.article-status--public {
  color: #0f56bd;
  background: #edf4ff;
  border-color: #cfe0fa;
}

.article-status--locked {
  color: #7a4b00;
  background: #fff7e6;
  border-color: #efd9a8;
}

.article-status--private {
  color: #4b5565;
  background: #f1f3f6;
  border-color: #d8dde5;
}

.article-private-code {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  color: #53647b;
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.045em;
  line-height: 1.25;
  white-space: nowrap;
}

.article-private-code-label {
  color: #9aa4b2;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.article-card-date {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  margin-left: auto;
  white-space: nowrap;
}

.article-date-label {
  color: #a0a9b7;
  font-size: 0.56rem;
  font-weight: 680;
  letter-spacing: 0.04em;
}

.article-listing-empty {
  padding: 1.1rem 1.2rem;
  color: #66758a;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.84rem;
}

.quarto-listing .listing-category,
.quarto-category,
.category {
  color: var(--blue-dark);
  background: transparent;
  border: 0;
  font-size: 0.69rem;
  font-weight: 720;
  letter-spacing: 0.045em;
  padding: 0;
  text-transform: uppercase;
}

/* Learning Hub title block */
.learning-hub-page #title-block-header,
.learning-hub-page .quarto-title-block {
  margin-bottom: 1rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid var(--line);
}

.learning-hub-page .quarto-title h1.title {
  font-size: clamp(2rem, 3vw, 2.65rem) !important;
  line-height: 1.08;
}

.learning-hub-page .quarto-title .description {
  max-width: 820px;
  color: var(--muted);
  font-size: 0.92rem !important;
  line-height: 1.5;
}

.learning-hub-page main > p:first-of-type {
  max-width: 920px;
  color: #66758a;
  font-size: 0.92rem;
  line-height: 1.62;
}

/* Compact count strip */
.learning-hub-summary {
  display: grid !important;
  grid-template-columns: 1.05fr repeat(5, minmax(0, 1fr)) !important;
  gap: 0 !important;
  align-items: stretch !important;
  margin: 1.25rem 0 1.65rem !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line) !important;
  border-radius: 12px;
  overflow: hidden;
}

.learning-hub-total,
.learning-hub-category {
  min-height: 70px;
  display: flex !important;
  align-items: center;
  gap: 0.45rem;
  padding: 0.72rem 0.82rem !important;
  border: 0 !important;
}

.learning-hub-total {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: #f8fbff;
}

.learning-hub-total .count-number {
  color: var(--ink-strong);
  font-size: 1.5rem;
  font-weight: 735;
  line-height: 1;
}

.learning-hub-total .count-label {
  color: #69788b;
  font-size: 0.71rem;
  font-weight: 540;
}

.learning-hub-categories {
  display: contents !important;
}

.learning-hub-category {
  justify-content: space-between;
  border-left: 1px solid var(--line) !important;
}

.learning-hub-category a {
  color: #405167 !important;
  font-size: 0.74rem !important;
  font-weight: 575 !important;
  line-height: 1.25;
}

.learning-hub-category .category-count {
  flex: 0 0 auto;
  min-width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-dark);
  background: #edf4ff;
  border-radius: 999px;
  font-size: 0.70rem;
  font-weight: 720;
}

.locked-count-label {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: #6d5017;
  font-size: 0.72rem;
  font-weight: 650;
}

.learning-hub-locked .category-count {
  color: #7a4b00;
  background: #fff3d8;
}

/* =========================================================
   ARTICLE PAGES / TOC
   ========================================================= */

body:has(nav[role="doc-toc"]) .quarto-title-block,
body:has(nav[role="doc-toc"]) #title-block-header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.8rem;
  padding-bottom: 1.25rem;
}

body:has(nav[role="doc-toc"]) .quarto-title h1.title {
  font-size: clamp(2.15rem, 3.6vw, 3rem) !important;
  line-height: 1.08 !important;
}

body:has(nav[role="doc-toc"]) .quarto-title .subtitle {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem) !important;
  line-height: 1.38 !important;
  font-weight: 450;
}

nav[role="doc-toc"] {
  font-size: 0.81rem !important;
  line-height: 1.35 !important;
}

nav[role="doc-toc"] .toc-title {
  color: var(--ink-strong) !important;
  font-size: 0.85rem !important;
  font-weight: 680 !important;
  margin-bottom: 0.5rem !important;
}

nav[role="doc-toc"] a {
  color: #647489 !important;
  font-size: 0.79rem !important;
  line-height: 1.30 !important;
}

nav[role="doc-toc"] a:hover,
nav[role="doc-toc"] a.active {
  color: var(--blue-dark) !important;
}

/* =========================================================
   ARTICLE CONTENT DETAILS
   ========================================================= */

.callout {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}

.callout-note {
  border-left-color: var(--blue) !important;
}

pre {
  background: #101827;
  color: #e5edf8;
  border: 1px solid #1e293b;
  border-radius: 8px;
}

code {
  color: #174ea6;
  background: #edf4ff;
  padding: 0.12rem 0.28rem;
  border-radius: 4px;
}

pre code {
  color: inherit;
  background: transparent;
  padding: 0;
}

thead {
  background: var(--surface-soft);
}

figure,
.quarto-figure {
  margin-top: 1.5rem;
  margin-bottom: 1.7rem;
}

img {
  border-radius: 8px;
}

figcaption,
.figure-caption {
  color: var(--muted-light);
  font-size: 0.88rem;
}

/* =========================================================
   FOOTER
   ========================================================= */

.nav-footer,
footer.footer {
  background: #111827 !important;
  color: #b8c2d0 !important;
  border-top: 0;
  margin-top: 0;
  font-size: 0.86rem;
}

.nav-footer a,
footer.footer a {
  color: #d7e4f7 !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991px) {
  .navbar .navbar-toggler {
    color: #26344d !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    opacity: 1 !important;
  }

  .navbar .navbar-toggler:hover,
  .navbar .navbar-toggler:focus-visible {
    background: #f2f6ff !important;
    border-color: #d8e2fa !important;
  }

  .navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.18rem rgba(79, 120, 232, 0.18) !important;
  }

  .navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2326344d' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.25' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    opacity: 1 !important;
  }

  .navbar .navbar-brand-container,
  .navbar .quarto-navbar-tools,
  #quarto-search {
    position: static !important;
    transform: none !important;
  }

  /* Preserve Bootstrap's mobile collapse behavior. */
  .navbar .navbar-collapse.collapse:not(.show) {
    display: none !important;
  }

  .navbar .navbar-collapse.collapse.show {
    display: block !important;
    max-height: calc(100vh - 50px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .navbar .navbar-nav .nav-link {
    font-size: 0.88rem !important;
    margin: 0.1rem 0.75rem !important;
    padding: 0.55rem 0 !important;
    box-shadow: none !important;
  }

  .navbar .dropdown-menu {
    min-width: 0 !important;
    box-shadow: none !important;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .current-building {
    max-width: 620px;
  }

  .topic-list {
    grid-template-columns: 1fr;
  }

  .home-about {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .learning-hub-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .learning-hub-total {
    grid-column: 1 / -1;
    min-height: 56px;
    flex-direction: row;
    align-items: baseline;
  }

  .learning-hub-category {
    border-left: 0 !important;
    border-top: 1px solid var(--line) !important;
  }
}

@media (max-width: 640px) {
  .home-hero,
  .home-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .home-hero {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .hero-main h1 {
    font-size: 2.4rem;
  }

  .home-about {
    padding: 3.4rem 1rem;
  }

  .learning-hub-summary {
    grid-template-columns: 1fr !important;
  }

  .learning-hub-total {
    grid-column: auto;
  }

  .learning-hub-category {
    border-left: 0 !important;
    border-top: 1px solid var(--line) !important;
  }
}


/* =========================================================
   Refinement pass — clearer home sections, About page,
   and search icon polish
   ========================================================= */

/* Remove the extra Quarto/theme underline from custom homepage headings.
   The section/divider structure already provides enough hierarchy. */
.home-page .section-heading h2,
.home-page .about-heading h2 {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Keep only the topic-list divider, avoiding the double-line effect. */
.home-page .topic-list {
  margin-top: 0.25rem;
}

/* Search: keep it icon-only, compact, and visually consistent with the nav.
   Clicking Quarto's icon still opens the search UI. */
#quarto-search,
#quarto-search button,
#quarto-search .aa-DetachedSearchButton {
  color: #344054 !important;
  opacity: 1 !important;
}

#quarto-search svg,
#quarto-search .aa-DetachedSearchButtonIcon {
  color: #344054 !important;
  stroke: #344054 !important;
  opacity: 1 !important;
  width: 1.02rem !important;
  height: 1.02rem !important;
}

/* =========================================================
   ABOUT PAGE
   ========================================================= */

.about-page #title-block-header,
.about-page .quarto-title-block {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.about-page main.content {
  width: 100% !important;
  max-width: var(--content-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 2.2rem 1rem 4.5rem !important;
}

.about-lead {
  max-width: 820px;
  margin-bottom: 2rem;
}

.about-lead h2 {
  margin: 0.45rem 0 0.8rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.about-lead p {
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.7;
}

.about-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.6rem 0 3.2rem;
}

.about-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.45rem 1.5rem;
  box-shadow: 0 8px 24px rgba(20, 35, 60, 0.045);
}

.about-panel h3 {
  margin: 0 0 0.55rem;
  font-size: 1.13rem;
}

.about-panel p {
  font-size: 0.92rem;
  line-height: 1.62;
  margin-bottom: 0.8rem;
}

.about-section {
  padding: 2.6rem 0;
  border-top: 1px solid var(--line);
}

.about-section h2 {
  margin: 0.45rem 0 0.9rem;
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
}

.about-section p {
  max-width: 900px;
  font-size: 0.96rem;
  line-height: 1.7;
}

.about-sharing {
  background: linear-gradient(180deg, rgba(237, 244, 255, 0.50), rgba(247, 249, 252, 0));
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.about-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 2.5rem;
  align-items: start;
  margin-top: 1rem;
  padding: 2rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(20, 35, 60, 0.05);
}

.about-contact h2 {
  margin: 0.45rem 0 0.75rem;
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
}

.about-contact p {
  font-size: 0.94rem;
  line-height: 1.68;
}

.contact-links {
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}

.contact-links p {
  margin-bottom: 0.85rem;
}

.contact-links strong {
  display: block;
  color: #53647a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}

.contact-links a {
  font-size: 0.9rem;
  font-weight: 600;
}

.about-closing {
  max-width: 820px;
  margin-top: 1.7rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

@media (max-width: 800px) {
  .about-two-column,
  .about-contact {
    grid-template-columns: 1fr;
  }

  .contact-links {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 1.25rem;
  }
}


/* =========================================================
   Learning Hub & Topic Pages — final refinement
   ========================================================= */

/* --- Topic page title area --- */
.topic-page main.content {
  padding-top: 2.2rem !important;
  padding-bottom: 4.5rem !important;
}

.topic-page #title-block-header,
.topic-page .quarto-title-block {
  margin-bottom: 1.35rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid var(--line);
}

.topic-page .quarto-title h1.title {
  margin-bottom: 0.35rem !important;
  font-size: clamp(2.1rem, 3.2vw, 2.65rem) !important;
  font-weight: 720 !important;
  line-height: 1.08 !important;
}

.topic-page .quarto-title .description {
  max-width: 780px;
  color: #5f6f82;
  font-size: 0.93rem !important;
  line-height: 1.52 !important;
}

/* Short intro below topic title */
.topic-page main.content > p:first-of-type {
  max-width: 760px;
  margin-bottom: 1.3rem;
  color: #718096;
  font-size: 0.9rem;
  line-height: 1.55;
}


/* --- Learning Hub spacing --- */
.learning-hub-page main.content {
  padding-top: 2.1rem !important;
  padding-bottom: 4.5rem !important;
}

.learning-hub-page main.content > p:first-of-type {
  max-width: 860px;
  margin-bottom: 1.25rem;
  color: #718096 !important;
  font-size: 0.9rem !important;
  line-height: 1.56 !important;
}


/* --- Filter --- */
.quarto-listing-filter {
  margin-top: 0.75rem !important;
  margin-bottom: 1.1rem !important;
}

.quarto-listing-filter .input-group {
  width: min(100%, 220px);
  margin-left: auto;
}

.quarto-listing-filter .form-control,
.quarto-listing-filter .input-group-text {
  min-height: 35px;
  border-color: var(--line-strong);
  background: #ffffff;
  font-size: 0.81rem;
}

.quarto-listing-filter .form-control::placeholder {
  color: #98a2b3;
}


/* --- Article cards --- */
.quarto-listing .card {
  height: 100%;
  border-radius: 11px;
}

.quarto-listing .card-body {
  padding: 0.9rem 0.95rem 0.85rem !important;
}

.quarto-listing .listing-title,
.quarto-listing .card-title {
  margin-bottom: 0.38rem !important;
  color: var(--ink-strong) !important;
  font-size: 0.94rem !important;
  font-weight: 665 !important;
  line-height: 1.27 !important;
}

.quarto-listing .listing-category {
  color: #5c6f89 !important;
  background: #fafcff !important;
  border: 1px solid #d7e0eb !important;
  border-radius: 5px !important;
  padding: 0.13rem 0.38rem !important;

  font-size: 0.63rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.045em !important;
}

.quarto-listing .listing-description {
  color: #748196 !important;
  font-size: 0.79rem !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
}

.quarto-listing .listing-date {
  color: #98a2b3 !important;
  font-size: 0.69rem !important;
  font-weight: 500 !important;
}


/* --- Learning Hub count strip --- */
.learning-hub-summary {
  margin-top: 0.95rem !important;
  margin-bottom: 1.3rem !important;
}

.learning-hub-total,
.learning-hub-category {
  min-height: 62px !important;
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
}

/* Learning Hub intro: use the full content width */
.learning-hub-page main.content > p:first-of-type {
  max-width: none !important;
  width: 100% !important;
}

/* =========================================================
   Navbar grouped color treatment: unified brand-blue ribbons
   ========================================================= */

.navbar,
.navbar.navbar-expand-lg {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid #dbe4ef !important;
  box-shadow:
    0 1px 0 rgba(23, 105, 224, 0.10),
    0 4px 12px rgba(15, 23, 42, 0.035) !important;
  backdrop-filter: saturate(170%) blur(18px);
}

.navbar .navbar-brand {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.navbar .navbar-nav .nav-link {
  color: #344054 !important;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active,
.navbar .quarto-navbar-tools .quarto-navigation-tool:hover,
#quarto-search:hover {
  color: #1769e0 !important;
}

.navbar .quarto-navbar-tools .quarto-navigation-tool,
#quarto-search {
  color: #344054 !important;
}

@media (min-width: 992px) {
  .navbar .navbar-collapse {
    gap: 0.62rem !important;
  }

  /* Group 1: site navigation */
  .navbar .navbar-collapse > .navbar-nav.me-auto {
    padding: 0.12rem 0.38rem !important;
    background: #f2f6ff !important;
    border: 1px solid #d8e2fa !important;
    border-radius: 999px !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.86),
      0 2px 8px rgba(15, 23, 42, 0.035) !important;
  }

  .navbar .navbar-collapse > .navbar-nav.me-auto .nav-link {
    margin: 0 0.38rem !important;
    padding-top: 0.72rem !important;
    padding-bottom: 0.66rem !important;
    color: #26344d !important;
  }

  .navbar .navbar-collapse > .navbar-nav.me-auto > .nav-item > .nav-link:hover,
  .navbar .navbar-collapse > .navbar-nav.me-auto > .nav-item > .nav-link.active {
    color: #3f68d9 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: inset 0 -1.5px 0 #4f78e8 !important;
  }

  /* Reset the right list so its two groups remain visibly separate. */
  .navbar .navbar-collapse > .navbar-nav.ms-auto {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* Group 2: LinkedIn and GitHub */
  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact {
    display: flex;
    align-items: center;
    background: #f2f6ff;
    border-top: 1px solid #d8e2fa;
    border-bottom: 1px solid #d8e2fa;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact:first-child {
    border-left: 1px solid #d8e2fa;
    border-radius: 999px 0 0 999px;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact:nth-child(2) {
    border-right: 1px solid #d8e2fa;
    border-radius: 0 999px 999px 0;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact .nav-link {
    margin: 0 !important;
    padding: 0.72rem 0.58rem 0.66rem !important;
    color: #344054 !important;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact .nav-link:hover,
  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact .nav-link:focus-visible {
    color: #3f68d9 !important;
    background: transparent !important;
    box-shadow: inset 0 -1.5px 0 #4f78e8 !important;
  }

  /* Group 3: Private Workspace */
  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item:last-child:not(.compact) {
    margin-left: 0.55rem;
    background: #f2f6ff;
    border: 1px solid #d8e2fa;
    border-radius: 999px;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item:last-child:not(.compact) .nav-link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.38rem;
    margin: 0 !important;
    padding: 0.72rem 0.72rem 0.66rem !important;
    color: #344054 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 999px !important;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item:last-child:not(.compact) .nav-link:hover,
  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item:last-child:not(.compact) .nav-link:focus-visible,
  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item:last-child:not(.compact) .nav-link.active {
    color: #3f68d9 !important;
    background: transparent !important;
    box-shadow: inset 0 -1.5px 0 #4f78e8 !important;
  }
}

@media (max-width: 991px) {
  .navbar .navbar-collapse > .navbar-nav.me-auto {
    margin: 0.35rem 0.75rem !important;
    padding: 0.3rem !important;
    background: #f2f6ff !important;
    border: 1px solid #d8e2fa !important;
    border-radius: 16px !important;
  }

  .navbar .navbar-collapse > .navbar-nav.me-auto > .nav-item > .nav-link {
    color: #26344d !important;
  }

  .navbar .navbar-collapse > .navbar-nav.me-auto > .nav-item > .nav-link:hover,
  .navbar .navbar-collapse > .navbar-nav.me-auto > .nav-item > .nav-link.active {
    color: #3f68d9 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: inset 0 -1.5px 0 #4f78e8 !important;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 !important;
    margin: 0.35rem 0.75rem 0.75rem !important;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact {
    background: #f2f6ff;
    border-top: 1px solid #d8e2fa;
    border-bottom: 1px solid #d8e2fa;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact:first-child {
    border-left: 1px solid #d8e2fa;
    border-radius: 999px 0 0 999px;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact:nth-child(2) {
    border-right: 1px solid #d8e2fa;
    border-radius: 0 999px 999px 0;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact .nav-link {
    margin: 0 !important;
    padding: 0.52rem 0.62rem !important;
    color: #344054 !important;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item:last-child:not(.compact) {
    margin-left: 0.5rem;
    background: #f2f6ff;
    border: 1px solid #d8e2fa;
    border-radius: 999px;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item:last-child:not(.compact) .nav-link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.38rem;
    margin: 0 !important;
    padding: 0.52rem 0.7rem !important;
    color: #344054 !important;
  }

  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact .nav-link:hover,
  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item.compact .nav-link:focus-visible,
  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item:last-child:not(.compact) .nav-link:hover,
  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item:last-child:not(.compact) .nav-link:focus-visible,
  .navbar .navbar-collapse > .navbar-nav.ms-auto > .nav-item:last-child:not(.compact) .nav-link.active {
    color: #3f68d9 !important;
    background: transparent !important;
    box-shadow: inset 0 -1.5px 0 #4f78e8 !important;
  }
}

@media (max-width: 640px) {
  .article-card-meta-row {
    flex-wrap: wrap;
  }

  .article-card-date {
    flex-basis: 100%;
    margin-left: 0;
  }
}

/* =========================================================
   Small Brand Signal beside name
   ========================================================= */

.navbar .navbar-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 0.55rem;
}

/* subtle energy / data signal */
.navbar .navbar-brand::before {
  content: "";
  display: inline-block;

  width: 17px;
  height: 18px;
  flex: 0 0 17px;

  background:
  linear-gradient(#1769e0, #1769e0)
    left bottom / 3px 18px no-repeat,

  linear-gradient(#4f8ee8, #4f8ee8)
    center bottom / 3px 13px no-repeat,

  linear-gradient(#8db8f5, #8db8f5)
    right bottom / 3px 8px no-repeat;

  border-radius: 0.1px;
}
