/* =====================================================================
   Qiao Li — filmmaker and film scholar
   One stylesheet for the whole site.
   - Most pages are light (warm paper). Film pages use a film "world":
     <body class="dark f-hujie"> etc. Colours for each film are under FILM WORLDS.
   ===================================================================== */

@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-wght-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", "Noto Serif SC", serif;
  --sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --wrap: 1280px;
  --gutter: clamp(18px, 4vw, 56px);
  --space: clamp(72px, 9vw, 128px);
  --header-h: 76px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --radius: 2px;
}

/* ---------- Themes ---------- */
.light, .on-light { --bg: #f4f1ea; --bg-2: #ebe6dc; --card: #fbf9f5; --fg: #161514; --fg-2: #3d3b37; --muted: #6f6a61; --line: rgba(22,21,20,.14); --accent: #9a3b26; }
.dark,  .on-dark  { --bg: #121211; --bg-2: #1c1c1a; --card: #201f1d; --fg: #f2efe8; --fg-2: #d9d5cc; --muted: #a29d93; --line: rgba(242,239,232,.16); --accent: #e0a46b; }

/* ---------- FILM WORLDS ---------- */
.f-wioa  { --bg: #141a16; --bg-2: #1d251f; --card: #1d251f; --fg: #efece3; --fg-2: #d7d3c7; --muted: #a2ab9f; --line: rgba(239,236,227,.16); --accent: #d1ae6b; }
.f-hujie { --bg: #0e0e0e; --bg-2: #191919; --card: #191919; --fg: #f4f4f2; --fg-2: #d8d8d4; --muted: #a3a39e; --line: rgba(244,244,242,.18); --accent: #d4483a; }
.f-fish  { --bg: #132027; --bg-2: #1b2b33; --card: #1b2b33; --fg: #ebf0f2; --fg-2: #cbd6da; --muted: #93a8b0; --line: rgba(235,240,242,.16); --accent: #e7ad6f; }
.f-key   { --bg: #1b1722; --bg-2: #262030; --card: #262030; --fg: #f1edf6; --fg-2: #d6cfe0; --muted: #a99fb8; --line: rgba(241,237,246,.16); --accent: #c4aee8; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 64px); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; color: var(--fg); }
p { margin: 0 0 1em; }
cite, em { font-style: italic; }
[lang|="zh"] { font-style: normal; }
.zh { font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, serif; letter-spacing: .05em; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--fg); color: var(--bg); padding: 8px 14px; }
.skip:focus { left: 8px; }
.on-dark, .on-light, .f-wioa, .f-hujie, .f-fish, .f-key { background: var(--bg); color: var(--fg); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space) 0; }
.section.tight { padding: calc(var(--space) * .55) 0; }
.section.flush-top { padding-top: 0; }
.alt-bg { background: var(--bg-2); }

/* ---------- Type ---------- */
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.display { font-family: var(--serif); font-size: clamp(48px, 7.4vw, 108px); line-height: .94; letter-spacing: -.02em; }
.title { font-family: var(--serif); font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -.012em; }
.h2 { font-family: var(--serif); font-size: clamp(32px, 3.6vw, 50px); line-height: 1.04; letter-spacing: -.01em; }
.h3 { font-family: var(--serif); font-size: clamp(24px, 2.2vw, 30px); line-height: 1.12; }
.lede { font-family: var(--serif); font-size: clamp(21px, 1.9vw, 27px); line-height: 1.38; color: var(--fg); }
.prose { max-width: 40em; color: var(--fg-2); }
.prose p { margin-bottom: 1.1em; }
.meta { font-size: 14px; line-height: 1.55; color: var(--muted); }
.link { display: inline-flex; align-items: center; gap: .5em; font-size: 14px; font-weight: 600; letter-spacing: .02em; text-decoration: none; color: var(--fg); border-bottom: 1.5px solid var(--accent); padding-bottom: 3px; }
.link::after { content: "→"; transition: transform .25s var(--ease); }
.link:hover::after { transform: translateX(4px); }
.btn { display: inline-flex; align-items: center; gap: .6em; font-size: 15px; font-weight: 600; text-decoration: none; padding: 14px 22px; border-radius: var(--radius); background: var(--fg); color: var(--bg); transition: background .2s, color .2s; }
.btn:hover { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.btn.ghost:hover { background: var(--fg); color: var(--bg); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header: always visible, always readable ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.05; }
.brand .b-name { font-family: var(--serif); font-size: 28px; letter-spacing: -.01em; }
.brand .b-role { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: clamp(6px, 1vw, 12px); align-items: center; }
.nav a { font-size: 15px; font-weight: 500; text-decoration: none; padding: 9px 14px; border-radius: 999px; color: var(--fg-2); transition: background .2s, color .2s; white-space: nowrap; }
.nav a:hover { background: var(--bg-2); color: var(--fg); }
.nav a[aria-current] { background: var(--fg); color: var(--bg); }
.menu-btn { display: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--fg); background: var(--bg-2); border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--bg); flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 40px; overflow-y: auto; visibility: hidden; opacity: 0; transition: opacity .2s, visibility 0s .2s; border-top: 1px solid var(--line); }
  .menu-open .nav { visibility: visible; opacity: 1; transition: opacity .2s; }
  .menu-open { overflow: hidden; }
  .nav a { font-family: var(--serif); font-size: 36px; font-weight: 400; color: var(--fg); padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a:hover { background: none; }
  .nav a[aria-current] { background: none; color: var(--accent); font-style: italic; }
}

/* ---------- Section navigation (in-page tabs) ---------- */
.subnav { position: sticky; top: var(--header-h); z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; padding-bottom: 10px; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav a { flex: none; font-size: 14px; font-weight: 500; text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--fg-2); background: var(--bg-2); }
.subnav a:hover, .subnav a.on { background: var(--fg); color: var(--bg); }
.crumbs { font-size: 13px; color: var(--muted); padding-top: 18px; }
.crumbs a { text-decoration: none; color: var(--fg-2); }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 8px; }

/* ---------- Home: split hero ---------- */
.home-hero { padding: clamp(36px, 5vw, 72px) 0 clamp(48px, 6vw, 88px); }
.home-hero .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 36px); row-gap: 40px; align-items: center; }
.home-hero .intro { grid-column: 1 / span 5; }
.home-hero .intro .kicker { display: block; margin-bottom: 22px; }
.home-hero .intro .lede { margin: 28px 0 34px; max-width: 24em; }
.mosaic { grid-column: 6 / span 7; display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: clamp(420px, 44vw, 620px); }
.mosaic a { position: relative; display: block; overflow: hidden; background: #222; border-radius: var(--radius); }
.mosaic a:first-child { grid-row: 1 / span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.mosaic a:hover img { transform: scale(1.04); }
.mosaic .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; font-size: 13px; line-height: 1.35; }
.mosaic .cap b { display: block; font-family: var(--serif); font-weight: 400; font-size: 21px; }

/* ---------- Explore tiles (clear routes into the site) ---------- */
.explore { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; padding: 22px; overflow: hidden; border-radius: var(--radius); text-decoration: none; color: #fff; background: #222; isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.78)); }
.tile:hover img { transform: scale(1.05); }
.tile .n { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.tile h3 { color: #fff; font-family: var(--serif); font-size: 32px; line-height: 1.05; margin: 8px 0 6px; }
.tile p { font-size: 14.5px; line-height: 1.45; margin: 0; opacity: .9; }
.tile .go { margin-top: 14px; font-size: 14px; font-weight: 600; }

/* ---------- Section heading row ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 52px); }
.head .kicker { display: block; margin-bottom: 12px; }
.head p { max-width: 34em; color: var(--fg-2); margin: 14px 0 0; }

/* ---------- Film cards ---------- */
.films { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px); }
.films.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.film-card { display: flex; flex-direction: column; text-decoration: none; color: var(--fg); background: var(--bg); border-radius: var(--radius); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.film-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(0,0,0,.5); }
.film-card figure { overflow: hidden; }
.film-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .8s var(--ease); }
.films.two .film-card img { aspect-ratio: 16 / 9; }
.film-card:hover img { transform: scale(1.04); }
.film-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.film-card .kicker { font-size: 11px; }
.film-card h3 { font-family: var(--serif); font-size: 26px; line-height: 1.08; }
.film-card p { font-size: 14.5px; line-height: 1.5; color: var(--fg-2); margin: 4px 0 0; }
.film-card .role { margin-top: auto; padding-top: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- Text cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); padding: clamp(22px, 2.4vw, 32px); border: 1px solid var(--line); }
.card.img { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card.img figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card.img .in { padding: clamp(22px, 2.4vw, 32px); }
.card .where { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.card h3 { font-family: var(--serif); font-size: clamp(24px, 2.1vw, 30px); line-height: 1.1; margin-bottom: 12px; }
.card p { font-size: 15.5px; color: var(--fg-2); }
.card p:last-child { margin-bottom: 0; }
.card .meta { margin-top: 10px; }
.span2 { grid-column: span 2; }
.feature { display: grid; grid-template-columns: 1fr 1fr; }
.feature figure { background: var(--bg-2); display: flex; align-items: center; justify-content: center; padding: clamp(24px, 4vw, 48px); }
.feature figure img { width: auto; max-height: 360px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); }

/* ---------- Books ---------- */
.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); align-items: end; }
.book { text-decoration: none; color: inherit; display: block; }
.book img { width: 100%; box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 22px 36px -22px rgba(0,0,0,.45); transition: transform .4s var(--ease); }
a.book:hover img { transform: translateY(-6px); }
.book .kicker { display: block; margin: 20px 0 6px; font-size: 11px; }
.book h3 { font-family: var(--serif); font-size: 22px; line-height: 1.14; }
.book p { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

/* ---------- Full-bleed film hero (film pages) ---------- */
.hero { position: relative; min-height: min(78vh, 760px); display: flex; align-items: flex-end; color: #f6f4ef; background: #0b0b0a; overflow: hidden; }
.hero > picture, .hero > img, .hero > picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.78) 100%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; padding-bottom: clamp(28px, 5vw, 60px); }
.hero h1 { color: #f8f6f1; }
.hero .kicker { color: rgba(248,246,241,.85); }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-top: 20px; }
.hero-foot .lede { color: rgba(248,246,241,.92); margin: 0; }
.hero-cap { font-size: 13px; color: rgba(248,246,241,.78); text-align: right; }

