/* Mini nav container */
nav.minimal-nav {
  position: fixed;
  top: var(--mininav-spacing, 18px);
  left: var(--mininav-spacing, 18px);
  width: 170px;       /* fixed size for consistency */
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding-right: 0.2em;
  background: var(--mininav-bg, transparent);
}

/* SVG background with masked logo cutout */
nav.minimal-nav svg.nav-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  preserveAspectRatio: none;
  shape-rendering: geometricPrecision;
}

.nav-rect {
  fill: var(--mininav-bg, transparent);
  transition: fill 0.3s ease;
}

.logo-fill {
  fill: var(--mininav-logo-fill, transparent);
  opacity: var(--mininav-logo-opacity, 0);
  transition: fill 0.3s ease, opacity 0.3s ease;
}

.logo-fill.active {
  opacity: var(--mininav-logo-opacity-active, 0.5);
}

nav.minimal-nav:hover .logo-fill {
  fill: var(--mininav-logo-fill, transparent);
}


/* Backdrop blur layer */
.minimal-nav .backdrop-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  mask: url(#logo-cut-poetry);
  -webkit-mask: url(#logo-cut-poetry);
  pointer-events: none;
  display: var(--mininav-backdrop-display, block);
}

/* Inner content */
.minimal-nav .content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
  color: white;
  font-weight: 600;
  user-select: none;
  padding-left: 0.5rem;
}



.minimal-nav .minimal-nav-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
  color: white;
  font-weight: 600;
  user-select: none;
  padding-left: 0.5rem;
  isolation: isolate;        /* ⬅️ new: separate blending context */
}

/* Back button */
.back-btn-minimal {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-right: 1.75rem;
  transition: transform 0.3s ease;
  padding: 0;
  line-height: 1;
}

.minimal-nav:hover .back-btn-minimal {
  transform: translateX(-4px);
}

/* Logo title */
.min-logo-title {
  display: flex;
  letter-spacing: -1px;
  margin-left: auto;
  padding-right: 0.25rem;
  font-family: "Roboto Flex", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}


.min-logo-title span {
  display: inline-block;
  transition: all 0.3s ease;
}

/* Gradient font weights */
.min-logo-title span:nth-child(1) { font-weight: 900; }
.min-logo-title span:nth-child(2) { font-weight: 820; }
.min-logo-title span:nth-child(3) { font-weight: 740; }
.min-logo-title span:nth-child(4) { font-weight: 660; }
.min-logo-title span:nth-child(5) { font-weight: 580; }
.min-logo-title span:nth-child(6) { font-weight: 500; }
.min-logo-title span:nth-child(7) { font-weight: 420; }
.min-logo-title span:nth-child(8) { font-weight: 340; }
.min-logo-title span:nth-child(9) { font-weight: 260; }
.min-logo-title span:nth-child(10) { font-weight: 180; }

.minimal-nav:hover .min-logo-title span {
  font-weight: 600;
}
