/* ==========================================================================
   SHOWCASE SECTION (Carousels & Media Cards)
   ========================================================================== */
.showcase-section { padding-top: clamp(40px, 6vw, 80px); }

.showcase-category { max-width: 1400px; margin: 0 auto; }
.showcase-category + .showcase-category { margin-top: 56px; }

.showcase-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 4px;
}
.showcase-category-title { display: flex; align-items: center; gap: 12px; }
.showcase-category-title h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; color: #fff; letter-spacing: -0.01em; }

.showcase-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.showcase-dot--video { background: var(--cyan); box-shadow: 0 0 10px 2px rgba(0, 240, 255, 0.6); }
.showcase-dot--audio { background: var(--purple); box-shadow: 0 0 10px 2px rgba(178, 102, 255, 0.6); }
.showcase-dot--web { background: var(--amber); box-shadow: 0 0 10px 2px rgba(255, 149, 0, 0.6); }
.showcase-dot--docs { background: #10B981; box-shadow: 0 0 10px 2px rgba(16, 185, 129, 0.6); }
.showcase-dot--social { background: #EC4899; box-shadow: 0 0 10px 2px rgba(236, 72, 153, 0.6); }
.showcase-dot--illustration { background: var(--purple); box-shadow: 0 0 10px 2px rgba(178, 102, 255, 0.6); }

/* --- Brand Dots for Documents --- */
.showcase-dot--pdf { background: #EF4444; box-shadow: 0 0 10px 2px rgba(239, 68, 68, 0.6); }
.showcase-dot--excel { background: #10B981; box-shadow: 0 0 10px 2px rgba(16, 185, 129, 0.6); }
.showcase-dot--word { background: #3B82F6; box-shadow: 0 0 10px 2px rgba(59, 130, 246, 0.6); }
.showcase-dot--ppt { background: #F97316; box-shadow: 0 0 10px 2px rgba(249, 115, 22, 0.6); }

/* --- Nav arrows --- */
.showcase-nav { display: flex; gap: 10px; }
.showcase-nav-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--border);
  color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.25s ease; flex-shrink: 0;
}
.showcase-nav-btn svg { width: 18px; height: 18px; }
.showcase-nav-btn:hover:not(:disabled) { background: var(--glass-strong); color: #fff; border-color: var(--border-light); transform: translateY(-2px); }
.showcase-nav-btn:disabled { opacity: 0.25; cursor: default; }
.showcase-nav-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* --- Carousel viewport + edge fades --- */
.showcase-carousel-wrap { position: relative; }

.showcase-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  touch-action: pan-x;
}
.showcase-carousel::-webkit-scrollbar { display: none; }
.showcase-carousel:active,
.showcase-carousel.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.showcase-carousel:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 12px; }

.showcase-track {
  display: flex;
  gap: 20px;
  padding: 4px 4px 12px;
  width: max-content;
}

.showcase-fade {
  position: absolute;
  top: 0; bottom: 12px;
  width: 64px;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.showcase-fade--left { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.showcase-fade--right { right: 0; background: linear-gradient(to left, var(--bg), transparent); }
.showcase-carousel-wrap.is-not-start .showcase-fade--left { opacity: 1; }
.showcase-carousel-wrap.is-not-end .showcase-fade--right { opacity: 1; }

/* --- Shared card shell --- */
.showcase-item { flex: 0 0 auto; scroll-snap-align: start; user-select: none; }
.showcase-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.showcase-card:hover { border-color: var(--border-light); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45); }

/* --- Video tile --- */
.showcase-item--video, .showcase-item--video-ph { width: min(78vw, 460px); }
.showcase-media { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.showcase-video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

.showcase-play-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.15);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease;
}
.showcase-play-overlay:hover { background: rgba(0, 0, 0, 0.35); }
.showcase-play-overlay svg { width: 52px; height: 52px; fill: #fff; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6)); opacity: 0.9; }

/* --- Shared meta footer --- */
.showcase-meta { padding: 18px 22px; }
.showcase-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; color: #fff; margin-bottom: 4px; }
.showcase-agent { font-size: 12px; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

/* --- Audio tile --- */
.showcase-item--audio, .showcase-item--audio-ph { width: min(80vw, 340px); }
.showcase-card--audio { padding: 22px; flex-direction: row; align-items: center; gap: 18px; }
.showcase-card--audio .showcase-album-art { width: 88px; height: 88px; border-radius: 14px; object-fit: cover; flex-shrink: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); border: 1px solid var(--border); pointer-events: none; }
.showcase-audio-controls { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.showcase-audio-controls .showcase-meta { padding: 0; }

.showcase-waveform { display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.showcase-waveform .bar { width: 3px; background: var(--cyan); border-radius: 2px; transform-origin: bottom; transform: scaleY(0.2); animation: wave 1.2s ease-in-out infinite alternate; animation-play-state: paused; }
.showcase-waveform.playing .bar { animation-play-state: running; }
.showcase-waveform .bar:nth-child(1) { height: 40%; animation-delay: -1.2s; }
.showcase-waveform .bar:nth-child(2) { height: 80%; animation-delay: -1.0s; }
.showcase-waveform .bar:nth-child(3) { height: 100%; animation-delay: -0.8s; }
.showcase-waveform .bar:nth-child(4) { height: 60%; animation-delay: -1.1s; }
.showcase-waveform .bar:nth-child(5) { height: 90%; animation-delay: -0.7s; }
.showcase-waveform .bar:nth-child(6) { height: 30%; animation-delay: -0.9s; }
@keyframes wave { 0% { transform: scaleY(0.2); } 100% { transform: scaleY(1); } }

.showcase-timeline { display: flex; align-items: center; gap: 10px; }
.showcase-audio-play-btn { background: var(--cyan); border: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #000; flex-shrink: 0; transition: transform 0.2s, box-shadow 0.2s; }
.showcase-audio-play-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(0, 240, 255, 0.4); }
.showcase-audio-play-btn svg { width: 15px; height: 15px; fill: currentColor; }

.showcase-time-slider { appearance: none; -webkit-appearance: none; flex: 1; min-width: 0; height: 5px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; outline: none; cursor: pointer; }
.showcase-time-slider::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 12px; height: 12px; background: #fff; border-radius: 50%; box-shadow: 0 0 10px rgba(0, 240, 255, 0.8); transition: transform 0.1s; }
.showcase-time-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.time-display { font-size: 11px; color: var(--text-faint); font-weight: 500; font-variant-numeric: tabular-nums; }

/* --- Placeholder tiles (Web) --- */
.showcase-item--web-ph, .showcase-item--docs-ph { width: min(78vw, 300px); }
.showcase-card--placeholder {
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  padding: 0;
  border-style: dashed;
  border-color: var(--border-light);
  min-height: 200px;
  gap: 0;
}

a.showcase-card--placeholder {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.showcase-card--placeholder:visited,
a.showcase-card--placeholder:hover,
a.showcase-card--placeholder:active,
a.showcase-card--placeholder:focus {
  text-decoration: none;
  color: inherit;
}

.showcase-card--placeholder > .showcase-album-art {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 0;
  border: none;
  box-shadow: none;
  display: block;
  pointer-events: none;
}
.showcase-card--placeholder .showcase-meta { padding: 18px 22px; }
.showcase-card--placeholder .showcase-title { color: #fff; font-size: 15px; margin: 0 0 4px; font-weight: 700; }
.showcase-card--placeholder .showcase-agent { color: var(--cyan); font-size: 11.5px; }

/* --- Placeholder tiles (Coded Projects, 9:16) --- */
/* .showcase-item--proj-ph { width: min(60vw, 260px); }

.showcase-item[data-category="projects"] .showcase-card--placeholder > .showcase-album-art {
  aspect-ratio: 8/8;
  object-fit: cover;
} */

/* --- Socials tile (Vertical 9:16) --- */
.showcase-item--social, .showcase-item--social-ph { width: min(60vw, 280px); }
.showcase-card--social .showcase-media { aspect-ratio: 9/16; }

/* --- Illustrations --- */
.showcase-item--illustration { width: min(60vw, 260px); }
.showcase-card--illustration > .showcase-album-art {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0;
  border: none;
  box-shadow: none;
  display: block;
  pointer-events: none;
}
.showcase-card--illustration .showcase-caption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-faint);
  font-weight: 400;
  margin: 2px 0 8px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
@media(max-width: 768px) {
  .showcase-item--illustration { width: min(52vw, 220px); }
}

/* --- Document tile (Portrait PDFs) --- */
.showcase-item--doc { width: min(60vw, 260px); display: flex; }
.showcase-card--doc { display: flex; flex-direction: column; height: 100%; }
.showcase-card--doc > .showcase-album-art {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 0;
  border: none;
  box-shadow: none;
  display: block;
  pointer-events: none;
}
.showcase-card--doc .showcase-meta { display: flex; flex-direction: column; flex: 1; }
.showcase-card--doc .showcase-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  line-clamp: 2; overflow: hidden; min-height: 2.6em;
}
.showcase-card--doc .showcase-caption {
  font-size: 13px; line-height: 1.5; color: var(--text-faint);
  font-weight: 400; margin: 2px 0 8px; display: -webkit-box;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; min-height: 2.6em;
}
.showcase-card--doc .showcase-agent { margin-top: auto; }
.showcase-card--doc:hover {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.08);
}

/* --- Added File Types (PDF, Excel, Word, PPT) --- */
.showcase-item--pdf, .showcase-item--excel, .showcase-item--word, .showcase-item--ppt { width: min(60vw, 260px); display: flex; }
.showcase-card--pdf, .showcase-card--excel, .showcase-card--word, .showcase-card--ppt { display: flex; flex-direction: column; height: 100%; }
.showcase-card--pdf > .showcase-album-art, .showcase-card--excel > .showcase-album-art, .showcase-card--word > .showcase-album-art, .showcase-card--ppt > .showcase-album-art {
  width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 0; border: none; box-shadow: none; display: block; pointer-events: none;
}
.showcase-card--pdf .showcase-meta, .showcase-card--excel .showcase-meta, .showcase-card--word .showcase-meta, .showcase-card--ppt .showcase-meta { display: flex; flex-direction: column; flex: 1; }
.showcase-card--pdf .showcase-title, .showcase-card--excel .showcase-title, .showcase-card--word .showcase-title, .showcase-card--ppt .showcase-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; min-height: 2.6em;
}
.showcase-card--pdf .showcase-caption, .showcase-card--excel .showcase-caption, .showcase-card--word .showcase-caption, .showcase-card--ppt .showcase-caption {
  font-size: 13px; line-height: 1.5; color: var(--text-faint); font-weight: 400; margin: 2px 0 8px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; min-height: 2.6em;
}
.showcase-card--pdf .showcase-agent, .showcase-card--excel .showcase-agent, .showcase-card--word .showcase-agent, .showcase-card--ppt .showcase-agent { margin-top: auto; }
.showcase-card--pdf:hover { border-color: rgba(239, 68, 68, 0.3); box-shadow: 0 20px 40px rgba(239, 68, 68, 0.08); }
.showcase-card--excel:hover { border-color: rgba(16, 185, 129, 0.3); box-shadow: 0 20px 40px rgba(16, 185, 129, 0.08); }
.showcase-card--word:hover { border-color: rgba(59, 130, 246, 0.3); box-shadow: 0 20px 40px rgba(59, 130, 246, 0.08); }
.showcase-card--ppt:hover { border-color: rgba(249, 115, 22, 0.3); box-shadow: 0 20px 40px rgba(249, 115, 22, 0.08); }

/* ==========================================================================
   SHOWCASE GRID VIEW (For the dedicated Showcase page)
   ========================================================================== */
.showcase-grid-view .showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}
.showcase-grid-view .showcase-item { width: 100% !important; display: block; }
.showcase-grid-view .showcase-card { height: 100%; display: flex; flex-direction: column; }
.showcase-grid-view .showcase-card--audio { flex-direction: column !important; align-items: stretch !important; padding: 24px !important; text-align: center; }
.showcase-grid-view .showcase-card--audio .showcase-album-art { width: 120px !important; height: 120px !important; margin: 0 auto 16px; }
.showcase-grid-view .showcase-audio-controls { align-items: center; }
.showcase-grid-view .showcase-timeline { width: 100%; justify-content: center; }
.showcase-grid-view.grid-portrait .showcase-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Responsive Adjustments for Mobile Carousels */
@media(max-width: 768px) {
  .showcase-category-head { padding: 0; }
  .showcase-category-title h3 { font-size: 19px; }
  .showcase-nav-btn { width: 36px; height: 36px; }
  .showcase-card--audio { flex-direction: row; padding: 16px; gap: 12px; }
  .showcase-card--audio .showcase-album-art { width: 64px; height: 64px; border-radius: 12px; }
  .showcase-timeline { gap: 8px; }
  .showcase-audio-play-btn { width: 32px; height: 32px; }
}