/* Contextual project pill — names the case study currently on screen.
   Inspired by object-led portfolios where a quiet label travels with the work. */
.project-pill {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 16px 0 6px;
  border-radius: 999px;
  background: #111214;
  color: #f4f5f2;
  font-size: 13px;
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(17, 18, 20, 0.18), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transform: translate(-50%, -14px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-pill.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

.project-pill__name {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: #f4f5f2;
  color: #111214;
  font-weight: 600;
  text-decoration: none;
}

.project-pill__name:focus-visible {
  outline: 2px solid #9eafff;
  outline-offset: 2px;
}

.project-pill__tag {
  min-width: 9ch;
  color: rgba(244, 245, 242, 0.72);
}

.project-pill__caret {
  display: inline-block;
  width: 1px;
  height: 13px;
  margin-left: 2px;
  vertical-align: -2px;
  background: currentColor;
  animation: project-pill-caret 1s steps(1) infinite;
}

@keyframes project-pill-caret {
  50% { opacity: 0; }
}

@media (max-width: 820px) {
  .project-pill {
    top: auto;
    bottom: 18px;
    transform: translate(-50%, 14px) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-pill { transition: opacity 0.2s ease; transform: translate(-50%, 0); }
  .project-pill__caret { display: none; }
}
