:root {
  --ink: #090909;
  --paper: #f8f8f6;
  --line: #d8d8d3;
  --soft: #ecece8;
  --space: clamp(20px, 3vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

a { color: inherit; }
.page-shell { overflow: hidden; }
.site-header {
  margin: 0;
  padding: 0;
  background: var(--ink);
  border-radius: 14px;
  overflow: hidden;
}

/* project-3: immersive Jianfa / Lake Moon presentation */
.project3-body { overflow-x: hidden; background: #0a0b0c; color: #f1eee7; }
.project3-body .site-header { position: relative; z-index: 20; }
.lxx-immersive { position: relative; min-height: 100vh; background: #0a0b0c; color: #f1eee7; }
.lxx-project-top { display: flex; justify-content: space-between; padding: 18px 4.5%; color: #8d908d; font: 10px Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.lxx-hero-screen { min-height: 90vh; position: relative; display: grid; place-items: center; overflow: hidden; padding: 60px 6% 90px; }
.lxx-hero-image { display: block; width: min(760px, 64vw); max-height: 72vh; object-fit: contain; opacity: .82; scale: 1.2; animation: lxx-image-reveal 1.2s ease both; }
.lxx-hero-orbit { position: absolute; width: min(560px, 52vw); aspect-ratio: 1; border: 1px solid rgb(191 155 92 / 70%); border-radius: 50%; transform: rotate(-12deg) scale(.82); opacity: .42; animation: lxx-moon-appear 1.3s .15s ease both; }
.lxx-hero-orbit::after { content: ""; position: absolute; inset: 13% 13% 13% 50%; border-left: 1px solid #bfa05e; border-radius: 50%; }
.lxx-hero-copy { position: absolute; z-index: 2; left: 9%; bottom: 13%; }
.lxx-kicker { margin: 0 0 18px; color: #bfa05e; font: 10px Arial, sans-serif; letter-spacing: .2em; }
.lxx-hero-copy h1 { margin: 0; font-size: clamp(42px, 7.8vw, 112px); line-height: .95; letter-spacing: -.05em; font-weight: 300; }
.lxx-hero-en { margin: 18px 0 0; color: #999c99; font-size: 12px; letter-spacing: .16em; }
.lxx-scroll-cue { position: absolute; right: 5%; bottom: 13%; color: #8d908d; font: 10px Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; writing-mode: vertical-rl; }
.lxx-scroll-cue span { display: block; margin-top: 12px; color: #bfa05e; font-size: 16px; }
.lxx-chapter-rail { position: fixed; z-index: 10; right: 22px; top: 50%; transform: translateY(-50%); display: grid; gap: 12px; width: 132px; }
.lxx-chapter-rail a { display: grid; gap: 3px; color: #757976; text-decoration: none; font-size: 9px; letter-spacing: .08em; transition: color .3s ease; }
.lxx-chapter-rail a small { font-size: 9px; color: #575b58; letter-spacing: .04em; }
.lxx-chapter-rail a.is-active, .lxx-chapter-rail a.is-active small { color: #bfa05e; }
.lxx-overview, .lxx-chapter, .lxx-end { width: 85%; margin-left: auto; margin-right: auto; }
.lxx-overview { margin-top: clamp(100px, 16vw, 230px); padding: 18px 0 clamp(120px, 18vw, 260px); border-top: 1px solid #303331; }
.lxx-section-label { display: flex; justify-content: space-between; color: #858985; font: 10px Arial, sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.lxx-overview-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 10vw; margin-top: 70px; align-items: start; }
.lxx-overview h2 { margin: 0; font-size: clamp(36px, 5.5vw, 78px); line-height: 1.02; letter-spacing: -.06em; font-weight: 300; }
.lxx-overview-grid p { max-width: 390px; margin: 0; color: #b9bbb5; font-size: 14px; line-height: 1.9; }
.lxx-keywords { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 42px; color: #bfa05e; font-size: 11px; letter-spacing: .16em; }
.lxx-keywords span::before { content: "/ "; color: #687d91; }
.lxx-chapter { margin-top: clamp(120px, 19vw, 280px); scroll-margin-top: 40px; }
.lxx-chapter-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 40px; border-top: 1px solid #303331; padding-top: 13px; }
.lxx-chapter-head h2 { margin: 0; color: #f1eee7; font: 400 11px Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.lxx-chapter-head h2 small { margin-left: 14px; color: #838782; font-size: 11px; letter-spacing: .08em; }
.lxx-chapter-head > span { color: #bfa05e; font: 10px Arial, sans-serif; letter-spacing: .1em; }
.lxx-media { margin: 0; background: #141719; overflow: hidden; }
.lxx-media img { display: block; width: 100%; height: auto; object-fit: contain; transition: transform .7s cubic-bezier(.2,.65,.2,1), opacity .7s ease; }
.lxx-media:hover img { transform: scale(1.018); }
.lxx-foundation-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 26px; align-items: start; }
.lxx-foundation-pair { display: grid; gap: 26px; }
.lxx-chapter#foundation .lxx-auto-gallery .lxx-generated:nth-child(3n) { margin-top: 0; }
.lxx-chapter#foundation .lxx-auto-gallery .lxx-generated { margin-top: 0; transform: none; }
.lxx-auto-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 46px; align-items: start; }
.lxx-auto-gallery .lxx-generated:nth-child(3n) { margin-top: 38px; }
.lxx-auto-gallery .lxx-wide { grid-column: span 2; }
.lxx-moon-stage { min-height: 260px; display: grid; place-items: center; position: relative; margin: 40px 0 84px; }
.lxx-moon-disc { width: clamp(150px, 22vw, 310px); aspect-ratio: 1; border-radius: 50%; background: #d8d3c4; box-shadow: 0 0 0 1px rgb(191 155 92 / 65%), 0 0 80px rgb(143 169 184 / 17%); transform: rotate(var(--moon-shift, 0deg)); transition: transform 1.2s ease; }
.lxx-moon-disc::after { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: #0a0b0c; transform: translateX(26%); }
.lxx-moon-stage p { position: absolute; margin: 0; color: #bfa05e; font-size: 11px; letter-spacing: .12em; line-height: 1.8; text-align: center; }
.lxx-moon-stage p small { color: #858985; font-size: 10px; letter-spacing: .08em; }
.lxx-moon-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lxx-chapter#moon .lxx-auto-gallery .lxx-generated { margin-top: 0; transform: none; }
.lxx-chapter#system .lxx-auto-gallery .lxx-generated,
.lxx-chapter#outdoor .lxx-auto-gallery .lxx-generated,
.lxx-chapter#campaign .lxx-auto-gallery .lxx-generated { margin-top: 0; transform: none; }
.lxx-system-stack { grid-column: 4; grid-row: 2; display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; gap: 0; }
.lxx-system-intro { display: flex; align-items: center; gap: 28px; margin: 0 0 44px; padding: 18px 22px; border-left: 3px solid #6485a0; box-shadow: 8px 0 #7b9aae, 16px 0 #953c39, 24px 0 #bfa05e; }
.lxx-system-intro p { margin: 0; color: #f1eee7; font-size: 16px; letter-spacing: .12em; }
.lxx-system-intro span { color: #858985; font-size: 11px; }
.lxx-outdoor-lead { display: grid; grid-template-columns: 1.55fr .45fr; gap: 9vw; align-items: center; }
.lxx-note-title { margin: 0 0 18px; color: #bfa05e; font: 10px Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.lxx-outdoor-lead > div > p:last-child, .lxx-campaign-lead > p { margin: 0; color: #b9bbb5; font-size: 13px; line-height: 1.8; }
.lxx-campaign-lead { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: end; width: 100%; margin: 0; }
.lxx-campaign-lead > .lxx-media:nth-child(2) { grid-column: 2 / span 2; }
.lxx-campaign-lead > p { grid-column: 2 / -1; max-width: 280px; padding-bottom: 8px; }
.lxx-end { min-height: 420px; margin-top: clamp(180px, 23vw, 340px); border-top: 1px solid #303331; padding-top: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.lxx-end > div { display: flex; justify-content: space-between; color: #858985; font: 10px Arial, sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.lxx-end > a { align-self: flex-end; margin-bottom: 30px; color: #bfa05e; border-bottom: 1px solid #bfa05e; padding-bottom: 8px; font-size: 11px; letter-spacing: .12em; text-decoration: none; }
.lxx-to-top { position: fixed; right: 24px; bottom: 24px; z-index: 15; width: 34px; height: 34px; border: 1px solid #515652; border-radius: 50%; background: #0a0b0c; color: #bfa05e; cursor: pointer; }
.lxx-lightbox { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 5vw; background: rgb(4 5 5 / 94%); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.lxx-lightbox.is-open { opacity: 1; pointer-events: auto; }
.lxx-lightbox img { display: block; max-width: 90vw; max-height: 90vh; width: auto; height: auto; object-fit: contain; }
.lxx-lightbox button { position: absolute; top: 26px; right: 30px; border: 0; background: none; color: #f1eee7; font-size: 34px; cursor: pointer; }
.lxx-missing { display: grid; min-height: 180px; place-items: center; color: #777b76; border: 1px dashed #3a403d; font: 10px Arial, sans-serif; letter-spacing: .1em; }
@keyframes lxx-image-reveal { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: .82; transform: translateY(0) scale(1); } }
@keyframes lxx-moon-appear { from { opacity: 0; transform: rotate(-22deg) scale(.66); } to { opacity: .42; transform: rotate(-12deg) scale(.82); } }
@media (prefers-reduced-motion: reduce) { .lxx-hero-image, .lxx-hero-orbit { animation: none; } .lxx-media img, .lxx-moon-disc, .lxx-lightbox { transition: none; } }
@media (max-width: 640px) {
  .lxx-project-top { padding: 14px 18px; }
  .lxx-hero-screen { min-height: 78vh; padding: 40px 18px 80px; }
  .lxx-hero-image { width: 92vw; max-height: 52vh; }
  .lxx-hero-orbit { width: 76vw; }
  .lxx-hero-copy { left: 18px; bottom: 10%; }
  .lxx-hero-copy h1 { font-size: 12vw; }
  .lxx-scroll-cue { display: none; }
  .lxx-chapter-rail { left: 18px; right: 18px; bottom: 16px; top: auto; transform: none; display: flex; width: auto; gap: 18px; overflow-x: auto; padding: 10px 12px; background: rgb(10 11 12 / 92%); border: 1px solid #303331; }
  .lxx-chapter-rail a { flex: 0 0 auto; min-width: 118px; }
  .lxx-overview, .lxx-chapter, .lxx-end { width: calc(100% - 36px); }
  .lxx-overview-grid { display: block; margin-top: 48px; }
  .lxx-overview h2 { font-size: 13vw; }
  .lxx-overview-grid > div { margin-top: 42px; }
  .lxx-chapter { margin-top: 150px; }
  .lxx-chapter-head { margin-bottom: 26px; }
  .lxx-chapter-head h2 small { display: block; margin: 8px 0 0; }
  .lxx-foundation-grid, .lxx-outdoor-lead, .lxx-campaign-lead { display: block; }
  .lxx-campaign-lead { width: 100%; margin: 0; }
  .lxx-foundation-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
  .lxx-auto-gallery { display: flex; overflow-x: auto; gap: 12px; margin-right: -18px; padding-right: 18px; scrollbar-width: none; }
  .lxx-auto-gallery::-webkit-scrollbar { display: none; }
  .lxx-auto-gallery .lxx-generated { flex: 0 0 min(76vw, 320px); margin-top: 0 !important; }
  .lxx-auto-gallery .lxx-wide { flex-basis: min(88vw, 350px); }
  .lxx-system-stack { display: contents; }
  .lxx-moon-stage { min-height: 220px; margin: 26px 0 58px; }
  .lxx-moon-gallery { display: flex; }
  .lxx-system-intro { display: block; margin-bottom: 28px; }
  .lxx-system-intro span { display: block; margin-top: 12px; }
  .lxx-outdoor-lead > div { margin-top: 28px; }
  .lxx-campaign-lead > figure { margin-bottom: 14px; }
  .lxx-campaign-lead > p { margin: 24px 0 0; }
  .lxx-end { min-height: 300px; margin-top: 170px; }
  .lxx-end > div { display: block; line-height: 2; }
  .lxx-end > div span { display: block; }
  .lxx-end > a { align-self: flex-start; }
}
.site-title {
  width: 100%;
  margin-left: 0;
  min-height: clamp(96px, 11vw, 190px);
  padding: .04em 4.5% 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .02em;
  font-size: clamp(4rem, 10vw, 10rem);
  line-height: .72;
  font-weight: 800;
  letter-spacing: 0;
  background: transparent;
  color: var(--paper);
  margin-bottom: 12px;
  overflow: hidden;
}
.intro-copy {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: clamp(.92rem, 4.6vw, 4.6rem);
  line-height: .94;
  font-weight: 800;
  letter-spacing: -.065em;
  white-space: nowrap;
  margin-bottom: clamp(28px, 4vw, 56px);
  transform: translateY(clamp(18px, 3vw, 38px));
  display: none;
}
.intro-copy small {
  flex: 0 0 auto;
  margin-right: clamp(8px, 1.8vw, 28px);
  font-size: clamp(.65rem, 1.25vw, 1.25rem);
  font-weight: 700;
  line-height: 1;
  transform: translateY(-0.08em);
  letter-spacing: -.035em;
}
.primary-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 28px;
  padding: 13px 4.5% 18px;
  border-top: 1px solid #333;
  transform: none;
}
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-credit { color: var(--paper); font-size: calc(clamp(.8rem, 1.2vw, 1.1rem) - 2px); font-weight: 400; }
.nav-back { text-decoration: none; font-size: clamp(1.1rem, 1.8vw, 1.5rem); line-height: 1; }
.primary-nav a {
  display: block;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 400;
  text-decoration: none;
  color: var(--paper);
}
.primary-nav a.active { text-decoration: none; }
.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: #f3776b;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.primary-nav a.active:hover {
  color: #f3776b;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.primary-nav span { font-size: 24px; line-height: 1; }
.primary-nav a.active { color: var(--paper); }
.hero-intro {
  width: min(88%, 920px);
  margin: clamp(86px, 12vw, 160px) auto 0;
  text-align: center;
  font-size: clamp(1rem, 1.75vw, 1.55rem);
  line-height: 1.35;
  letter-spacing: -.035em;
}

.hero {
  position: relative;
  min-height: clamp(430px, 70vw, 860px);
  margin-top: clamp(150px, 21vw, 340px);
}
.hero-image-placeholder {
  position: absolute;
  inset: 0 auto auto 0;
  width: min(90vw, 1260px);
  height: clamp(310px, 52vw, 670px);
  background: var(--soft);
  overflow: hidden;
  transform: translateY(clamp(-145px, -8vw, -72px));
}
.hero-image-placeholder img, .hero-side-placeholder img, .project-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease, filter .45s ease; }
.hero-link { display: block; width: 100%; height: 100%; }
.hero-link:hover img { transform: scale(1.035); }
.hero-outline-placeholder {
  position: absolute;
  left: -2vw;
  top: clamp(116px, 18vw, 230px);
  width: min(108vw, 1450px);
  height: clamp(90px, 16vw, 200px);
  background: transparent;
  color: transparent;
  font-size: clamp(4rem, 13vw, 12rem);
  line-height: .8;
  font-weight: 900;
  letter-spacing: .1em;
  white-space: nowrap;
  -webkit-text-stroke: clamp(1px, .25vw, 4px) var(--ink);
  z-index: 2;
}
.hero-outline-placeholder::before {
  content: "PROJECT";
  position: absolute;
  inset: 0;
  color: transparent;
  -webkit-text-stroke: clamp(1px, .25vw, 4px) var(--paper);
  clip-path: inset(0 15% 0 0);
}
.hero-side-placeholder {
  position: absolute;
  right: 0;
  top: clamp(255px, 39vw, 500px);
  width: 33vw;
  height: clamp(100px, 16vw, 190px);
  background: var(--line);
  overflow: hidden;
  transform: translateY(clamp(-245px, -15vw, -122px));
}

.portfolio-section, .about-section, .site-footer { padding: 0 var(--space); }
.portfolio-section { margin-top: clamp(-180px, -12vw, -70px); }
.portfolio-page-section { margin-top: clamp(80px, 12vw, 180px); }
.empty-page { min-height: 70vh; }
.detail-header {
  margin: var(--space);
  min-height: clamp(36px, 4.5vw, 65px);
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: var(--ink);
  border-radius: 14px;
}
.detail-back { color: var(--paper); font-size: clamp(1.1rem, 2vw, 1.6rem); text-decoration: none; }
.detail-content { min-height: 75vh; }
.project-detail-content {
  padding: clamp(60px, 9vw, 140px) clamp(16px, 3.5vw, 56px) 120px;
  background: #eeeeeb;
}
.project-detail-content h1 {
  max-width: 1200px;
  margin: 0 auto clamp(28px, 5vw, 70px);
  font-size: clamp(2rem, 5vw, 5.5rem);
  line-height: .9;
  letter-spacing: -.07em;
}
.pdf-pages { display: grid; gap: 0; max-width: none; margin: 0 auto; }
.pdf-pages img { display: block; width: 100%; height: auto; background: white; }
.xiangyu-gallery {
  --xy-gap: clamp(18px, 2.6vw, 44px);
  padding: clamp(70px, 10vw, 150px) clamp(18px, 4.5vw, 76px) clamp(120px, 16vw, 260px);
  background: #f0f0ed;
}
.xy-piece { margin: 0; overflow: hidden; }
.xy-piece img { display: block; width: 100%; height: auto; }
.xy-hero { width: min(100%, 1520px); margin: 0 auto clamp(110px, 16vw, 250px); }
.xy-feature { width: min(78%, 1180px); margin: 0 0 clamp(120px, 18vw, 280px) auto; }
.xy-portrait-row {
  width: min(92%, 1380px);
  margin: 0 auto clamp(130px, 18vw, 280px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  align-items: start;
}
.xy-portrait-row-b { width: min(82%, 1200px); }
.xy-portrait-row-c { width: min(88%, 1280px); }
.xy-lift { transform: translateY(clamp(-50px, -4vw, -22px)); }
.xy-landscape { width: min(73%, 1120px); margin-bottom: clamp(90px, 13vw, 210px); }
.xy-landscape-left { margin-left: 0; margin-right: auto; }
.xy-landscape-right { margin-left: auto; margin-right: 0; }
.xy-poster-pair {
  width: min(80%, 1200px);
  margin: clamp(150px, 20vw, 320px) auto clamp(140px, 19vw, 300px);
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1fr);
  gap: clamp(42px, 8vw, 130px);
  align-items: start;
}
.xy-poster-pair .xy-lower { margin-top: clamp(90px, 12vw, 190px); }
.xy-solo-poster { width: min(31%, 470px); margin: 0 auto clamp(160px, 21vw, 330px); }
.xy-wide-final { width: min(84%, 1320px); margin: 0 auto clamp(70px, 9vw, 140px) 0; }
.xy-wide-final-offset { margin-left: auto; margin-right: 0; }
.xy-ending { width: min(27%, 410px); margin: clamp(170px, 22vw, 350px) 8% 0 auto; }
.xy-ref-page {
  width: 100%;
  max-width: none;
  margin: auto;
  padding: 28px clamp(18px, 2.9vw, 42px) 70px;
  background: #f4f3ee;
  color: #171714;
}
.xy-ref-topline { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.xy-ref-intro { min-height: clamp(520px, 68vh, 850px); padding-top: clamp(110px, 17vh, 220px); display: grid; grid-template-columns: 1.1fr .9fr; gap: 8vw; align-items: start; }
.xy-ref-intro h1 { margin: 0; font-size: clamp(48px, 8.5vw, 128px); line-height: .94; letter-spacing: -.065em; font-weight: 400; }
.xy-ref-roman { margin-top: 24px; font-size: clamp(12px, 1.3vw, 18px); letter-spacing: .2em; }
.xy-ref-meta { padding-top: 10px; font-size: 12px; line-height: 1.8; max-width: 340px; }
.xy-ref-meta p { margin: 0 0 30px; }
.xy-ref-label { display: block; margin-bottom: 7px; color: #77776f; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.xy-ref-section { margin-top: clamp(140px, 16vw, 240px); }
.xy-ref-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 38px; border-top: 1px solid #d8d7cf; padding-top: 12px; }
.xy-ref-head { display: none; }
.xy-ref-head h2 { margin: 0; font-size: 11px; font-weight: 400; letter-spacing: .15em; text-transform: uppercase; }
.xy-ref-head span { color: #77776f; font-size: 11px; }
.xy-ref-media { margin: 0; background: #e8e7e0; position: relative; }
.xy-ref-media img { display: block; width: 100%; height: auto; object-fit: contain; }
.xy-ref-hero .xy-ref-media img { max-height: 82vh; object-fit: contain; }
.xy-ref-single { width: 84%; margin: 0 auto; }
.xy-ref-triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.xy-ref-one-two { display: grid; gap: 74px; }
.xy-ref-one-two > .xy-ref-media { width: 34%; margin: 0 auto; }
.xy-ref-one-two > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px; width: 74%; margin: 0 auto; }
.xy-ref-double { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px; }
.xy-ref-center-small { width: 60%; margin: 78px auto 0; }
.xy-ref-stack { display: grid; gap: 32px; }
.xy-ref-nature { gap: 36px; }
.xy-ref-asym { display: grid; grid-template-columns: 1fr 40%; gap: 10vw; align-items: center; }
.xy-ref-copy { max-width: 300px; font-size: 13px; line-height: 1.8; }
.xy-ref-copy div { margin-bottom: 22px; font-size: 10px; letter-spacing: .16em; color: #77776f; }
.xy-ref-center-wide { width: 75%; margin: 110px auto 0; }
.xy-ref-closing { min-height: 500px; margin-top: clamp(200px, 23vw, 340px); border-top: 1px solid #d8d7cf; padding-top: 14px; }
.xy-ref-center-poster { width: 35%; margin: 180px auto 0; }
.portfolio-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: calc(100vh - 204px);
  min-height: 560px;
}
.portfolio-panel {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(28px, 4vw, 64px) clamp(20px, 3.2vw, 52px) 80px;
  scrollbar-width: thin;
}
.portfolio-panel-light { background: var(--paper); color: var(--ink); }
.portfolio-panel-dark { background: var(--ink); color: var(--paper); }
.panel-intro {
  margin: 0 0 clamp(58px, 9vw, 130px);
  max-width: 29rem;
  font-size: clamp(1.6rem, 3.1vw, 3.25rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.065em;
}
.panel-intro small { font-size: .48em; letter-spacing: -.04em; }
.panel-projects {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 30px);
  align-items: start;
}
.panel-project { display: block; color: inherit; text-decoration: none; }
.panel-project img { width: 100%; height: clamp(220px, 30vw, 430px); object-fit: cover; display: block; }
.panel-project { overflow: hidden; }
.panel-project img { transition: transform .45s ease, filter .45s ease; }
.panel-project:hover img { transform: scale(1.045); }
.panel-project:nth-child(1) { grid-column: span 4; }
.panel-project:nth-child(2) { grid-column: span 2; margin-top: clamp(42px, 5vw, 84px); }
.panel-project:nth-child(3) { grid-column: span 3; }
.panel-project:nth-child(4) { grid-column: span 3; margin-top: clamp(34px, 4vw, 68px); }
.panel-project:nth-child(5) { grid-column: span 2; }
.panel-project:nth-child(6) { grid-column: span 4; margin-top: clamp(38px, 5vw, 80px); }
.panel-project:nth-child(7) { grid-column: span 3; }
.panel-project:nth-child(8) { grid-column: span 3; margin-top: clamp(34px, 4vw, 68px); }
.panel-project:nth-child(9) { grid-column: span 4; }
.panel-project:nth-child(10) { grid-column: span 2; }
.panel-project:nth-child(1) img { height: clamp(230px, 25vw, 390px); }
.panel-project:nth-child(2) img { height: clamp(170px, 20vw, 300px); }
.panel-project:nth-child(3) img { height: clamp(190px, 22vw, 340px); }
.panel-project:nth-child(4) img { height: clamp(250px, 29vw, 430px); }
.panel-project:nth-child(5) img { height: clamp(160px, 18vw, 270px); }
.panel-project:nth-child(6) img { height: clamp(220px, 24vw, 370px); }
.panel-project .festival-cover { position: relative; overflow: hidden; height: clamp(220px, 24vw, 370px); }
.panel-project:nth-child(n) .festival-cover img { position: absolute; top: -100%; left: 0; width: 100%; height: 240%; object-fit: cover; object-position: center 60%; }
@media (max-width: 640px) { .panel-project .festival-cover { height: 280px; } }
.panel-project:nth-child(7) img { height: clamp(210px, 24vw, 360px); }
.panel-project:nth-child(8) img { height: clamp(250px, 28vw, 420px); }
.portfolio-panel-dark .panel-project img { filter: saturate(.78); }
.panel-project span { display: block; padding-top: 12px; font-size: clamp(1rem, 1.5vw, 1.35rem); font-weight: 700; }
.mobile-panel-switch { display: none; }
.project-after-school { position: relative; display: block; overflow: visible; }
.project-after-school-frame { position: relative; z-index: 0; height: clamp(220px, 24vw, 370px); overflow: hidden; background: #eef1f0; }
.project-after-school-frame::before { content: ""; position: absolute; z-index: 0; width: 68%; aspect-ratio: 1; left: 46%; top: 7%; transform: translateX(-50%); border-radius: 50%; background: #dff2fc; }
.project-after-school img { position: relative; z-index: 1; width: 100%; height: 100% !important; object-fit: contain; object-position: center bottom; padding: 0 4%; background: transparent; }
.project-after-school span { position: static; display: block; padding-top: 12px; color: inherit; text-shadow: none; }
.project-new img { aspect-ratio: 16 / 9; height: auto !important; object-fit: cover; object-position: center bottom; }
.project-geography img { aspect-ratio: 1 / 1; height: auto !important; object-fit: cover; object-position: center center; }
.project-empty img { aspect-ratio: 1 / 1; height: auto !important; object-fit: cover; background: #f1f0eb; }
.portfolio-panel::-webkit-scrollbar { width: 8px; }
.portfolio-panel-light::-webkit-scrollbar-thumb { background: #cfcfca; }
.portfolio-panel-dark::-webkit-scrollbar-thumb { background: #505050; }
.portfolio-panel { scrollbar-width: none; }
.portfolio-panel::-webkit-scrollbar { display: none; }
.portfolio-heading { margin: 0 0 20px; font-size: clamp(2.2rem, 6vw, 6rem); line-height: .9; letter-spacing: -.07em; }
.section-rule, .footer-line { height: 2px; background: var(--ink); }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 2vw, 28px);
  padding: clamp(34px, 6vw, 86px) 0 clamp(100px, 15vw, 220px);
}
.project-card {
  display: block;
  min-height: 220px;
  background: var(--soft);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 14px 28px rgb(0 0 0 / 16%); }
.project-card span { position: absolute; left: 14px; bottom: 12px; color: white; font-size: calc(clamp(1rem, 2vw, 1.7rem) - 8px); font-weight: 400; letter-spacing: -.04em; text-shadow: 0 1px 9px rgb(0 0 0 / 45%); }
.card-large { grid-column: span 7; height: clamp(130px, 21vw, 285px); min-height: 0; align-self: start; }
.card-tall { grid-column: span 5; height: clamp(160px, 26vw, 350px); min-height: 0; align-self: start; }
.card-tall { height: auto; aspect-ratio: 16 / 9; }
.card-wide { grid-column: span 8; min-height: clamp(220px, 32vw, 440px); }
.card-wide { min-height: 0; aspect-ratio: 2.05 / 1; }
.card-small { grid-column: span 4; min-height: clamp(220px, 32vw, 440px); }
.card-small { height: auto; min-height: 0; aspect-ratio: 1 / 1; }
.card-medium { grid-column: 3 / span 7; min-height: clamp(250px, 38vw, 520px); }
.card-tall img, .card-small img { object-fit: contain; background: var(--soft); }
.card-tall img, .card-wide img {
  object-fit: cover;
  object-position: center;
  transform: scale(1.45);
}
.card-tall img { transform: scale(1.15); }
.card-wide img { object-position: center center; }
.card-tall:hover img { transform: scale(1.2); }
.card-wide:hover img { transform: scale(1.5); }
.card-tall::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28%;
  height: 28%;
  background: #000;
  z-index: 1;
}
.more-link {
  grid-column: 11 / -1;
  align-self: end;
  justify-self: end;
  color: var(--ink);
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.more-link span { display: inline-block; margin-left: 10px; font-size: 1.35em; line-height: .7; }
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7vw;
  padding-bottom: clamp(160px, 25vw, 360px);
}
.about-column { min-height: clamp(260px, 28vw, 460px); background: var(--soft); padding: clamp(20px, 3vw, 48px); }
.about-column h2, .about-column h3 { margin: 0 0 18px; font-size: clamp(2rem, 5vw, 5rem); letter-spacing: -.06em; }
.about-column h3 { font-size: clamp(1.1rem, 2vw, 1.8rem); margin-top: 24px; }
.about-column p { max-width: 32rem; font-size: clamp(1rem, 1.55vw, 1.45rem); line-height: 1.08; letter-spacing: -.03em; margin: 0; }
.about-column-offset { margin-top: clamp(80px, 12vw, 180px); }
.site-footer { padding-bottom: var(--space); }
.footer-line { margin-bottom: 22px; }
.footer-block { width: min(100%, 540px); font-weight: 800; font-size: clamp(1rem, 1.8vw, 1.35rem); }

@media (max-width: 640px) {
  .xiangyu-gallery { padding: 54px 16px 110px; }
  .xy-hero, .xy-feature, .xy-landscape, .xy-wide-final { width: 100%; margin-bottom: 72px; }
  .xy-portrait-row {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 84px;
  }
  .xy-portrait-row .xy-piece:nth-child(n) { grid-column: auto; width: auto; transform: none; }
  .xy-poster-pair { width: 100%; gap: 16px; margin: 84px 0; }
  .xy-poster-pair .xy-lower { margin-top: 52px; }
  .xy-solo-poster { width: 58%; margin-bottom: 90px; }
  .xy-ending { width: 58%; margin: 90px auto 0; }
  .xy-ref-page { padding: 18px 12px 28px; }
  .xy-ref-intro { display: block; min-height: 430px; padding-top: 82px; }
  .xy-ref-meta { margin-top: 70px; }
  .xy-ref-section { margin-top: 86px; }
  .xy-ref-head { margin-bottom: 24px; }
  .xy-ref-triple, .xy-ref-double, .xy-ref-nature { display: flex; grid-template-columns: none; gap: 10px; overflow-x: auto; margin-inline: -12px; padding: 0 12px 10px; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .xy-ref-triple::-webkit-scrollbar, .xy-ref-double::-webkit-scrollbar, .xy-ref-nature::-webkit-scrollbar { display: none; }
  .xy-ref-triple > .xy-ref-media, .xy-ref-double > .xy-ref-media, .xy-ref-nature > .xy-ref-media { flex: 0 0 min(78vw, 320px); scroll-snap-align: start; }
  .xy-ref-single, .xy-ref-center-small, .xy-ref-center-wide, .xy-ref-center-poster { width: 100%; }
  .xy-ref-one-two { display: flex; gap: 10px; overflow-x: auto; margin-inline: -12px; padding: 0 12px 10px; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .xy-ref-one-two::-webkit-scrollbar { display: none; }
  .xy-ref-one-two > .xy-ref-media, .xy-ref-one-two > div .xy-ref-media { flex: 0 0 min(78vw, 320px); width: auto; scroll-snap-align: start; }
  .xy-ref-one-two > div { display: contents; }
  .xy-ref-asym { grid-template-columns: 1fr; gap: 42px; }
  .xy-ref-copy { order: 2; }
  .xy-ref-asym > .xy-ref-media { width: 58%; margin-left: auto; order: 1; }
  .xy-ref-center-wide { margin-top: 70px; }
  .xy-ref-center-poster { width: 62%; margin-top: 110px; }
  .xy-ref-closing { min-height: 430px; margin-top: 170px; }
  .portfolio-split { display: block; height: auto; min-height: 0; }
  .mobile-panel-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 18px 0; padding: 6px; background: #e4e0d8; border-radius: 999px; }
  .mobile-panel-switch button { border: 0; border-radius: 999px; padding: 12px 10px; color: #777; background: transparent; font-size: .9rem; cursor: pointer; }
  .mobile-panel-switch button.is-active { color: #fff; background: var(--ink); }
  .portfolio-panel { height: auto; min-height: 80vh; overflow: visible; }
  .portfolio-panel[data-panel] { display: none; }
  .portfolio-panel[data-panel].is-mobile-active { display: block; }
  .panel-intro { font-size: clamp(1.8rem, 8vw, 3rem); }
  .panel-projects { grid-template-columns: 1fr; gap: 34px; }
  .panel-project:nth-child(n) { grid-column: auto; margin-top: 0; }
  .panel-project:nth-child(n) img { height: 280px; }
  .portfolio-panel-dark .panel-project:nth-child(n) img { height: auto; aspect-ratio: auto; object-fit: contain; background: transparent; }
  .hero { min-height: 380px; }
  .hero-image-placeholder { width: 98vw; height: 285px; }
  .hero-outline-placeholder::before { clip-path: inset(0 8% 0 0); }
  .hero-outline-placeholder { width: 108vw; top: 108px; }
  .hero-side-placeholder { top: 240px; width: 32vw; height: 90px; }
  .portfolio-grid { display: flex; flex-direction: column; }
  .project-card, .card-wide, .card-medium { min-height: 240px; }
  .card-wide { aspect-ratio: auto; min-height: 240px; }
  .card-large { height: 120px; }
  .card-tall { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .card-small { height: auto; min-height: 0; aspect-ratio: 1 / 1; }
  .more-link { align-self: flex-end; margin-top: 16px; }
  .about-section { gap: 18px; }
}
