/* ===================================================================
   ForgeProject - Static Project Page Stylesheet (project-page.css)
   =================================================================== */

.project-page-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
  color: var(--text-primary);
}

.project-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.project-breadcrumb a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.project-breadcrumb a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

.project-breadcrumb .crumb-sep {
  opacity: 0.5;
}

.project-breadcrumb .current {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* --- Project Hero Card --- */
.project-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 16px);
  padding: 2.25rem 2rem;
  margin-bottom: 2.25rem;
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.project-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-primary);
}

.project-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.p-badge-domain {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.p-badge-difficulty {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.p-badge-difficulty.Hard,
.p-badge-difficulty.Very\ Hard {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.p-badge-difficulty.Medium {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.project-hero-title {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-heading);
  margin-bottom: 0.85rem;
}

.project-hero-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-pill {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  padding: 0.35rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 8px);
  color: #cbd5e1;
}

.project-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.btn-launch {
  background: var(--grad-primary);
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm, 8px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-launch:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-anchor {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary) !important;
  font-weight: 500;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm, 8px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-anchor:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

/* --- Content Sections --- */
.project-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 16px);
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
}

.project-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-color);
}

.project-section p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-section p:last-child {
  margin-bottom: 0;
}

.project-section ul,
.project-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.project-section li {
  margin-bottom: 0.5rem;
}

/* --- System Specs Grid --- */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.spec-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem;
}

.spec-box h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.spec-box p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* --- Code Files Manifest --- */
.file-manifest-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.file-manifest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 8px);
}

.file-name-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #e2e8f0;
}

.file-lang-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.code-preview-block {
  margin-top: 1.25rem;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
}

.code-header {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.code-preview-block pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e6edf3;
}

/* --- Viva Q&A Cards --- */
.viva-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.viva-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem 1.5rem;
}

.viva-question {
  font-size: 1.02rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.viva-question-num {
  color: var(--accent-secondary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.viva-answer {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
  padding-left: 1.7rem;
}

/* --- Slide Outline Grid --- */
.slides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.slide-mini-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 8px);
  padding: 1rem;
}

.slide-mini-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-primary);
}

.slide-mini-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.slide-mini-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* --- Related Projects --- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.related-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.related-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.related-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.related-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--accent-secondary);
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .project-hero {
    padding: 1.5rem 1.25rem;
  }
  .project-section {
    padding: 1.25rem;
  }
  .project-hero-title {
    font-size: 1.45rem;
  }
}
