/* Shared by the project pages (Kaleidoscope, Name Genius, Calm, Studio Vinami):
   a Back pill that stays at the top while you scroll, and a Top button once you're further down. */
.top {
  position: sticky; top: 0; z-index: 20;
  margin: 0 calc(-1 * var(--pad, 0px)); padding: 14px 0;
  background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.top .back {
  display: inline-flex; align-items: center; gap: .45em; padding: 10px 20px;
  border: 1.5px solid #1c1c1e; border-radius: 999px; background: #fff;
  font: 500 17px/1 "Space Grotesk", system-ui, sans-serif; color: #1c1c1e; text-decoration: none;
  transition: background-color .2s, color .2s;
}
.top .back:hover { background: #1c1c1e; color: #fff; }

.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 20;
  display: inline-flex; align-items: center; gap: .4em; padding: 12px 18px;
  border: 1.5px solid #1c1c1e; border-radius: 999px; background: #fff; color: #1c1c1e;
  font: 500 16px/1 "Space Grotesk", system-ui, sans-serif; cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity .25s, translate .25s, background-color .2s, color .2s;
}
.to-top.on { opacity: 1; translate: 0 0; pointer-events: auto; }
.to-top:hover { background: #1c1c1e; color: #fff; }

/* phones: the last lines never end up hidden under the Top button, and every link in the bar is easy to tap */
@media (max-width: 600px) {
  body { padding-bottom: 76px; }
  .top .back { padding: 11px 18px; font-size: 16px; }
  .top > a:not(.back) { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; font-size: 14px; }
  .to-top { padding: 12px 16px; font-size: 15px; }
}
