/* Krop Studio — the display system's own components: the six pre-made headers (Giant, Swiss, Cover, Index,
   Editorial, Pinned), the one universal Capsule navigation, the bio, the footer, the Albums structure (covers page +
   album page), the font override, and the scaffolding the motion modules need. Tone comes from --ground / --ink set
   on <html> by studio.js; the grid's own CSS was rewritten to the same variables. */

:root {
    --spad: clamp(1.25rem, 4vw, 3rem);      /* system page margin */
    --font-display: inherit;
    --font-body: inherit;
    --swiss: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
    --sys-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(0.2, 0, 0, 1);      /* committed ease-out, never overshoots */
    /* the Capsule's glass — light glass on light tones, dark glass on dark; neutral, never the theme's ink */
    --glass-bg: rgba(255, 255, 255, 0.86);
    --glass-bg-hover: rgba(255, 255, 255, 0.96);
    --glass-solid: #F7F7F8;
    --glass-ink: #0B0B0C;
    --glass-mute: rgba(0, 0, 0, 0.5);
    --glass-line: rgba(0, 0, 0, 0.085);
    --glass-hi: rgba(0, 0, 0, 0.05);
    --glass-sel: rgba(0, 0, 0, 0.07);
    --glass-edge: rgba(255, 255, 255, 0.9);
    --glass-rim: rgba(0, 0, 0, 0.12);
    --glass-shadow: 0 6px 20px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.05);
    --glass-shadow-deep: 0 12px 34px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.06);
    --glass-sheet-shadow: 0 24px 64px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.06);
}
html[data-studio-tone="dark"] {
    --glass-bg: rgba(30, 30, 32, 0.88);
    --glass-bg-hover: rgba(44, 44, 46, 0.94);
    --glass-solid: #232325;
    --glass-ink: #F5F5F7;
    --glass-mute: rgba(255, 255, 255, 0.52);
    --glass-line: rgba(255, 255, 255, 0.12);
    --glass-hi: rgba(255, 255, 255, 0.08);
    --glass-sel: rgba(255, 255, 255, 0.12);
    --glass-edge: rgba(255, 255, 255, 0.12);
    --glass-rim: rgba(255, 255, 255, 0.16);
    --glass-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
    --glass-shadow-deep: 0 12px 34px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.3);
    --glass-sheet-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* the studio's own elements size the same on every grid, whatever the grid's own reset does */
#studio-mast, #studio-mast *, #studio-nav, #studio-nav *, #studio-bio, #studio-bio *, #studio-footer, #studio-footer *, .pidx, .pidx *, .pdet, .pdet *, .studio-lb, .studio-lb * { box-sizing: border-box; }

