/* Site-wide hamburger navigation. Namespaced with `cdnav-` so it stays
   self-contained regardless of whichever project's stylesheet also loads. */

.cdnav-toggle {
  position: fixed;
  top: 0.85rem;
  left: 1rem;
  z-index: 1001;
  width: 42px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid #262626;
  border-radius: 10px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
}

.cdnav-toggle .cdnav-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cdnav-root.is-open .cdnav-toggle .cdnav-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.cdnav-root.is-open .cdnav-toggle .cdnav-bar:nth-child(2) {
  opacity: 0;
}

.cdnav-root.is-open .cdnav-toggle .cdnav-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.cdnav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cdnav-root.is-open .cdnav-overlay {
  opacity: 1;
  pointer-events: auto;
}

.cdnav-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(85vw, 320px);
  z-index: 1000;
  background: #0a0a0a;
  border-right: 1px solid #1c1c1c;
  overflow: hidden;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.cdnav-root.is-open .cdnav-panel {
  transform: translateX(0);
}

.cdnav-track {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 0.25s ease;
}

.cdnav-panel[data-view="pages"] .cdnav-track {
  transform: translateX(-50%);
}

.cdnav-view {
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.1rem 1.5rem;
  overflow-y: auto;
}

.cdnav-header {
  display: flex;
  align-items: center;
  padding-left: 2.75rem;
  margin-bottom: 1.25rem;
  min-height: 42px;
}

.cdnav-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.cdnav-back {
  background: none;
  border: none;
  color: #ccc;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0;
}

.cdnav-back:hover {
  color: #7cff6b;
}

.cdnav-project-name {
  color: #7cff6b;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.cdnav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cdnav-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  border-bottom: 1px solid #161616;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  padding: 0.9rem 0.25rem;
  cursor: pointer;
}

.cdnav-row:hover {
  color: #7cff6b;
}

.cdnav-chevron {
  color: #666;
}

.cdnav-page-link {
  display: block;
  color: #ccc;
  text-decoration: none;
  font-size: 0.98rem;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid #161616;
}

.cdnav-page-link:hover {
  color: #fff;
}

.cdnav-page-link.is-current {
  color: #7cff6b;
  font-weight: 600;
}
