/* Project pages: media first, short introductions, no long-form sidebar. */
.page-intro:has(.project-showcase) { padding-top: 26px; }
.detail-hero:has(.project-showcase) { grid-template-columns: .74fr 1.26fr; gap: 42px; align-items: center; }
.detail-hero > div { min-width: 0; }
.detail-hero:has(.project-showcase) .lead { font-size: 17px; line-height: 1.8; }
.detail-hero:has(.project-showcase) h1 { font-size: clamp(34px,4vw,52px); }
.project-showcase { min-width: 0; scroll-margin-top: 98px; }
.showcase-slides { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #080f1b; }
.showcase-slide { margin: 0; }
.showcase-stage { position: relative; width: 100%; aspect-ratio: 16/10; display: grid; place-items: center; }
.showcase-stage video, .showcase-stage img, .showcase-stage > a { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.showcase-stage > a { display: grid; place-items: center; position: absolute; inset: 0; }
.showcase-stage video { position: absolute; inset: 0; }
.showcase-image:hover { background: #142132; }
.showcase-slide figcaption { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 12px 15px; font-size: 12px; line-height: 1.6; background: #f0f5f6; color: var(--muted); min-height: 43px; }
.showcase-slide figcaption a { color: var(--accent); white-space: nowrap; }
.showcase-slide figcaption a:hover { text-decoration: underline; }
.showcase-play { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); align-items: center; gap: 12px; padding: 13px 23px; border: 1px solid #ffffff88; border-radius: 40px; background: #07121ad9; box-shadow: 0 8px 35px #0005; color: white; font-size: 14px; backdrop-filter: blur(8px); }
[data-media-ready] .showcase-play { display: inline-flex; }
.showcase-play:hover { background: var(--accent); }
.showcase-play span:first-child { font-size: 20px; }
.showcase-external::after { content: ''; position: absolute; inset: 0; background: #05101a44; }
.external-play { position: absolute; z-index: 1; display: flex; align-items: center; gap: 12px; background: #07121ad9; border: 1px solid #ffffff88; border-radius: 40px; padding: 13px 23px; color: white; font-size: 14px; }
.external-play b { font-size: 20px; }
.showcase-controls { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 10px 0; }
.showcase-hint { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.showcase-controls > div { display: flex; align-items: center; gap: 10px; }
.showcase-controls button { border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); width: 36px; height: 32px; line-height: 1; }
.showcase-controls button:hover { border-color: var(--accent); background: var(--soft); }
.showcase-controls output { min-width: 50px; text-align: center; color: var(--muted); font: 12px/1.5 var(--font-mono); }
.showcase-thumbs { display: flex; gap: 9px; overflow-x: auto; padding: 3px 3px 9px; scrollbar-width: thin; scrollbar-color: #adc7cc transparent; overscroll-behavior-x: contain; }
.showcase-thumb { flex: 0 0 92px; position: relative; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: #101b2a; opacity: .62; transition: opacity .15s; }
.showcase-thumb img { width: 100%; height: 100%; object-fit: cover; }
.showcase-thumb:hover { opacity: 1; }
.showcase-thumb[aria-pressed=true] { opacity: 1; border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: 2px; }
.thumb-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-size: 16px; color: white; text-shadow: 0 1px 8px black; }
.project-summary { padding: 12px 0 54px; }
.project-summary > section { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 45px; padding: 35px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 98px; }
.project-summary > section:last-child { border-bottom: 0; }
.project-summary h2 { font-size: 22px; font-weight: 600; line-height: 1.65; margin: 0; }
.project-summary p { font-size: 15px; color: #435966; line-height: 1.95; margin: 0 0 13px; max-width: 55em; }
.project-summary p:last-child { margin-bottom: 0; }
.project-summary strong { font-weight: 600; color: var(--ink); }
.project-features { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 25px; }
.project-features h3 { font-size: 16px; margin: 0 0 10px; font-weight: 600; }
.project-features p { font-size: 14px; line-height: 1.9; }
.project-anchor { display: block; height: 0; scroll-margin-top: 105px; }
.project-reading-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 17px; }
.project-reading-links a { color: var(--accent); font-size: 13px; text-underline-offset: 4px; }
.project-reading-links a:hover { text-decoration: underline; }
.project-download { display: flex; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.project-download span { color: var(--muted); font-size: 12px; }
@media (min-width: 1450px) { .page-intro:has(.project-showcase) > .wrap { width: min(1240px,calc(100% - 96px)); } }
@media (max-width: 900px) {
  .detail-hero:has(.project-showcase) { grid-template-columns: 1fr; gap: 25px; }
  .detail-hero:has(.project-showcase) .tags { margin-bottom: 14px; }
  .detail-hero:has(.project-showcase) .buttons { margin-top: 16px; }
  .project-summary > section { grid-template-columns: 1fr; gap: 17px; padding: 28px 0; }
  .showcase-stage { aspect-ratio: 16/9; }
}
@media (max-width: 540px) {
  .detail-hero:has(.project-showcase) .lead { font-size: 16px; }
  .project-features { grid-template-columns: 1fr; gap: 20px; }
  .project-features h3 { margin-bottom: 5px; }
  .showcase-slide figcaption { font-size: 11px; gap: 10px; padding: 10px 11px; }
  .showcase-thumb { flex-basis: 80px; height: 50px; }
  .showcase-controls button { min-height: 36px; width: 40px; }
  .project-summary h2 { font-size: 21px; }
  .project-summary { padding-bottom: 25px; }
}
@media (prefers-reduced-motion: reduce) { .showcase-thumb { transition: none; } }
