/* The existing hero stays intact. Project identities share its typography and flat surfaces. */
.projects-section {
  position: relative;
  isolation: isolate;
  --project-sienna: #b95000;
  --project-crimson: #ba2448;
  --project-amber: #9a6200;
  --project-jade: #00796b;
  --project-sapphire: #7042bd;
  padding: clamp(64px, 8vw, 112px) 0 36px;
  border-top: 1px solid var(--line-strong);
  background: var(--bg);
  scroll-margin-top: 24px;
}

.projects-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/preview/assets/brand-background-light.svg") no-repeat left 3vw bottom 96px;
  background-size: min(48vw, 640px);
  opacity: 0.055;
}

body[data-theme="dark"] .projects-section::before {
  background-image: url("/preview/assets/brand-background-dark.svg");
  opacity: 0.065;
}

body[data-theme="dark"] .projects-section {
  --project-sienna: #ff9b4e;
  --project-crimson: #ff748e;
  --project-amber: #f2c253;
  --project-jade: #49d9bf;
  --project-sapphire: #c09cff;
}

.projects-wrap {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

.projects-intro { max-width: 760px; margin-bottom: 40px; }
.projects-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 700;
  line-height: 1.08;
  margin-block: 16px;
}
.projects-intro > p:last-child { color: var(--text-2); max-width: 660px; }

.main-projects {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.3fr);
  align-items: start;
  gap: 24px;
}
.project-card {
  min-width: 0;
  padding: clamp(20px, 2.3vw, 32px);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--project-color);
  background: var(--surface);
}
.project-sienna { --project-color: var(--project-sienna); }
.project-crimson { --project-color: var(--project-crimson); }
.project-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 28px;
}
.project-number, .project-status, .direction-label {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.project-number { color: var(--text-2); }
.project-status {
  display: inline-block;
  padding: 4px 8px;
  color: var(--text-2);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
}
.project-identity {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}
.project-art, .area-art {
  background: #060608;
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.project-art { width: 112px; height: 112px; }
.project-art img, .area-art img { width: 100%; height: 100%; object-fit: contain; }
.project-copy h3 {
  color: var(--project-color);
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.1;
  margin-bottom: 12px;
}
.project-copy p, .project-direction p, .brain-contents > p, .brain-area > p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.75;
}
.project-direction {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.direction-label { display: block; color: var(--project-color); margin-bottom: 8px; }
.brain-contents { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.brain-contents > h4 { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.brain-contents > p { margin-top: 6px; }
.brain-areas {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.brain-area {
  min-width: 0;
  padding-top: 16px;
  border-top: 2px solid var(--area-color);
}
.area-amber { --area-color: var(--project-amber); }
.area-jade { --area-color: var(--project-jade); }
.area-sapphire { --area-color: var(--project-sapphire); }
.area-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.area-art { width: 72px; height: 72px; }
.area-heading h4 {
  font-family: var(--font-display);
  color: var(--area-color);
  font-size: 25px;
  line-height: 1.15;
  margin-bottom: 10px;
}
.brain-area > p { margin-top: 14px; font-size: 13px; }
.status-planned { border-style: dashed; }
.projects-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-2);
}
.release-note { max-width: 650px; }
.copyright-note { flex-shrink: 0; font: 12px var(--font-mono); color: var(--muted); }

@media (max-width: 1100px) {
  .main-projects { grid-template-columns: 1fr; }
  .project-identity { grid-template-columns: 112px minmax(0, 1fr); }
  .brain-areas { gap: 24px; }
}

@media (max-width: 600px) {
  .projects-section::before { background-size: 280px; background-position: right -24px bottom 16px; }
  .projects-intro { margin-bottom: 28px; }
  .project-topline { margin-bottom: 22px; }
  .project-identity { grid-template-columns: 80px minmax(0, 1fr); gap: 16px; align-items: start; }
  .project-art { width: 80px; height: 80px; }
  .project-copy h3 { font-size: 30px; }
  .brain-areas { grid-template-columns: 1fr; }
  .brain-area { display: grid; grid-template-columns: 1fr; }
  .area-heading { flex-direction: row; align-items: center; gap: 16px; }
  .area-art { flex: 0 0 64px; width: 64px; height: 64px; }
  .area-heading h4 { font-size: 28px; margin-bottom: 8px; }
  .projects-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cs-badge .dot { animation: none; }
}
