/*
  PROJECT.CSS — additional styles for individual project pages
  This file is only loaded on project pages, not the homepage.
  
  WHY separate files:
  The homepage doesn't need project page styles, and project pages
  don't need some homepage-specific styles. Keeping them separate
  means each page only loads what it needs — faster load times.
  This is called "code splitting" at the CSS level.
*/

/* ---- HERO ---- */
.project-hero {
  padding: 140px 40px 60px;
  background: var(--bg-section);
  border-bottom: 1px solid rgba(239, 231, 213, 0.06);
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.project-year {
  font-size: 0.8rem;
  color: var(--cream-muted);
  font-family: var(--font-head);
}

.project-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--cream);
  margin-bottom: 20px;
}

.project-subtitle {
  max-width: 65ch;
  color: var(--cream-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.project-links {
  display: flex;
  gap: 12px;
}

/* ---- LAYOUT ---- */
.project-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: start;
}

/* ---- BODY TEXT ---- */
.project-body h2 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cream);
  margin: 40px 0 16px;
  letter-spacing: -0.02em;
}

.project-body h2:first-child { margin-top: 0; }

.project-body p {
  color: var(--cream-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  max-width: 70ch;
}

.project-list {
  list-style: none;
  margin-bottom: 16px;
}

.project-list li {
  font-size: 0.92rem;
  color: var(--cream-muted);
  padding: 10px 0;
  border-bottom: 1px solid rgba(239, 231, 213, 0.06);
  padding-left: 20px;
  position: relative;
}

.project-list li::before {
  content: '✓';
  color: var(--gold);
  position: absolute;
  left: 0;
  font-size: 0.8rem;
}

/* ---- ARCHITECTURE DIAGRAM ---- */
.arch-diagram {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 24px;
  background: var(--bg-section);
  border: 1px solid rgba(239, 231, 213, 0.06);
  border-radius: 8px;
  flex-wrap: wrap;
}

.arch-block {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid rgba(239, 192, 123, 0.15);
}

.arch-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.arch-block p {
  font-size: 0.8rem !important;
  color: var(--cream-muted) !important;
  margin: 0 !important;
}

.arch-arrow {
  color: var(--gold);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ---- SIDEBAR ---- */
.project-sidebar {
  position: sticky;
  top: 90px;
  /*
    WHY sticky: The sidebar stays visible as you scroll through the project body.
    position: sticky is like a hybrid of relative and fixed — it scrolls normally
    until it hits the top: 90px offset, then "sticks" there.
    It unsticks when you scroll past its parent container.
  */
}

.sidebar-card {
  background: var(--bg-section);
  border: 1px solid rgba(239, 231, 213, 0.06);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.sidebar-card h3 {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.sidebar-card ul {
  list-style: none;
}

.sidebar-card ul li {
  font-size: 0.85rem;
  color: var(--cream-muted);
  padding: 6px 0;
  border-bottom: 1px solid rgba(239, 231, 213, 0.05);
}

.sidebar-card ul li:last-child { border-bottom: none; }

.status-active {
  font-size: 0.85rem;
  color: #50c878;
  font-weight: 500;
}

.sidebar-link {
  font-size: 0.85rem;
  color: var(--gold);
  display: block;
  transition: letter-spacing 0.2s;
}

.sidebar-link:hover { letter-spacing: 0.02em; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .project-hero { padding: 100px 20px 40px; }
  .project-layout {
    grid-template-columns: 1fr;
  }
  .project-sidebar { position: static; }
  .arch-diagram { flex-direction: column; }
  .arch-arrow { transform: rotate(90deg); }
}

/* ---- EXPERIENCE PAGE EXTRAS ---- */
.intro-pull {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.7;
  border-left: 3px solid var(--gold);
  padding-left: 20px;
  margin-bottom: 40px;
}

.gold-text { color: var(--gold); font-weight: 600; }

/* ---- PHASE LIST ---- */
.phase-list { margin: 28px 0; display: flex; flex-direction: column; gap: 0; border: 1px solid rgba(239,231,213,0.08); border-radius: 8px; overflow: hidden; }
.phase-item { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid rgba(239,231,213,0.06); transition: background 0.2s; }
.phase-item:last-child { border-bottom: none; }
.phase-done { background: rgba(80,200,120,0.04); }
.phase-active { background: rgba(239,192,123,0.06); }
.phase-label { font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; color: var(--gold); letter-spacing: 0.04em; }
.phase-done .phase-label::before { content: '✓ '; color: #50c878; }
.phase-active .phase-label::before { content: '◎ '; color: var(--gold); }
.phase-name { font-size: 0.87rem; color: var(--cream-muted); line-height: 1.5; }

/* ---- STACK TABLE ---- */
.stack-table { width: 100%; border-collapse: collapse; margin: 20px 0 32px; font-size: 0.85rem; }
.stack-table th { font-family: var(--font-head); font-size: 0.72rem; font-weight: 600; color: var(--gold); letter-spacing: 0.05em; text-align: left; padding: 10px 14px; border-bottom: 1px solid rgba(239,192,123,0.2); }
.stack-table td { padding: 11px 14px; color: var(--cream-muted); border-bottom: 1px solid rgba(239,231,213,0.05); vertical-align: top; line-height: 1.5; }
.stack-table tr:hover td { background: rgba(239,192,123,0.03); }
.stack-table td:first-child { color: var(--cream); font-weight: 500; white-space: nowrap; }
.stack-table td:nth-child(2) { color: var(--gold); font-family: var(--font-head); font-size: 0.82rem; }

/* ---- INCIDENT BLOCK ---- */
.incident-block { background: rgba(239,192,123,0.05); border: 1px solid rgba(239,192,123,0.15); border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0; padding: 24px; margin: 24px 0 28px; }
.incident-label { font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; margin-bottom: 12px; }
.incident-block p { font-size: 0.9rem !important; color: var(--cream-muted) !important; line-height: 1.75 !important; margin-bottom: 12px !important; }
.incident-block p:last-child { margin-bottom: 0 !important; }
code { font-family: monospace; font-size: 0.85em; color: var(--gold); background: rgba(239,192,123,0.1); padding: 2px 6px; border-radius: 3px; }
