/* ===== Work Showcase (Horizontal Scroll) ===== */
.work {
  position: relative;
  z-index: 3;
  background: var(--bg-primary);
}

.work__showcase {
  position: relative;
  height: 100vh;
}

.work__showcase-inner {
  display: flex;
  width: 100%;
  height: 100vh;
  background: var(--bg-primary);
  position: relative;
  z-index: 10;
}

.work__gallery-wrapper {
  flex: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.work__gallery {
  display: flex;
  gap: 3rem;
  height: 100%;
  align-items: center;
  padding: 0 4rem;
  will-change: transform;
}

.work__card {
  flex-shrink: 0;
  width: 44vw;
  max-width: 560px;
  height: 68vh;
  max-height: 540px;
  background: var(--bg-secondary);
  border-radius: 28px;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transition:
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    transform 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
  outline: none;
}

.work__card:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 47, 167, 0.2);
}

.work__card.is-active {
  border-color: rgba(0, 47, 167, 0.25);
  box-shadow: var(--shadow-medium);
  transform: scale(1.02);
}

.work__card-visual {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary-muted), #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.work__card-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    var(--project-color, var(--accent)) 0%,
    transparent 70%
  );
  opacity: 0.18;
  transition: opacity 0.4s ease;
}

.work__card:hover .work__card-visual::before,
.work__card.is-active .work__card-visual::before {
  opacity: 0.3;
}

.work__card-icon {
  width: 64px;
  height: 64px;
  color: var(--project-color, var(--accent));
  position: relative;
  z-index: 1;
  opacity: 0.75;
  transition:
    opacity 0.4s ease,
    transform 0.4s var(--ease-out);
}

.work__card:hover .work__card-icon,
.work__card.is-active .work__card-icon {
  opacity: 1;
  transform: scale(1.1);
}

.work__card-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

.work__card.kktong .work__card-title {
  color: var(--kktong-accent);
}

/* Info Panel */
.work__info-panel {
  width: 360px;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 2rem 2.5rem;
  border-left: 1px solid var(--border-light);
  background: var(--bg-primary);
  position: relative;
  z-index: 3;
}

.work__info-content {
  width: 100%;
}

.work__info-number {
  display: block;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--border-light);
  margin-bottom: 1.5rem;
  letter-spacing: var(--tracking-tighter);
  transition: color 0.4s ease;
}

.work__info-number.is-active {
  color: var(--accent);
}

.work__info-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: var(--tracking-tight);
}

.work__info-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.work__info-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.work__info-tags span {
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--brand-primary-muted);
  color: var(--accent);
}

.work__info-progress {
  margin-top: 2rem;
  height: 3px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}

.work__info-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
}

/* ===== Responsive work ===== */
@media (max-width: 768px) {
  .work__showcase {
    height: auto;
    overflow: visible;
  }

  .work__showcase-inner {
    flex-direction: column;
    height: auto;
  }

  .work__gallery-wrapper {
    height: auto;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .work__gallery-wrapper::-webkit-scrollbar {
    display: none;
  }

  .work__gallery {
    padding: 2rem 1.25rem;
    gap: 1rem;
  }

  .work__card {
    width: 80vw;
    height: auto;
    min-height: 320px;
    max-height: none;
    padding: 2rem;
  }

  .work__card-visual {
    width: 100px;
    height: 100px;
  }

  .work__card-icon {
    width: 48px;
    height: 48px;
  }

  .work__info-panel {
    width: 100%;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--border-light);
    padding: 2rem 1.25rem;
  }

  .work__info-number {
    font-size: 3rem;
  }
}