/* ---------- Film page parts ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.facts div { padding: 20px 22px; }
.facts div + div { border-left: 1px solid var(--line); }
.facts dt { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.25; color: var(--fg); }
.two { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 36px); row-gap: 32px; }
.two > .a { grid-column: 1 / span 5; }
.two > .b { grid-column: 7 / span 6; }
.two > .a.sticky { position: sticky; top: calc(var(--header-h) + 80px); align-self: start; }
.pull { font-family: var(--serif); font-style: italic; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.16; color: var(--fg); }
.pull small { display: block; font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 18px; }
.recog { list-style: none; padding: 0; margin: 0; }
.recog li { padding: 15px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 6em 1fr; gap: 16px; font-size: 15.5px; color: var(--fg-2); }
.recog li:last-child { border-bottom: 1px solid var(--line); }
.recog .y { color: var(--accent); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.stills { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
.stills a { display: block; overflow: hidden; background: var(--bg-2); grid-column: span 6; border-radius: var(--radius); }
.stills .w12 { grid-column: span 12; } .stills .w7 { grid-column: span 7; } .stills .w5 { grid-column: span 5; }
.stills img { width: 100%; height: 100%; aspect-ratio: 2.39 / 1; object-fit: cover; transition: transform .6s var(--ease); }
.stills a:hover img { transform: scale(1.03); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pager a { display: block; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--bg-2); transition: border-color .2s; }
.pager a:hover { border-color: var(--accent); }
.pager .kicker { display: block; margin-bottom: 6px; }
.pager .h3 { display: block; }
.pager a:last-child { text-align: right; }

/* ---------- Lists ---------- */
.biblio { list-style: none; margin: 0; padding: 0; }
.biblio li { display: grid; grid-template-columns: 7em 1fr; column-gap: clamp(16px, 2.4vw, 32px); padding: 20px 0; border-top: 1px solid var(--line); }
.biblio li:last-child { border-bottom: 1px solid var(--line); }
.biblio .y { font-size: 14px; font-weight: 600; color: var(--accent); padding-top: 4px; }
.biblio .t { font-family: var(--serif); font-size: 22px; line-height: 1.22; color: var(--fg); display: block; margin-bottom: 6px; }
.biblio .r { font-size: 15px; color: var(--fg-2); }
.biblio a { word-break: break-word; }
.credits { width: 100%; border-collapse: collapse; font-size: 15px; }
.credits td { padding: 13px 18px 13px 0; border-top: 1px solid var(--line); vertical-align: top; color: var(--fg-2); }
.credits tr:last-child td { border-bottom: 1px solid var(--line); }
.credits td:first-child { color: var(--accent); font-weight: 600; width: 5em; }
.credits .t { color: var(--fg); }

