/* Detail pages reuse the original site's typography, colors and spacing. */
.project-hero > div { min-width: 0; }
.project-title { overflow-wrap: anywhere; }
.project-meta-row { gap: 16px; }
.meta-val { text-align: right; }
.project-single { max-width: 880px; margin: 0 auto; }
.project-img-sq img { object-fit: contain; }
@media (max-width: 760px) {
 body { --pad: 24px; }
 header { flex-wrap: wrap; gap: 16px; }
 nav ul { gap: 18px; }
 .project-hero { padding-top: 140px; grid-template-columns: 1fr; gap: 32px; }
 .project-grid-2 { grid-template-columns: 1fr; gap: 16px; }
 .section { padding-top: 40px; padding-bottom: 40px; }
}

.artwork-gallery { display: grid; gap: 48px; }
.artwork-gallery figure { margin: 0; }
.artwork-gallery img { display: block; width: auto; height: auto; max-width: 100%; max-height: 62svh; margin: 0 auto; }
.artwork-gallery figcaption { max-width: 1000px; margin: 14px auto 0; font: 12px var(--font-mono); color: var(--gray); }
.book-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.book-toolbar button, .book-toolbar select, .book-toolbar a { font: 13px var(--font-body); padding: 10px 14px; border: 1px solid var(--border); color: var(--black); background: var(--white); border-radius: 3px; text-decoration: none; }
.book-toolbar button, .book-toolbar select { cursor: pointer; }
.book-toolbar button:hover:not(:disabled), .book-toolbar a:hover { border-color: var(--blue); color: var(--blue); }
.book-toolbar button:disabled { opacity: .35; cursor: default; }
.book-toolbar :focus-visible, .book-stage:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.reader-status { color: var(--gray); font: 12px var(--font-mono); margin-bottom: 16px; }
.book-stage { border: 0; background: var(--white); }
.book-stage img { width: auto; height: auto; max-width: 100%; max-height: 62svh; display: block; margin-inline: auto; cursor: zoom-in; }

@media (max-width: 760px) { .artwork-gallery { gap: 32px; } }

.artwork-gallery { gap: 40px; }
.artwork-gallery figure { text-align: center; }
.artwork-trigger { display: block; width: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.artwork-trigger:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.artwork-gallery figcaption { text-align: center; }

/* Soft edge definition only on detail-page previews, including the book. */
.artwork-gallery .artwork-trigger > img,
.book-stage > #book-page {
  box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 5px 18px rgb(0 0 0 / .12);
}

/* Next Project hover uses the same blue as the homepage name. */
.next-project { transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.next-project .next-label, .next-project .next-arrow { transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) {
 .next-project:hover { background-color: var(--blue); border-top-color: var(--blue); color: var(--white); }
 .next-project:hover .next-label, .next-project:hover .next-arrow { color: var(--white); }
}
.next-project:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
 .next-project, .next-project .next-label, .next-project .next-arrow { transition: none; }
}
