/* Mobile portfolio: one reading flow, intact photographs, reachable controls.
   :nth-child(n) deliberately outranks the desktop's individual frame positions. */
@media (max-width: 1024px) {
  html { scroll-padding-top: 84px; }
  body { -webkit-text-size-adjust: 100%; }
  body, body a, body button { cursor: auto; }
  :root { --page-gutter: clamp(16px, 4.5vw, 32px); }
  .hud {
    height: auto; min-height: 68px;
    padding: calc(10px + env(safe-area-inset-top)) var(--page-gutter) 10px;
    grid-template-columns: auto minmax(0, 1fr); align-items: center;
    background: rgba(5,5,5,.96); mix-blend-mode: normal;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .hud-title { display: none; }
  .hud-actions { gap: clamp(4px, 1vw, 12px); min-width: 0; align-items: center; }
  .monogram { min-width: 44px; min-height: 44px; align-items: center; }
  .monogram span { font-size: 24px; }
  .monogram i { font-size: 10px; }
  .instagram-hud, .language, .sound-toggle, .index-toggle {
    min-width: 44px; min-height: 44px; touch-action: manipulation;
  }
  .instagram-hud svg, .sound-toggle svg { width: 21px; height: 21px; }
  .sound-toggle { justify-content: center; }
  .hud .sound-toggle > span { display: none; }
  .language { font-size: 14px; }
  .index-toggle { gap: 8px; font-size: 14px; }
  .language-menu { top: 100%; right: 0; min-width: 110px; transform: translateY(-5px); max-height: 65svh; overflow-y: auto; }
  .language-menu[aria-hidden="false"] { transform: none; }
  .language-menu button { min-height: 44px; font-size: 14px; }
  .sound-volume { right: auto; left: 0; width: 168px; font-size: 14px; }
  .sound-volume input { height: 36px; }
  .index {
    display: flex; flex-direction: column; gap: 28px;
    padding: calc(90px + env(safe-area-inset-top)) var(--page-gutter) calc(24px + env(safe-area-inset-bottom));
    height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .index-visual { display: none; }
  .index ol { align-self: stretch; flex: 0 0 auto; }
  .index li a { min-height: 72px; grid-template-columns: 32px minmax(0,1fr); gap: 8px; padding: 16px 0; }
  .index li a:hover, .index li a:focus-visible { padding-left: 0; }
  .index sup { font-size: 12px; margin: 0; align-self: center; }
  .index li span { font-size: clamp(1.75rem, 7vw, 3rem); line-height: 1.05; overflow-wrap: anywhere; }
  .index em { display: none; }
  .index-foot { position: static; display: grid; grid-template-columns: minmax(0,1fr); gap: 0; margin-top: auto; font-size: 14px; line-height: 1.4; }
  .index-foot a { display: flex; align-items: center; min-height: 48px; padding: 8px 0; border-bottom: 1px solid #ffffff22; }
  .index-foot a > span { font-size: inherit; }
  .index-foot > span { display: none; }
  .chapter-rail { display: none; }

  .field { min-height: 36rem; height: 100svh; }
  .field-fallback { width: 84%; height: 56%; top: 22%; }
  .wordmark { font-size: clamp(4rem, 21vw, 12rem); line-height: 1.1; }
  .wordmark .cursor-origin-letter { display: inline; letter-spacing: inherit; }
  .word { left: var(--page-gutter); transform: none; }
  /* Set tracking on each word: the filled first name stays compact while
     the outlined surname needs clear space between its contours. */
  .wordmark .word-one { letter-spacing: -.025em; font-kerning: normal; }
  .wordmark .word-two { letter-spacing: .065em; font-kerning: none; }
  .word-one { top: calc(102px + env(safe-area-inset-top)); }
  .word-two { bottom: calc(172px + env(safe-area-inset-bottom)); -webkit-text-stroke-width: 1px; }
  .field-code { left: var(--page-gutter); top: calc(110px + 23vw); font-size: 12px; line-height: 1.5; }
  .field-instruction { display: none; }
  .mutate { left: var(--page-gutter); bottom: calc(24px + env(safe-area-inset-bottom)); min-height: 48px; width: min(230px, calc(100% - 110px)); padding: 0 16px; font-size: 12px; gap: 12px; }
  .field-caption { left: var(--page-gutter); right: var(--page-gutter); bottom: calc(92px + env(safe-area-inset-bottom)); width: auto; text-align: left; font-size: 12px; line-height: 1.5; }
  .field-caption small { display: block; }
  .down { display: grid; left: auto; right: var(--page-gutter); bottom: calc(24px + env(safe-area-inset-bottom)); transform: none; width: 48px; height: 48px; }

  .position, .chapter, .chapter-spectres, .curatorial, .about, .biography {
    min-height: 0; padding: 80px var(--page-gutter); scroll-margin-top: 0;
  }
  .position { display: flex; flex-direction: column; gap: 48px; }
  .position h2 { margin: 0; font-size: clamp(2.8rem, 13vw, 7rem); line-height: .98; }
  .position h2 > span { transform: none; overflow-wrap: anywhere; }
  .position h2 > span:nth-child(n) { margin-left: 0; }
  .position-end { position: static; font-size: 18px; line-height: 1.5; }
  .position-code, .chapter-meta, .curatorial-meta, .bio-meta, .about-head > p,
  .about .milestones, .curatorial-foot, .bio-axis, .bio-portrait figcaption,
  .bio-commission > span, .bio-archive figcaption, .bio-installations-head > span,
  .installation-view figcaption, .contact > p, .afterimage > p {
    font-size: 12px; line-height: 1.5;
  }
  .chapter-meta, .curatorial-meta, .bio-meta { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; margin-bottom: 36px; }
  .chapter-meta > span:nth-child(2), .curatorial-meta > span:nth-child(2), .bio-meta > span:nth-child(2) { text-align: right; }
  .chapter-meta > span:last-child, .curatorial-meta > span:last-child, .bio-meta > span:last-child { display: none; }
  .chapter-title { font-size: clamp(2.8rem, 14vw, 7rem); line-height: .98; }
  .chapter-title > span { transform: none; overflow-wrap: anywhere; }
  .chapter-title > span:nth-child(2) { margin-left: 0; }
  .chapter-peaux .chapter-title > span:first-child { width: auto; }
  .chapter-peaux .chapter-title > span:nth-child(2) { margin: 10px 0 0; transform: none; text-align: left; font-size: .6em; line-height: 1.1; }
  .chapter-note { width: auto; max-width: 34rem; margin: 28px 0 0; font-size: 18px; line-height: 1.5; letter-spacing: -.02em; }
  .composition { display: flex; flex-direction: column; gap: 24px; min-height: 0; margin: 28px 0 0; padding: 0; }
  .composition .frame:nth-child(n) {
    position: relative; inset: auto; width: 100%; max-width: 680px;
    margin: 0; align-self: center; transform: none; will-change: auto;
  }
  .composition-matiere .frame:nth-child(n) { width: 88%; max-width: 440px; }
  .artwork, .artwork img { width: 100%; height: auto; }
  .frame figcaption { grid-template-columns: 24px minmax(0,1fr); gap: 2px 8px; margin-top: 6px; font-size: 12px; line-height: 1.4; }
  .frame figcaption > span:not(.artwork-details) { font-size: 14px; overflow-wrap: anywhere; }
  .frame figcaption > small { grid-column: 2; }
  .frame figcaption > .artwork-details { grid-column: 2; gap: 2px 10px; }
  .roster { position: static; margin-top: 48px; padding-top: 16px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
  .chapter-spectres .spectral-machine { display: none; }

  .curatorial h2, .about h2 { margin: 0; font-size: clamp(2.4rem, 11vw, 6rem); line-height: 1.03; }
  .curatorial h2 > span, .about h2 i { transform: none; overflow-wrap: anywhere; }
  .curatorial h2 > span:nth-child(2), .curatorial h2 > span:nth-child(4) { margin: 12px 0 0; font-size: .7em; line-height: 1.15; transform: none; }
  .curatorial-body, .about-head, .about-body, .bio-hero, .bio-content { grid-template-columns: minmax(0,1fr); gap: 36px; margin-top: 40px; }
  .about-head { margin-top: 0; padding-bottom: 40px; }
  .about-body { margin-top: 0; padding: 40px 0; }
  .curatorial-lead, .about-lead, .bio-lead { max-width: 38rem; font-size: clamp(1.4rem, 5.5vw, 2.2rem); line-height: 1.3; letter-spacing: -.035em; }
  .curatorial-copy, .about-body > .practice-copy, .bio-copy { grid-template-columns: minmax(0,1fr); gap: 24px; font-size: 17px; line-height: 1.7; }
  .practice-copy p:nth-child(n) { grid-column: auto; }
  .curatorial-copy p, .practice-copy p, .bio-copy p, .bio-commission p { text-align: left; hyphens: auto; }
  .curatorial-foot { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px 24px; }
  .milestones { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .afterimage { min-height: 60svh; padding: 32px var(--page-gutter); }
  .afterimage-word { font-size: clamp(2.8rem, 15vw, 8rem); line-height: .95; }
  .afterimage-word span { transform: none; overflow-wrap: anywhere; }
  .biography h2 { font-size: clamp(4rem, 21vw, 12rem); line-height: 1.05; letter-spacing: .035em; font-kerning: none; }
  .bio-hero { margin-top: 40px; }
  .bio-portrait { grid-template-columns: minmax(0,1fr); gap: 24px; margin-top: 40px; }
  .bio-portrait figcaption { min-height: 0; flex-direction: row; align-items: center; gap: 12px; }
  .bio-portrait-frame { width: 100%; max-width: 560px; justify-self: center; }
  .bio-axis { flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .bio-commission { grid-template-columns: minmax(0,1fr); gap: 16px; margin-top: 48px; }
  .bio-commission strong { text-align: left; }
  .bio-commission p { grid-column: auto; font-size: 17px; line-height: 1.7; }
  .bio-archive { margin-top: 40px; }
  .bio-archive figcaption { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .bio-installations { margin-top: 64px; }
  .bio-installations-head { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .bio-installations-head h3 { text-align: left; }
  .bio-installations-head p { grid-column: auto; font-size: 17px; line-height: 1.7; }
  .bio-installations-grid { display: flex; flex-direction: column; gap: 40px; margin-top: 32px; }
  .installation-view:nth-child(n) { width: 100%; margin: 0; align-self: stretch; }
  .installation-view figcaption { grid-template-columns: 28px minmax(0,1fr); gap: 12px; }
  .contact { min-height: 80svh; padding: 64px var(--page-gutter) calc(24px + env(safe-area-inset-bottom)); gap: 36px; }
  .contact h2 { font-size: clamp(2.5rem, 12vw, 7rem); line-height: 1.05; letter-spacing: -.015em; overflow-wrap: anywhere; }
  .contact h2 span { margin-left: 0; transform: none; }
  .contact-link { position: static; inset: auto; transform: none; width: 104px; height: 104px; flex-shrink: 0; }
  .contact-foot { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 14px; font-size: 9px; line-height: 1.4; letter-spacing: .025em; }
  .contact-foot > span:first-child { flex-basis: 100%; padding-bottom: 4px; opacity: .55; }
  .contact-foot .legal-links { flex-direction: row; flex-wrap: wrap; gap: 0 14px; min-width: 0; text-align: left; }
  .contact-foot .legal-links [data-rights] { order: -1; }
  .contact-foot > span:last-child { margin-left: auto; }
  .contact-foot a { display: inline-flex; align-items: center; min-height: 36px; font-size: 9px; line-height: 1.4; letter-spacing: .025em; opacity: .65; overflow-wrap: anywhere; }
  .contact-foot a:hover, .contact-foot a:focus-visible { opacity: 1; }

  .viewer { width: 100%; height: 100vh; height: 100dvh; padding: calc(8px + env(safe-area-inset-top)) 12px calc(8px + env(safe-area-inset-bottom)); overflow: hidden; }
  .viewer[open] { grid-template-columns: 48px minmax(0,1fr) 48px; grid-template-rows: 48px minmax(0,1fr) auto 48px; column-gap: 8px; row-gap: 8px; }
  .viewer-close { grid-column: 2 / 4; grid-row: 1; min-height: 44px; font-size: 14px; }
  .viewer-close span { width: 36px; height: 36px; }
  .viewer-sound { top: calc(10px + env(safe-area-inset-top)); left: 12px; }
  .viewer-stage { grid-column: 1 / -1; grid-row: 2; min-width: 0; width: 100%; overscroll-behavior: contain; }
  .viewer-media { width: 100%; height: 100%; min-height: 0; }
  .viewer-diptych, .viewer-triptych { max-width: 100%; max-height: 100%; }
  .viewer > p { grid-column: 1 / -1; grid-row: 3; grid-template-columns: minmax(0,1fr) auto; margin: 0; padding: 8px 4px; gap: 8px 12px; font-size: 14px; line-height: 1.4; }
  .viewer > p strong { overflow-wrap: anywhere; }
  .viewer-counter { grid-column: 2; grid-row: 1; }
  .viewer-meta { display: none; }
  .viewer > p > .viewer-artwork-details { justify-content: flex-start; font-size: 12px; }
  .viewer-nav { position: static; top: auto; bottom: auto; transform: none; padding: 0; min-height: 48px; }
  .viewer-nav span { width: 44px; height: 44px; }
  .viewer-nav b { display: none !important; }
  .viewer-previous { grid-column: 1; grid-row: 4; }
  .viewer-next { grid-column: 3; grid-row: 4; justify-self: end; }
  .cursor, .field-flash { display: none; }
  .cursor-reactive { transform: none; text-shadow: none; will-change: auto; }
  .artwork:hover img, .artwork-diptych:hover .diptych, .artwork-triptych:hover .triptych { transform: none; filter: none; }
  .tv-noise, .tv-noise.is-scintillating { animation: none; background-image: var(--grain-texture); }
  .contact > img { animation: none; }
}
@media (max-width: 370px) {
  .hud { padding-left: 12px; padding-right: 12px; }
  .hud-actions { gap: 2px; }
  .index-toggle > span { display: none !important; }
  .monogram i { display: none; }
}
@media (pointer: coarse), (hover: none) {
  .cursor { display: none; }
  .artwork, .index-toggle, .language, .sound-toggle { cursor: pointer; }
}
