/* Keep Safari text sizing stable on rotation; browser zoom remains available. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* About has one set of responsive rules at the end of this file. */
/* Three compact chapters: photographs, collaborations, and an introduction. */
.site-header nav { flex-wrap: nowrap; }
.photo-deck #deck-hint { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; top: -26px; right: 8%; left: auto; bottom: auto; font-size: .875rem; transform: rotate(5deg); }
.photo-deck #deck-hint[hidden] { display: none; }
.photo-deck #deck-hint > span { display: block; font-size: inherit; line-height: 1.2; margin: 0; transform: none; text-align: left; }
#deck-hint svg { display: block; width: 58px; height: 38px; margin-left: 22px; overflow: visible; }
#deck-hint path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media(max-width:700px) {
 .horizontal-layout .site-header { min-height: 84px; padding: 10px 0; gap: 15px; }
 .site-header .brand { font-size: 1.85rem; }
 .site-header nav { gap: 13px; font-size: .75rem; }
 .photo-deck #deck-hint { top: -18px; right: 4%; font-size: .75rem; gap: 3px; }
 #deck-hint svg { width: 44px; height: 29px; margin-left: 25px; }
}


/* An open set of prints, with the other stories waiting behind it. */
.horizontal-layout .work-section { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(16px, 2dvh, 26px); padding-top: clamp(20px, 3dvh, 35px); padding-bottom: clamp(16px, 2dvh, 26px); }
.work-section .section-heading { margin: 0; }
.collab-sheet { display: flex; gap: clamp(10px, 1.4vw, 26px); min-height: 0; padding: 8px 0; }
.collab-card { flex: 1 1 0; display: grid; grid-template-rows: minmax(0, 1fr) 86px; gap: 10px; min-width: 0; min-height: 0; transition: flex-grow .65s cubic-bezier(.22,.7,.2,1); }
.collab-card.is-active { flex-grow: 2.65; }
.collab-prints { display: block; position: relative; min-width: 0; min-height: 0; container-type: size; isolation: isolate; }
.collab-print { display: block; position: absolute; top: 50%; left: 50%; width: max-content; height: max-content; padding: 7px 7px 29px; background: #f8f7f3; border: 1px solid #c9c8c180; box-shadow: 0 14px 30px -16px #27313f70; transform: translate(-50%,-50%) translateY(25px) rotate(var(--angle, -3deg)) scale(.88); transition: transform .65s cubic-bezier(.22,.7,.2,1), opacity .5s, box-shadow .5s; }
.collab-print img { display: block; width: auto; height: auto; max-width: max(1px, calc(100cqw - 34px)); max-height: max(1px, calc(100cqh - 100px)); object-fit: contain; transition: max-width .65s, max-height .65s; }
.collab-print[data-slot="0"] { z-index: 4; --angle: -3deg; }
.collab-print[data-slot="1"] { z-index: 1; --angle: -8deg; }
.collab-print[data-slot="2"] { z-index: 2; --angle: 7deg; }
.collab-print[data-slot="3"] { z-index: 3; --angle: 3deg; }
.collab-card:nth-child(even) .collab-print[data-slot="0"] { --angle: 3deg; }
.collab-prints { transition: opacity .5s; }
.collab-card:not(.is-active) .collab-prints { opacity: .8; }
.collab-card.is-active .collab-print { box-shadow: 0 20px 34px -20px #27313f90; }
.collab-card.is-active .collab-print img { max-width: max(1px, calc(66cqw - 18px)); max-height: max(1px, calc(68cqh - 42px)); }
.collab-card.is-active .collab-print[data-slot="0"] { transform: translate(-50%,-50%) translate(0, 9cqh) rotate(-3deg); }
.collab-card.is-active .collab-print[data-slot="1"] { transform: translate(-50%,-50%) translate(-16cqw, -17cqh) rotate(-12deg) scale(.84); }
.collab-card.is-active .collab-print[data-slot="2"] { transform: translate(-50%,-50%) translate(17cqw, -15cqh) rotate(11deg) scale(.84); }
.collab-card.is-active .collab-print[data-slot="3"] { transform: translate(-50%,-50%) translate(17cqw, 12cqh) rotate(9deg) scale(.78); }
.collab-paper { display: contents; }
.collab-action { position: absolute; bottom: 7px; left: 6px; right: 6px; text-align: right; font-size: .6875rem; letter-spacing: .015em; white-space: nowrap; }
.story-select { display: flex; flex-direction: column; justify-content: flex-start; width: 100%; gap: 12px; padding: 12px 0 0; text-align: left; background: transparent; border-top: 1px solid var(--line); color: #344151; }
.story-title { display: block; font-size: clamp(1.05rem, 1.65vw, 1.75rem); line-height: 1.12; letter-spacing: -.045em; }
.is-active .story-select { color: var(--ink); border-color: var(--ink); }
.is-active .story-title { font-size: clamp(1.3rem, 2.1vw, 2.1rem); }
.collab-meta { display: flex; justify-content: space-between; gap: 8px; width: 100%; font-size: .625rem; line-height: 1.35; text-transform: uppercase; color: #445161; }
.collab-meta span:last-child { flex-shrink: 0; }
.work-section .constellation-note { display: grid; grid-template-columns: 1fr 1.2fr; gap: 35px; margin: 0; padding: 18px 0 0; align-items: center; }
.work-section .constellation-note h3 { font-size: clamp(1.25rem, 1.9vw, 2rem); line-height: 1.15; }
.work-section .constellation-note h3 a { display: inline; min-height: 0; font-size: inherit; line-height: inherit; }
.work-section .constellation-note p { margin: 0; font-size: .8125rem; line-height: 1.5; }
@media(max-width:700px) {
 .horizontal-layout .work-section { padding-top: 20px; padding-bottom: 14px; gap: 12px; }
 .work-section .section-heading { display: flex; flex-direction: row; align-items: center; gap: 14px; }
 .work-section .section-heading h2 { font-size: 1.8rem; }
 .work-section .section-heading .section-label { max-width: 84px; font-size: .625rem; padding-top: 0; text-align: right; flex-shrink: 0; }
 .collab-sheet { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); grid-template-rows: minmax(0,1fr) auto auto; gap: 0 16px; padding: 0; }
 .collab-card { display: contents; }
 /* Keep every preview in the same sized grid cell. Safari must not animate
    from an unlaid-out, display:none container when a story is selected. */
 .collab-prints { display: block; grid-column: 1 / -1; grid-row: 1; margin: 0 4px 5px; visibility: hidden; pointer-events: none; transition: none; }
 .collab-card.is-active .collab-prints.is-positioned { visibility: visible; pointer-events: auto; }
 .story-select { gap: 5px; min-height: 54px; padding: 9px 0 8px; }
 .collab-card:nth-child(1) .story-select { grid-column: 1; grid-row: 2; }
 .collab-card:nth-child(2) .story-select { grid-column: 2; grid-row: 2; }
 .collab-card:nth-child(3) .story-select { grid-column: 1; grid-row: 3; }
 .collab-card:nth-child(4) .story-select { grid-column: 2; grid-row: 3; }
 .story-title, .is-active .story-title { font-size: .9375rem; line-height: 1.15; }
 .collab-meta { font-size: .5625rem; }
 /* Stationary, full-cell grid layers center the paper. Only the inner
    paper moves, so its animation cannot displace the centering transform. */
 .collab-card .collab-print[data-slot], .collab-card.is-active .collab-print[data-slot] {
  inset: 0; width: auto; height: auto; display: grid; place-items: center;
  padding: 0; border: 0; background: none; box-shadow: none;
  transform: none; translate: none; rotate: none; transition: none;
  pointer-events: none;
 }
 .collab-paper {
  display: block; position: relative; box-sizing: content-box;
  width: var(--photo-width); padding: 5px 5px 25px;
  border: 1px solid #c9c8c180; background: #f8f7f3;
  box-shadow: 0 14px 28px -17px #27313f70;
  transform: translate(var(--float-x), var(--float-y)) rotate(var(--float-angle));
  pointer-events: auto;
 }
 .collab-action { bottom: 6px; font-size: .625rem; }
 .collab-card .collab-print img, .collab-card.is-active .collab-print img {
  width: var(--photo-width); height: var(--photo-height);
  max-width: none; max-height: none; transition: none;
 }
 .work-section .constellation-note { grid-template-columns: 1fr; gap: 7px; padding: 12px 0 0; }
 .work-section .constellation-note h3 { font-size: 1rem; }
 .work-section .constellation-note p { font-size: .6875rem; line-height: 1.4; }
}
@media(max-width:700px) and (max-height:650px) {
 .horizontal-layout .work-section { padding-top: 12px; padding-bottom: 10px; gap: 8px; }
 .work-section .section-heading h2 { font-size: 1.5rem; }
 .work-section .section-heading .section-label, .collab-meta { display: none; }
 .story-select { min-height: 44px; padding: 7px 0; justify-content: center; }
 .story-title, .is-active .story-title { font-size: .875rem; }
 .work-section .constellation-note { padding-top: 8px; gap: 5px; }
 .work-section .constellation-note p { font-size: .625rem; }
 .hero-composition .photo-deck { margin-top: 6px; }
}
@media(prefers-reduced-motion:reduce) {
 .collab-card, .collab-print, .collab-print img { transition: none; }
}
.collab-sheet.motion-paused .collab-card, .collab-sheet.motion-paused .collab-print, .collab-sheet.motion-paused .collab-print img { transition: none; }

/* Small visual shutter snap; shared behavior lives in dialog-motion.js. */
.work-section .constellation-note { border-bottom: 0; }
.photo-deck #deck-hint { align-items: center; gap: 2px; transform: rotate(-5deg); }
#deck-hint svg { margin-left: 0; }

/* Give the name a little more breathing room without crossing the viewport edge. */
.hero-composition .photo-deck { transform: translateX(clamp(12px, 2.2vw, 30px)); }
.photo-deck #deck-hint { flex-direction: row; align-items: center; gap: 6px; right: 9%; top: -22px; transform: none; }
#deck-hint svg { width: 20px; height: 20px; margin: 0; }
@media(max-width:700px) {
 .hero-composition .photo-deck { transform: translateX(8px); }
 .photo-deck #deck-hint { top: -17px; right: 8%; }
 #deck-hint svg { width: 17px; height: 17px; }
}

/* Closing controls use a centered symbol so the hit area and glyph stay aligned. */
.dismiss-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: transparent; font-size: 1.8rem; line-height: 1; }
.dismiss-button:hover { background: #0000000d; }
.image-dialog > .dismiss-button { position: absolute; right: 25px; top: 15px; }
.image-dialog[data-single] { background: linear-gradient(115deg, #bec9d7, #dcc4bb); color: var(--ink); }
/* The close target and portrait share one responsive column. Its right edge
   follows the photograph even when viewport height limits the image width. */
.image-dialog[data-single][open] { display: grid; grid-template-columns: min(100%, calc((100dvh - 84px) * 2 / 3)); grid-template-rows: 44px auto; justify-content: center; align-content: center; gap: 8px; padding: 16px; }
.image-dialog[data-single] > img { grid-column: 1; grid-row: 2; width: 100%; height: auto; aspect-ratio: 2 / 3; }
.image-dialog[data-single]::backdrop { background: #27313f66; }
.image-dialog[data-single] .image-dismiss-side { color: var(--ink); }
.image-dialog[data-single] > .dismiss-button { position: static; grid-column: 1; grid-row: 1; justify-self: end; border: 1px solid transparent; z-index: 4; }
.image-dialog[data-single] > .dismiss-button:hover { border-color: currentColor; }
.image-dialog[data-single] > .gallery-controls { display: none; }

/* A looping hand-drawn cue reads as a page turn instead of a directional arrow. */
.photo-deck #deck-hint { flex-direction: column; align-items: flex-end; gap: 0; right: 8%; top: -30px; transform: rotate(-4deg); }
#deck-hint > span { transform: translateY(-4px); }
#deck-hint svg { width: 50px; height: 35px; margin: -1px 2px 0 0; transform: rotate(-4deg); }
#deck-hint path { stroke-width: 2; }
@media(max-width:700px) {
 .photo-deck #deck-hint { top: -25px; right: 7%; }
 #deck-hint > span { transform: translateY(-3px); }
 #deck-hint svg { width: 42px; height: 30px; margin-right: 1px; }
}

/* The full photograph closes from either quiet edge of the viewing area. */
.image-dismiss-side { position: absolute; top: 22%; bottom: 18%; z-index: 3; width: max(44px, 7vw); padding: 0; background: transparent; }
.image-dismiss-side--left { left: 0; }
.image-dismiss-side--right { right: 0; }
.image-dismiss-side:hover { background: #ffffff0a; }
.image-dismiss-side:focus-visible { outline: 2px solid currentColor; outline-offset: -5px; }

@media(max-width:700px) {
 .image-dismiss-side { width: 46px; top: 18%; bottom: 16%; }
}

/* Project stories use the same ink, paper, and measured color language as the main rail. */
.project-dialog {
  --project-accent: #bec9d7;
  --project-wash: #344151;
  width: min(1480px, calc(100% - 28px));
  height: min(940px, calc(100% - 28px));
  max-width: none;
  max-height: none;
  margin: auto;
  overflow: auto;
  background: #27313f;
  color: #eeede9;
  border: 1px solid #667386;
  box-shadow: 0 26px 90px #11182780;
}
.project-dialog::backdrop { background: #17202bcc; }
.project-dialog .dialog-topbar {
  display: grid;
  grid-template-columns: 1fr auto 44px;
  align-items: center;
  min-height: 74px;
  padding: 12px 24px;
  background: #27313f;
  border-bottom: 1px solid #56606d;
}
.project-dialog .dialog-label { color: #d9dee5; }
.dialog-topbar-code { color: var(--project-accent); font-size: .6875rem; letter-spacing: .09em; }
.project-dialog .dialog-topbar .dismiss-button { color: #eeede9; }
.project-dialog .dialog-layout { grid-template-columns: minmax(340px, .93fr) minmax(0, 1.07fr); gap: clamp(34px, 5vw, 82px); padding: clamp(26px, 4vw, 62px); }
.project-dialog .dialog-gallery { position: relative; top: auto; align-self: start; }
.gallery-overline { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 10px; color: #aeb9c6; font-size: .625rem; letter-spacing: .11em; }
.gallery-overline span:last-child { color: var(--project-accent); }
.project-dialog .gallery-expand { height: min(63vh, 640px); border: 1px solid #7c8a9a; background: var(--project-wash); overflow: hidden; }
.project-dialog .gallery-expand::before { content: ''; position: absolute; z-index: 1; top: 0; left: 0; right: 0; height: 8px; background: linear-gradient(90deg, var(--project-accent), #eeede9 44%, var(--project-wash)); opacity: .9; }
.project-dialog .gallery-expand > img { height: 100%; width: 100%; padding: 18px; object-fit: contain; background: var(--project-wash); }
.gallery-expand-label { position: absolute; z-index: 2; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 11px; padding: 9px 12px; background: #eeede9; color: #27313f; font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; }
.gallery-expand-label span { color: var(--project-accent); font-size: 1rem; line-height: .7; }
.project-dialog .gallery-controls { justify-content: space-between; padding: 24px 0 14px; color: #d9dee5; border: 0; }
.gallery-step { display: inline-flex !important; align-items: center; justify-content: center; gap: 10px; width: auto !important; height: auto !important; min-height: 38px; padding: 7px 11px; border: 1px solid #718095 !important; border-radius: 999px; background: transparent !important; color: inherit; font-size: .625rem !important; letter-spacing: .1em; line-height: 1; text-transform: uppercase; }
.gallery-step:hover, .gallery-step:focus-visible { border-color: var(--project-accent) !important; background: var(--project-accent) !important; color: #27313f; }
.gallery-count { min-width: 60px; text-align: center; font-size: .75rem; letter-spacing: .08em; }
.project-dialog .gallery-thumbnails { justify-content: center; gap: 9px; padding-top: 12px; }
.project-dialog .gallery-thumbnails button { width: 68px; height: 68px; border-color: #667386; background: #344151; opacity: .6; }
.project-dialog .gallery-thumbnails button[aria-pressed="true"] { border-color: var(--project-accent); opacity: 1; }
.project-dialog .gallery-thumbnails img { object-fit: cover; }
.project-dialog .dialog-story { align-self: start; padding-top: 18px; }
.project-dialog .dialog-story .section-label { color: var(--project-accent); }
.project-dialog .dialog-story h2 { margin: 17px 0 24px; color: #eeede9; font-size: clamp(2.7rem, 5vw, 6.4rem); line-height: .94; }
.project-dialog .dialog-summary { max-width: 650px; margin-bottom: 26px; color: #d9dee5; font-size: clamp(1.15rem, 1.7vw, 1.65rem); line-height: 1.35; }
.dialog-palette-wrap { margin: 28px 0 30px; padding: 13px 0 15px; border-top: 1px solid #56606d; border-bottom: 1px solid #56606d; color: #aeb9c6; font-size: .625rem; letter-spacing: .1em; }
.dialog-palette { display: flex; width: 100%; height: 14px; margin-top: 10px; overflow: hidden; }
.dialog-palette > span { flex: var(--weight) 1 0; min-width: 1px; background: var(--swatch); }
.project-dialog .dialog-story #dialog-body p { max-width: 650px; color: #bfc8d3; font-size: 1rem; line-height: 1.65; }
.project-dialog .project-facts { margin-top: 35px; }
.project-dialog .project-facts > div { border-color: #56606d; }
.project-dialog .project-facts dt { color: var(--project-accent); }
.project-dialog .project-facts dd { color: #eeede9; }
.image-dialog .gallery-controls { color: #eeede9; }
.image-dialog .gallery-step { border-color: #758397 !important; }
.image-dismiss-side { display: grid; place-items: center; color: #eeede9; }
.image-dismiss-side > span { opacity: 0; writing-mode: vertical-rl; font-size: .5625rem; letter-spacing: .18em; text-transform: uppercase; transition: opacity .2s; }
.image-dismiss-side:hover > span, .image-dismiss-side:focus-visible > span { opacity: .8; }

@media(max-width:700px) {
 .project-dialog { width: 100%; height: 100%; border: 0; }
 .project-dialog .dialog-topbar { grid-template-columns: 1fr auto 38px; min-height: 64px; padding: 9px 17px; }
 .dialog-topbar-code { font-size: .5625rem; }
 .project-dialog .dialog-layout { grid-template-columns: 1fr; gap: 25px; padding: 20px 18px 44px; }
 .gallery-overline { margin-bottom: 8px; font-size: .5625rem; }
 .project-dialog .gallery-expand { height: min(53svh, 520px); }
 .project-dialog .gallery-expand > img { padding: 12px; }
 .gallery-expand-label { right: 10px; bottom: 10px; padding: 8px 10px; }
 .project-dialog .gallery-thumbnails button { width: 56px; height: 56px; }
 .project-dialog .dialog-story { padding-top: 0; }
 .project-dialog .dialog-story h2 { font-size: clamp(2.7rem, 12vw, 4.4rem); }
 .project-dialog .dialog-summary { font-size: 1.1rem; }
 .project-dialog .dialog-story #dialog-body p { font-size: .9375rem; }
 .dialog-palette-wrap { margin-top: 22px; }
}

/* A lighter project reading room keeps the dark About chapter from taking over. */
.project-dialog { background: #c4cfdb; color: #27313f; border-color: #8f9dac; box-shadow: 0 26px 90px #17202c66; }
.project-dialog::backdrop { background: #27313f99; }
.project-dialog .dialog-topbar { grid-template-columns: 1fr 44px; background: #c4cfdb; border-color: #9aa7b5; }
.project-dialog .dialog-label { color: #27313f; }
.project-dialog .dialog-topbar .dismiss-button { color: #27313f; }
.project-dialog .gallery-expand { border-color: #758496; background: #e7eaec; }
.project-dialog .gallery-expand > img { background: #e7eaec; }
.project-dialog .gallery-overline { display: none; }
.project-dialog .gallery-expand-label { background: #27313f; color: #eeede9; }
.project-dialog .gallery-expand-label span { color: #c4cfdb; }
.project-dialog .gallery-controls { color: #27313f; border-color: #9aa7b5; }
.project-dialog .gallery-step { border-color: #27313f !important; }
.project-dialog .gallery-step:hover, .project-dialog .gallery-step:focus-visible { background: #27313f !important; color: #eeede9; }
.project-dialog .gallery-thumbnails button { border-color: #758496; background: #e7eaec; }
.project-dialog .gallery-thumbnails button[aria-pressed="true"] { border-color: var(--project-accent); }
.project-dialog .dialog-story .section-label { color: #4f5e70; }
.project-dialog .dialog-story h2 { color: #27313f; }
.project-dialog .dialog-summary { color: #27313f; }
.dialog-palette-wrap { border-color: #9aa7b5; color: #4f5e70; }
.project-dialog .dialog-story #dialog-body p { color: #27313f; }
.project-dialog .project-facts > div { border-color: #9aa7b5; }
.project-dialog .project-facts dt { color: #4f5e70; }
.project-dialog .project-facts dd { color: #27313f; }
.background-dialog:focus-visible, .project-dialog:focus-visible, .image-dialog:focus-visible { outline: 0; outline-offset: 0; }
/* Pointer focus can linger after a tap or dialog closes; retain the ring only
   when the visitor switches back to keyboard navigation. */
html[data-input="pointer"] :focus { outline: none !important; }
@media(max-width:700px) {
 .project-dialog .dialog-topbar { grid-template-columns: 1fr 38px; }
}

/* Keep the mobile section cue on one line, with its direction mark beside the label. */
@media(max-width:700px) {
 .section-travel-hint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: none;
  white-space: nowrap;
 }
 .section-travel-hint > span { margin-left: 0; }
}

/* Give the desktop flip label a little more air above its hand-drawn pointer. */
@media(min-width:701px) {
 .photo-deck #deck-hint > span { transform: translateY(-8px); }
}

/* Mobile hero: let the photographs cross the name, then place the cue below the stack. */
@media(max-width:700px) {
 .horizontal-layout .hero-composition .photo-deck {
  width: 96%;
  max-width: 390px;
  margin: -40px auto 66px;
  transform: none;
 }
 .horizontal-layout .photo-deck #deck-hint {
  top: auto;
  left: 4%;
  right: auto;
  bottom: -30px;
  align-items: flex-start;
  gap: 0;
  transform: rotate(-3deg);
  flex-direction: column-reverse;
 }
 .horizontal-layout .photo-deck #deck-hint > span {
  transform: none;
  text-align: center;
 }
 .horizontal-layout .photo-deck #deck-hint svg {
  width: 44px;
  height: 30px;
  margin-left: 11px;
  transform: rotate(180deg);
 }
 .horizontal-layout .hero-research > p:first-child {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(.69rem, 3.05vw, .96rem);
  letter-spacing: -.05em;
 }
}

/* Each paper loops inside an 8px by 12px pocket around its fixed anchor.
   Staggered phases keep the prints from moving together as one stack. */
@keyframes story-print-drift {
 0%, 100% { transform: translate(calc(var(--float-x) - 4px), var(--float-y)) rotate(calc(var(--float-angle) - .65deg)); }
 25% { transform: translate(var(--float-x), calc(var(--float-y) - 6px)) rotate(var(--float-angle)); }
 50% { transform: translate(calc(var(--float-x) + 4px), var(--float-y)) rotate(calc(var(--float-angle) + .65deg)); }
 75% { transform: translate(var(--float-x), calc(var(--float-y) + 6px)) rotate(var(--float-angle)); }
}
@media(max-width:700px) and (prefers-reduced-motion:no-preference) {
 .collab-card.is-active .collab-paper {
  animation: story-print-drift calc(7.8s + var(--slot) * 1.1s) ease-in-out infinite;
  animation-delay: calc(var(--slot) * -2.3s);
 }
 #work[inert] .collab-paper,
 .collab-sheet.motion-paused .collab-paper,
 .collab-sheet.motion-hidden .collab-paper {
  animation-play-state: paused;
 }
}


/* Center the complete gallery in the usable dialog viewport, not against the
   height of a long article. The photograph itself has equal inset on all sides. */
.project-dialog .gallery-expand {
 display: grid;
 place-items: center;
 padding: 18px;
}
.project-dialog .gallery-expand > img {
 display: block;
 min-height: 0;
 min-width: 0;
 width: 100%;
 height: 100%;
 padding: 0;
 object-fit: contain;
 object-position: 50% 50%;
}
@media(min-width:701px) {
 .project-dialog { --gallery-space: calc(min(940px, 100dvh - 28px) - 74px - 2 * clamp(26px, 4vw, 62px)); }
 .project-dialog .dialog-gallery {
  position: sticky;
  top: calc(74px + clamp(26px, 4vw, 62px));
  height: var(--gallery-space);
  display: flex;
  flex-direction: column;
  justify-content: center;
 }
 .project-dialog .gallery-expand {
  flex: 0 0 auto;
  height: clamp(150px, calc(var(--gallery-space) - 150px), 600px);
 }
 .project-dialog .gallery-controls, .project-dialog .gallery-thumbnails { flex-shrink: 0; }
 /* The outer print retains its fixed fan position and hit area. Only its
    inner paper floats; the selected shelf and its selectors never move. */
 .collab-card .collab-print, .collab-card.is-active .collab-print {
  padding: 0; border: 0; background: none; box-shadow: none;
 }
 .collab-paper {
  display: block; position: relative; width: max-content;
  padding: 7px 7px 29px; border: 1px solid #c9c8c180;
  background: #f8f7f3; box-shadow: 0 14px 30px -16px #27313f70;
 }
}
@keyframes desktop-story-float {
 0%, 100% { transform: translate(-4px, 0) rotate(-.65deg); }
 25% { transform: translate(0, -6px) rotate(0deg); }
 50% { transform: translate(4px, 0) rotate(.65deg); }
 75% { transform: translate(0, 6px) rotate(0deg); }
}
@media(min-width:701px) and (prefers-reduced-motion:no-preference) {
 .collab-card.is-active .collab-paper {
  animation: desktop-story-float calc(7.8s + var(--slot) * 1.1s) ease-in-out infinite;
  animation-delay: calc(var(--slot) * -2.3s);
 }
 #work[inert] .collab-paper,
 .collab-sheet.motion-paused .collab-paper,
 .collab-sheet.motion-hidden .collab-paper { animation-play-state: paused; }
}
@media(max-width:700px) {
 .horizontal-layout .hero h1 {
  width: 100%;
  font-size: 25.5vw;
  letter-spacing: -.095em;
  text-align: center;
 }
 .horizontal-layout .hero-composition .deck-stage { aspect-ratio: 1; }
 .project-dialog .gallery-expand { padding: 14px; }
}

/* The color strip has its own row above the mat. The photograph is centered
   within the remaining rectangle, with equal padding above and below. */
.project-dialog .gallery-expand {
 display: grid;
 grid-template-rows: 8px minmax(0, 1fr);
 gap: 0;
 padding: 0;
 border: 0;
 background: transparent;
 overflow: visible;
 appearance: none;
}
.project-dialog .gallery-expand::before {
 content: '';
 position: static;
 display: block;
 width: 100%;
 height: 8px;
 border: 1px solid #758496;
 border-bottom: 0;
 background: linear-gradient(90deg, var(--project-accent), #eeede9 44%, var(--project-wash));
 opacity: 1;
}
.project-dialog .gallery-expand > .gallery-image-stage {
 position: relative;
 display: block;
 inset: auto;
 width: 100%;
 height: 100%;
 min-height: 0;
 padding: 0;
 border: 1px solid #758496;
 background: #e7eaec;
 overflow: hidden;
 --photo-inset: 18px;
}
.project-dialog .gallery-image-stage > img {
 position: absolute;
 inset: var(--photo-inset);
 display: block;
 width: calc(100% - 2 * var(--photo-inset));
 height: calc(100% - 2 * var(--photo-inset));
 min-height: 0;
 min-width: 0;
 max-width: none;
 padding: 0;
 margin: 0;
 object-fit: contain;
 object-position: center;
}
@media(max-width:700px) {
 .project-dialog .gallery-expand > .gallery-image-stage { --photo-inset: 14px; }
}

.project-links:not(:empty) { display: grid; gap: 14px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #9aa7b5; }
.project-links a { justify-self: start; padding-block: 8px; text-decoration: underline; text-underline-offset: 4px; line-height: 1.5; }
.project-links a:hover { text-decoration-thickness: 2px; }

/* Keep the mobile cue in document flow, so text zoom and short screens cannot
   place it on top of the subtitle. The photos retain their own sized stage. */
@media (max-width: 700px) {
 .horizontal-layout .hero-composition .photo-deck { width: min(96%, clamp(210px, calc(100svh - 360px), 390px)); margin: clamp(-40px, -7vw, -20px) auto 0; }
 .horizontal-layout .photo-deck #deck-hint { position: static; width: max-content; max-width: 100%; margin: 0 0 12px 4%; padding-top: 2px; transform: none; font-size: clamp(.75rem, 3vw, .875rem); }
 .horizontal-layout .photo-deck #deck-hint svg { width: clamp(34px, 10vw, 44px); height: auto; flex: none; }
 .horizontal-layout .hero-composition { flex: 0 0 auto; padding-bottom: 14px; }
 .horizontal-layout .hero-bottom { flex: 0 0 auto; }
 .horizontal-layout .hero-research > p:first-child { white-space: normal; }
}
/* A phone held sideways keeps one preview, with choices beside it. Allow
   vertical scrolling when browser controls or larger text reduce the space. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
 .horizontal-layout .site-header { min-height: 60px; padding-block: 8px; }
 .site-header .brand { font-size: 2rem; }
 .section-navigation { min-height: 36px; }
 .horizontal-layout .work-section { grid-template-rows: auto minmax(176px, 1fr); gap: 4px; padding-block: 2px 6px; }
 .work-section .section-heading h2 { font-size: 1.8rem; }
 .collab-sheet { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: repeat(4, minmax(44px, 1fr)); gap: 0 24px; padding: 0; min-height: 176px; }
 .collab-card { display: contents; }
 .collab-prints { display: block; grid-column: 1; grid-row: 1 / 5; margin: 0; visibility: hidden; pointer-events: none; transition: none; }
 .collab-card.is-active .collab-prints.is-positioned { visibility: visible; pointer-events: auto; }
 .collab-card:nth-child(n) .story-select { grid-column: 2; grid-row: auto; gap: 3px; min-height: 44px; padding: 4px 0; }
 .story-title, .is-active .story-title { font-size: 1rem; }
 .collab-meta { display: flex; font-size: .625rem; }
 .collab-card .collab-print[data-slot], .collab-card.is-active .collab-print[data-slot] { inset: 0; width: auto; height: auto; display: grid; place-items: center; padding: 0; border: 0; background: none; box-shadow: none; transform: none; translate: none; rotate: none; transition: none; pointer-events: none; }
 .collab-paper { display: block; position: relative; box-sizing: content-box; width: var(--photo-width); padding: 5px 5px 25px; border: 1px solid #c9c8c180; background: #f8f7f3; transform: translate(var(--float-x), var(--float-y)) rotate(var(--float-angle)); pointer-events: auto; }
 .collab-card .collab-print img, .collab-card.is-active .collab-print img { width: var(--photo-width); height: var(--photo-height); max-width: none; max-height: none; transition: none; }
 .collab-action { bottom: 6px; font-size: .625rem; }
 .work-section .constellation-note { grid-template-columns: 1fr; gap: 6px; padding-top: 12px; }
 .work-section .constellation-note h3 { font-size: 1rem; }
 .work-section .constellation-note p { font-size: .75rem; }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) and (prefers-reduced-motion: no-preference) {
 .collab-card.is-active .collab-paper { animation-name: story-print-drift; }
}

/* Size the hero against its actual rail viewport (after header/browser chrome),
   rather than a guessed phone height. The photo stage gets the remaining room. */
@media (max-width: 700px), (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
 .horizontal-layout .section-track > .hero { container-type: size; overflow: hidden; }
 .horizontal-layout .hero-composition { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); row-gap: 16px; padding: 12px 0 8px; }
 .horizontal-layout .hero h1 { font-size: min(25.5vw, 28cqh); width: 100%; text-align: center; }
 /* Balance the negative trailing letter spacing so the visible letters center. */
 .horizontal-layout .hero h1 > span { padding-inline-end: .095em; }
 .horizontal-layout .hero-composition .photo-deck { display: grid; grid-template-rows: minmax(0, 1fr) auto; width: min(96%, 390px); height: 100%; min-height: 0; margin: 0 auto; transform: none; }
 .horizontal-layout .hero-composition .deck-stage { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; }
 .horizontal-layout .photo-deck #deck-hint { position: static; flex-direction: column-reverse; align-items: flex-start; width: max-content; margin: 0 0 0 4%; padding: 0; gap: 0; transform: translateY(-8px); font-size: .75rem; }
 .horizontal-layout .photo-deck #deck-hint > span { transform: none; }
 .horizontal-layout .photo-deck #deck-hint svg { width: 34px; height: 24px; margin: 0 0 0 11px; transform: rotate(180deg); }
 .horizontal-layout .hero-bottom { flex: 0 0 auto; padding: 10px 0; }
 .horizontal-layout .hero-research > p:first-child { font-size: clamp(.69rem, 3.05vw, .96rem); }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
 .horizontal-layout .hero-composition { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; gap: 12px; }
 .horizontal-layout .hero h1 { font-size: min(16vw, 35cqh); }
 .horizontal-layout .hero-composition .photo-deck { height: 100%; margin: 0 auto; }
 .horizontal-layout .photo-deck #deck-hint { flex-direction: row; align-items: center; gap: 8px; }
 .horizontal-layout .hero-bottom .work-jump { display: none; }
}

/* Short landscape project viewer: keep the photo and controls visible while
   the story scrolls independently beside them. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
 .project-dialog { width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; overflow: hidden; }
 .project-dialog[open] { display: flex; flex-direction: column; }
 .project-dialog .dialog-topbar { position: static; flex: 0 0 48px; min-height: 48px; padding: 2px max(16px, env(safe-area-inset-left)); }
 .project-dialog .dialog-layout { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); overflow: hidden; }
 .project-dialog .dialog-gallery { position: static; align-self: stretch; display: flex; flex-direction: column; height: 100%; min-height: 0; justify-content: start; }
 .project-dialog .gallery-expand { flex: 1 1 0; height: auto; min-height: 0; grid-template-rows: 6px minmax(0, 1fr); }
 .project-dialog .gallery-expand::before { height: 6px; }
 .project-dialog .gallery-expand > .gallery-image-stage { --photo-inset: 8px; }
 .project-dialog .gallery-controls { flex: 0 0 auto; padding: 12px 0 8px; }
 .project-dialog .gallery-step { min-height: 34px; padding: 6px 10px; }
 .project-dialog .gallery-thumbnails { flex: 0 0 auto; gap: 8px; padding: 6px 0 0; }
 .project-dialog .gallery-thumbnails button { width: 40px; height: 40px; }
 .project-dialog .dialog-story { height: 100%; min-height: 0; padding: 4px 6px 20px 0; overflow-y: auto; overscroll-behavior: contain; }
 .project-dialog .dialog-story h2 { font-size: clamp(1.7rem, 3.7vw, 2.5rem); margin: 10px 0 16px; line-height: 1.04; }
 .project-dialog .dialog-summary { font-size: 1rem; margin-bottom: 18px; }
 .project-dialog .dialog-story #dialog-body p { font-size: .875rem; line-height: 1.5; }
}

/* Never paint an empty paper while its photograph is downloading/decoding. */
.collab-paper:not(.is-image-ready) { opacity: 0; }

/* Beyond a standard desktop, fit the entire composition to both screen axes.
   Keep the established smaller layouts and the print animation transforms. */
@media (min-width: 2000px) {
 .horizontal-layout .hero-composition {
  container-type: size;
  width: 100%;
  max-width: calc((100dvh - 235px) * 2.6);
  margin-inline: auto;
 }
 .horizontal-layout .hero h1 { font-size: min(19vw, 18cqw, 44cqh); }
 .horizontal-layout .hero-composition .photo-deck {
  width: min(100%, calc(100cqh - 80px));
  max-width: none;
  margin: 0;
  justify-self: center;
  transform: none;
 }
 .horizontal-layout .photo-deck #deck-hint {
  font-size: clamp(.875rem, 1.7cqh, 1.5rem);
  top: -2.14em;
 }
 .horizontal-layout .photo-deck #deck-hint svg {
  width: 3.57em;
  height: 2.5em;
 }
}

/* Linked field notes sit beside the existing Constellation invitation. */
.project-notes { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; border-top: 1px solid var(--line); padding-top: 16px; }
.work-section .project-notes .constellation-note { display: block; padding: 0; border: 0; }
.work-section .project-notes .constellation-note h3 { font-size: clamp(1rem, 1.45vw, 1.5rem); line-height: 1.2; }
.work-section .project-notes .constellation-note p { margin-top: 6px; font-size: .8125rem; line-height: 1.5; }
.pet-note { display: flex; gap: 16px; align-items: flex-start; }
.pet-note > span { display: grid; gap: 6px; }
.pet-note strong { font-weight: 400; font-size: clamp(1rem, 1.45vw, 1.5rem); line-height: 1.2; letter-spacing: -.035em; }
.pet-note > span > span { font-size: .8125rem; line-height: 1.5; color: #505157; }
.pet-note:hover strong { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 700px) {
 .project-notes { grid-template-columns: 1fr; gap: 12px; padding-top: 12px; }
 .pet-note { border-top: 1px solid var(--line); padding-top: 10px; gap: 12px; }
 .pet-note > span { gap: 3px; }
 .pet-note > span > span { font-size: .75rem; }
}

/* A single continuous ground connects all three chapters. */
.hero-shell {
 background: radial-gradient(ellipse at 90% 18%, #aebfd3 0%, transparent 55%), linear-gradient(115deg, #d2cfce 0%, #bec9d7 75%);
 background-size: 140% 130%;
 background-position: calc(var(--chapter-progress, 0) * 32%) calc(var(--chapter-progress, 0) * 24%);
}
.horizontal-layout .work-section { background: transparent; color: var(--ink); }
.story-select { border-top: 0; }

/* Enlarge the period to finish at the same right edge as ANDRE. */
.hero h1 .name-period { font-size: 1.392em; line-height: 0; letter-spacing: -.066092em; }
@media (max-width: 700px), (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
 .horizontal-layout .hero h1 { width: max-content; max-width: 100%; margin-inline: auto; text-align: left; letter-spacing: -.092em; }
 .horizontal-layout .hero h1 > span { padding-inline-end: .092em; }
}

/* Closely fitted brackets resize smoothly as complete phrases roll upward. */
.hero-research { min-width: 0; width: 100%; }
.horizontal-layout .hero-research > #hero-tagline { max-width: none; white-space: nowrap; }
.tagline-label { display: inline-flex; align-items: baseline; gap: .28em; font-size: var(--tagline-size, 1em); }
.tagline-clause { display: block; white-space: nowrap; }
.tagline-bracket { display: inline-flex; align-items: baseline; gap: .025em; }
.tagline-word { position: relative; display: inline-grid; justify-items: start; flex: none; overflow: hidden; white-space: nowrap; vertical-align: bottom; line-height: 1.35; text-align: left; }
.tagline-value { display: block; width: max-content; grid-area: 1 / 1; }
@media (max-width: 700px) {
 .horizontal-layout .hero-research > #hero-tagline { font-size: clamp(.9375rem, 3.9vw, 1.125rem); line-height: 1.5; }
 .tagline-label { flex-direction: column; align-items: flex-start; gap: 0; }
}

/* One stable navigation row, with visible boundaries at the first/last chapter. */
.section-navigation {
 display: grid;
 grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
 gap: 20px;
 min-height: 76px;
 padding-block: 10px;
 background: transparent;
}
.section-navigation button {
 display: flex;
 align-items: center;
 gap: 14px;
 width: auto;
 height: auto;
 min-height: 44px;
 padding: 0;
 font-size: .875rem;
 text-align: left;
}
.section-navigation #section-prev { justify-self: start; }
.section-navigation #section-next { justify-self: end; text-align: right; }
.section-navigation .round-arrow { flex: 0 0 44px; width: 44px; height: 44px; }
.section-navigation button:not(:disabled):hover { transform: none; }
.section-navigation button:not(:disabled):hover .round-arrow { background: var(--ink); color: #d2d8df; }
.section-navigation button:disabled { cursor: default; pointer-events: none; }
.section-navigation #section-current { min-width: 0; }
@media (max-width: 700px) {
 .section-navigation { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 64px; gap: 14px; }
 .section-navigation #section-current { display: none; }
 .section-navigation button { gap: 8px; font-size: .75rem; }
 .section-navigation .round-arrow { flex-basis: 38px; width: 38px; height: 38px; font-size: 1.35rem; }
}
@media (orientation: landscape) and (max-height: 600px) {
 .section-navigation { min-height: 52px; padding-block: 4px; }
 .section-navigation .round-arrow { flex-basis: 36px; width: 36px; height: 36px; }
}
/* Leave room above the desktop prints for their cue and beside them for the period. */
@media (min-width: 701px) and (min-height: 601px), (min-width: 1101px) {
 .horizontal-layout .hero-composition { container-type: inline-size; column-gap: clamp(16px, 2vw, 32px); }
 .horizontal-layout .hero h1 { font-size: min(18.6vw, 15.8cqw); }
 .horizontal-layout .hero-composition .photo-deck { width: 100%; margin: 0; transform: none; }
}
@media (min-width: 1101px) {
 .horizontal-layout .hero-composition { grid-template-columns: minmax(0, 65fr) minmax(0, 35fr); }
 .horizontal-layout .hero h1 { font-size: min(18.6vw, 18cqw); }
}
@media (min-width: 2000px) {
 .horizontal-layout .hero-composition { container-type: size; }
 .horizontal-layout .hero h1 { font-size: min(18.6vw, 18cqw, 44cqh); }
 .horizontal-layout .hero-composition .photo-deck { width: min(100%, calc(100cqh - 80px)); }
}
@media (min-width: 1101px) and (max-width: 1999px) {
 .horizontal-layout .hero-composition { grid-template-columns: minmax(0, 65fr) minmax(0, 35fr); }
 .horizontal-layout .hero-composition .photo-deck {
  width: min(100%, calc((100dvh - 330px) * .91));
  margin: 0;
  justify-self: end;
  transform: none;
 }
}

/* Match Constellation's frame easing while fitting each photo without a tall mat. */
.project-dialog .gallery-expand {
 flex: 0 0 auto;
 max-width: 100%;
 min-height: 0;
 margin-inline: auto;
}
.project-dialog.is-gallery-ready .gallery-expand {
 transition: width 440ms cubic-bezier(.22,1,.36,1), height 440ms cubic-bezier(.22,1,.36,1);
}
.project-dialog.motion-paused .gallery-expand { transition: none; }
@media (prefers-reduced-motion: reduce) {
 .project-dialog.is-gallery-ready .gallery-expand { transition: none; }
}


/* Preserve the expanding photo fans; fit complete titles to their own columns. */
.story-select { container-type: inline-size; }
.story-title { white-space: nowrap; font-size: min(clamp(1.05rem, 1.65vw, 1.75rem), 9.6cqw); }
.is-active .story-title { font-size: min(clamp(1.3rem, 2.1vw, 2.1rem), 9.6cqw); }
@media (max-width: 700px) {
 .story-title, .is-active .story-title { font-size: min(.9375rem, 9.6cqw); }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
 .story-title, .is-active .story-title { font-size: min(1rem, 9.6cqw); }
}

/* Keep the rail geometry fixed while its boundary controls snap shut. */
.section-navigation button[data-snapshot="hidden"] { visibility: hidden; opacity: 0; pointer-events: none; }

/* Give the photograph most of the mobile hero, including its paper caption. */
@media (max-width: 700px), (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
 .horizontal-layout .hero-composition { padding-block: 4px; row-gap: 6px; }
 .horizontal-layout .hero h1 { font-size: min(22vw, 18cqh); }
 .horizontal-layout .hero-composition .photo-deck { width: min(100%, 420px); max-width: none; }
 .horizontal-layout .photo-deck #deck-hint { flex-direction: row; align-items: center; justify-self: center; gap: 8px; margin: 0; transform: none; font-size: .6875rem; }
 .horizontal-layout .photo-deck #deck-hint svg { width: 28px; height: 20px; margin: 0; }
 .deck-print { padding: 6px 6px 32px; }
 .print-footer { bottom: 6px; left: 7px; right: 7px; gap: 4px; }
 .print-footer .print-number { font-size: .625rem; letter-spacing: 0; }
 .print-footer .frame-palette { height: 5px; }
 .deck-print:not(.deck-print--front) .print-footer { visibility: hidden; }
 .horizontal-layout .hero-bottom { padding-block: 8px; }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
 .horizontal-layout .site-header { min-height: 52px; padding-block: 4px; }
 .horizontal-layout .hero-composition { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
 .horizontal-layout .hero h1 { font-size: min(14vw, 33cqh); }
}

/* Move the cool and warm pools across the shared canvas as chapters travel. */
.hero-shell {
 background:
  radial-gradient(ellipse at calc(90% - var(--chapter-progress, 0) * 35%) calc(18% + var(--chapter-progress, 0) * 25%), #99b4d5 0%, transparent 65%),
  radial-gradient(ellipse at calc(10% + var(--chapter-progress, 0) * 40%) 85%, #dcc4bb 0%, transparent 60%),
  #c9d1db;
 background-size: 100% 100%;
 background-position: 0 0;
}

.horizontal-layout .photo-deck #deck-hint[hidden] { display: none; }

/* Shared pointer proportions: never stretch the arrow or position it over a print. */
.horizontal-layout .photo-deck #deck-hint { display: flex; flex-direction: column; align-items: center; gap: 5px; top: -40px; right: 0; bottom: auto; left: auto; margin: 0; transform: none; font-size: .875rem; }
.horizontal-layout .photo-deck #deck-hint > span { transform: none; }
.horizontal-layout .photo-deck #deck-hint svg { display: block; position: static; width: 64px; height: 57.6px; margin: 0; transform: none; }
#deck-hint path { stroke-width: 2; vector-effect: non-scaling-stroke; }
.motion-controls svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 700px), (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
 /* Center portrait prints; tuck the cue into the lower-right corner. */
 .horizontal-layout .hero-composition { row-gap: 2px; padding-block: 4px 2px; }
 .horizontal-layout .hero-composition .photo-deck {
  --deck-cue-position: corner;
  width: min(100%, 460px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 44px;
 }
 .horizontal-layout .photo-deck #deck-hint {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  margin: 0; padding: 0; transform: none; font-size: .75rem;
 }
 .horizontal-layout .photo-deck #deck-hint > span {
  position: absolute; right: auto; bottom: auto;
  left: var(--cue-label-x, calc(100% - 56px)); top: var(--cue-label-y, calc(100% - 2.4em));
  width: 56px; text-align: left; line-height: 1.2;
 }
 .horizontal-layout .photo-deck #deck-hint svg {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; transform: none;
 }
 .horizontal-layout .hero h1 { font-size: min(23vw, 18cqh); }
}
@media (max-width: 700px) and (max-height: 700px) {
 .horizontal-layout .hero-composition { row-gap: 2px; }
 .horizontal-layout .hero h1 { font-size: min(23vw, 15cqh); }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
 .horizontal-layout .hero-composition {
  width: min(100%, calc(210cqh + 100px)); margin-inline: auto;
  grid-template-columns: max-content minmax(0, 1fr); gap: 18px; padding-block: 8px 6px;
 }
 .horizontal-layout .hero h1 { font-size: min(14vw, 36cqh); margin-inline: 0; }
 .horizontal-layout .hero-composition .photo-deck {
  --deck-cue-position: side;
  width: 100%; margin: 0;
  grid-template-columns: minmax(0, 1fr) 64px;
  grid-template-rows: minmax(0, 1fr);
  column-gap: 8px;
 }
 /* Put the mat on the right, with the label and palette turned together. */
 .photo-deck .deck-print { padding: 6px 32px 6px 6px; }
 .photo-deck .print-footer {
  top: 7px; right: auto; bottom: auto; left: calc(100% - 7px);
  width: calc(var(--print-height) - 16px);
  transform: rotate(90deg); transform-origin: top left;
 }
 .horizontal-layout .work-section { padding-block: 12px; gap: 12px; }
 .collab-sheet { min-height: 176px; }
 .collab-prints { scale: .95; transform-origin: center top; }
}

@media (min-width: 701px) and (max-width: 1100px) and (min-height: 601px) {
 .horizontal-layout .hero-composition .photo-deck { width: min(100%, calc((100dvh - 360px) * .91)); justify-self: end; }
}

/* About: size the portrait against the usable chapter height. */
.horizontal-layout .connect-section {
 container-type: size;
 display: flex;
 flex-direction: column;
 gap: 20px;
 padding: clamp(20px, 3dvh, 32px) var(--gutter);
 background: transparent;
 color: var(--ink);
}
.connect-layout {
 display: grid;
 grid-template-columns: minmax(180px, .8fr) minmax(0, 1.4fr);
 align-items: center;
 gap: clamp(32px, 6vw, 96px);
 flex: 1 0 auto;
 min-height: min-content;
 width: 100%;
 max-width: 1440px;
 margin-inline: auto;
}
.portrait-card { display: flex; justify-content: center; align-self: center; min-width: 0; }
.portrait-frame { --portrait-inset: 12px; --portrait-image-height: clamp(200px, calc(100cqh - 122px), 568px); position: relative; width: calc(var(--portrait-image-height) * 2 / 3 + var(--portrait-inset) * 2 + 2px); max-width: 100%; padding: var(--portrait-inset) var(--portrait-inset) 0; border: 1px solid #27313f40; background: #ffffff24; }
.portrait-frame::before, .portrait-frame::after { content: ''; position: absolute; width: 28px; height: 28px; pointer-events: none; }
.portrait-frame::before { top: -11px; left: -11px; border-top: 2px solid #59687b; border-left: 2px solid #59687b; }
.portrait-frame::after { right: -11px; bottom: -11px; border-right: 2px solid #59687b; border-bottom: 2px solid #59687b; }
.portrait-window { display: block; width: 100%; padding: 0; border: 0; background: transparent; appearance: none; border-radius: 0; cursor: zoom-in; }
/* The window owns the dimensions; both transition layers fill the same box. */
.portrait-image-stage { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; isolation: isolate; }
.portrait-window img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.portrait-window .portrait-outgoing { pointer-events: none; }
.portrait-controls { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.portrait-controls[hidden] { display: none; }
.portrait-frame:has(.portrait-controls[hidden]) { padding-bottom: 12px; }
.portrait-controls button { display: grid; place-items: center; flex: 0 0 36px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 1.25rem; }
.portrait-controls button:hover { background: #27313f0d; }
.portrait-palette { display: flex; flex: 1; height: 8px; overflow: hidden; }
.portrait-palette span { min-width: 0; min-height: 0; flex-basis: 0; }
.connect-copy { min-width: 0; }
.connect-copy h2 { font-size: clamp(2.5rem, 4.6vw, 5.4rem); font-weight: 400; letter-spacing: -.065em; line-height: 1.05; }
.connect-copy #about-title { display: flex; flex-wrap: wrap; align-items: center; gap: .06em .24em; }
.greeting-prefix { white-space: nowrap; }
#about-title .name-morph { flex: 0 1 4.5em; width: 4.5em; max-width: 100%; height: 1.3em; font-size: inherit; place-items: center start; padding-inline: 2px; }
#about-title .name-label { display: flex; align-items: center; gap: .025em; font-family: var(--body); font-weight: 400; font-size: .95em; letter-spacing: -.065em; transform-origin: left center; }
#about-title .name-word { display: block; flex: none; overflow: hidden; white-space: nowrap; padding-inline: .04em; }
#about-title .name-bracket { flex: none; }
.connect-copy > p { max-width: 38em; margin-top: 18px; font-size: clamp(1rem, 1.65vw, 1.4rem); letter-spacing: -.02em; line-height: 1.5; color: #424b58; }
.background-button { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; min-height: 44px; padding: 10px 0; margin-top: 24px; background: transparent; border-bottom: 1px solid #27313f40; text-align: left; font-size: .875rem; }
.background-button > span { font-size: 1.5rem; line-height: 1; }
.background-button:hover { border-color: currentColor; }
.connect-contact { margin-top: 24px; }
.connect-hello { display: inline-flex; align-items: center; gap: 25px; font: 900 clamp(2.3rem, 4.8vw, 5.5rem)/1 var(--display); letter-spacing: -.065em; }
.connect-hello > span { font-family: var(--body); font-weight: 400; font-size: 1.05em; letter-spacing: 0; transition: transform .2s; }
.connect-hello:hover > span { transform: translate(4px, -4px); }
.connect-socials { display: flex; justify-content: flex-start; gap: 12px; margin: 16px 0 0; }
.connect-socials a { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid #27313f60; color: var(--ink); transition: background .2s, border-color .2s; }
.connect-socials a:hover { background: #27313f0d; border-color: currentColor; }
.connect-socials svg { width: 23px; height: 23px; }
.connect-footer {
 display: flex;
 flex: none;
 flex-wrap: wrap;
 align-items: center;
 justify-content: flex-end;
 align-self: stretch;
 gap: 0 24px;
 margin-top: auto;
 text-align: right;
 color: #424b58;
 font-size: .6875rem;
}
.connect-footer > span { white-space: nowrap; }
.connect-footer .motion-controls { flex: 0 0 auto; justify-content: flex-end; gap: 18px; }
.connect-footer .motion-controls button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 0; font-size: .6875rem; white-space: nowrap; }
.connect-footer .motion-controls button[hidden] { display: none; }

@media (max-width: 700px) and (orientation: portrait) {
 .horizontal-layout .connect-section { padding-block: clamp(12px, 2dvh, 20px); gap: 10px; }
 .connect-layout {
  --about-row-gap: clamp(6px, 1.2cqh, 14px);
  flex: 1 0 auto;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  /* Equal flexible rows center the complete text/contact group below the
     portrait without spreading its individual pieces apart. */
  grid-template-rows: auto minmax(0, 1fr) auto auto auto minmax(0, 1fr);
  gap: 0 clamp(16px, 4vw, 22px);
 }
 .connect-copy { display: contents; }
 .portrait-card { grid-column: 1; grid-row: 1; }
 .portrait-frame { --portrait-inset: 9px; width: 100%; }
 .connect-copy #about-title { grid-column: 2; grid-row: 1; align-self: center; flex-direction: column; align-items: flex-start; gap: .08em; font-size: clamp(2rem, min(12vw, 9.5cqh), 4rem); }
 #about-title .name-morph { flex-basis: auto; }
 .connect-copy > p { grid-column: 1 / -1; grid-row: 3; margin: calc(14px + var(--about-row-gap)) 0 0; font-size: .9375rem; line-height: 1.45; }
 .background-button { grid-column: 1 / -1; grid-row: 4; margin: var(--about-row-gap) 0 0; padding-block: 6px; font-size: .8125rem; }
 .connect-contact { grid-column: 1 / -1; grid-row: 5; align-self: start; margin: calc(10px + var(--about-row-gap)) 0 0; }
 .connect-hello { display: flex; justify-content: space-between; gap: 14px; font-size: clamp(2rem, 10vw, 3.6rem); }
 .connect-socials { margin-top: 12px; }
 .connect-footer { flex-direction: column; align-items: flex-end; font-size: .625rem; }
}

/* Mobile keeps the photograph tall: palette and navigation share a side rail. */
@media (max-width: 700px) and (orientation: portrait), (orientation: landscape) and (max-height: 600px) {
 .portrait-frame { --portrait-rail: 24px; display: grid; grid-template-columns: minmax(0, 1fr) var(--portrait-rail); gap: 8px; padding-bottom: var(--portrait-inset); }
 .portrait-window { grid-column: 1; grid-row: 1; }
 .portrait-controls { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: 1fr; grid-template-rows: 32px minmax(0, 1fr) 32px; gap: 8px; min-height: 0; }
 .portrait-controls[hidden] { display: none; }
 .portrait-palette { grid-column: 1; grid-row: 2; flex-direction: column; justify-self: center; align-self: stretch; width: 6px; height: auto; min-height: 0; }
 .portrait-controls button { grid-column: 1; width: 100%; height: 32px; min-width: 0; }
 #portrait-prev { grid-row: 1; }
 #portrait-next { grid-row: 3; }
 .portrait-frame:has(.portrait-controls[hidden]) { grid-template-columns: minmax(0, 1fr); }
}

@media (orientation: landscape) and (max-height: 600px) {
 .horizontal-layout .connect-section { padding-block: 12px 10px; gap: 8px; }
 .connect-layout { grid-template-columns: minmax(150px, .7fr) minmax(0, 1.6fr); align-items: start; align-content: start; gap: clamp(28px, 4vw, 48px); }
 .portrait-card { align-self: start; }
 .portrait-frame { --portrait-inset: 10px; --portrait-image-height: clamp(150px, calc(100cqh - 36px), 300px); width: calc(var(--portrait-image-height) * 2 / 3 + var(--portrait-inset) * 2 + var(--portrait-rail) + 10px); }
 .connect-copy { align-self: center; }
 .connect-copy h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
 .connect-copy > p { margin-top: 10px; font-size: .9375rem; line-height: 1.4; }
 .background-button { margin-top: 8px; }
 .connect-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 12px; }
 .connect-hello { gap: 16px; font-size: clamp(1.75rem, 3.2vw, 2.4rem); min-height: 44px; }
 .connect-socials { margin: 0; }
}

/* Overflow reserves a footer for the cue. Hiding the cue at the end of the list
   preserves that space; scrolling never changes the text width or scroll range. */
.background-dialog { position: fixed; width: min(780px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: clamp(18px, 3vw, 34px); overflow: hidden; background: var(--paper); }
.background-dialog[open] { display: flex; flex-direction: column; }
.background-heading { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; }
.background-heading h2 { font-weight: 400; font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -.05em; }
.background-heading .dismiss-button { flex: none; }
.background-timeline { min-height: 0; margin: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.background-timeline > div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 22px; border-top: 1px solid var(--line); padding: 16px 0; }
.background-timeline dt { font-size: .6875rem; color: var(--muted); padding-top: 4px; }
.background-timeline dd { margin: 0; }
.background-timeline h3 { font-size: 1.125rem; font-weight: 400; line-height: 1.25; letter-spacing: -.025em; }
.background-timeline p { font-size: .875rem; color: var(--muted); margin-top: 5px; line-height: 1.4; }
.background-scroll-footer { display: flex; flex: none; justify-content: flex-end; padding-top: 8px; }
.background-scroll-footer[hidden] { display: none; }
.background-scroll-cue { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid currentColor; background: transparent; color: var(--ink); }
.background-scroll-cue[hidden] { display: grid; visibility: hidden; pointer-events: none; }
.background-scroll-cue:hover { background: var(--ink); color: var(--paper); }
.background-scroll-cue svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; }
@media (max-width: 700px) {
 .background-heading { gap: 12px; padding-bottom: 16px; }
 .background-timeline > div { grid-template-columns: 72px minmax(0, 1fr); gap: 13px; padding-block: 12px; }
 .background-timeline dt { font-size: .625rem; }
 .background-timeline h3 { font-size: .9375rem; }
 .background-timeline p { font-size: .75rem; }
}
