/* Industrial Design Portfolio — build v6 (cell-aligment-guide.jpg) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

#app {
  width: 100%;
  height: 100%;
}

.view {
  display: none;
  width: 100%;
  height: 100%;
}

.view--active {
  display: block;
}

/*
 * 16:9 canvas scaled to cover the viewport (cropped, never stretched).
 * Cell overlays stay aligned with the artwork.
 */
.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #1a1a1a;
}

.stage-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 16 / 9;
  width: max(100vw, calc(100vh * 16 / 9));
  height: auto;
}

.stage__background {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.build-tag {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 30;
  margin: 0;
  padding: 2px 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.45);
  border-radius: 3px;
  pointer-events: none;
}

/*
 * Cell positions measured from web-background _1.jpg (4800×2700).
 * Each button matches only the bordered image box (not labels below).
 */
.cells-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cell {
  position: absolute;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;
  contain: strict;
}

/* From cell-aligment-guide.jpg — 16" wide × 9" tall */
.cell--personal {
  left: 27.375%;
  top: 12%;
  width: 14.1875%;
  height: 11.0556%;
}

.cell--microrider {
  left: 27.55%;
  top: 30.25%;
  width: 14.1875%;
  height: 49.8889%;
}

.cell--wbs {
  left: 44.5625%;
  top: 12%;
  width: 13.9375%;
  height: 38.8333%;
}

.cell--sss {
  left: 60.3125%;
  top: 12%;
  width: 12.5625%;
  height: 38.8333%;
}

.cell--skil {
  left: 44.5625%;
  top: 58.4%;
  width: 28.3125%;
  height: 21.7778%;
}

.cell__film {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.42);
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.cell:hover .cell__film,
.cell:focus-visible .cell__film {
  opacity: 1;
}

.cell:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px #1a6fb5;
}

.cells-overlay--calibrate .cell {
  outline: 2px solid rgba(255, 0, 0, 0.9);
  background: rgba(255, 0, 0, 0.06);
}

.cells-overlay--calibrate .cell__film {
  opacity: 0.4;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 14%;
  height: 46%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.nav-arrow--prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 1.5%;
}

.nav-arrow--next {
  right: 0;
  justify-content: flex-end;
  padding-right: 1.5%;
}

.nav-arrow__icon {
  display: block;
  width: 0;
  height: 0;
  opacity: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
  transition: opacity 0.2s ease;
}

.nav-arrow:hover .nav-arrow__icon,
.nav-arrow:focus-visible .nav-arrow__icon {
  opacity: 0.92;
}

.nav-arrow--prev .nav-arrow__icon {
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-right: 22px solid rgba(40, 40, 40, 0.88);
}

.nav-arrow--next .nav-arrow__icon {
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 22px solid rgba(40, 40, 40, 0.88);
}

.nav-arrow:focus-visible {
  outline: none;
}

.nav-arrow:focus-visible .nav-arrow__icon {
  opacity: 1;
  filter: drop-shadow(0 0 0 2px #1a6fb5);
}

@media (prefers-reduced-motion: reduce) {
  .cell__film,
  .nav-arrow__icon {
    transition: none;
  }
}
