/* ============================================================
   Sophie Yingying Zheng — art portfolio
   Design inspired by joykinna.com: calm, gallery-first, generous white
   ============================================================ */

:root {
  --bg: #faf9f6;
  --paper: #ffffff;
  --ink: #1b1a17;
  --muted: #6f6a61;
  --faint: #9a948a;
  --line: #e6e2d9;
  --accent: #1d4d6b;        /* deep ocean blue */
  --accent-deep: #123247;
  --accent-soft: #edf2f5;
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --nav-h: 74px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #d8e6ef; }

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 22px; } }

/* ------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.brand em { font-style: italic; font-weight: 400; color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a {
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); border-bottom-color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 18px; }
/* language switcher: English | 中文 */
.lang-switch { display: inline-flex; align-items: center; gap: 8px; }
.lang-switch a {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .18s ease, border-color .18s ease;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active { color: var(--ink); border-bottom-color: var(--accent); }
/* the Chinese label is set in its own script, so no letter-spacing/uppercase */
.lang-switch a[hreflang="zh"] { letter-spacing: 0.04em; text-transform: none; font-size: 0.82rem; }
.insta-link {
  display: inline-flex; align-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line);
  justify-content: center;
  color: var(--muted);
  transition: border-color .18s ease, color .18s ease;
}
.insta-link:hover { color: var(--accent); border-color: var(--accent); }
.insta-link svg { width: 15px; height: 15px; }

@media (max-width: 860px) {
  /* keep the page gutter from .wrap: only add vertical padding here,
     otherwise the header text would sit flush against the screen edge */
  .nav-inner { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .main-nav { order: 3; width: 100%; justify-content: flex-start; gap: 20px; overflow-x: auto; }
}

/* ------------------------------------------------ hero (home) */
.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 4.5vw;
  align-items: center;
  padding: 7vh 0 9vh;
  min-height: calc(100vh - var(--nav-h));
}
.hero-text .role {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}
.hero-text h1 {
  font-size: clamp(2.7rem, 5.6vw, 4.6rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}
.hero-text h1 em { font-style: italic; font-weight: 400; }
.hero-text .lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  color: var(--accent-deep);
  margin: 0 0 20px;
  line-height: 1.35;
}
.hero-text .intro { color: var(--muted); max-width: 46ch; margin: 0 0 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-block;
  padding: 14px 30px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn.solid { background: var(--ink); color: var(--bg); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-figure { margin: 0; }
.hero-figure .frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 30px 60px -30px rgba(18, 50, 71, 0.35);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 5vh; min-height: 0; }
  .hero-figure { order: -1; }
  .hero-figure .frame { aspect-ratio: 4 / 5; max-height: 62vh; }
}

/* ------------------------------------------------ sections */
.section { padding: 72px 0; }
/* every section shares the page background (no .alt panel) */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 34px;
}
.section-head h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 500; }
.section-head .more {
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent;
}
.section-head .more:hover { border-bottom-color: var(--accent); }
.eyebrow {
  font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
}

/* home works strip */
.works-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 820px) { .works-strip { grid-template-columns: 1fr; } }
.work-card { text-decoration: none; display: block; }
.work-card .ph { position: relative; overflow: hidden; background: #eeece6; aspect-ratio: 4 / 5; }
.work-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease, opacity .5s ease;
}
.work-card:hover img { transform: scale(1.035); }
.work-card .cap { margin-top: 12px; font-size: 0.9rem; }
.work-card .cap .t { font-family: var(--serif); font-size: 1.12rem; }
.work-card .cap .m { color: var(--faint); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }

/* upcoming exhibition callout */
.exh-callout {
  background: var(--accent-soft);
  border: 1px solid #dbe7ee;
  padding: 34px 38px;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 14px 30px;
}
.exh-callout .pill {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  background: var(--accent); color: #fff; padding: 4px 12px; border-radius: 999px; margin-right: 14px;
  vertical-align: 2px;
}
.exh-callout .t { font-family: var(--serif); font-size: 1.45rem; }
.exh-callout .v { color: var(--muted); margin-top: 4px; }
.exh-callout .more { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); text-decoration: none; }

