/* ============================================================
   Project detail page.
   ============================================================ */

.back-link {
  position: fixed;
  top: 34px;
  left: 100px;
  z-index: 50;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 16px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.back-link:hover {
  color: var(--text-primary);
  border-color: rgba(125, 211, 252, 0.4);
  background: rgba(125, 211, 252, 0.08);
}

.detail {
  max-width: 880px;
  margin: 0 auto;
  padding: 140px 24px 120px;
  animation: detail-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes detail-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail__title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 700;
  background: linear-gradient(120deg, #fff 0%, var(--accent-cyan) 60%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.detail__tagline {
  margin-top: 14px;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 60ch;
}

.detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.detail__tag {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  border: 1px solid rgba(125, 211, 252, 0.3);
  background: rgba(125, 211, 252, 0.06);
  padding: 5px 12px;
  border-radius: 999px;
}

.detail__links {
  display: flex;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.detail__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 10px 18px;
  border-radius: 10px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.detail__link:hover {
  border-color: var(--accent-cyan);
  background: rgba(125, 211, 252, 0.08);
  transform: translateY(-2px);
}

.detail__section {
  margin-top: 64px;
}

.detail__section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail__section p + p {
  margin-top: 14px;
}

.detail__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail__list li {
  position: relative;
  padding-left: 26px;
  color: var(--text-muted);
  line-height: 1.6;
}

.detail__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-cyan), var(--accent-violet));
  box-shadow: 0 0 8px rgba(125, 211, 252, 0.6);
}

/* ---------- Auto-generated workflow diagram ---------- */
/* Single row that scrolls inside itself rather than wrapping — a wrapped
   row leaves a dangling arrow at the line break. */
.flow-diagram {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 28px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  overflow-x: auto;
  scrollbar-width: thin;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  /* Share the row evenly so six steps still fit without clipping the last
     one; longer pipelines fall back to the container's horizontal scroll. */
  flex: 1 1 0;
  min-width: 92px;
  text-align: center;
}

.flow-step__num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #10132b;
  background: radial-gradient(circle at 35% 30%, #eaf6ff, var(--accent-cyan) 50%, var(--accent-violet));
  box-shadow: 0 0 16px rgba(125, 211, 252, 0.45);
}

.flow-step__label {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.flow-arrow {
  color: var(--accent-cyan);
  font-size: 1.2rem;
  opacity: 0.7;
  flex-shrink: 0;
  margin-top: 6px;
}

/* Narrow screens: stack the steps vertically with downward arrows,
   which reads better than a long sideways scroll on a phone. */
@media (max-width: 640px) {
  .flow-diagram {
    flex-direction: column;
    align-items: center;
    overflow-x: visible;
  }

  .flow-step {
    min-width: 0;
  }

  .flow-arrow {
    margin-top: 0;
    transform: rotate(90deg);
  }
}

.detail__not-found {
  padding: 220px 24px 120px;
  text-align: center;
}

.detail__not-found h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}
