:root {
  --ui-pad: 24px;
  --ui-color: #fff;
  --ui-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
}

body.portfolio {
  cursor: none;
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

#projectImage {
  opacity: 1;
  transition: opacity 300ms ease;
}

#projectImage.fading {
  opacity: 0;
}

.ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  color: var(--ui-color);
  text-shadow: var(--ui-shadow);
  font-size: 16px;
  letter-spacing: 0.2px;
}

.topbar {
  position: absolute;
  top: var(--ui-pad);
  left: var(--ui-pad);
  right: var(--ui-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
}

.brand,
.info {
  pointer-events: auto;
  text-decoration: none;
  color: var(--ui-color);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.2s ease;
}

.brand:hover {
  color: var(--brand-hover-color, var(--ui-color));
}

.info:hover {
  color: #7b7b7b;
}

.project-name {
  position: absolute;
  left: var(--ui-pad);
  bottom: var(--ui-pad);
  pointer-events: auto;
  padding: 6px 12px;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 600;
  max-width: min(520px, calc(100vw - 2 * var(--ui-pad)));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  background: center / contain no-repeat;
  will-change: transform;
}

.cursor.right {
  background-image: url("../img/interface/cursor-right.png");
}

.cursor.left {
  background-image: url("../img/interface/cursor-left.png");
}

@media (hover: none), (pointer: coarse) {
  body.portfolio {
    cursor: auto;
  }

  .cursor {
    display: none;
  }
}