/* ---------- About ---------- */
.bio { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 36px); row-gap: 40px; align-items: start; }
.bio .pic { grid-column: 1 / span 5; position: sticky; top: calc(var(--header-h) + 80px); }
.bio .pic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.bio .txt { grid-column: 7 / span 6; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 36px); }
.note .kicker { display: block; margin-bottom: 12px; }
.note p:last-child { margin-bottom: 0; }

/* ---------- Page head ---------- */
.page-head { padding: clamp(40px, 6vw, 84px) 0 clamp(28px, 4vw, 52px); }
.page-head .kicker { display: block; margin-bottom: 16px; }
.page-head .lede { margin-top: 22px; max-width: 32em; color: var(--fg-2); }

/* ---------- Contact ---------- */
.email { font-family: var(--serif); font-size: clamp(32px, 5vw, 68px); line-height: 1.05; text-decoration: none; border-bottom: 2px solid var(--accent); word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: #161514; color: #ece9e2; padding: clamp(56px, 7vw, 96px) 0 36px; --muted: #a29d93; --line: rgba(236,233,226,.14); --accent: #e0a46b; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 36px); row-gap: 36px; }
.site-footer .f-name { grid-column: 1 / span 5; }
.site-footer .f-name strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; margin-bottom: 10px; }
.site-footer .f-name p { color: #c9c5bc; font-size: 15px; max-width: 26em; }
.site-footer .f-col { grid-column: span 2; font-size: 15px; }
.site-footer .f-col.wide { grid-column: span 3; }
.site-footer h4 { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; color: #ece9e2; }
.site-footer a:hover { color: var(--accent); }
.site-footer .f-bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Lightbox ---------- */
.lightbox { padding: 0; border: 0; max-width: none; max-height: none; width: 100vw; height: 100vh; height: 100dvh; background: rgba(8,8,8,.97); color: #eee; }
.lightbox::backdrop { background: rgba(8,8,8,.97); }
.lightbox[open] { display: flex; flex-direction: column; }
.lb-bar, .lb-nav { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); font-size: 14px; }
.lightbox button { font: inherit; color: #eee; background: none; border: 0; cursor: pointer; padding: 10px 0; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 var(--gutter); min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .explore { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .films { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .site-footer .f-name { grid-column: 1 / -1; }
  .site-footer .f-col, .site-footer .f-col.wide { grid-column: span 4; }
}
@media (max-width: 900px) {
  .home-hero .intro, .mosaic { grid-column: 1 / -1; }
  .mosaic { height: 480px; }
  .two > .a, .two > .b { grid-column: 1 / -1; }
  .two > .a.sticky, .bio .pic { position: static; }
  .bio .pic { grid-column: 1 / span 8; }
  .bio .txt { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .feature { grid-template-columns: 1fr; }
  .span2 { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  :root { --header-h: 66px; }
  .brand .b-name { font-size: 24px; }
  .brand .b-role { font-size: 10px; }
  .mosaic { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: 260px 160px; }
  .mosaic a:first-child { grid-column: 1 / -1; grid-row: auto; }
  .mosaic .cap b { font-size: 18px; }
  .explore { grid-template-columns: 1fr; }
  .tile { min-height: 220px; }
  .films, .films.two, .cards, .cards.two { grid-template-columns: 1fr; }
  .films .film-card img { aspect-ratio: 16 / 10; }
  .shelf { column-gap: 16px; }
  .book h3 { font-size: 19px; }
  .biblio li, .recog li { grid-template-columns: 1fr; row-gap: 4px; }
  .facts { grid-template-columns: 1fr; }
  .facts div + div { border-left: 0; border-top: 1px solid var(--line); }
  .stills a, .stills .w7, .stills .w5 { grid-column: span 12; }
  .pager { grid-template-columns: 1fr; }
  .pager a:last-child { text-align: left; }
  .hero-cap { text-align: left; }
  .bio .pic { grid-column: 1 / -1; }
  .site-footer .f-col, .site-footer .f-col.wide { grid-column: span 6; }
  .credits, .credits tbody, .credits tr, .credits td { display: block; width: auto !important; }
  .credits tr { padding: 14px 0; border-top: 1px solid var(--line); }
  .credits td { border: 0 !important; padding: 1px 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
@media print { .site-header, .site-footer, .subnav { display: none; } }

/* Feature card: image beside text (overrides .card.img) */
.card.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: stretch; }
.card.feature figure { background: var(--bg-2); display: flex; align-items: center; justify-content: center; padding: clamp(24px, 4vw, 48px); }
.card.feature figure img { width: auto; max-width: 100%; max-height: 340px; aspect-ratio: auto; object-fit: contain; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.card.feature .in { align-self: center; }
@media (max-width: 900px) { .card.feature { grid-template-columns: 1fr; } }
