.project-gallery {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-alt);
}

.project-gallery__viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.project-gallery__track {
  display: flex;
  width: 100%;
  height: 100%;
  --gallery-index: 0;
  transform: translateX(calc(var(--gallery-index) * -100%));
  transition: transform var(--transition-slow);
}

.project-gallery__image {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: 700;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.project-gallery__arrow--prev {
  left: var(--space-sm);
}

.project-gallery__arrow--next {
  right: var(--space-sm);
}

.project-gallery__arrow:hover {
  background: var(--color-bg);
  transform: translateY(-50%) scale(1.05);
}

.project-gallery__arrow:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.project-gallery__arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.project-gallery__counter {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  background: rgba(11, 15, 20, 0.7);
  color: var(--color-text-inverse);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 2px var(--space-sm);
  border-radius: var(--radius-full);
}
