/* ==========================================================================
   Project Detail Pages Stylesheet (Haunted Labs Projects)
   ========================================================================== */

.project-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-blue);
  margin-bottom: 2rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: var(--transition);
}

.project-nav-back:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-blue);
  text-decoration: none;
}

.project-hero {
  padding: 1rem 0 3rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.project-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-purple);
  background: rgba(188, 140, 255, 0.12);
  border: 1px solid rgba(188, 140, 255, 0.35);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.project-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.project-hero-lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 820px;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.project-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* ==========================================================================
   Project Content Grid (Main Article + Sidebar)
   ========================================================================== */
.project-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

.project-main {
  min-width: 0;
}

.project-sidebar {
  position: sticky;
  top: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-section-title {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.sidebar-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.85rem;
}

.sidebar-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 0.5rem;
}

.sidebar-info-label {
  color: var(--text-muted);
}

.sidebar-info-val {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ==========================================================================
   Typography & Sections inside Project Pages
   ========================================================================== */
.project-main h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.project-main h2:first-of-type {
  margin-top: 0;
}

.project-main h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin: 1.75rem 0 0.75rem;
}

.project-main p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.project-main ul, .project-main ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

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

.project-main strong {
  color: var(--text-primary);
}

/* Callout Box */
.callout {
  background: rgba(88, 166, 255, 0.08);
  border-left: 4px solid var(--accent-blue);
  border-radius: 0 8px 8px 0;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
}

.callout-purple {
  background: rgba(188, 140, 255, 0.08);
  border-left-color: var(--accent-purple);
}

.callout-orange {
  background: rgba(255, 112, 67, 0.08);
  border-left-color: var(--accent-orange);
}

.callout-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.callout-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Code & Architecture Blocks */
.code-block {
  background: #070a0f;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 1.5rem 0;
  overflow: hidden;
}

.code-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-content {
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e6edf3;
}

.code-content pre {
  margin: 0;
  white-space: pre;
}

/* Tables */
.spec-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.spec-table th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.spec-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Responsive */
@media (max-width: 900px) {
  .project-layout {
    grid-template-columns: 1fr;
  }

  .project-sidebar {
    position: static;
    margin-top: 2rem;
  }
}
