/* WordPress integration. The original prototype stylesheet stays unchanged. */
[hidden] { display: none !important; }
.reveal { clip-path: none; }
.motion-ready .reveal:not(.is-visible) { clip-path: inset(49% 0 49% 0); }
.nav-toggle, .theme-controls { visibility: hidden; }
.interactions-ready .nav-toggle, .interactions-ready .theme-controls { visibility: visible; }
.generic-page > .editor-content { margin: 0 auto 48px; max-width: 924px; padding-inline: var(--gutter); line-height: 1.6; }
.editor-content > * + *, .study > p + p, .entry-text > * + * { margin-top: 1em; }
.editor-content a, .study a, .entry-text a, .me-copy li a { text-decoration: underline; text-underline-offset: 3px; }
.entry-text:empty { display: none; }
.feed-pagination, .pagination .nav-links { display: flex; flex-wrap: wrap; gap: 20px; margin: 40px 0; }
.feed-pagination a, .pagination a { min-height: 44px; display: inline-flex; align-items: center; }
.feed-pagination .current { align-self: center; text-decoration: underline; }
body.admin-bar .navigation { top: 32px; height: calc(100dvh - 32px); }
@media (max-width: 782px) { body.admin-bar .navigation { top: 46px; height: calc(100dvh - 46px); } }
@media (max-width: 600px) { body.admin-bar #wpadminbar { position: fixed; } }
@media (prefers-reduced-motion: reduce) { .motion-ready .reveal { clip-path: none; } }

/* body_class() adds .page; only the inner template gets page spacing. */
body.page { padding-top: 0; }

/* Refined navigation and portfolio cues; preserve the original layout. */
.nav-toggle[data-nav-action="close"] { gap: 5px; }
.nav-toggle[data-nav-action="close"] svg { width: 16px; height: 16px; }
.project-caption svg { width: 22px; height: 22px; transition: transform 260ms cubic-bezier(.22,1,.36,1); }
.project-card a:hover .project-caption svg, .project-card a:focus-visible .project-caption svg { transform: translateX(4px); }
.editorial-paths a svg { transition: transform 260ms cubic-bezier(.22,1,.36,1); }
.editorial-paths a[href="#selected-stories"]:hover svg { transform: translateY(4px); }
#selected-stories:focus { outline: none; }
/* Animate between compatible inset shapes, including the visible state. */
.motion-ready .reveal.is-visible { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
  .motion-ready .reveal { clip-path: none !important; }
  .project-card a:hover .project-caption svg, .editorial-paths a:hover svg { transform: none; }
}

/* Distinct compositions, one editable collection. */
.header-nav { display:flex; align-items:center; gap:32px; }
.view-controls { display:flex; gap:6px; font-size:13px; }
.view-controls button { min-width:44px; min-height:44px; opacity:.5; position:relative; }
.view-controls button[aria-pressed="true"] { opacity:1; }
.view-controls button[aria-pressed="true"]::after { content:''; position:absolute; bottom:6px; left:12px; right:12px; height:1px; background:currentColor; }
.story-details { display:none; }
.stories-section-heading { position:relative; padding-top:18px; }
.stories-section-heading .view-controls { margin:0 var(--gutter) 24px; }
.stories-section-heading .editorial-heading { margin-bottom:28px; }
.zine-explore { display:none; }
[data-layout="stories"][data-view="grid"] .project-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:36px 16px; max-width:none; }
[data-layout="stories"][data-view="grid"] .project-card { margin:0; min-width:0; }
[data-layout="stories"][data-view="grid"] .project-card .photo { aspect-ratio:3/4; }
[data-layout="stories"][data-view="grid"] .project-card .photo img { height:100%; object-fit:cover; object-position:var(--image-position); }
[data-layout="stories"][data-view="grid"] .project-caption h2 { font-size:13px; }
[data-layout="stories"] .feed-pagination { grid-column:1/-1; }
[data-layout="zine"][data-view="grid"] .feed { columns:2; column-gap:20px; max-width:none; }
[data-layout="zine"][data-view="grid"] .feed-entry { break-inside:avoid; margin-bottom:44px; }
[data-layout="zine"][data-view="grid"] .entry-caption { display:block; font-size:12px; }
@media(max-width:759px) {
 .header-nav { gap:8px; }
 .header .view-controls { position:absolute; top:calc(100% + 4px); right:var(--gutter); }
 .stories-page,.zine-page { padding-top:66px; }
}
@media(min-width:760px) {
 [data-layout="stories"][data-view="list"] .project-list { max-width:none; }
 [data-layout="stories"][data-view="list"] .project-card > a { display:grid; grid-template-columns:1fr 1.2fr; gap:48px; align-items:center; }
 [data-layout="stories"][data-view="list"] .project-card > a > .photo { grid-column:2; grid-row:1; }
 [data-layout="stories"][data-view="list"] .story-summary { grid-column:1; grid-row:1; }
 [data-layout="stories"][data-view="list"] .project-caption { align-items:flex-start; padding-bottom:30px; }
 [data-layout="stories"][data-view="list"] .project-caption h2 { font-size:clamp(21px,2.3vw,36px); max-width:420px; }
 [data-layout="stories"][data-view="list"] .story-details { display:grid; gap:18px; font-size:13px; line-height:1.5; }
 .story-details dt { color:var(--muted); margin-bottom:4px; }
 .stories-section-heading .view-controls { position:absolute; right:0; bottom:0; }
 [data-layout="stories"][data-view="grid"] .project-list { gap:68px 32px; }
 [data-layout="stories"][data-view="grid"] .project-caption h2 { font-size:15px; }
 [data-layout="zine"][data-view="grid"] .feed { column-gap:48px; }
 [data-layout="zine"][data-view="grid"] .entry-caption { font-size:14px; }
}
@media(min-width:1100px) {
 .stories-page > .editorial-heading,.zine-page > .editorial-heading,.stories-section-heading .editorial-heading { text-align:center; }
 .stories-page,.zine-page { padding-top:48px; }
 .stories-page > .editorial-heading,.zine-page > .editorial-heading { margin-bottom:58px; }
 [data-layout="stories"][data-view="list"] .project-card > a { grid-template-columns:1.8fr 1fr; gap:7vw; }
 [data-layout="stories"][data-view="list"] .story-details { grid-template-columns:repeat(2,1fr); max-width:630px; }
 [data-layout="stories"][data-view="list"] .project-caption { max-width:630px; padding-bottom:42px; }
 [data-layout="stories"][data-view="grid"] .project-list { grid-template-columns:repeat(3,minmax(0,1fr)); gap:80px 5vw; }
 .zine-page[data-view="grid"].board-ready .feed { display:none; }
 .zine-page[data-view="grid"].board-ready .zine-explore { display:block; }
 .board-hint { font-size:11px; color:var(--muted); text-align:center; padding:0 20px 16px; }
 .zine-board { width:100%; height:max(540px,78svh); overflow:hidden; position:relative; cursor:grab; touch-action:none; outline-offset:-8px; }
 .zine-board:active { cursor:grabbing; }
 .board-plane { position:absolute; inset:0; }
 .board-card { position:absolute; top:0; left:0; width:250px; will-change:transform; user-select:none; }
 .board-card img { pointer-events:none; }
 .board-card h2 { font-size:14px; font-weight:500; margin-top:10px; }
 .board-card p { font-size:12px; line-height:1.4; margin-top:5px; }
 .board-card .photo { clip-path:none; }
}
@media(min-width:1600px) {
 [data-layout="stories"][data-view="grid"] .project-list { grid-template-columns:repeat(4,minmax(0,1fr)); }
}

