/* Use primary input capabilities, so narrow desktop windows still show keys. */
.navigation-hint {
  position: fixed;
  inset-inline: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 19;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin-inline: auto;
  padding: 5px 12px;
  border: 1px solid rgba(129, 140, 248, .22);
  border-radius: 999px;
  background: rgba(2, 6, 23, .9);
  color: #cbd5e1;
  font-size: .75rem;
  line-height: 1.4;
  pointer-events: none;
  user-select: none;
}
.navigation-hint-keyboard, .navigation-hint-touch {
  display: flex;
  align-items: center;
  gap: 9px;
}
.navigation-hint-touch { display: none; }
.navigation-hint svg {
  width: 58px;
  height: 28px;
  flex: none;
  fill: none;
  stroke: #818cf8;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hint-key path, .hint-track { stroke: #38bdf8; }
.hint-key rect, .hint-hand { fill: #0f172a; }
.hint-key-left { animation: hint-key-press 2s ease-in-out 2; }
.hint-key-right { animation: hint-key-press 2s ease-in-out 1s 2; }
.hint-hand { animation: hint-swipe 2s ease-in-out 2; }
@keyframes hint-key-press {
  0%, 35%, 100% { transform: translateY(0); }
  15%, 25% { transform: translateY(3px); stroke: #38bdf8; }
}
@keyframes hint-swipe {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-12px); }
  75% { transform: translateX(12px); }
}
/* Keep the controls above the hint, including on devices with a home indicator. */
.slider-nav { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
.slider-nav .swipe-hint, .project-tip { display: none; }
.slider-nav:focus-within {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%);
}
.dot:focus-visible { outline: 2px solid #38bdf8; outline-offset: 5px; }
@media (hover: none) and (pointer: coarse) {
  .navigation-hint-keyboard { display: none; }
  .navigation-hint-touch { display: flex; }
}
@media (max-width: 400px) {
  .navigation-hint { font-size: .6875rem; padding-inline: 9px; }
  .navigation-hint svg { width: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .navigation-hint *, .slider-nav { animation: none !important; transition: none !important; }
  .portfolio-slider { scroll-behavior: auto; }
}

