/* DepthCarousel component styles adapted from React Bits for #portfolio. */
.depth-carousel-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0 0 12px;
}

.depth-carousel {
  position: relative;
  width: 100%;
  height: 500px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(ellipse at 42% 48%, rgba(232, 117, 67, 0.1), transparent 62%),
    radial-gradient(ellipse at 80% 80%, rgba(213, 255, 96, 0.04), transparent 55%),
    rgba(22, 20, 18, 0.72);
  perspective: var(--dc-perspective, 1400px);
  perspective-origin: 50% 50%;
  touch-action: pan-y;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.depth-carousel:active {
  cursor: grabbing;
}

.depth-carousel:focus-visible {
  outline: 2px solid #edb58c;
  outline-offset: 4px;
}

.depth-carousel__stage,
.depth-carousel__stage.work-gallery {
  position: absolute;
  inset: 0;
  display: block;
  grid-template-columns: none;
  gap: 0;
  transform-style: preserve-3d;
}

.depth-carousel__card {
  position: absolute;
  top: 50%;
  left: calc(50% - var(--dc-offset, 0px));
  transform-origin: center center;
  overflow: hidden;
  background: #171513;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.72),
    0 8px 20px -10px rgba(0, 0, 0, 0.55);
  will-change: transform, opacity, filter;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.depth-carousel__card.is-active {
  border-color: rgba(237, 181, 140, 0.58);
  box-shadow:
    0 34px 64px -18px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(237, 181, 140, 0.16);
}

.depth-carousel__card .work-card-open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: left;
  color: #f5f0eb;
  font: inherit;
  cursor: inherit;
}

.depth-carousel__card .work-card-open:focus-visible {
  outline: 2px solid #edb58c;
  outline-offset: -3px;
}

.depth-carousel__card .work-visual {
  position: absolute;
  inset: 0;
  display: block;
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #201d1a;
}

.depth-carousel__card .work-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(18, 16, 14, 0.24) 0%,
    transparent 36%,
    rgba(16, 14, 12, 0.22) 52%,
    rgba(16, 14, 12, 0.9) 82%,
    rgba(16, 14, 12, 0.97) 100%
  );
}

.depth-carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 18%;
  display: block;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
  -webkit-user-drag: none;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.depth-carousel__card.is-active:hover .depth-carousel__img {
  transform: scale(1.045);
}

.depth-carousel__card .work-category {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  max-width: calc(100% - 76px);
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(23, 21, 19, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f5eee8;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  backdrop-filter: blur(8px);
}

.depth-carousel__card .work-arrow {
  position: absolute;
  right: 14px;
  top: 14px;
  bottom: auto;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3e7db;
  color: #211a16;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.28s ease,
    background 0.28s ease;
}

.depth-carousel__card.is-active:hover .work-arrow,
.depth-carousel__card.is-active .work-card-open:focus-visible .work-arrow {
  background: #edb58c;
  transform: rotate(8deg);
}

.depth-carousel__card .work-copy {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: block;
  padding: 46px 20px 22px;
}

.depth-carousel__card .work-copy strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.9px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  overflow-wrap: normal;
}

.depth-carousel__card .work-description {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
  color: #e6dbd0;
  max-width: 28ch;
}

.depth-carousel__card .work-cover-line {
  display: block;
  height: 2px;
  width: 44px;
  margin-top: 14px;
  background: #edb58c;
  transform-origin: left;
  transition: width 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.depth-carousel__card.is-active .work-cover-line {
  width: 100%;
}

.depth-carousel__tint {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.depth-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3000;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(24, 21, 19, 0.72);
  backdrop-filter: blur(8px);
  color: #f5f0eb;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.depth-carousel__arrow:hover {
  background: rgba(59, 44, 35, 0.92);
  border-color: rgba(237, 181, 140, 0.55);
  color: #edb58c;
}

.depth-carousel__arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.depth-carousel__arrow:focus-visible {
  outline: 2px solid #edb58c;
  outline-offset: 3px;
}

.depth-carousel__arrow--prev {
  left: 14px;
}

.depth-carousel__arrow--next {
  right: 14px;
}

.depth-carousel__dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 16, 14, 0.68);
  backdrop-filter: blur(8px);
}

.depth-carousel__dot {
  position: relative;
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(245, 240, 235, 0.34);
  cursor: pointer;
  transition:
    width 0.25s ease,
    background 0.25s ease;
}

.depth-carousel__dot::after {
  content: '';
  position: absolute;
  inset: -12px -4px;
}

.depth-carousel__dot.is-active {
  width: 22px;
  background: #edb58c;
}

.depth-carousel__dot:focus-visible {
  outline: 2px solid #edb58c;
  outline-offset: 4px;
}

.depth-carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(28, 26, 25, 0.85);
}

.depth-carousel-status {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.depth-carousel-count {
  font-size: 12px;
  font-weight: 600;
  color: #edb58c;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.depth-carousel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #f5f0eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.depth-carousel-explore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: #edb58c;
  color: #1f1712;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.depth-carousel-explore:hover {
  background: #f5c6a3;
}

.depth-carousel-explore:active {
  transform: scale(0.98);
}

.depth-carousel-explore:focus-visible {
  outline: 2px solid #f5f0eb;
  outline-offset: 3px;
}

@media (max-width: 620px) {
  .depth-carousel {
    height: 390px;
    border-radius: 16px;
  }

  .depth-carousel__arrow {
    width: 38px;
    height: 38px;
  }

  .depth-carousel__arrow--prev {
    left: 10px;
  }

  .depth-carousel__arrow--next {
    right: 10px;
  }

  .depth-carousel__card .work-copy {
    padding: 36px 16px 18px;
  }

  .depth-carousel__card .work-copy strong {
    font-size: 22px;
    letter-spacing: -0.6px;
  }

  .depth-carousel__card .work-description {
    font-size: 11px;
  }

  .depth-carousel__card .work-category {
    left: 12px;
    top: 12px;
    font-size: 10px;
    padding: 5px 9px;
  }

  .depth-carousel__card .work-arrow {
    right: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .depth-carousel-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .depth-carousel-title {
    white-space: normal;
    line-height: 1.35;
  }

  .depth-carousel-explore {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .depth-carousel__card {
    will-change: auto;
    transition: none;
  }

  .depth-carousel__arrow,
  .depth-carousel__dot,
  .depth-carousel__img,
  .depth-carousel__card .work-arrow,
  .depth-carousel__card .work-cover-line,
  .depth-carousel-explore {
    transition: none !important;
  }
}