/* ------------------------------------------------ gallery page */
.page-head { padding: 56px 0 34px; }
.page-head h1 { font-size: clamp(2.05rem, 3.9vw, 3.05rem); font-weight: 500; margin-bottom: 10px; }
.page-head .sub { color: var(--muted); max-width: 62ch; margin: 0; }
.page-head .count { margin-top: 10px; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

.masonry { columns: 3 300px; column-gap: 26px; padding-bottom: 20px; }
.work { break-inside: avoid; margin: 0 0 26px; }
.work .ph { position: relative; overflow: hidden; background: #eeece6; cursor: zoom-in; }
.work .ph img {
  width: 100%; height: auto;
  transition: transform .5s ease, opacity .35s ease;
  opacity: 0;
}
.work .ph img.loaded { opacity: 1; }
.work:hover .ph img { transform: scale(1.03); }
.work .cap { padding: 12px 2px 0; }
.work .cap .t { font-family: var(--serif); font-size: 1.18rem; }
.work .cap .m { color: var(--faint); font-size: 0.78rem; letter-spacing: 0.08em; margin-top: 2px; }
.work .cap .m:empty { display: none; }
.gallery-hint { color: var(--faint); font-size: 0.86rem; margin: 8px 0 26px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(13, 13, 13, 0.94);
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column;
}
.lightbox.open { display: flex; }
.lb-stage { display: flex; align-items: center; justify-content: center; gap: 18px; max-width: 96vw; }
.lb-img { max-width: min(88vw, 1500px); max-height: 80vh; object-fit: contain; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.lb-btn {
  background: none; border: none; color: #cfcbc4; cursor: pointer;
  font-family: var(--sans); font-size: 1.9rem; padding: 14px;
  transition: color .15s ease; line-height: 1;
}
.lb-btn:hover { color: #fff; }
.lb-nav { position: absolute; }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }
@media (max-width: 700px) {
  .lb-nav.prev { left: 2px; } .lb-nav.next { right: 2px; }
  .lb-btn { padding: 10px; }
}
.lb-cap { color: #e9e6e0; text-align: center; margin-top: 20px; padding: 0 20px; }
.lb-cap .t { font-family: var(--serif); font-size: 1.35rem; }
.lb-cap .m { color: #9b968d; font-size: 0.8rem; letter-spacing: 0.08em; margin-top: 3px; min-height: 1em; }
.lb-counter { color: #8d887f; font-size: 0.78rem; letter-spacing: 0.12em; margin-top: 8px; }
.lb-close { position: absolute; top: 16px; right: 20px; font-size: 2rem; }

/* ------------------------------------------------ running text */
/* running prose is aligned on both edges at every width, including phones.
   Hyphenation is what keeps a narrow column from opening rivers of white
   space: iOS, Android and Firefox have a dictionary; Chrome on Windows does
   not (and only matters for local previews, not for visitors). */
.about-bio .prose p,
.work-desc p,
.page-head .sub {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ------------------------------------------------ about page */
.prose { max-width: 70ch; }
.prose p { margin: 0 0 1.25em; color: #3c3a35; }
/* biography, with the portrait profile picture directly under the page title */
.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 4vw 5vw;
  align-items: start;
}
.about-photo { margin: 0; }
.about-photo img {
  width: 100%; height: auto;
  background: var(--bg);
}
@media (max-width: 900px) {
  .about-intro { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .about-photo { max-width: 420px; }
}
/* "Artist Biography" label: body sans in the muted body-copy colour (as on Contact),
   set one step larger than the biography text below it */
.about-intro .eyebrow { font-family: var(--sans); font-size: 1.15rem; color: var(--muted); }
.about-bio { max-width: 74ch; }
/* the opening quotation: exactly the body-copy font, size and colour, italic only */
.about-bio .prose p:first-child {
  font-family: inherit;
  font-size: inherit;
  font-style: italic;
  color: #3c3a35;
  margin-bottom: 1.5em;
}

.exh-list { list-style: none; margin: 0; padding: 0; }
.exh-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 22px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.exh-item:first-child { border-top: 1px solid var(--line); }
.exh-item .date { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
/* exhibition title and venue share the body font, size and weight;
   only the colour differs (venue stays muted) */
.exh-item .t { font-family: var(--sans); font-size: 1.1rem; font-weight: 300; }
.exh-item .v { font-family: var(--sans); font-size: 1.1rem; font-weight: 300; color: var(--muted); margin-top: 2px; }
.exh-item .pill {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--accent); color: #fff; padding: 3px 10px; border-radius: 999px; margin-left: 10px;
  vertical-align: 3px;
}
@media (max-width: 640px) { .exh-item { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* ------------------------------------------------ contact page */
.contact-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 7vw; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-links { display: flex; flex-direction: column; gap: 22px; margin-top: 10px; }
.contact-links .lab { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
/* contact details follow the site's link voice: body sans, accent colour, underline on hover */
.contact-links a.big {
  font-family: var(--sans); font-size: 1.05rem; font-weight: 500; color: var(--accent);
  text-decoration: none; border-bottom: 1px solid transparent; word-break: break-all;
  transition: border-color .18s ease;
}
.contact-links a.big:hover { border-bottom-color: var(--accent); }
.contact-links .insta-row { display: flex; align-items: center; gap: 12px; }
.form-panel { background: var(--paper); border: 1px solid var(--line); padding: 34px 36px; }
.form-panel h2 { font-size: 1.6rem; margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); background: var(--bg);
  font: inherit; color: var(--ink);
  transition: border-color .18s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { color: var(--faint); font-size: 0.82rem; margin-top: 16px; }

/* ------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); padding: 46px 0 54px; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 26px 60px; align-items: center; justify-content: space-between; }
.footer-brand { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-meta { width: 100%; display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; color: var(--faint); font-size: 0.82rem; }
.footer-meta .socials { display: flex; gap: 12px; align-items: center; }
.footer-meta .socials a { color: var(--muted); }
.footer-meta .socials a:hover { color: var(--accent); }
.footer-meta .socials svg { width: 16px; height: 16px; display: block; }

/* ------------------------------------------------ 404 */
.notfound { text-align: center; padding: 14vh 0; }
.notfound h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: 14px; }
.notfound p { color: var(--muted); margin-bottom: 34px; }

/* ------------------------------------------------ motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   Homepage (Design 1 — Editorial Split, full sections)
   ============================================================ */
.cap {
  font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
.cap.muted { color: var(--faint); }
.d1-head { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; background: rgba(250,249,246,.94); backdrop-filter: blur(8px); }
.d1-nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 18px; }
.d1-brand { font-family: var(--serif); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; font-size: 1.25rem; color: var(--ink); }
.d1-nav nav { display: flex; gap: 26px; }
.d1-nav nav a { text-decoration: none; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent; }
.d1-nav nav a:hover { color: var(--ink); }
.d1-ico { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.d1-ico:hover { color: var(--accent); border-color: var(--accent); }
.d1-ico svg { width: 15px; height: 15px; }
.d1-hero { display: grid; grid-template-columns: 1.02fr .98fr; gap: 4.5vw; align-items: center; padding: 60px 0 90px; min-height: calc(100vh - 74px); }
.d1-hero .cap { margin-bottom: 20px; }
.d1-hero h1 { font-size: clamp(2.7rem, 5.6vw, 4.6rem); font-weight: 500; letter-spacing: .02em; margin-bottom: 18px; }
.d1-lead { font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 2.2vw, 1.75rem); color: var(--accent-deep); margin: 0 0 18px; line-height: 1.35; }
.d1-sub { color: var(--muted); max-width: 46ch; margin: 0 0 34px; }
.d1-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.d1-fig { margin: 0; }
.d1-fig .f { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper); box-shadow: 0 30px 60px -30px rgba(18, 50, 71, .35); }
.d1-fig img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .d1-hero { grid-template-columns: 1fr; gap: 30px; min-height: 0; padding-top: 36px; }
  .d1-fig { order: -1; max-width: 460px; }
  .d1-nav { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .d1-nav nav { order: 3; width: 100%; gap: 20px; overflow-x: auto; }
}
.mini-foot { border-top: 1px solid var(--line); padding: 34px 0 40px; }
.mini-foot .in { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; align-items: center; }
.mini-foot .name { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.mini-foot .meta { color: var(--faint); font-size: .8rem; display: flex; gap: 18px; align-items: center; }
.mini-foot svg { width: 15px; height: 15px; display: block; }

/* ---------- Design 1 sections (restored) ---------- */
.d1-sec { padding: 72px 0; }
.d1-sec.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.d1-sechead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 32px; }
.d1-sechead h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.d1-sechead a { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.d1-sechead a:hover { border-bottom-color: var(--accent); }
.d1-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 820px) { .d1-grid { grid-template-columns: 1fr; } }
.pv-w { margin: 0; }
.pv-w .ph { position: relative; overflow: hidden; background: #eeece6; aspect-ratio: 4 / 5; }
.pv-w img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pv-w:hover img { transform: scale(1.03); }
.pv-w figcaption { padding-top: 10px; font-family: var(--serif); font-size: 1.08rem; }
.pv-w figcaption small { display: block; font-family: var(--sans); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.d1-quote { max-width: 800px; margin: 0 auto; text-align: center; }
.d1-quote blockquote { margin: 0 0 26px; font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.55; color: var(--accent-deep); }
.d1-quote a { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.d1-quote a:hover { border-bottom-color: var(--accent); }
.d1-exhbox { background: var(--accent-soft); border: 1px solid #dbe7ee; padding: 30px 36px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 30px; }
.d1-exhbox .pill { background: var(--accent); color: #fff; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; padding: 3px 12px; border-radius: 999px; margin-right: 12px; vertical-align: 2px; }
.d1-exhbox .t { font-family: var(--serif); font-size: 1.4rem; }
.d1-exhbox .v { color: var(--muted); margin-top: 4px; }
.d1-exhbox > a { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.d1-exhbox > a:hover { border-bottom-color: var(--accent); }

/* home page: slideshow box with arrows on each side, 850px tall, text below */
.about-intro.photo-small { grid-template-columns: minmax(0, 1fr); gap: 36px; }
.about-intro.photo-small .slideshow { margin: 0 auto; }
.about-intro.photo-small .about-bio { max-width: 680px; margin: 0 auto; text-align: center; }
.about-intro.photo-small .about-bio .hero-cta { justify-content: center; }
.slideshow { width: 100%; max-width: 996px; }
/* the picture keeps its exact 3:4 shape and sizes itself from the height,
   which is capped against the window so it never dominates a laptop screen */
.slide-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.slide-frame { position: relative; flex: 0 0 auto; height: min(1000px, 85vh); aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg); }
.slide-frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.slide-frame img.on { opacity: 1; }
.slide-arrow {
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); font-size: .95rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.slide-arrow:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.slide-count {
  position: absolute; bottom: 12px; right: 12px; z-index: 3;
  background: rgba(250, 249, 246, .9); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px;
  font-size: .72rem; letter-spacing: .12em; color: var(--muted);
}
.slide-dots { position: absolute; bottom: 16px; left: 12px; z-index: 3; display: flex; gap: 6px; }
.slide-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; background: rgba(27, 26, 23, .25); cursor: pointer; }
.slide-dots button.on { background: var(--accent); }
@media (max-width: 1150px) { .slide-frame { height: 720px; } }
@media (max-width: 900px) {
  /* minmax(0,1fr) stops the picture from blowing the grid column out to the
     screen edge (grid items otherwise keep their min-content width) */
  .about-intro.photo-small { grid-template-columns: minmax(0, 1fr); }
  .about-intro.photo-small .slideshow { margin: 0 auto; }
  .slideshow { max-width: 100%; min-width: 0; }
  /* on phones the picture takes the full width and the arrows sit on top of it,
     so the box stays as large as the screen allows */
  .slide-row { display: block; position: relative; }
  .slide-frame { width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 4; }
  .slide-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
    background: rgba(255, 255, 255, .92); border-color: rgba(27, 26, 23, .18);
  }
  .slide-arrow.prev { left: 10px; }
  .slide-arrow.next { right: 10px; }
}

/* ------------------------------------------------ portfolio: series -> works -> photos */
.pf-series { padding: 46px 0 34px; border-top: 1px solid var(--line); }
.pf-series:first-child { border-top: 0; padding-top: 6px; }
.pf-series .section-head { margin-bottom: 24px; }
.pf-count { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }
.pf-card { text-decoration: none; display: block; }
.pf-card .cap { margin-top: 12px; }
.pf-card .cap .t { font-family: var(--serif); font-size: 1.16rem; }
.pf-card .cap .m { color: var(--faint); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }

/* work page */
.crumbs { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { margin: 0 8px; color: var(--line); }
.crumbs .here { color: var(--ink); }
.pf-photos { columns: 3 300px; column-gap: 26px; padding: 10px 0 40px; }
.pf-photo { break-inside: avoid; margin: 0 0 26px; }
.pf-photo .ph { position: relative; overflow: hidden; background: #eeece6; cursor: zoom-in; }
.pf-photo img { width: 100%; height: auto; display: block; opacity: 0; transition: opacity .35s ease, transform .5s ease; }
.pf-photo img.loaded { opacity: 1; }
.pf-photo:hover img { transform: scale(1.02); }
.pf-missing { color: var(--muted); }
@media (max-width: 700px) { .pf-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; } }

/* work page: single-work slideshow — fixed 680 x 850 box (4:5), whole painting visible */
.work-slideshow { max-width: 1180px; margin: 6px auto 30px; }
.work-slideshow .slide-frame {
  flex: 0 0 auto;
  width: 680px; height: 850px; aspect-ratio: 4 / 5;
  background: var(--bg); cursor: zoom-in;
}
.work-slideshow .slide-frame img { object-fit: contain; }
.work-slideshow .slide-arrow { width: 44px; height: 44px; font-size: 1.05rem; }
@media (max-width: 1000px) {
  .work-slideshow { min-width: 0; max-width: 100%; }
  .work-slideshow .slide-frame { flex: 1 1 0; min-width: 0; width: auto; height: auto; max-width: 680px; aspect-ratio: 4 / 5; }
}
@media (max-width: 900px) {
  .work-slideshow .slide-arrow { width: 38px; height: 38px; }
}

/* portfolio cards: square picture box + inline slideshow per work */
.pf-card { display: block; }
.pf-card .ph { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg); }
.pf-card .ph img { width: 100%; height: 100%; object-fit: contain; }
.pf-card .card-open { position: absolute; inset: 0; z-index: 1; }
.pf-card .cap .t a { text-decoration: none; color: inherit; }
.pf-card .cap .t a:hover { color: var(--accent); }

/* work page: info on the left, picture slider on the right */
.work-layout { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 44px; align-items: start; padding: 26px 0 40px; }
.work-info h1 { font-size: clamp(1.5rem, 2.3vw, 1.95rem); margin: 0 0 10px; line-height: 1.25; }
.work-meta { margin: 0; }
/* size / medium / year: same typeface and size as the description below them —
   no font-size of its own, so it inherits the body size exactly */
.work-meta .line { font-family: var(--sans); color: var(--ink); line-height: 1.75; }
.work-desc { color: #3c3a35; max-width: 48ch; margin-top: 2.3em; }
.work-desc p { margin: 0 0 1.05em; }
.work-hint { margin: 18px 0 0; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.work-layout .work-slideshow { margin: 0; max-width: none; }
@media (max-width: 1000px) {
  .work-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .work-desc { max-width: none; }
}

/* portfolio card caption: title, then size / type / year on separate lines */
/* work titles use the body sans-serif (regular weight), slightly smaller than the serif version */
.pf-card .cap .t { display: block; margin-bottom: 6px; font-family: var(--sans); font-size: 1rem; font-weight: 400; letter-spacing: .01em; }
.pf-card .cap .m { color: var(--muted); font-size: .84rem; letter-spacing: .01em; text-transform: none; margin-top: 1px; }

/* home page: the opening quotation, one size larger than body copy */
.about-intro.photo-small .about-bio .prose p:first-child { font-size: 1.2rem; }

/* portfolio page: link to the downloadable portfolio PDF */
.pdf-line { margin: 16px 0 0; }
.pdf-link {
  display: inline-block;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--line); padding-bottom: 3px;
  transition: border-color .18s ease, color .18s ease;
}
.pdf-link:hover { border-bottom-color: var(--accent); }

/* ---------------------------------------------------------------------------
   Chinese typography
   CJK glyphs fill the em box, so a heading set at the Latin size reads
   noticeably larger and heavier than the Latin heading it replaces. In Chinese
   (body:lang(zh), which also matches zh-Hans) the page titles and the section
   headings are therefore set one step smaller — about 80%:
     page titles     作品集 / 关于 / 联系
     section headings 中性浮力系列 / 云系列 / 其他 / 展览
   English is untouched.
   --------------------------------------------------------------------------- */
body:lang(zh) .page-head h1 {
  font-size: clamp(1.95rem, 3.5vw, 2.85rem);
}
body:lang(zh) .section-head h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
}

