/* =========================================================================
   Yang Yumeng
   Typeface : Suisse Int'l  (drop the licensed files into assets/fonts/ —
              see README; Inter / Helvetica Neue stand in until then)
   Colour   : white paper, near-black ink, grey for secondary text,
              one blush pink used only on About and Miss Yang Studio.
   ========================================================================= */

/* ---------- Suisse Int'l (optional local files) ---------- */
@font-face {
  font-family: "Suisse Intl Web";
  src: url("../fonts/SuisseIntl-Regular.woff2") format("woff2"),
       url("../fonts/SuisseIntl-Regular.woff")  format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Suisse Intl Web";
  src: url("../fonts/SuisseIntl-Medium.woff2") format("woff2"),
       url("../fonts/SuisseIntl-Medium.woff")  format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Suisse Intl Web";
  src: url("../fonts/SuisseIntl-SemiBold.woff2") format("woff2"),
       url("../fonts/SuisseIntl-SemiBold.woff")  format("woff");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --paper:     #ffffff;
  --ink:       #171717;
  --grey:      #7d7d7d;   /* secondary text */
  --grey-soft: #a4a49f;   /* tertiary — sizes, micro labels */
  --wash:      #f2f2f0;   /* empty media wells */
  --pink:      #eccec7;   /* About frame, Studio band */
  --pink-soft: #f6e6e2;

  --font: "Suisse Int'l", "Suisse Intl", "Suisse Intl Web",
          "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* type scale, anchored to the wordmark */
  --fs-wordmark: clamp(1rem, 1.35vw, 1.2rem);
  --fs-menu:     clamp(1.35rem, 2.3vw, 1.75rem);
  --fs-series:   clamp(1.2rem, 1.75vw, 1.45rem);   /* a little above wordmark */
  --fs-body:     clamp(0.8125rem, 1vw, 0.9375rem); /* a little below wordmark */
  --fs-small:    0.75rem;
  --fs-micro:    0.6875rem;

  --gutter: clamp(20px, 4.2vw, 56px);
  --top-bar: clamp(64px, 8vw, 92px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p, figure, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- chrome: name left, plus right ---------- */
.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(18px, 2.6vw, 30px) var(--gutter);
  pointer-events: none;
}
.chrome > * { pointer-events: auto; }

.wordmark {
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  font-size: var(--fs-wordmark);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.wordmark.is-hidden { opacity: 0; transform: translateY(-6px); pointer-events: none; }

.menu { text-align: right; }
.menu__toggle {
  display: block;
  margin-left: auto;
  width: 28px; height: 28px;
  position: relative;
  margin-top: -6px;
}
.menu__toggle span {
  position: absolute;
  left: 50%; top: 50%;
  width: 17px; height: 1.4px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease), opacity 0.25s var(--ease);
}
.menu__toggle span:last-child { transform: translate(-50%, -50%) rotate(90deg); }
.menu[data-open="true"] .menu__toggle span:last-child {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
}

.menu__list {
  overflow: hidden;
  max-height: 0;
  visibility: hidden;
  transition: max-height 0.45s var(--ease), visibility 0s linear 0.45s;
}
.menu[data-open="true"] .menu__list {
  max-height: 240px;
  visibility: visible;
  transition: max-height 0.45s var(--ease), visibility 0s linear 0s;
}
.menu__list li {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.menu[data-open="true"] .menu__list li { opacity: 1; transform: none; }
.menu[data-open="true"] .menu__list li:nth-child(1) { transition-delay: 0.05s; }
.menu[data-open="true"] .menu__list li:nth-child(2) { transition-delay: 0.10s; }
.menu[data-open="true"] .menu__list li:nth-child(3) { transition-delay: 0.15s; }
.menu[data-open="true"] .menu__list li:nth-child(4) { transition-delay: 0.20s; }

.menu__list a {
  display: block;
  font-size: var(--fs-menu);
  font-weight: 400;
  line-height: 0.98;                /* lines almost touching */
  letter-spacing: -0.005em;
  padding: 0;
}
.menu__list li:first-child a { padding-top: 14px; }
.menu__list a:hover,
.menu__list a[aria-current="page"] { opacity: 0.42; }

/* ---------- page frame ---------- */
.page {
  padding: calc(var(--top-bar) + 12px) var(--gutter) clamp(70px, 12vh, 130px);
  max-width: 1440px;
  margin: 0 auto;
}
.page--tall { min-height: 100dvh; display: flex; flex-direction: column; }

.status { color: var(--grey); font-size: var(--fs-small); padding: 20px 0; }
.status code { font-size: 0.95em; }

.media-well {
  display: flex; flex-direction: column; gap: 5px;
  flex: 1 1 auto;
  align-items: flex-start; justify-content: flex-end;
  width: 100%; height: 100%; min-height: 120px;
  padding: 12px;
  background: var(--wash);
  color: var(--grey-soft);
  font-size: var(--fs-micro);
  text-align: left;
}

/* =========================================================================
   HOME
   ========================================================================= */
.home { height: 100dvh; overflow: hidden; }
.diptych { display: grid; grid-template-columns: 1fr 1fr; height: 100dvh; }
.diptych__panel { position: relative; overflow: hidden; background: var(--wash); }
.diptych__panel img, .diptych__panel video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.3s var(--ease);
}
.diptych__panel:hover img, .diptych__panel:hover video { transform: scale(1.03); }

.home__foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: flex; justify-content: space-between; gap: 14px;
  padding: 14px var(--gutter);
  font-size: var(--fs-micro);
  color: var(--grey);
  background: linear-gradient(to top, rgba(255,255,255,0.9), rgba(255,255,255,0));
}
.home__foot a:hover { color: var(--ink); }