/* ---- font override (only when the theme picked a face) ---- */
html[data-studio-font] body,
html[data-studio-font] body :not(i):not(.fa):not(.la):not(.pswp__icn) { font-family: var(--font-body) !important; }
html[data-studio-font] :is(h1, h2, h3, .imageset__title, .album__title, .deck__title, .next__title, .menu__album, .nav__name, #intro h1, .mast__name, .mast__statement, .pdet__next-title, .pdet__col-title) { font-family: var(--font-display) !important; }
/* the Capsule is the browser's furniture: the system font whatever the theme */
#studio-nav, #studio-nav * { font-family: var(--sys-font) !important; }

/* single-weight faces never get a synthesised bold */
html[data-studio-font="serif"] :is(.mast__name, .mast__statement, .pdet__next-title, .pdet__col-title), html[data-studio-font="condensed"] :is(.mast__name, .pdet__next-title), html[data-studio-font="black"] :is(.mast__name, .pdet__next-title) { font-weight: 400 !important; }
html[data-studio-font="serif"] .mast-giant .mast__name { letter-spacing: -0.01em; }

/* ---- the system's small voice ---- */
.mast__sub, .mast__loc, .foot__row { font-size: 12px; line-height: 1.4; letter-spacing: 0.06em; }
html[data-studio-font="mono"] :is(.mast__sub, .mast__loc, .foot__row) { letter-spacing: 0; }
#studio-mast, #studio-footer { color: var(--ink); font-family: var(--font-body, inherit); -webkit-font-smoothing: antialiased; }
#studio-mast a, #studio-footer a { color: inherit; text-decoration: none; cursor: pointer; }

/* ================= HEADERS ================= */

#studio-mast { color: var(--ink); }
.mast__name { margin: 0; font-weight: 800; line-height: 1; font-family: var(--font-display, inherit); }
.mast__sub, .mast__loc { margin: 0; }
.mast__sub { opacity: 0.6; }

/* giant — the name fitted across the viewport, centred; one small line under it */
.mast-giant { position: relative; z-index: 3; text-align: center; padding: calc(var(--spad) + 1.5rem) 0 4vh; background: var(--ground); overflow: hidden; }
.mast-giant .mast__name { display: inline-block; white-space: nowrap; text-transform: uppercase; letter-spacing: -0.035em; line-height: 0.86; vertical-align: top; }
.mast-giant .mast__sub { margin-top: 1.5rem; padding: 0 var(--spad); text-transform: uppercase; white-space: pre-wrap; }

/* cover — a full-viewport poster: sub-header and city/state top left, the name fitted across the bottom */
.mast-cover { position: relative; z-index: 3; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: var(--spad); background: var(--ground); overflow: hidden; }
html.studio-nav-on .mast-cover { padding-bottom: calc(var(--spad) + 64px); }
.mast-cover .mast__top { display: flex; flex-direction: column; gap: 0.35rem; text-transform: uppercase; }
.mast-cover .mast__sub { opacity: 1; }
.mast-cover .mast__loc { opacity: 0.55; }
.mast-cover .mast__name { display: inline-block; white-space: nowrap; text-transform: uppercase; letter-spacing: -0.035em; line-height: 0.84; margin-bottom: -0.08em; vertical-align: bottom; }

/* pinned — a small name pinned top-left with nothing behind it; the page clears it */
.mast-pinned { position: fixed; top: 0; left: 0; z-index: 901; padding: calc(var(--spad) * 0.75) var(--spad); pointer-events: none; }
.mast-pinned .mast__name { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; pointer-events: auto; }
.mast-pinned .mast__sub { font-size: 11px; letter-spacing: 0.04em; margin-top: 0.3rem; }
/* !important: the grids' own id rules (#portfolio, #pile-main…) outrank these */
html[data-header="pinned"] :is([data-studio-scope], .bio-block--intro, .pidx, .pdet) { padding-top: 5rem !important; }
html[data-header="pinned"] .bio-block--intro + :is([data-studio-scope], .pdet) { padding-top: 1rem !important; }

/* swiss — the grid block: everything big, bold, left aligned, on a twelve-column grid with rules.
   Helvetica unless the theme picked a face. */
.mast-swiss {
    position: relative; z-index: 3; background: var(--ground);
    padding: calc(var(--spad) + 1.5rem) var(--spad) 7vh;
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(12px, 1.5vw, 24px); row-gap: clamp(1.6rem, 3.2vw, 3.6rem);
    font-family: var(--font-body, var(--swiss)); font-weight: 700; letter-spacing: -0.03em;
}
.mast-swiss .mast__name { grid-column: 1 / -1; font-family: var(--font-display, var(--swiss)); font-size: calc(clamp(56px, 10.5vw, 190px) * var(--name-scale, 1)); font-weight: 700; line-height: 0.88; letter-spacing: -0.05em; margin-left: -0.04em; overflow-wrap: anywhere; }
.mast-swiss .mast__meta { grid-column: 1 / span 5; border-top: 3px solid var(--ink); padding-top: 0.5em; font-size: clamp(22px, 2.6vw, 44px); line-height: 1.04; letter-spacing: -0.035em; }
.mast-swiss.mast--nobio .mast__meta { grid-column: 1 / span 8; }
.mast-swiss .mast__sub, .mast-swiss .mast__loc { font-size: inherit; line-height: inherit; letter-spacing: inherit; opacity: 1; margin: 0; }
.mast-swiss .bio { grid-column: 7 / -1; border-top: 3px solid var(--ink); padding-top: 0.9em; }
.mast-swiss .bio__text { font-size: clamp(17px, 1.65vw, 27px); line-height: 1.28; font-weight: 500; letter-spacing: -0.02em; max-width: none; }
.mast-swiss .bio p { margin-bottom: 0.7em; }
.mast-swiss .bio a { border-bottom-width: 2px; }
.mast-swiss .mast__meta:only-of-type { grid-column: 1 / -1; }

/* index — the archive sheet: the name, then a hairline table of specialty / location / work / links in mono metadata */
.mast-index { position: relative; z-index: 3; background: var(--ground); padding: calc(var(--spad) + 1.25rem) var(--spad) 6vh; }
.mast-index .mast__name { font-size: calc(clamp(40px, 6.4vw, 104px) * var(--name-scale, 1)); font-weight: 700; letter-spacing: -0.04em; line-height: 0.92; margin: 0 0 clamp(1.4rem, 3vw, 2.6rem) -0.03em; overflow-wrap: anywhere; }
.mast__table { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); column-gap: clamp(12px, 2vw, 32px); margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid rgba(var(--ink-rgb), 0.18); }
.mast__cell { padding: 0.9rem 0 1.05rem; min-width: 0; }
.mast__cell dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.55; margin: 0 0 0.45rem; font-weight: 500; }
.mast__cell dd { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 500; letter-spacing: -0.005em; }
.mast__links { display: flex; flex-wrap: wrap; gap: 0.3em 1.1em; }
.mast__links a { border-bottom: 1px solid rgba(var(--ink-rgb), 0.35); transition: border-color 0.15s ease; white-space: nowrap; }
.mast__links a:hover { border-bottom-color: currentColor; }
.mast__links a::after { content: "\2197"; font-size: 0.8em; margin-left: 0.25em; opacity: 0.6; }
.mast-index .bio { margin-top: 2.2rem; }
.mast-index .bio__text { font-size: 16.5px; line-height: 1.5; max-width: 62ch; }

