/* A sunlit studio: physical prints, timber, mat board and a moving film ribbon. */
.photography-page {
  --paper: #eee5d3;
  --wash: #e0d4ba;
  --ink: #37382e;
  --muted: #706d5c;
  --line: #c4b89e;
  --photo-rule: #6c604233;
}
.photography-page .atmosphere {
  opacity: 1;
  background: radial-gradient(ellipse at 15% 5%, #fff7df 0%, transparent 54%),
    radial-gradient(ellipse at 90% 65%, #d9dfd5 0%, transparent 55%),
    linear-gradient(145deg, #e8e1d0, #f1e5ce 48%, #e4dfd1);
}
.photography-page .grain { opacity: .075; }
.photo-ambience { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; isolation: isolate; }
.photo-color-mist { position: absolute; border-radius: 50%; filter: blur(55px); }
.photo-color-mist--warm { width: 78vw; height: 80vh; top: -24vh; left: -20vw; opacity: .85; background: radial-gradient(ellipse, #fff8de 2%, #f5d4a393 45%, transparent 72%); }
.photo-color-mist--cool { width: 73vw; height: 100vh; right: -24vw; top: 12vh; background: radial-gradient(ellipse, #b4c9c585, #c9c1ca52 48%, transparent 72%); }
.photo-window-light { position: absolute; width: 130vw; height: 150vh; top: -35vh; left: -30vw; transform: rotate(-25deg); background: linear-gradient(90deg, transparent 13%, #fff9e2b3 25%, #fffdf1bb 32%, transparent 42%, transparent 46%, #fff8dc99 52%, transparent 68%); filter: blur(22px); mix-blend-mode: soft-light; }
.photo-window-shadow { position: absolute; width: 140vw; height: 150vh; left: -30vw; top: -30vh; transform: rotate(-28deg); background: linear-gradient(90deg, transparent 20%, #79674918 21%, #79674918 23%, transparent 24%, transparent 47%, #68705c17 48%, #68705c17 50%, transparent 51%), linear-gradient(0deg, transparent 47%, #62705d12 48%, #62705d12 51%, transparent 52%); filter: blur(10px); }
.photo-leaf-shadow { position: absolute; top: -20vh; right: -10vw; width: min(110vw, 1500px); height: 140vh; background: var(--yilun-image-de550f3113b6, url(assets/photography/ginkgo-shadow.svg)) right top / contain no-repeat; opacity: .22; filter: blur(8px); transform-origin: 100% 0; mix-blend-mode: multiply; }
.photo-light-water { position: absolute; inset: -10%; background: radial-gradient(ellipse at 35% 65%, transparent 28%, #fffce22e 30%, transparent 34%), radial-gradient(ellipse at 70% 60%, transparent 33%, #fffbe940 35%, transparent 37%), radial-gradient(ellipse at var(--px,45%) var(--py,30%), #fff9e383, transparent 43%); filter: blur(12px); }
.photo-air-dust { position: absolute; inset: 0; opacity: .6; }
.photo-air-dust i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff9de; box-shadow: 0 0 8px 3px #fff8e655; left: 17%; top: 35%; }
.photo-air-dust i:nth-child(2) { left: 34%; top: 72%; width: 2px; height: 2px; }
.photo-air-dust i:nth-child(3) { left: 58%; top: 22%; }
.photo-air-dust i:nth-child(4) { left: 73%; top: 48%; width: 2px; height: 2px; }
.photo-air-dust i:nth-child(5) { left: 85%; top: 78%; }
.photo-air-dust i:nth-child(6) { left: 11%; top: 84%; width: 2px; height: 2px; }
.photo-air-dust i:nth-child(7) { left: 47%; top: 51%; }
.photo-air-dust i:nth-child(8) { left: 89%; top: 19%; width: 2px; height: 2px; }

.photo-journal { width: min(100% - 96px, 1360px); }
.photo-edition { border-top: 0; padding-top: 22px; }
.photo-masthead { margin-bottom: 50px; border-bottom: 1px solid var(--photo-rule); }
.photo-masthead h1 { font-weight: 500; font-size: clamp(72px, 11.8vw, 174px); padding-block: .27em .24em; }
html[lang="zh-CN"] .photo-masthead h1 { font-size: clamp(88px, 11.5vw, 170px); font-weight: 700; letter-spacing: .23em; padding-left: .23em; }
.photo-deck { border-top: 0; padding-bottom: 22px; }
.photo-cover { gap: 64px; align-items: start; padding-inline: 14px; padding-bottom: 18px; }
.photo-side { border: 0; padding: 30px 0 0; }
.photo-card--lead { rotate: -1.1deg; }
.photo-card--side { rotate: 3deg; }
.photo-cover .photo-card { transition: rotate 1s var(--photo-ease), translate 1s var(--photo-ease); }
.photo-image-link { --mat: 0px; display: block; padding: 0; }
.photo-aperture { position: absolute; display: block; inset: var(--mat); overflow: hidden; background: #21231e; }
.photo-aperture img { width: 100%; height: 100%; }
.photo-glass { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, #fff9e728, transparent 34%, transparent 52%, #fffceb14 54%, transparent 80%); transition: opacity .8s; }

/* A narrow walnut moulding, recessed ivory mount, and bevel at the aperture. */
.photo-card--lead .photo-image-link {
  --mat: clamp(22px, 2.7vw, 40px);
  aspect-ratio: 1.46;
  overflow: visible;
  border: 10px solid #67543c;
  border-image: linear-gradient(135deg, #c8b090 0%, #775d41 8%, #473b2a 24%, #967c58 52%, #4d3c29 75%, #b49c76 100%) 1;
  background: repeating-linear-gradient(3deg, #ffffff03 0 1px, #9b865109 1px 2px, transparent 2px 4px), linear-gradient(140deg, #f8f3e7, #e7dfc9);
  box-shadow: inset 0 0 0 1px #e2d7be, inset 3px 4px 5px #392b2529,
    1px 2px 1px #40352680, 5px 7px 9px #534a3330, 14px 24px 30px #4a412a25, 28px 45px 65px #55482d16;
}
.photo-card--lead .photo-image-link::before { content: ""; position: absolute; inset: -7px; border: 1px solid #e6cda240; box-shadow: inset 1px 1px 1px #f4dcac66, 0 0 0 2px #34291e38; pointer-events: none; }
.photo-card--lead .photo-image-link::after { inset: calc(var(--mat) - 2px); border: 2px solid; border-color: #b5ab92 #f9f3e5 #fff8e6 #bfb399; box-shadow: 0 0 0 1px #e5dcc5; z-index: 1; }
.photo-card--lead .photo-aperture { box-shadow: inset 0 0 5px #0007; }
.photo-card--lead figcaption { padding: 24px 8px 0; }
.photo-card--lead .photo-open { bottom: calc(var(--mat) + 12px); right: calc(var(--mat) + 12px); }

/* A loose instant print beside the mounted photograph. */
.photo-card--side .photo-image-link {
  --mat: 15px;
  aspect-ratio: .96;
  overflow: visible;
  border: 1px solid #d6ccb7;
  background: linear-gradient(125deg, #fdf9ec, #ece3cf);
  box-shadow: 1px 1px 1px #fff8e4, 3px 5px 4px #5c523226, 10px 18px 26px #51462c2b, 20px 30px 42px #51462c12;
}
.photo-card--side .photo-aperture { bottom: 64px; border: 1px solid #bfb5a1; box-shadow: 0 1px 1px #fffff099, inset 0 0 5px #0007; }
.photo-card--side .photo-image-link::before { content: ""; position: absolute; left: 28%; top: -15px; width: 44%; height: 34px; z-index: 3; rotate: -7deg; background: repeating-linear-gradient(90deg, transparent 0 2px, #ece3bc22 2px 3px), #cabc8c77; backdrop-filter: blur(2px); box-shadow: 0 1px 2px #5444241c; clip-path: polygon(1% 0, 98% 2%, 97% 16%, 100% 29%, 97% 46%, 100% 65%, 97% 81%, 99% 100%, 0 98%, 2% 80%, 0 59%, 2% 42%, 0 20%); }
.photo-card--side .photo-image-link::after { content: "Y / L"; display: grid; place-items: center; inset: auto 0 14px; height: 32px; box-shadow: none; font: italic 22px/1 Newsreader, serif; color: #7c745f; letter-spacing: .08em; }
.photo-card--side .photo-open { bottom: 80px; right: 28px; }
.photo-card--side figcaption { padding: 23px 10px 0; }
.photo-card--side h2 { font-size: clamp(23px, 2.5vw, 34px); }
.photo-editorial { border: 0; margin-top: 35px; padding-top: 0; gap: 20px; }
.photo-seal { width: 73px; height: 73px; opacity: .75; }
.photo-seal > span { font-size: 23px; }
.photo-seal > small { font-size: 6px; }
.photo-editorial > p { font-size: 23px; }
html[lang="zh-CN"] .photo-editorial > p { font-size: 18px; }
.photo-cover .photo-card h2 { font-weight: 500; }
.photo-open { opacity: .7; }

/* A continuous 35 mm ribbon. The perforations move with the dragged frames. */
.photo-archive { margin-top: 82px; border-top: 1px solid var(--photo-rule); padding-top: 42px; }
.photo-archive-toolbar { border-top: 0; margin-bottom: 32px; }
.photo-strip {
  --film-offset: 0px;
  gap: 26px;
  padding: 49px 28px 46px;
  background-color: #272821;
  background-image: var(--yilun-image-78830c892e0c, url(assets/photography/film-perforation.svg)), var(--yilun-image-78830c892e0c, url(assets/photography/film-perforation.svg)),
    radial-gradient(ellipse at 0% 15%, #cd5b2542, transparent 32%),
    linear-gradient(110deg, #332b23, #242720 40%, #2b2924 82%, #573c282b);
  background-position: var(--film-offset) 10px, var(--film-offset) calc(100% - 10px), 0 0, 0 0;
  background-size: 38px 20px, 38px 20px, 100% 100%, 100% 100%;
  background-repeat: repeat-x, repeat-x, no-repeat, no-repeat;
  border-block: 1px solid #70634a;
  border-radius: 3px;
  rotate: -.7deg;
  box-shadow: 1px 3px 3px #3c322739, 3px 13px 20px #41392326, 14px 28px 48px #41392318;
  scrollbar-color: #8d7d58 #272821;
  scroll-padding-inline: 28px;
}
.photo-card--strip { flex-basis: 32%; color: #e8ddc2; position: relative; }
.photo-card--strip .photo-image-link { border: 1px solid #877859; border-radius: 2px; background: #161912; aspect-ratio: 1.42; box-shadow: 0 0 0 3px #171b13, 0 0 0 4px #49433580; }
.photo-card--strip:nth-child(even) .photo-image-link { aspect-ratio: 1.42; }
.photo-card--strip .photo-image-link::after { inset: 0; box-shadow: inset 0 0 12px 2px #0004; border: 1px solid #060c064d; }
.photo-card--strip .photo-glass { background: linear-gradient(110deg, #efb26712, transparent 40%, #c2d5b307); }
.film-edge { display: flex; justify-content: space-between; padding-top: 10px; font: 9px/1 ui-monospace, monospace; letter-spacing: .15em; color: #c4a66b; }
.photo-card--strip figcaption { padding-top: 17px; }
.photo-card--strip .photo-caption-line { display: none; }
.photo-card--strip h3 { font-size: clamp(20px, 2vw, 28px); font-weight: 400; margin: 0; color: #e4d9bd; }
.photo-card--strip .photo-open { width: 29px; height: 29px; bottom: 13px; right: 13px; }
.photo-strip-footer { margin-top: 30px; border: 0; }
.photo-filters button[aria-pressed=true] { background: #505642; border-color: #505642; color: #f6efdc; }
.photo-colophon { padding-top: 80px; }

/* The full-size view also reads as a photographic print, without cropping. */
.photo-viewer { background: radial-gradient(ellipse at 16% 15%, #57534035, transparent 52%), #20211ef7; }
.photo-viewer-image { outline: 10px solid #ece5d5; outline-offset: 1px; border: 1px solid #b7ac94; box-shadow: 0 1px 0 12px #716751, 8px 15px 45px 18px #0005; }
.photo-viewer-stage { padding: 16px; }
.photo-flight { outline: 1px solid #a99570; }
.photo-viewer .photo-viewer-top, .photo-viewer .photo-viewer-bottom { position: relative; z-index: 6; }

:root[data-theme=dark] .photography-page { --paper: #252a26; --wash: #34382d; --ink: #eee5d2; --muted: #b8b39f; --line: #5d6150; --photo-rule: #b1b19b30; }
:root[data-theme=dark] .photography-page .atmosphere { background: radial-gradient(ellipse at 14% 5%, #5b5633, transparent 55%), radial-gradient(ellipse at 90% 60%, #304750, transparent 60%), #222a27; }
:root[data-theme=dark] .photo-color-mist--warm { opacity: .16; }
:root[data-theme=dark] .photo-color-mist--cool { opacity: .25; }
:root[data-theme=dark] .photo-window-light { opacity: .17; }
:root[data-theme=dark] .photo-light-water { opacity: .2; }
:root[data-theme=dark] .photo-leaf-shadow { opacity: .6; filter: blur(10px); }
:root[data-theme=dark] .photo-window-shadow { opacity: .6; mix-blend-mode: multiply; }
:root[data-theme=dark] .photo-card--lead .photo-image-link { background: linear-gradient(135deg, #cfc5ae, #b8ae98); }
:root[data-theme=dark] .photo-card--side .photo-image-link { background: linear-gradient(135deg, #d1c5ae, #bfb49b); }
:root[data-theme=dark] .photo-card--side .photo-image-link::after { color: #615846; }
:root[data-theme=dark] .photo-air-dust { opacity: .35; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .photo-cover .photo-card:hover { rotate: 0deg; translate: 0 -5px; }
  .photo-image-link:hover .photo-glass { opacity: .35; }
  .photo-image-link:hover .photo-open { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .photo-color-mist--warm { animation: studio-warm 24s ease-in-out infinite alternate; }
  .photo-color-mist--cool { animation: studio-cool 31s ease-in-out infinite alternate; }
  .photo-window-light { animation: studio-window 28s ease-in-out infinite alternate; }
  .photo-leaf-shadow { animation: studio-leaves 19s ease-in-out infinite alternate; }
  .photo-light-water { animation: studio-water 27s ease-in-out infinite alternate; }
  .photo-air-dust i { animation: studio-dust 19s ease-in-out infinite alternate; }
  .photo-air-dust i:nth-child(2n) { animation-duration: 27s; animation-delay: -10s; }
  .photo-air-dust i:nth-child(3n) { animation-duration: 23s; animation-delay: -15s; }
  /* Reveal only the aperture so the frame's long cast shadow remains intact. */
  .photo-ready .photo-cover [data-photo-reveal] { clip-path: none; }
  .photo-ready .photo-cover [data-photo-reveal].photo-waiting { opacity: 0; translate: 0 24px; }
  .photo-ready .photo-cover [data-photo-reveal].is-visible { opacity: 1; translate: 0 0; }
  .photo-ready .photo-cover .photo-aperture { transition: clip-path 1.6s var(--photo-ease); }
  .photo-ready .photo-cover .photo-waiting .photo-aperture { clip-path: inset(0 0 100% 0); }
  .photo-ready .photo-cover .is-visible .photo-aperture { clip-path: inset(0); }
}
.page-hidden .photo-ambience *, .photo-viewing .photo-ambience * { animation-play-state: paused; }
@keyframes studio-warm { from { transform: translate(-3%, -4%) scale(1); } to { transform: translate(16%, 12%) scale(1.17); } }
@keyframes studio-cool { from { transform: translate(0, 0) scale(1); } to { transform: translate(-14%, -12%) scale(1.16); } }
@keyframes studio-window { from { transform: translate(-3%, -3%) rotate(-25deg); } to { transform: translate(11%, 5%) rotate(-19deg); } }
@keyframes studio-leaves { 0% { transform: rotate(-6deg) translate(0, 0) scale(1.02); } 45% { transform: rotate(-1deg) translate(-12px, 16px) scale(1); } 100% { transform: rotate(4deg) translate(20px, 8px) scale(1.04); } }
@keyframes studio-water { from { transform: translate(0, 0) rotate(-8deg) scale(1); } to { transform: translate(5%, -5%) rotate(4deg) scale(1.2); } }
@keyframes studio-dust { 0% { transform: translate(0, 0); opacity: .1; } 45% { opacity: .7; } 100% { transform: translate(36px, -70px); opacity: .25; } }
@media (max-width: 1000px) {
  .photo-journal { width: calc(100% - 64px); }
  .photo-cover { gap: 40px; padding-inline: 8px; }
  .photo-card--lead .photo-image-link { --mat: 23px; border-width: 8px; }
  .photo-card--side .photo-image-link { --mat: 12px; }
  .photo-editorial { gap: 12px; }
  .photo-card--strip { flex-basis: 42%; }
  .photo-leaf-shadow { width: 135vw; right: -25vw; }
}
@media (max-width: 640px) {
  .photo-journal { width: calc(100% - 40px); }
  .photo-masthead { margin-bottom: 32px; }
  .photo-masthead h1 { font-size: 11.4vw; }
  html[lang="zh-CN"] .photo-masthead h1 { font-size: 17vw; letter-spacing: .14em; padding-left: .14em; }
  .photo-cover { padding-inline: 5px; gap: 38px; }
  .photo-card--lead .photo-image-link { --mat: 18px; border-width: 7px; }
  .photo-side { padding: 0 5px; gap: 27px; }
  .photo-card--side .photo-image-link { --mat: 10px; }
  .photo-card--side .photo-aperture { bottom: 45px; }
  .photo-card--side .photo-image-link::after { height: 22px; bottom: 10px; font-size: 17px; }
  .photo-card--side .photo-open { bottom: 55px; right: 17px; width: 24px; height: 24px; }
  .photo-card--side .photo-image-link::before { height: 24px; top: -11px; }
  .photo-card--side h2 { font-size: 20px; }
  .photo-editorial { margin-top: 0; }
  .photo-editorial > p, html[lang="zh-CN"] .photo-editorial > p { font-size: 15px; }
  .photo-archive { margin-top: 44px; }
  .photo-strip { padding-inline: 21px; gap: 24px; scroll-padding-inline: 21px; }
  .photo-card--strip { flex-basis: 82%; }
  .film-edge { font-size: 8px; }
  .photo-color-mist { filter: blur(25px); }
  .photo-leaf-shadow { width: 190vw; top: -5vh; right: -80vw; opacity: .15; }
}
@media (prefers-reduced-motion: reduce) {
  .photo-air-dust { display: none; }
  .photo-window-light { opacity: .7; }
}