@media(min-width:1100px) {
 .zine-page {padding-top:24px;}
 .zine-page > .editorial-heading {margin-bottom:30px;}
 .board-hint {padding-bottom:12px;}
}

/* The desktop collage starts directly below navigation. Keep its H1 for assistive technology. */
@media(min-width:1100px) {
 .zine-page[data-view="grid"].board-ready { padding-top:0; }
 .zine-page[data-view="grid"].board-ready > .editorial-heading,
 .zine-page[data-view="grid"].board-ready .board-hint {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
 }
 .zine-board { height:calc(100svh - var(--header-height)); }
 body.admin-bar .zine-board { height:calc(100svh - var(--header-height) - 32px); }
 /* A compact keyboard cue replaces the full-width focus rectangle. */
 .zine-board:focus,.zine-board:focus-visible { outline:none; }
 .zine-board:focus-visible::after {
  content:'Arrow keys to move · Esc to leave'; position:absolute; bottom:16px; left:24px;
  padding:8px 12px; color:var(--ink); background:var(--paper); border:1px solid var(--line); border-radius:999px;
  font-size:11px; line-height:1.4; pointer-events:none;
 }
}

/* Editorial scale and a single chevron family. */
[data-layout="stories"][data-view="list"] .project-caption h2 { font-size:17px; line-height:1.45; max-width:440px; }
.project-caption svg { width:18px; height:18px; }
#selected-stories .editorial-heading { font-size:clamp(34px,4vw,48px); }
.story-details { grid-template-columns:1fr !important; }
.text-reveal { opacity:1; transform:none; }
.motion-ready .text-reveal { transition:opacity 650ms cubic-bezier(.22,1,.36,1),transform 650ms cubic-bezier(.22,1,.36,1); }
.motion-ready .text-reveal:not(.is-visible) { opacity:0; transform:translateY(14px); }
@media (prefers-reduced-motion:reduce) {
 /* Fade only: no wipe or translation. Preserve a visible, brief entrance. */
 .motion-ready .reveal,.motion-ready .text-reveal { transition:opacity 240ms ease-out !important; transform:none !important; clip-path:none !important; }
 .motion-ready .reveal:not(.is-visible),.motion-ready .text-reveal:not(.is-visible) { opacity:0; }
 .motion-ready .reveal.is-visible,.motion-ready .text-reveal.is-visible { opacity:1; }
 .hero-line > span { animation:soft-opening 300ms ease-out both !important; }
 @keyframes soft-opening { from {opacity:0} to {opacity:1} }
}