/* =========================================================================
   WORK — every series on one page
   ========================================================================= */
.series { padding-top: clamp(46px, 9vh, 96px); }
.series:first-child { padding-top: clamp(10px, 3vh, 34px); }

.series__title {
  font-size: var(--fs-series);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.series__text {
  font-size: var(--fs-body);
  color: var(--ink);
  max-width: 68ch;
  margin-bottom: clamp(26px, 4.5vh, 48px);
}
.series__text p + p { margin-top: 0.85em; }

.works {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 34px);              /* identical gap everywhere */
  align-items: end;
}
.work__frame {
  --frame-h: clamp(170px, 22vw, 290px);         /* modest, never oversized */
  height: var(--frame-h);
  display: flex; align-items: flex-end; justify-content: flex-start;
  width: 100%;
}
.work__frame button {
  padding: 0; width: 100%; height: 100%;
  display: flex; align-items: flex-end; justify-content: flex-start;  /* picture and caption share a left edge */
}
.work__media {
  position: relative;
  display: block;
  max-width: 100%;
  min-width: 0;
  line-height: 0;
}
.work__media img,
.work__media video {
  display: block;
  max-width: 100%;
  max-height: var(--frame-h);
  width: auto; height: auto;
}
.work__media > .media-well { height: var(--frame-h); }
/* the work's second file fades in over the first on hover:
   a video fills the frame, a second photo sits inside it */
.work__media > .work__cover { transition: opacity 0.45s var(--ease); }
.work__hover {
  position: absolute; inset: 0;
  width: 100% !important; height: 100% !important;
  max-height: none !important;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
img.work__hover { object-fit: contain; }
.work__media.is-playing .work__hover { opacity: 1; }
.work__media.is-playing > .work__cover { opacity: 0; }
.work__caption { padding-top: 10px; }
.work__name {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.35;
}
.work__meta {
  display: block;
  font-size: var(--fs-micro);
  color: var(--grey);
  line-height: 1.4;
}

/* =========================================================================
   AVAILABLE — image, then four lines
   ========================================================================= */
.available {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));   /* 1 2 / 3 4 … */
  gap: clamp(34px, 6vh, 66px) clamp(24px, 4vw, 60px);
}
.available__row {
  display: grid;
  grid-template-columns: clamp(130px, 16vw, 220px) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 34px);
  align-items: center;
}
.available__frame {
  height: clamp(130px, 15vw, 220px);
  display: flex; align-items: center; justify-content: flex-start;
}
.available__frame button {
  padding: 0; height: 100%; max-width: 100%;
  display: flex; align-items: center; justify-content: flex-start;
}
.available__frame img, .available__frame video {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
}
.available__frame > .media-well { height: 100%; }

.available__lines { display: flex; flex-direction: column; gap: 2px; }
.available__title {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--grey);
}
.available__line { font-size: var(--fs-small); color: var(--grey); }
.available__enquire {
  margin-top: 10px;
  font-size: var(--fs-micro);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--grey);
  align-self: flex-start;
}
.available__enquire:hover { color: var(--ink); }

/* =========================================================================
   ABOUT
   ========================================================================= */
.about__portrait {
  width: clamp(225px, 28.5vw, 345px);      /* 1.5× the earlier frame, no colour */
}
.about__portrait img, .about__portrait video { width: 100%; height: auto; }
.about__portrait > .media-well { min-height: 225px; }

.about__bio {
  margin-top: clamp(24px, 4vh, 44px);
  max-width: 62ch;
  font-size: var(--fs-body);
}
.about__bio p + p { margin-top: 0.95em; }

.about__foot {
  margin-top: auto;
  padding-top: clamp(60px, 14vh, 150px);
  display: flex; flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px clamp(20px, 4vw, 60px);
  font-size: var(--fs-small);
  color: var(--grey);
}
.about__foot a:hover { color: var(--ink); }
.about__foot a.is-missing { color: var(--grey-soft); cursor: help; }

