/* ==========================================================================
   Essay Header + Breadcrumb Navigation
   --------------------------------------------------------------------------
   Purpose:
   - Sticky header with a centered home icon/logo.
   - Separate sticky breadcrumb bar beneath the header.
   - Uses full-bleed (100vw + calc) to prevent side “peeking” from shadows.
   Notes:
   - Full-bleed patterns can be sensitive to scrollbar width on some browsers.
     Mitigate with: html { overflow-x: hidden; }
   ========================================================================== */


/*------------------------------------*\
  PAGE CONTAINER
  - Main content column used across pages.
\*------------------------------------*/
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 2rem;
}


/*------------------------------------*\
  STICKY SITE HEADER (Home icon/logo)
  - Stays pinned to top of viewport.
  - Full-bleed background prevents adjacent shadows from showing at edges.
\*------------------------------------*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 1001;

  background: #fff;
  padding: 0.5rem 0;
  transition: padding 0.3s ease-in-out;

  /* Full-bleed background layer */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle separation rule under the header
   - Uses an ::after so layout doesn’t shift when scrolled */
.site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;

  width: 100%;
  height: 1px;
  background: #e5e5e5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Click target wrapper for the home icon/logo */
.site-header__home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Logo sizing (resizes in the scrolled state below) */
.site-header__logo {
  width: 60px;
  height: auto;
  transition: width 0.3s;
}

/* Compact header state
   - JS toggles .scrolled based on scroll position */
.site-header.scrolled {
  padding: 0.5rem 0;
}

.site-header.scrolled .site-header__logo {
  width: 40px;
}


/*------------------------------------*\
  BREADCRUMB BAR
  - Separate sticky layer beneath header.
  - Full-bleed background prevents hero/image shadows from “peeking” at edges.
\*------------------------------------*/
.breadcrumb {
  position: sticky;
  top: var(--header-height, 56px);
  z-index: 1000;

  /* Full-bleed background layer */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  background: #fff;
  padding: 0.65rem 0;
  font-size: 0.875rem;

  /* Clean separation line (subtle; avoids competing shadows) */
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);

  transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

/* Hidden state used during scroll
   - JS toggles .hidden to slide the breadcrumb out of view */
.breadcrumb.hidden {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

/* Breadcrumb inner column
   - Keeps breadcrumb content aligned to a readable width */
.breadcrumb__list {
  max-width: 736px; /* requested breadcrumb width */
  margin: 0 auto;
  padding: 0 2rem;

  display: flex;
  justify-content: center; /* centered look */
  align-items: center;
  flex-wrap: wrap;

  list-style: none;
  gap: 0; /* separators handle spacing */
}

/* Default breadcrumb item styling */
.breadcrumb__item {
  font-weight: 500;
  color: #666;
}

/* Current page state */
.breadcrumb__item[aria-current="page"] {
  color: #aaa;
  font-weight: 400;
}

/* Link inherits item color for clean hierarchy */
.breadcrumb__link {
  color: inherit;
  text-decoration: none;
}

.breadcrumb__link:hover {
  color: #333;
}

/* Separator glyph between items */
.breadcrumb__separator {
  margin: 0 0.5rem;
  color: #999;
}