/* Compact editorial heading row, shared by Home and the archive. */
.stories-page .stories-section-heading,#selected-stories .stories-section-heading {
  display:flex;align-items:baseline;justify-content:flex-start;gap:14px;
 margin:0 var(--gutter) 40px;padding-top:0;
}
.stories-page .stories-section-heading .editorial-heading,
#selected-stories .stories-section-heading .editorial-heading {
 text-align:left;font-size:clamp(30px,3.4vw,44px);margin:0;
}
.stories-page .stories-section-heading .view-controls,
#selected-stories .stories-section-heading .view-controls { position:static;margin:0;flex:0 0 auto; }
/* Theme colors switch immediately; only the small selector thumb moves. */
:root { --theme-duration:0ms; }
body { transition:none; }
.theme-switch { width:76px;min-height:44px;display:grid;place-items:center;touch-action:manipulation; }
.theme-switch-track { position:relative;display:block;width:76px;height:36px;border-radius:999px;background:#c5beb4;border:1px solid #bdb5a9; }
.theme-switch-thumb { position:absolute;left:6px;top:6px;width:22px;height:22px;border-radius:50%;background:#f6f1eb;box-shadow:none;transform:translateX(0);transition:none; }
.theme-switch-sun,.theme-switch-moon { position:absolute;top:9px;color:#f6f1eb; }
.theme-switch-sun {right:12px;} .theme-switch-moon {left:12px;}
.theme-switch svg {width:16px;height:16px;}
:root[data-theme="dark"] .theme-switch-track {background:#282828;border-color:#555;}
:root[data-theme="dark"] .theme-switch-thumb {transform:translateX(40px);}
.nav-toggle { border:1px solid var(--line);border-radius:999px;padding:0 15px;min-height:38px;background:transparent;gap:3px; }
@media(max-width:759px) {
  .stories-page .stories-section-heading,#selected-stories .stories-section-heading {gap:10px;margin-bottom:30px;}
 .stories-page .stories-section-heading .editorial-heading,#selected-stories .stories-section-heading .editorial-heading {font-size:30px;}
 .nav-toggle {padding-inline:12px;}
 .stories-page {padding-top:44px;}
}

/* The switch has no animated state: both color and thumb update in the click frame. */
.theme-switch,.theme-switch * { transition:none !important;animation:none !important; }

/* Photographs enter individually as the visitor scrolls. */
.motion-ready .reveal {
 clip-path:none !important;
 opacity:1;
 transform:translateY(0);
 transition:opacity 650ms cubic-bezier(.22,1,.36,1),transform 650ms cubic-bezier(.22,1,.36,1);
 transition-delay:0ms;
}
.motion-ready .reveal:not(.is-visible) {opacity:0;transform:translateY(20px);}
.motion-ready .reveal.is-visible {opacity:1;transform:translateY(0);}
@media (prefers-reduced-motion:reduce) {
 .motion-ready .reveal,.motion-ready .reveal:not(.is-visible) {opacity:1;transform:none !important;transition:none !important;}
}

/* Optional publication links use the portfolio chevron. */
.zine-publication-link {display:flex;align-items:center;justify-content:space-between;gap:12px;width:fit-content;max-width:100%;min-height:44px;margin-top:12px;font-size:13px;line-height:1.4;}
.zine-publication-link svg {width:18px;height:18px;flex:0 0 auto;transition:transform 260ms cubic-bezier(.22,1,.36,1);}
.zine-publication-link:hover svg,.zine-publication-link:focus-visible svg {transform:translateX(4px);}
@media(prefers-reduced-motion:reduce){.zine-publication-link svg{transition:none;}}

/* Keep the collage publication link close to its caption. */
.board-card .zine-publication-link {margin-top:4px;min-height:28px;}

/* Home desktop: three photographs in one horizontal strip. */
@media (min-width:1100px) {
 .home-carousel {max-width:none;}
 .home-carousel .carousel-track {gap:24px;aspect-ratio:auto;scroll-snap-type:x mandatory;}
 .home-carousel .carousel-slide {flex:0 0 calc((100% - 48px)/3);scroll-snap-align:start;}
 .home-carousel .photo {aspect-ratio:3/4;}
}
