/* ============================================
   DS Detail Page — Split layout (mirrors design pages)
   ============================================ */

/* --- Project Header Bar (fixed, matches design pages) --- */
.ds-project-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 1.25rem 3rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.ds-project-header-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ds-project-header-title {
  font-family: var(--font-serif-display, 'DM Serif Display', 'Georgia', serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
}

.ds-project-header-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
  margin-left: auto;
}

.ds-project-header-spacer {
  height: 64px;
}

/* --- Split Layout: Sticky Text + Scrollable Right --- */
.ds-split {
  display: flex;
  background: #0a0a0a;
  min-height: 100vh;
}

/* Left: sticky text panel */
.ds-split-text {
  flex: 0 0 44%;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 2.5rem 2rem 2.5rem 3rem;
  display: flex;
  align-items: flex-start;
  scrollbar-width: none;
}

.ds-split-text::-webkit-scrollbar {
  display: none;
}

.ds-split-text-inner {
  max-width: 480px;
}

/* Meta grid */
.ds-split-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 2rem;
}

.ds-split-meta .meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ds-split-meta .meta-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.35);
}

.ds-split-meta .meta-value {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Section titles */
.ds-split-section-title {
  font-family: var(--font-serif-display, 'DM Serif Display', 'Georgia', serif);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: #e8622b;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

/* Body text */
.ds-split-body {
  font-size: 0.85rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

/* Tech stack pills */
.ds-split-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.ds-split-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  color: rgba(255, 255, 255, 0.6);
  transition: border-color 0.3s ease;
}

.ds-split-pill:hover {
  border-color: rgba(232, 98, 43, 0.4);
}

/* GitHub action button */
.ds-split-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.ds-split-action-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.ds-split-action-btn:hover {
  border-color: #e8622b;
  color: #fff;
  background: rgba(232, 98, 43, 0.15);
}

.ds-split-action-btn svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* KPI metrics row (inline in left panel) */
.ds-split-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.ds-split-metric {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  text-align: center;
}

.ds-split-metric-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: #e8622b;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.ds-split-metric-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
}

/* Right: scrollable visuals panel */
.ds-split-visuals {
  flex: 1;
  padding: 2.5rem 6rem 2.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-content: flex-start;
}

.ds-visual-card {
  flex: 0 0 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #111;
}

.ds-visual-card--half {
  flex: 0 0 calc(50% - 0.75rem);
}

.ds-visual-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, #0d0d0d, #1a1a2e);
}

.ds-visual-placeholder .visual-icon {
  font-size: 1.5rem;
  opacity: 0.5;
}

.ds-visual-caption {
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.03em;
  background: #0d0d0d;
}

/* Pipeline / architecture placeholder (wide) */
.ds-visual-card--pipeline .ds-visual-placeholder {
  aspect-ratio: 21 / 9;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: #0a0a0a;
}

/* Full-bleed visual image */
.ds-visual-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}

.lightbox.is-active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: default;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox.is-active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
  padding: 0.25rem;
}

.lightbox-close:hover {
  color: #fff;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .ds-project-header {
    padding: 1rem 1.5rem;
    gap: 1rem;
  }

  .ds-project-header-spacer {
    height: 56px;
  }

  .ds-split {
    flex-direction: column;
  }

  .ds-split-text {
    position: relative;
    height: auto;
    flex: none;
    padding: 2rem 1.5rem;
    top: auto;
  }

  .ds-split-visuals {
    padding: 0 1.5rem 3rem;
  }

  .ds-visual-card--half {
    flex: 0 0 100%;
  }

  .ds-split-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .ds-split-metrics {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Spotify Rec Picker
   ============================================ */
.rec-picker {
  width: 100%;
}

.rec-picker-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 1rem;
}

.rec-picker-dropdowns {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rec-picker-x {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.25);
}

.rec-select {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.65rem 1rem;
  background: #111;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.rec-select:focus {
  outline: none;
  border-color: #e8622b;
}

.rec-select option {
  background: #111;
  color: #ccc;
}

.rec-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rec-empty {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  padding: 3rem 0;
  text-align: center;
}

.rec-track {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.rec-track:hover {
  border-color: rgba(232, 98, 43, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.rec-track-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.rec-track-title {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.rec-track-artist {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.03em;
}

.rec-track-rank {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
  min-width: 1.2rem;
  flex-shrink: 0;
}

.rec-track-link {
  color: #1db954;
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.rec-track-link:hover {
  color: #1ed760;
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .rec-picker-dropdowns {
    flex-direction: column;
    gap: 0.5rem;
  }

  .rec-picker-x {
    display: none;
  }

  .rec-select {
    width: 100%;
  }
}

/* ============================================
   Project Nav Footer — All Projects + Edge Arrows
   (DS pages — dark theme)
   ============================================ */

.project-nav-footer {
  padding: 3rem 2rem 2rem;
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  text-align: center;
}

.project-nav-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  justify-items: center;
}

.project-nav-col-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 0.75rem;
  display: block;
}

.project-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-nav-item {
  display: block;
  padding: 0.4rem 0;
  transition: opacity 0.3s ease;
}

.project-nav-item:hover {
  opacity: 0.6;
}

.project-nav-item.is-current {
  pointer-events: none;
}

.project-nav-item-name {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
}

.project-nav-item.is-current .project-nav-item-name {
  color: #e8622b;
}

/* --- Edge Hover Arrows --- */
.edge-arrow {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.edge-arrow.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.edge-arrow--prev { left: 0; }
.edge-arrow--next { right: 0; }

.edge-arrow-icon {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease, transform 0.3s ease;
  line-height: 1;
}

.edge-arrow:hover .edge-arrow-icon {
  color: #e8622b;
  transform: scale(1.2);
}

.edge-arrow--prev:hover .edge-arrow-icon {
  transform: translateX(-4px) scale(1.2);
}

.edge-arrow--next:hover .edge-arrow-icon {
  transform: translateX(4px) scale(1.2);
}

@media (max-width: 768px) {
  .edge-arrow {
    display: none;
  }

  .project-nav-footer {
    padding: 1.5rem 1.25rem 1.25rem;
  }
}
