/* Only the native mobile implementation opts into these rules. A phone keeps
   this viewer through rotation; the desktop orbit's CSS is unchanged. */
.portfolio--mobile {
  height: auto;
  min-height: 100svh;
  overflow: visible;
  padding: 88px 20px 48px;
  background: #080b12;
  color: #edf0f5;
  scroll-margin-top: 72px;
}
.portfolio--mobile .portfolio__canvas,
.portfolio--mobile .portfolio__caption,
.portfolio--mobile .portfolio__hint { display: none; }
.portfolio--mobile .portfolio__ui {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: 680px;
  margin: 0 auto 30px;
  gap: 20px;
  pointer-events: auto;
}
.portfolio--mobile .portfolio__ui::before { display: none; }
.portfolio--mobile .portfolio__ui .rv { opacity: 1; visibility: visible; transform: none; translate: none; scale: none; filter: none; }
.portfolio--mobile .screen__eyebrow { flex-wrap: wrap; gap: 12px; font-size: 12px; }
.portfolio--mobile .screen__title { font-size: clamp(32px, 7.5vw, 48px); line-height: 1.12; letter-spacing: -.045em; }
.portfolio--mobile .screen__sub { display: block; margin-top: 14px; font-size: 16px; line-height: 1.5; letter-spacing: -.01em; color: #929baa; }
.mobile-work { position: relative; max-width: 680px; margin: 0 auto; }
.mobile-work__controls {
  position: sticky;
  /* Leave room for the fixed Arcade button, including safe-area offsets. */
  top: max(152px, calc(env(safe-area-inset-top) + 132px));
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid #303847;
  border-radius: 12px;
  background: #111722;
}
.mobile-work__arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 44px;
  border: 1px solid #384454;
  border-radius: 8px;
  background: #202b3a;
  color: #e9f2ff;
  font: 400 24px/1 sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.mobile-work__arrow:disabled { color: #657183; border-color: transparent; background: transparent; cursor: default; }
.mobile-work__arrow:active:not(:disabled) { background: #354760; }
.mobile-work__count { color: #c3ccd9; font: 400 12px/1.5 "JetBrains Mono", monospace; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.mobile-work__track {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}
.mobile-work__track::-webkit-scrollbar { display: none; }
.mobile-work__project {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #273140;
  border-radius: 14px;
  background: #111722;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.mobile-work__image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center top; background: #192332; }
.mobile-work__body { padding: 23px 20px 26px; }
.mobile-work__kicker { margin: 0 0 10px; color: #96b7cf; font-size: 12px; line-height: 1.6; }
.mobile-work__title { margin: 0 0 16px; font-size: clamp(27px, 6.5vw, 38px); line-height: 1.12; letter-spacing: -.045em; text-wrap: balance; }
.mobile-work__summary { margin: 0 0 22px; color: #e0e6ef; font-size: 17px; line-height: 1.55; }
.mobile-work__tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 24px; padding: 0; list-style: none; }
.mobile-work__tags li { padding: 6px 9px; border: 1px solid #344152; border-radius: 5px; color: #bbc8d8; font-size: 11px; line-height: 1.4; }
.mobile-work__story { color: #aab6c6; font-size: 15px; line-height: 1.75; }
.mobile-work__story p { margin: 0 0 16px; }
.mobile-work__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.mobile-work__links a { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; padding: 11px 14px; border: 1px solid #6886a0; border-radius: 7px; color: #e3f2ff; font-size: 13px; line-height: 1.5; text-decoration: none; }
.mobile-work__links a span { font-size: 20px; }
.mobile-work__arrow:focus-visible,
.mobile-work__track:focus-visible,
.mobile-work__links a:focus-visible { outline: 2px solid #9ad9ff; outline-offset: 3px; }
.portfolio--mobile .portfolio__nav {
  position: static;
  transform: none;
  width: max-content;
  max-width: 100%;
  margin: 32px auto 0;
  background: #141c28;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.portfolio--mobile .portfolio__arrow,
.portfolio--mobile .portfolio__arrow[data-next] { min-height: 48px; padding: 0 8px; font-size: 11px; }
.portfolio--mobile .portfolio__arrow span { display: inline; }
.portfolio--mobile .portfolio__arrow i { width: 32px; height: 32px; }
.portfolio--mobile .portfolio__arrow[data-next] svg { animation: none; }
@media (max-width: 359px) {
  .portfolio--mobile { padding-inline: 14px; }
  .mobile-work__body { padding-inline: 16px; }
  .portfolio--mobile .portfolio__arrow { gap: 6px; }
}
@media (max-height: 500px) {
  .portfolio--mobile { padding-top: 76px; }
}
