/* ═══════════════════════════════════════════════════════════
   PROJECT DETAIL PAGES — project.css
   Extends style.css. Same tokens, same hairline structure:
   the case study reads as a document, the sidebar as a spec.
═══════════════════════════════════════════════════════════ */

/* ─── HERO ───────────────────────────────────────────────── */
.proj-hero {
  position: relative;
  padding: calc(var(--nav-h) + 72px) 0 72px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}

.proj-hero-inner {
  position: relative;
  z-index: 1;
  text-align: left;
}

.proj-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.proj-title {
  max-width: 26ch;
  font-size: clamp(2.125rem, 1.5rem + 2.8vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.proj-subtitle {
  max-width: 60ch;
  margin-bottom: 36px;
  font-size: var(--fs-lg);
  line-height: 1.7;
  color: var(--text-2);
}

.proj-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── CONTENT LAYOUT ─────────────────────────────────────── */
.proj-content {
  padding: clamp(56px, 6vw, 88px) 0;
  background: var(--bg);
}

.proj-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}

/* ─── MAIN: a document, not a stack of cards ─────────────── */
.proj-main {
  display: flex;
  flex-direction: column;
}

.proj-block {
  padding: clamp(32px, 4vw, 44px) 0;
  border-top: 1px solid var(--line);
}

.proj-block:first-child {
  padding-top: 0;
  border-top: none;
}

.proj-block:last-child {
  padding-bottom: 0;
}

.proj-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}

.proj-section-title i {
  font-size: 0.8125rem;
  color: var(--accent);
}

.proj-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.proj-block p {
  max-width: 72ch;
  margin-bottom: 18px;
  line-height: 1.75;
  color: var(--text-2);
}

.proj-block p:last-child {
  margin-bottom: 0;
}

.proj-block p strong {
  color: var(--text);
  font-weight: 550;
}

/* Feature list */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px 32px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-2);
}

.feature-list li i {
  flex-shrink: 0;
  margin-top: 5px;
  font-size: 0.75rem;
  color: var(--accent);
}

/* ─── SIDEBAR: the spec sheet ────────────────────────────── */
.proj-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}

.sidebar-title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--text);
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.dataset-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--accent);
  text-align: right;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  -webkit-text-decoration-color: var(--accent-line);
  text-decoration-color: var(--accent-line);
  transition: opacity var(--duration) var(--ease);
}

.dataset-link:hover {
  opacity: 0.75;
  -webkit-text-decoration-color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Status pill — semantic, so it stays green rather than accent */
.badge-green {
  padding: 3px 11px;
  border: 1px solid var(--ok-line);
  border-radius: var(--r-pill);
  background: var(--ok-soft);
  color: var(--ok);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
}

.accent {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
}

.tech-pill:hover {
  color: var(--text-2);
  border-color: var(--line-strong);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .proj-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .proj-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .proj-sidebar .sidebar-card {
    flex: 1 1 260px;
  }

  .proj-sidebar .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 767px) {
  .proj-hero {
    padding: calc(var(--nav-h) + 48px) 0 56px;
  }

  .nav-inner .btn-sm span {
    display: none;
  }
}

@media (max-width: 560px) {
  .proj-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .proj-sidebar {
    flex-direction: column;
  }
}
