.project-back {
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.case-study {
  width: min(75vw, 1400px);
  max-width: none;
  padding-top: 3.5rem;
}
.case-study h1 {
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}
.project-content {
  margin-top: 3rem;
  font-size: 1.08rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.project-content > p {
  max-width: 780px;
}
.project-content .volumetric-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: start;
  margin: 2.5rem 0 3rem;
}
.project-content .volumetric-gallery figure {
  min-width: 0;
  margin: 0;
}
.project-content .volumetric-gallery img {
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: contain;
  background: var(--paper);
  margin: 0;
}
.project-content .layout-sample {
  margin-top: 0 !important;
}
.pcb-layout-views {
  display: grid;
  gap: 1.25rem;
}
.project-content .volumetric-gallery figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.project-content .media-title {
  margin: 0 0 1rem;
  padding-top: 0;
  border-top: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.project-content h2 {
  margin: 3rem 0 1.3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.project-content h3 {
  margin: 1.8rem 0 1rem;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.4;
}
.project-content h4 {
  font-size: 1rem;
  font-weight: 500;
}
.project-content hr {
  display: none;
}
.project-content ul,
.project-content ol {
  padding-left: 1.5rem;
}
.project-content li {
  margin-block: 0.45rem;
}
.project-content a {
  color: var(--accent);
}
.project-content pre {
  overflow-x: auto;
  padding: 1.2rem;
  background: var(--paper);
  border-radius: 0.6rem;
}
.project-content code {
  font-size: 0.88em;
  background: var(--paper);
  padding: 0.15rem 0.3rem;
}
.project-content blockquote {
  margin-inline: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}
.project-content .image-column-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-block: 2rem;
}
.project-content .image-column-container > div {
  flex: 1;
  min-width: 0;
}
.project-content .image-column-container .image-column-container {
  flex-direction: column;
  gap: 1rem;
}
.project-content .image-column-container .image-column-container > div {
  width: 100%;
}
.project-content .vertical-divider {
  display: none;
}
.project-content img,
.project-content video {
  max-width: 100%;
  height: auto;
  border-radius: 0.7rem;
  margin-block: 1rem;
}
.project-content video {
  display: block;
  width: 100%;
  max-height: 620px;
  background: var(--paper);
}
.project-content iframe,
.project-content embed {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  margin-block: 1.5rem;
}
.project-content iframe[src*="youtube"] {
  aspect-ratio: 16 / 9;
  height: auto;
}
.project-content iframe.pdf,
.project-content embed {
  height: min(75vh, 700px);
  min-height: 360px;
}
.project-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}
.project-content th,
.project-content td {
  padding: 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
}
.project-content .load-error {
  padding: 1.5rem;
  background: var(--paper);
}
@media (max-width: 700px) {
  .project-content .volumetric-gallery {
    grid-template-columns: 1fr;
  }
  .project-content .layout-sample {
    max-width: 360px;
    margin-top: 0 !important;
  }
  .project-content .image-column-container {
    flex-direction: column;
    gap: 1rem;
  }
  .project-content .image-column-container > div {
    width: 100%;
  }
  .project-content img {
    width: auto;
  }
  .case-study {
    width: 100%;
    padding-top: 2rem;
  }
}

/* FTC documentation: flat, captioned galleries instead of nested columns. */
.ftc-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--paper);
  border-radius: 0.8rem;
  margin-block: 2rem;
}
.ftc-stats strong,
.ftc-stats span {
  display: block;
}
.ftc-stats strong {
  font-size: 1.12rem;
  font-weight: 500;
}
.ftc-stats span {
  color: var(--muted);
  font-size: 0.88rem;
}
.ftc-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-block: 1.5rem 3rem;
}
.ftc-gallery--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ftc-gallery figure {
  margin: 0;
  min-width: 0;
}
.project-content .ftc-gallery img,
.project-content .ftc-gallery video {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--paper);
  margin: 0;
  padding: 0.5rem;
}
.ftc-gallery figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.45;
}
@media (max-width: 700px) {
  .ftc-gallery,
  .ftc-gallery--three {
    grid-template-columns: 1fr;
  }
  .ftc-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .ftc-stats > div + div {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
  }
}