/* editorial — a small name line, then the bio's opening as one big statement under a rule */
.mast-editorial { position: relative; z-index: 3; background: var(--ground); padding: calc(var(--spad) + 0.75rem) var(--spad) 6vh; }
.mast__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--ink); margin-bottom: clamp(2rem, 6vh, 5rem); }
.mast__small { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.mast__small--right { font-weight: 400; opacity: 0.6; text-align: right; }
.mast__statement { margin: 0; font-family: var(--font-display, inherit); font-size: calc(clamp(30px, 3.9vw, 72px) * var(--name-scale, 1)); font-weight: 400; line-height: 1.06; letter-spacing: -0.025em; max-width: 24em; text-wrap: pretty; }
html[data-studio-font="serif"] .mast__statement { letter-spacing: -0.01em; line-height: 1.02; font-size: calc(clamp(34px, 4.4vw, 84px) * var(--name-scale, 1)); }
html[data-studio-font="black"] .mast__statement, html[data-studio-font="condensed"] .mast__statement { text-transform: uppercase; }
html[data-studio-font="condensed"] .mast__statement { letter-spacing: 0; font-size: calc(clamp(38px, 5.2vw, 96px) * var(--name-scale, 1)); }
.mast__rest { margin: clamp(1.4rem, 3vh, 2.2rem) 0 0; font-size: 16px; line-height: 1.5; max-width: 46em; opacity: 0.72; }

/* ================= THE CAPSULE — one universal navigation ================= */
/* One glass element on the page, the regular (tinted) variant: blur 16px, ~88% fill, a darkened rim and a specular
   top edge (iOS 27's material), capsule radius = height / 2, everything nested concentric. The menu is Apple's
   separated trailing circle. Monochrome ink that flips with the tone. */

#studio-nav.capsule {
    position: fixed; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 940;
    display: flex; justify-content: center; pointer-events: none;
    -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.cap__group { position: relative; display: flex; align-items: center; gap: 8px; pointer-events: auto; max-width: calc(100vw - 32px); }
.cap__bar, .cap__menu {
    color: var(--glass-ink);
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
    border: 0;
    box-shadow: 0 0 0 0.5px var(--glass-rim), inset 0 1px 0 var(--glass-edge), var(--glass-shadow);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.cap--scrolled .cap__bar, .cap--scrolled .cap__menu { box-shadow: 0 0 0 0.5px var(--glass-rim), inset 0 1px 0 var(--glass-edge), var(--glass-shadow-deep); }
.cap__bar { display: flex; align-items: center; height: 44px; padding: 5px; border-radius: 22px; min-width: 0; }
.cap__home {
    display: flex; align-items: center; height: 34px; padding: 0 12px 0 14px; border-radius: 17px;
    font-size: 13px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap; color: inherit; text-decoration: none;
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; text-transform: none; outline: 0;
    transition: background-color 0.15s ease;
}
.cap__home:hover, .cap__home:focus-visible { background: var(--glass-hi); }
.cap__sep { flex: none; width: 0.5px; height: 16px; background: var(--glass-line); margin: 0 3px; }
.cap__tabs { position: relative; display: flex; align-items: center; height: 34px; min-width: 0; }
.cap__tab {
    position: relative; z-index: 1; display: flex; align-items: center; height: 34px; padding: 0 12px;
    width: var(--w, auto); box-sizing: border-box; overflow: hidden;
    font-size: 13px; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap; color: var(--glass-mute);
    text-decoration: none; border-radius: 17px; outline: 0; text-transform: none;
    transition: color 0.2s ease, width 0.32s var(--ease), padding 0.32s var(--ease), opacity 0.18s ease;
}
.cap__tab:hover, .cap__tab:focus-visible { color: var(--glass-ink); }
.cap__tab.is-active { color: var(--glass-ink); }
.cap__tab.is-folded { display: none; }
.cap__pill {
    position: absolute; left: 0; top: 0; height: 34px; width: 0; border-radius: 17px; opacity: 0;
    background: var(--glass-sel); box-shadow: inset 0 1px 0 var(--glass-edge);
    transition: transform 0.34s var(--ease), width 0.34s var(--ease), opacity 0.2s ease;
}
.cap__menu {
    flex: none; width: 44px; height: 44px; padding: 0; margin: 0; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer; outline: 0;
    transition: transform 0.2s var(--ease), background-color 0.3s ease, box-shadow 0.3s ease;
}
.cap__menu:hover { background: var(--glass-bg-hover); }
.cap__menu:active { transform: scale(0.94); }
.cap__menu:focus-visible { box-shadow: 0 0 0 0.5px var(--glass-rim), inset 0 1px 0 var(--glass-edge), var(--glass-shadow), 0 0 0 3px rgba(10, 132, 255, 0.45); }
.cap__ico { position: relative; display: block; width: 15px; height: 11px; }
.cap__ico i { position: absolute; left: 0; width: 15px; height: 1.5px; border-radius: 1px; background: currentColor; transition: transform 0.3s var(--ease), opacity 0.16s ease; }
.cap__ico i:nth-child(1) { top: 0; }
.cap__ico i:nth-child(2) { top: 4.75px; }
.cap__ico i:nth-child(3) { top: 9.5px; }
html.studio-menu-open .cap__ico i:nth-child(1) { transform: translateY(4.75px) rotate(45deg); }
html.studio-menu-open .cap__ico i:nth-child(2) { opacity: 0; transform: scaleX(0.3); }
html.studio-menu-open .cap__ico i:nth-child(3) { transform: translateY(-4.75px) rotate(-45deg); }
.cap--nomenu .cap__menu { display: none; }

/* minimised while scrolling down: the other categories fold away, the name and the current one stay */
.cap--min .cap__tab:not(.is-active) { width: 0; padding: 0; opacity: 0; }
.cap--min .cap__tabs:not(:has(.is-active)) { display: none; }
.cap--min .cap__tabs:not(:has(.is-active)) + .cap__sep { display: none; }

/* phones: the name · the current category; every category lives in the sheet */
.cap--compact .cap__tab:not(.is-active) { display: none; }
.cap--compact .cap__tabs:not(:has(.is-active)), .cap--compact .cap__tabs:not(:has(.is-active)) ~ .cap__sep { display: none; }
.cap--compact .cap__pill { display: none; }
.cap--compact .cap__tab { width: auto; }
.cap--compact .cap__tab.is-active { color: var(--glass-ink); font-weight: 600; }

/* the scrim catches outside clicks — invisible on desktop, a breath of dim on phones */
.cap__scrim { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: transparent; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s; }
html.studio-menu-open .cap__scrim { pointer-events: auto; opacity: 1; visibility: visible; transition: opacity 0.25s ease, visibility 0s; }

/* the sheet: rises from the menu circle — eases in, never bounces */
.cap__sheet {
    pointer-events: auto; position: absolute; bottom: calc(100% + 10px); right: 0; z-index: 2;
    width: 300px; max-width: calc(100vw - 20px);
    max-height: calc(100vh - 120px); max-height: calc(100svh - 120px);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
    padding: 6px; border-radius: 22px;
    background: var(--glass-bg); color: var(--glass-ink);
    border: 0; box-shadow: 0 0 0 0.5px var(--glass-rim), inset 0 1px 0 var(--glass-edge), var(--glass-sheet-shadow);
    -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
    font-size: 15px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 400; text-transform: none;
    transform-origin: bottom right; opacity: 0; visibility: hidden;
    transform: translateY(6px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.26s var(--ease), visibility 0s linear 0.26s;
}
.cap__sheet::-webkit-scrollbar { display: none; }
html.studio-menu-open .cap__sheet { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease, transform 0.34s var(--ease), visibility 0s; }
.cap__sheet a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 16px; color: inherit; text-decoration: none; cursor: pointer; outline: 0; transition: background-color 0.12s ease; }
.cap__sheet a:hover, .cap__sheet a:focus-visible { background: var(--glass-hi); }
.cap__sheet a:active { background: var(--glass-sel); }
.cap__list + .cap__list { margin-top: 4px; padding-top: 4px; border-top: 0.5px solid var(--glass-line); }
.cap__sheet a::before { content: ""; flex: none; width: 6px; margin-left: 2px; }
.cap__list--work a::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0; transform: scale(0.5); transition: opacity 0.18s ease, transform 0.25s var(--ease); margin-left: 2px; }
.cap__list--work a.is-active::before { opacity: 1; transform: none; }
.cap__count { margin-left: auto; font-size: 12.5px; color: var(--glass-mute); font-variant-numeric: tabular-nums; }
.cap__list--pages a::after { content: "\2192"; margin-left: auto; opacity: 0.5; font-size: 13px; }
.cap__list--links a { font-size: 13.5px; color: var(--glass-mute); }
.cap__list--links a::after { content: "\2197"; margin-left: auto; opacity: 0.6; font-size: 12px; }
.cap__list--links a:hover { color: var(--glass-ink); }

@media (prefers-reduced-motion: reduce) {
    .cap__sheet, .cap__scrim, .cap__ico i, .cap__menu, .cap__tab, .cap__pill, .cap__bar { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
    .cap__bar, .cap__menu, .cap__sheet { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-solid); }
}

/* ================= FOOTER ================= */

.foot { position: relative; z-index: 2; padding: 10vh var(--spad) 6vh; background: var(--ground); }
html.studio-nav-on .foot { padding-bottom: calc(6vh + 72px); }
.foot__inner { border-top: 1px solid rgba(var(--ink-rgb), 0.14); padding-top: 2rem; }
.foot__row { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: baseline; }
.foot__name { font-weight: 700; text-transform: uppercase; }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot__links a { opacity: 0.7; border-bottom: 1px solid transparent; transition: opacity 0.15s ease, border-color 0.15s ease; }
.foot__links a:hover { opacity: 1; border-bottom-color: currentColor; }
.foot__loc { margin-left: auto; opacity: 0.5; }

/* ================= BIO ================= */

.bio-block { position: relative; z-index: 2; background: var(--ground); padding: 2vh var(--spad) 7vh; }
.bio { color: var(--ink); }
.bio p { margin: 0 0 1em; }
.bio p:last-child { margin-bottom: 0; }
.bio a { border-bottom: 1px solid rgba(var(--ink-rgb), 0.35); transition: border-color 0.15s ease; }
.bio a:hover { border-bottom-color: currentColor; }
.bio__text { font-size: 19px; line-height: 1.42; letter-spacing: -0.005em; max-width: 36em; }
html[data-header="giant"] .bio-block--intro { text-align: center; }
html[data-header="giant"] .bio-block--intro .bio__text { margin-left: auto; margin-right: auto; }
html[data-header="cover"] .bio-block--intro { padding-top: 6vh; }

/* ================= HOME: ALBUMS ================= */

/* in albums mode the all-work stream is hidden (unless an album shows through the page's own grid) */
html[data-structure="projects"][data-view="index"] [data-studio-scope],
html[data-structure="projects"][data-view="project"]:not([data-project-layout="grid"]) [data-studio-scope] { display: none !important; }
html[data-view="project"][data-project-layout="grid"] [data-studio-scope] .studio-off { display: none !important; }
html[data-view="project"][data-project-layout="grid"] [data-studio-scope] .imageset__title,
html[data-view="project"][data-project-layout="grid"] [data-studio-scope] :is(.album--link, .imageset-link, .deck--link) { display: none !important; }
html[data-view="project"][data-project-layout="grid"] [data-studio-scope] :is(.album__head, .album__meta, .imageset__meta) { display: none !important; }

/* the covers page */
.pidx { position: relative; z-index: 2; background: var(--ground); color: var(--ink); padding: 2vh var(--spad) 8vh; }
.pidx__item { display: block; position: relative; color: inherit; text-decoration: none; }
.pidx__media { display: block; position: relative; overflow: hidden; background: rgba(var(--ink-rgb), 0.06); }
.pidx__media img, .pidx__media video { display: block; width: 100%; height: auto; }
.pidx[data-aspect="portrait"] .pidx__media { aspect-ratio: 4 / 5; }
.pidx[data-aspect="square"] .pidx__media { aspect-ratio: 1 / 1; }
.pidx[data-aspect="landscape"] .pidx__media { aspect-ratio: 3 / 2; }
.pidx:not([data-aspect="natural"]) .pidx__media img, .pidx:not([data-aspect="natural"]) .pidx__media video { height: 100%; object-fit: cover; }
.pidx__label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 0.8rem; font-size: 13px; line-height: 1.3; }
.pidx__title { font-weight: 500; }
.pidx__count { opacity: 0.5; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pidx[data-labels="hover"] .pidx__label { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; margin: 0; color: #fff; opacity: 0; transition: opacity 0.2s ease; text-shadow: 0 1px 12px rgba(0,0,0,0.5); }
.pidx[data-labels="hover"] .pidx__item:hover .pidx__label { opacity: 1; }
.pidx[data-labels="none"] .pidx__label { display: none; }
.pidx-grid { display: grid; grid-template-columns: repeat(var(--pidx-cols, 3), 1fr); gap: 4vw 2vw; align-items: start; }
.pidx-stack .pidx__item { width: min(var(--pidx-w, 72vw), 100%); margin: 0 auto 8vh; }
.pidx-stack .pidx__label { font-size: 16px; margin-top: 1rem; }
.pidx-drift { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 2vw; row-gap: 5vw; align-items: start; }
.pidx-drift .pidx__item:nth-child(6n+1) { grid-column: 1 / span 7; }
.pidx-drift .pidx__item:nth-child(6n+2) { grid-column: 9 / span 4; margin-top: 10vw; }
.pidx-drift .pidx__item:nth-child(6n+3) { grid-column: 3 / span 6; }
.pidx-drift .pidx__item:nth-child(6n+4) { grid-column: 10 / span 3; margin-top: 14vw; }
.pidx-drift .pidx__item:nth-child(6n+5) { grid-column: 1 / -1; }
.pidx-drift .pidx__item:nth-child(6n+6) { grid-column: 5 / span 6; }
.pidx__tile { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 4 / 5; padding: 1.4rem; border: 1px solid rgba(var(--ink-rgb), 0.35); }
.pidx__tile-title { font-size: clamp(20px, 2vw, 32px); line-height: 1.1; }
.pidx__tile-glyph { font-size: 14px; opacity: 0.7; }

/* the album page — a stack of prints, the description as intro, the next album at the end */
.pdet { position: relative; z-index: 2; background: var(--ground); color: var(--ink); padding: 2vh 0 6vh; }
.pdet__item { width: min(var(--pdet-w, 72vw), 100vw); margin: 0 auto 6vh; }
.pdet__item img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.pdet__video { position: relative; width: 100%; } .pdet__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdet__cap { margin: 0.7rem 0 0; font-size: 12px; letter-spacing: 0.04em; opacity: 0.55; }
.pdet[data-captions="none"] .pdet__cap { display: none; }
.pdet[data-captions="hover"] .pdet__cap { opacity: 0; transition: opacity 0.2s ease; }
.pdet[data-captions="hover"] .pdet__item:hover .pdet__cap { opacity: 0.55; }
.pdet__item { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.9s var(--ease); }
.pdet__item.is-in { opacity: 1; transform: none; }
.pdet__next { margin: 6vh var(--spad) 0; padding: 8vh 0 2vh; border-top: 1px solid rgba(var(--ink-rgb), 0.14); }
.pdet__next-link { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; color: inherit; text-decoration: none; }
.pdet__next-eyebrow { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.55; margin-bottom: 0.8rem; }
.pdet__next-title { display: block; font-family: var(--font-display, inherit); font-size: clamp(32px, 5vw, 88px); font-weight: 700; line-height: 0.95; letter-spacing: -0.02em; }
.pdet__next-media { display: block; width: 22vw; max-width: 320px; overflow: hidden; }
.pdet__next-media img, .pdet__next-media video { display: block; width: 100%; height: auto; }
.pdet__next-link:hover .pdet__next-title { opacity: 0.6; }

/* the runtime's own small lightbox */
.studio-lb { position: fixed; inset: 0; z-index: 950; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 1rem; background: rgba(var(--ground-rgb), 0.92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); cursor: zoom-out; }
.studio-lb.is-open { display: flex; }
.studio-lb img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; }
.studio-lb__cap { margin: 0; font-size: 12px; letter-spacing: 0.04em; opacity: 0.6; }
html.studio-lb-open { overflow: hidden; }
html:has(.pswp--open) { overflow: hidden; }   /* a zoomed print holds the page: no keyboard / scrollbar scrolling beneath it */

/* ---- motion scaffolding ---- */
#studio-fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
html.liquid-on [data-studio-scope], html.pix-on [data-studio-scope],
html.liquid-on #studio-page, html.pix-on #studio-page,
html.liquid-on #footer, html.pix-on #footer { position: relative; z-index: 1; }
img[data-liquid], img[data-pix] { opacity: 0 !important; }
html.liquid-on [data-studio-scope] :is(.media, .media > a, .cell, .cell > a, .pile__item, .pile__item > a, .print__media, figure, figure > a, .row),
html.pix-on [data-studio-scope] :is(.media, .media > a, .cell, .cell > a, .pile__item, .pile__item > a, .print__media, figure, figure > a, .row) { background-color: transparent !important; background-image: none !important; }
#studio-page { transform-origin: 0 0; will-change: transform; }
html.elastic-on, html.elastic-on body { overflow-x: clip; }

html.studio-nav-on #krop-tag { z-index: 899; }

@media (max-width: 767px) {
    #studio-nav.capsule { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
    .cap__group { max-width: calc(100vw - 24px); }
    .cap__bar { height: 48px; border-radius: 24px; }
    .cap__home { height: 38px; font-size: 14px; padding: 0 13px 0 15px; border-radius: 19px; }
    .cap__tab { height: 38px; font-size: 14px; }
    .cap__menu { width: 48px; height: 48px; }
    .cap__scrim { background: rgba(0, 0, 0, 0.18); }
    .cap__sheet { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; transform: translateY(8px) scale(0.98); transform-origin: bottom center; border-radius: 24px; font-size: 17px; max-height: calc(100svh - 100px); }
    html.studio-menu-open .cap__sheet { transform: none; }
    .cap__sheet a { padding: 12px 14px; border-radius: 16px; }
    .cap__count, .cap__list--links a { font-size: 14px; }
    html.studio-nav-on #krop-tag { display: none; }
    .mast-giant { padding-top: calc(var(--spad) + 1.6rem); }
    .mast-cover { padding-top: calc(var(--spad) + 1.6rem); }
    .mast-swiss { grid-template-columns: 1fr; row-gap: 1.4rem; padding-top: calc(var(--spad) + 1.6rem); }
    .mast-swiss .mast__name { font-size: calc(clamp(44px, 15vw, 96px) * var(--name-scale, 1)); }
    .mast-swiss .mast__meta, .mast-swiss.mast--nobio .mast__meta, .mast-swiss .bio { grid-column: 1; }
    .mast-swiss .mast__meta { font-size: clamp(20px, 6vw, 30px); }
    .mast-swiss .bio__text { font-size: 17px; }
    .mast-index .mast__name { font-size: calc(clamp(34px, 11vw, 64px) * var(--name-scale, 1)); }
    .mast__table { grid-template-columns: 1fr 1fr; }
    .mast__row { flex-direction: column; gap: 0.3rem; }
    .mast__small--right { text-align: left; }
    .mast__statement { font-size: calc(clamp(26px, 7.4vw, 40px) * var(--name-scale, 1)); }
    html[data-header="pinned"] :is([data-studio-scope], .bio-block--intro, .pidx, .pdet) { padding-top: 4.2rem !important; }
    .pidx-grid { grid-template-columns: repeat(2, 1fr); gap: 5vw 3vw; }
    .pidx-drift .pidx__item { grid-column: 1 / -1 !important; margin-top: 0 !important; }
    .pdet__item { width: 100vw; }
    .pdet__cap { padding: 0 var(--spad); }
    .pdet__next-link { grid-template-columns: 1fr; }
    .pdet__next-media { width: 60vw; }
    .bio__text { font-size: 17px; }
}

/* ---- album page: Flow — a sticky description column, the prints flow like a paragraph ---- */
.pdet--flow { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; column-gap: 2.5rem; align-items: start; padding: 2vh var(--spad) 6vh; }
.pdet__column { position: sticky; top: 2rem; font-size: 15px; line-height: 1.45; }
.pdet__col-title { font-family: var(--font-display, inherit); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 1rem; }
.pdet__col-desc { margin: 0 0 1rem; max-width: 30em; }
.pdet__col-desc p { margin: 0 0 0.8em; }
.pdet__col-desc a { border-bottom: 1px solid rgba(var(--ink-rgb), 0.35); }
.pdet__col-meta { opacity: 0.5; font-variant-numeric: tabular-nums; margin: 0 0 1rem; }
.pdet__col-next { display: inline-block; color: inherit; text-decoration: none; border-bottom: 1px solid rgba(var(--ink-rgb), 0.35); transition: border-color 0.15s ease; }
.pdet__col-next:hover { border-bottom-color: currentColor; }
.pdet--flow .pdet__stream { font-size: 0; line-height: 0; margin-right: 5%; }
.pdet--flow .pdet__item { position: relative; display: inline-block; vertical-align: bottom; width: calc(37% * var(--pdet-scale, 1)); max-width: 100%; margin: 0 1px 2px 0; background: rgba(var(--ink-rgb), 0.08); }
.pdet--flow .pdet__item:nth-child(even) { width: calc(35% * var(--pdet-scale, 1)); }
.pdet--flow .pdet__item:nth-child(4n) { width: calc(24% * var(--pdet-scale, 1)); }
.pdet--flow .pdet__item:nth-child(8n) { width: calc(40% * var(--pdet-scale, 1)); }
.pdet--flow .pdet__cap { position: absolute; left: 0; bottom: 0; max-width: 100%; margin: 0; padding: 3px 6px; background: var(--ground); color: var(--ink); font-size: 11px; line-height: 15px; letter-spacing: 0; opacity: 0; transition: opacity 0.15s ease; pointer-events: none; }
.pdet--flow .pdet__item:hover .pdet__cap { opacity: 1; }
.pdet--flow .pdet__next { grid-column: 1 / -1; margin-left: 0; margin-right: 0; }
@media (max-width: 767px) {
    .pdet--flow { display: block; padding-left: var(--spad); padding-right: var(--spad); }
    .pdet__column { position: static; margin-bottom: 2rem; }
    .pdet--flow .pdet__stream { margin-right: 0; }
    .pdet--flow .pdet__item, .pdet--flow .pdet__item:nth-child(even), .pdet--flow .pdet__item:nth-child(4n), .pdet--flow .pdet__item:nth-child(8n) { width: 100%; margin: 0 0 2px; }
    .pdet--flow .pdet__cap { padding: 3px 6px; }
}
