.project-page { background: var(--bg); }

.project-page .site-header { background: rgba(5, 5, 5, .94); }
.project-page main { overflow: clip; }

.project-hero {
  position: relative;
  min-height: auto;
  padding-block: 74px 96px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 50px;
}
.project-hero-copy { width: 100%; max-width: none; }
.project-breadcrumb { margin: 0 0 32px; color: var(--muted); font-size: .76rem; }
.project-breadcrumb a { color: #d7dce5; text-underline-offset: 4px; }
.project-identity { display: flex; align-items: center; gap: 14px; }
.project-identity img { width: 54px; height: 54px; border-radius: 13px; object-fit: cover; }
.project-identity strong, .project-identity span { display: block; }
.project-identity strong { font-size: .96rem; }
.project-identity span { margin-top: 2px; color: var(--blue-bright); font-size: .7rem; letter-spacing: .1em; }
.project-hero h1 {
  max-width: 1100px;
  margin: 26px 0 0;
  font-size: clamp(3.25rem, 5vw, 5.2rem);
  line-height: .99;
  letter-spacing: -.067em;
  text-wrap: balance;
}
.project-lead { max-width: 880px; margin: 25px 0 0; color: var(--muted); font-size: clamp(.98rem, 1.2vw, 1.08rem); }
.project-meta { margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.project-meta li { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: #c5cbd5; background: rgba(10, 11, 13, .88); font-size: .72rem; }
.project-hero .hero-actions { margin-top: 30px; }

.project-proof {
  position: relative;
  margin: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #313b4b;
  border-radius: 18px;
  background: #0b0d11;
  box-shadow: 0 42px 100px rgba(0, 0, 0, .72), 0 26px 90px rgba(23, 107, 255, .11);
}
.project-proof::before { position: absolute; inset: 0 0 auto; height: 1px; content: ""; background: var(--blue-bright); opacity: .74; }
.project-proof img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; object-position: center top; border-radius: 10px; }
.project-proof figcaption, .readme-demo figcaption {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #d7dce5;
  font-size: .72rem;
  font-weight: 680;
  letter-spacing: .04em;
}
.project-proof figcaption span:last-child, .readme-demo figcaption span:last-child { color: var(--muted); font-weight: 520; }

.project-body {
  padding-block: 28px 110px;
  display: grid;
  grid-template-columns: 210px minmax(0, 820px);
  justify-content: space-between;
  gap: 86px;
}
.project-toc { position: sticky; top: 112px; align-self: start; }
.project-toc p { margin: 0 0 18px; color: var(--blue-bright); font-size: .67rem; font-weight: 760; letter-spacing: .16em; }
.project-toc nav { display: grid; gap: 4px; }
.project-toc a { padding: 7px 0; color: var(--muted); text-decoration: none; font-size: .79rem; transition: color .2s ease, padding-left .2s ease; }
.project-toc a:hover { padding-left: 6px; color: #fff; }
.project-toc .readme-source { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: #dce2eb; text-decoration: underline; text-underline-offset: 4px; }

.readme { min-width: 0; }
.readme-section { padding: 74px 0; border-top: 1px solid var(--line); scroll-margin-top: 92px; }
.readme-section:first-child { border-top-color: #3a4557; }
.readme-eyebrow { margin: 0 0 14px; color: var(--blue-bright); font-size: .69rem; font-weight: 760; letter-spacing: .16em; }
.readme h2 { max-width: 760px; margin: 0; font-size: clamp(2.2rem, 3.5vw, 3.6rem); line-height: 1.06; letter-spacing: -.055em; text-wrap: balance; }
.readme h3 { margin: 36px 0 12px; font-size: 1.2rem; letter-spacing: -.025em; }
.readme p { margin: 18px 0 0; color: #b4bbc6; font-size: .94rem; }
.readme strong { color: #f3f5f8; }
.readme a { text-underline-offset: 4px; }
.readme ul, .readme ol { margin: 24px 0 0; padding-left: 22px; color: #b4bbc6; }
.readme li { margin-top: 10px; padding-left: 5px; }
.readme li::marker { color: var(--blue-bright); font-weight: 760; }
.readme blockquote { margin: 28px 0 0; padding: 18px 20px; border-left: 2px solid var(--blue); color: #c8ced8; background: #091020; }
.readme blockquote p { margin: 0; color: inherit; }

.capability-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.capability { min-height: 148px; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(9, 10, 12, .82); }
.capability:nth-child(2n) { border-right: 0; }
.capability:nth-last-child(-n+2) { border-bottom: 0; }
.capability span { display: block; margin-bottom: 25px; color: var(--blue-bright); font-size: .67rem; letter-spacing: .12em; }
.capability strong { display: block; font-size: .96rem; }
.capability p { margin-top: 7px; font-size: .78rem; }

.workflow-list { margin-top: 32px; padding: 0; display: grid; list-style: none; counter-reset: workflow; }
.workflow-list li { position: relative; margin: 0; padding: 23px 22px 23px 72px; border-top: 1px solid var(--line); counter-increment: workflow; }
.workflow-list li:last-child { border-bottom: 1px solid var(--line); }
.workflow-list li::before { position: absolute; top: 22px; left: 20px; color: var(--blue-bright); content: "0" counter(workflow); font-size: .72rem; font-weight: 780; letter-spacing: .12em; }
.workflow-list strong { display: block; font-size: .93rem; }
.workflow-list span { display: block; margin-top: 5px; color: var(--muted); font-size: .8rem; }

.readme-table { width: 100%; margin-top: 30px; border-collapse: collapse; border: 1px solid var(--line); background: rgba(9, 10, 12, .86); font-size: .8rem; }
.readme-table th, .readme-table td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.readme-table th { color: #edf0f5; background: #0e1116; }
.readme-table td { color: #aeb6c2; }
.readme-table tr:last-child td { border-bottom: 0; }

.readme-demo { margin: 34px 0 0; padding: 0 14px 14px; overflow: hidden; border: 1px solid #344052; border-radius: 14px; background: #090b0e; box-shadow: 0 24px 66px rgba(0, 0, 0, .5); }
.readme-demo video, .readme-demo > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; border-radius: 9px; background: #060708; }

.readme-gallery { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.readme-gallery figure { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: #090b0e; }
.readme-gallery img { width: 100%; aspect-ratio: 1.55 / 1; object-fit: cover; object-position: left top; border-radius: 8px; }
.readme-gallery figcaption { padding: 10px 3px 2px; color: var(--muted); font-size: .72rem; }

.code-block { margin: 28px 0 0; padding: 18px 20px; overflow-x: auto; border: 1px solid #293245; border-radius: 10px; color: #d9e4f7; background: #080d16; font: .78rem/1.7 "Cascadia Code", "SFMono-Regular", Consolas, monospace; white-space: pre; }
.note-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.note-card { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(10, 11, 13, .84); }
.note-card strong { display: block; font-size: .88rem; }
.note-card p { margin-top: 7px; font-size: .78rem; }

.project-cta { margin-top: 74px; padding: 48px; border: 1px solid #30405c; border-radius: 16px; background: #091226; }
.project-cta h2 { max-width: 620px; font-size: clamp(2rem, 3vw, 3rem); }
.project-cta p { max-width: 650px; }
.project-cta .hero-actions { margin-top: 26px; }

.project-footer-note { max-width: 700px; }
.project-page.js .reveal { opacity: 0; transition: opacity .7s ease; }
.project-page.js .reveal.is-visible { opacity: 1; }

@media (max-width: 1040px) {
  .project-hero { min-height: auto; grid-template-columns: 1fr; gap: 50px; }
  .project-hero-copy { max-width: none; }
  .project-body { grid-template-columns: 1fr; gap: 30px; }
  .project-toc { position: static; padding: 20px 0 30px; border-top: 1px solid var(--line); }
  .project-toc nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
  .project-toc .readme-source { margin: 0; padding: 7px 0; border-top: 0; }
}

@media (max-width: 700px) {
  .project-hero { padding-block: 50px 68px; }
  .project-breadcrumb { margin-bottom: 24px; }
  .project-identity img { width: 48px; height: 48px; }
  .project-hero h1 { margin-top: 22px; font-size: clamp(3rem, 15vw, 4.2rem); }
  .project-proof { padding: 9px; border-radius: 14px; }
  .project-proof figcaption { min-height: 36px; }
  .project-body { padding-bottom: 80px; }
  .readme-section { padding-block: 58px; }
  .capability-grid, .note-grid, .readme-gallery { grid-template-columns: 1fr; }
  .capability { border-right: 0; }
  .capability:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .capability:last-child { border-bottom: 0; }
  .readme-table { display: block; overflow-x: auto; }
  .project-cta { margin-top: 56px; padding: 30px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-page.js .reveal { opacity: 1; }
}
