/* ─── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  background-color: var(--terra) !important;
  border-bottom: 2px solid rgba(0, 0, 0, 0.15);
  box-shadow: none;
}

.navbar-sketchbook {
  position: sticky;
  top: 0;
  z-index: 1020;
}

.navbar-sketchbook .container-fluid {
  justify-content: flex-start;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.navbar-brand {
  color: var(--white) !important;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

.navbar-brand:hover {
  color: var(--sunset) !important;
}

.navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0 auto;
}

/* Override typography.css link styles inside the navbar */
.navbar a,
.navbar a:hover,
.navbar a:focus,
.navbar a:visited {
  text-decoration: none !important;
  border-bottom: none !important;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7) !important;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--sunset) !important;
}

button.nav-link {
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.nav-item-search {
  margin-left: 0.4rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}


/* ─── Breadcrumb bar ──────────────────────────────────────────────────────── */
.sketchbook-breadcrumb-bar {
  background: rgba(237, 139, 0, 0.07);
  border-bottom: 1px solid rgba(237, 139, 0, 0.18);
  padding: 0.35rem 0;
}

.sketchbook-breadcrumb-inner {
  max-width: 968px;
  padding-left: 2rem;
  margin: 0 auto;
}

.breadcrumb-nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.breadcrumb-nav-list-item {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1;
}

.breadcrumb-nav-list-item + .breadcrumb-nav-list-item::before {
  content: '/';
  color: rgba(237, 139, 0, 0.35);
  margin: 0 0.35rem;
}

.breadcrumb-nav-list-item a {
  color: var(--sunset);
  text-decoration: none;
  opacity: 0.75;
}

.breadcrumb-nav-list-item a:hover {
  opacity: 1;
}

.breadcrumb-nav-list-item[aria-current="page"] span {
  color: rgba(237, 139, 0, 0.55);
}


/* ─── Scrollspy ──────────────────────────────────────────────────────────── */

.scrollspy-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}

/* Two-column layout at medium screens: content + nav side by side */
@media (min-width: 60rem) {
  .scrollspy-wrapper {
    grid-template-columns: 1fr 11rem;
    column-gap: 3rem;
  }
}

/* Wider nav column at large screens to reduce label truncation */
@media (min-width: 80rem) {
  .scrollspy-wrapper {
    grid-template-columns: 1fr 14rem;
  }
  .scrollspy-label {
    max-width: 12rem;
  }
}

.scrollspy-content {
  min-width: 0;
}

.scrollspy {
  display: none;
}

@media (min-width: 60rem) {
  .scrollspy {
    display: block;
    position: sticky;
    top: 5rem;
    align-self: start;
  }
}

.scrollspy-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
}

/* Vertical rule behind the dots */
.scrollspy-list::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--rule-gray);
}

.scrollspy-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  text-decoration: none !important;
  border-bottom: none !important;
}

.scrollspy-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-gray);
  white-space: nowrap;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.scrollspy-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-gray);
  background: var(--white);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: border-color 0.15s, background 0.15s;
}

.scrollspy-item.active .scrollspy-dot {
  background: var(--terra);
  border-color: var(--terra);
}

.scrollspy-item.active .scrollspy-label {
  color: var(--terra);
}

.scrollspy-link:hover .scrollspy-dot {
  border-color: var(--dark-gray);
}

.scrollspy-link:hover .scrollspy-label {
  color: var(--dark-gray);
}


/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar-sketchbook .container-fluid {
    min-height: auto;
    gap: 0.8rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
  }

  .breadcrumb-nav-list-item {
    font-size: 0.72rem;
  }
}