/* CV preview — same room as the lightbox, with a download link */
.cvbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; flex-direction: column;
  background: rgba(255,255,255,0.97);
  padding: clamp(18px, 3vh, 30px) var(--gutter) clamp(20px, 3vh, 34px);
}
.cvbox[data-open="true"] { display: flex; }
.cvbox__bar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding-bottom: 14px;
  font-size: var(--fs-small); color: var(--grey);
}
.cvbox__bar strong { color: var(--ink); font-weight: 500; }
.cvbox__actions { display: flex; gap: 26px; }
.cvbox__actions a, .cvbox__actions button {
  font-size: var(--fs-micro); letter-spacing: 0.09em; text-transform: uppercase; color: var(--grey);
}
.cvbox__actions a:hover, .cvbox__actions button:hover { color: var(--ink); }
.cvbox__page {
  flex: 1 1 auto; min-height: 0;
  border: 1px solid #e6e6e2;
  background: #fff;
}
.cvbox__page iframe { display: block; width: 100%; height: 100%; border: 0; }

/* =========================================================================
   MISS YANG STUDIO
   ========================================================================= */
.studio__band {
  background: var(--pink-soft);
  margin: 0 calc(var(--gutter) * -1);
  padding: clamp(28px, 5vh, 60px) var(--gutter) clamp(34px, 6vh, 70px);
}
.studio__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  max-width: 1440px; margin: 0 auto;
}
.studio__map { width: 100%; display: block; background: var(--paper); }
.studio__address { margin-top: 14px; font-size: var(--fs-small); line-height: 1.5; }
.studio__address strong { font-weight: 600; }
.studio__address span { color: var(--grey); display: block; }
.studio__directions {
  display: inline-block; margin-top: 10px;
  font-size: var(--fs-micro); letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--grey);
}
.studio__directions:hover { color: var(--ink); }
.studio__intro { font-size: var(--fs-body); max-width: 62ch; }
.studio__intro p + p { margin-top: 0.9em; }

.studio__media {
  --n: 3;
  --gap: clamp(14px, 2.4vw, 34px);
  display: flex;
  justify-content: space-between;        /* first at the left edge, last at the right */
  gap: var(--gap);
  padding-top: clamp(30px, 6vh, 70px);
}
.studio__media > * {
  flex: 0 0 auto;
  width: calc((100% - (var(--n) - 1) * var(--gap)) / var(--n) / 1.5);   /* 1.5× smaller than a full column */
}
.studio__tile { background: var(--wash); aspect-ratio: 3 / 4; overflow: hidden; }
.studio__tile img, .studio__tile video { width: 100%; height: 100%; object-fit: cover; }
.studio__tile > .media-well { height: 100%; }

/* =========================================================================
   EXHIBITIONS
   ========================================================================= */
.exhibits__heading {
  font-size: var(--fs-body);            /* same size and weight as a year */
  font-weight: 600;
  margin-bottom: clamp(34px, 6vh, 66px);
}
.years { display: flex; flex-direction: column; gap: clamp(34px, 6vh, 66px); }
.year__label {
  font-size: var(--fs-body);
  font-weight: 600;
  margin-bottom: clamp(16px, 2.6vh, 26px);
}
.exhibits { display: flex; flex-direction: column; gap: clamp(20px, 3.4vh, 34px); }
.exhibit { max-width: 74ch; }
.exhibit__title { font-size: var(--fs-body); font-weight: 600; line-height: 1.4; }
.exhibit__venue { font-size: var(--fs-body); font-weight: 400; line-height: 1.4; }
.exhibit__place,
.exhibit__type { font-size: var(--fs-micro); color: var(--grey); line-height: 1.5; }

/* =========================================================================
   LIGHTBOX
   ========================================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.97);
  padding: clamp(46px, 8vh, 90px) var(--gutter);
}
.lightbox[data-open="true"] { display: flex; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 80vh; width: auto; height: auto; object-fit: contain; }
.lightbox__bar {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: var(--fs-micro); color: var(--grey);
}
.lightbox__close { position: absolute; top: 24px; right: var(--gutter); font-size: var(--fs-micro); color: var(--grey); }
.lightbox__nav { display: flex; gap: 20px; }
.lightbox__nav button { font-size: var(--fs-micro); color: var(--grey); }
.lightbox__nav button:hover, .lightbox__close:hover { color: var(--ink); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1000px) {
  .studio__grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work__frame { --frame-h: clamp(170px, 34vw, 260px); }
}
@media (max-width: 720px) {
  .diptych { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .home__foot { flex-direction: column; gap: 2px; }
  .available { grid-template-columns: 1fr; }
  .available__row { grid-template-columns: 1fr; gap: 14px; }
  .available__frame { height: clamp(170px, 46vw, 240px); justify-content: flex-start; }
  .about__foot { flex-direction: column; gap: 8px; }
  .studio__media { flex-wrap: wrap; justify-content: flex-start; }
  .studio__media > * { width: calc((100% - var(--gap)) / 2); }
}
@media (max-width: 480px) {
  .works { grid-template-columns: 1fr; }
  .work__frame { --frame-h: clamp(200px, 62vw, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .chrome, .home__foot, .lightbox { display: none !important; }
  .page { padding-top: 0; }
}
