/* ── Project page styles ── */

.project-hero {
  padding-top: 100px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--fg); }

.project-hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.project-role {
  font-size: 18px;
  color: var(--accent);
  margin-top: 8px;
  margin-bottom: 16px;
}

.project-summary {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 540px;
}

.project-meta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.meta-row:first-child { padding-top: 0; }
.meta-row:last-child { border-bottom: none; padding-bottom: 0; }

.meta-row .label { min-width: 80px; margin-bottom: 0; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

/* ── Project detail blocks ── */
.project-detail {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.project-detail:last-child { border-bottom: none; }

.project-detail-header {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.project-number {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.02em;
  padding-top: 4px;
}

.project-detail-desc {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 8px;
  max-width: 600px;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-left: 80px;
}

.detail-block .label { margin-bottom: 8px; }

.detail-block p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.detail-block ul {
  list-style: none;
  padding: 0;
}

.detail-block ul li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
  margin-bottom: 6px;
}

.detail-block ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

/* ── Architecture diagram ── */
.design-section { border-top: 1px solid var(--border); }

.arch-diagram {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 40px 0;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto;
}

.arch-node {
  flex-shrink: 0;
  padding: 16px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.2s;
}

.arch-node:hover { border-color: var(--accent); }

.arch-node-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.arch-connector {
  width: 40px;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
  position: relative;
}

.arch-connector::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 5px solid var(--border);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

.design-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.design-note {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.design-note h3 { margin-bottom: 12px; font-size: 18px; }

.design-note ul {
  list-style: none;
  padding: 0;
}

.design-note ul li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
  margin-bottom: 8px;
}

.design-note ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

/* ── Project navigation ── */
.project-nav-section {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.project-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.2s;
}

.project-nav-link:hover { border-color: rgba(255,255,255,0.16); }
.project-nav-link.next { text-align: right; }

.project-nav-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .project-hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .project-detail-grid {
    grid-template-columns: 1fr;
    margin-left: 0;
  }
  .project-detail-header {
    grid-template-columns: 40px 1fr;
  }
  .design-notes { grid-template-columns: 1fr; }
  .arch-diagram { padding: 24px 16px; }
}

@media (max-width: 480px) {
  .project-nav { grid-template-columns: 1fr; }
}
