/* Project walkthroughs share the portfolio's paper, green, and orange palette. */
#project-dialog {
  width: min(1060px, calc(100% - 48px));
  max-height: 92vh;
  max-height: 92dvh;
  padding: 0;
  overscroll-behavior: contain;
}
#project-dialog .dialog-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0;
  padding: 16px 30px;
  background: var(--paper);
}
#project-dialog .dialog-bar button { min-height: 36px; padding: 4px 10px; }
#dialog-content { padding: 28px 30px 25px; }
.project-dialog-heading { display: grid; grid-template-columns: .75fr 1.25fr; gap: 30px; align-items: start; margin-bottom: 25px; }
.project-dialog-heading .dialog-title { font-size: 35px; margin-bottom: 5px; }
.project-dialog-heading .dialog-status { font-size: 10px; margin: 0; }
.project-dialog-heading .dialog-description { font-size: 13px; margin: 0; line-height: 1.8; }
.project-gallery { min-width: 0; border-radius: 7px; }
.project-gallery:focus-visible { outline: 2px solid var(--orange); outline-offset: 6px; }
.project-slide { margin: 0; }
.slide-image-wrap { position: relative; overflow: hidden; width: 100%; max-width: 880px; max-height: 44vh; max-height: 44dvh; margin-inline: auto; aspect-ratio: 8 / 5; border: 1px solid #bfc9b8; border-radius: 7px; background: #0b1628; touch-action: pan-y pinch-zoom; }
.slide-image { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; }
.slide-image[hidden], .slide-error[hidden] { display: none; }
.slide-error { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 25px; color: #eee; font-size: 14px; }
.slide-caption { padding-top: 22px; min-height: 125px; }
.slide-kicker { color: var(--orange); font-size: 9px; letter-spacing: 1.7px; font-weight: 600; margin-bottom: 8px; }
.slide-caption h3 { font: 600 23px / 1.3 var(--display); letter-spacing: -.7px; margin: 0 0 8px; }
.slide-caption > p:last-child { color: var(--muted); font-size: 13px; max-width: 730px; line-height: 1.8; margin: 0; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 15px; padding-block: 10px 15px; border-bottom: 1px solid var(--line); }
.gallery-hint { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.gallery-controls { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.gallery-arrow { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #bdc8b7; border-radius: 50%; background: #f5f4edf2; color: var(--ink); font-size: 19px; pointer-events: auto; box-shadow: 0 2px 10px #0002; }
.gallery-arrow:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gallery-counter { font-size: 11px; font-variant-numeric: tabular-nums; min-width: 38px; text-align: center; }
.gallery-thumbnails { display: flex; gap: 10px; padding: 18px 3px 5px; overflow-x: auto; scrollbar-width: thin; }
.gallery-thumbnail { display: block; position: relative; width: 112px; flex: 0 0 112px; padding: 3px; border: 2px solid transparent; border-radius: 5px; background: transparent; opacity: .6; transition: opacity .15s; }
.gallery-thumbnail[aria-pressed="true"] { border-color: var(--orange); opacity: 1; }
.gallery-thumbnail:hover { opacity: 1; }
.gallery-thumbnail img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; border-radius: 2px; object-fit: cover; }
.gallery-thumbnail span { position: absolute; bottom: 8px; right: 8px; padding: 0 4px; border-radius: 2px; background: #12271ee6; color: white; font-size: 8px; line-height: 1.7; }
.gallery-note { color: var(--muted); font-size: 10px; margin: 10px 0 24px; }
.project-build-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-build-details summary { display: flex; justify-content: space-between; gap: 15px; padding-block: 17px; font-size: 13px; cursor: pointer; list-style: none; }
.project-build-details summary::-webkit-details-marker { display: none; }
.project-build-details summary::after { content: '+'; color: var(--orange); font-size: 19px; line-height: 1; }
.project-build-details[open] summary::after { content: '−'; }
.project-build-details .project-tags { padding-top: 8px; }
.project-build-details .dialog-details { padding-top: 0; }
.project-build-details .dialog-footnote { margin-bottom: 22px; }
.project-dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 22px; }
.project-dialog-footer > span { color: var(--muted); font-size: 11px; }
.project-dialog-footer .button { padding: 10px 16px; font-size: 11px; gap: 20px; }
@media (max-width: 760px) {
  #project-dialog { width: calc(100% - 20px); max-height: 94vh; max-height: 94dvh; border-radius: 9px; }
  #project-dialog .dialog-bar { padding: 10px 16px; }
  #project-dialog .dialog-bar .eyebrow { font-size: 8px; }
  #dialog-content { padding: 20px 16px; }
  .project-dialog-heading { grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
  .project-dialog-heading .dialog-title { font-size: 28px; }
  .project-dialog-heading .dialog-description { font-size: 12px; line-height: 1.7; }
  .slide-image-wrap { width: 94%; }
  .slide-caption { padding-top: 18px; min-height: 0; }
  .slide-caption h3 { font-size: 20px; }
  .slide-caption > p:last-child { font-size: 12px; }
  .gallery-hint { font-size: 10px; }
  .gallery-controls { left: 7px; right: 7px; }
  .gallery-toolbar { margin-top: 10px; }
  .gallery-thumbnails { gap: 7px; padding-top: 15px; }
  .gallery-thumbnail { width: 82px; flex-basis: 82px; }
  .gallery-note { font-size: 9px; margin-bottom: 20px; }
  .project-dialog-footer { flex-wrap: wrap; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .gallery-thumbnail { transition: none; } }
