/* Shuyi Studio Art Gallery */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #1a1a1a;
  --muted: #6e6e6e;
  --line: #e6e6e6;
  --serif: "Noto Serif TC", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Noto Sans TC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 16px/1.7 var(--sans);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 6px 14px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.page {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
}
.site-header .page { padding: 22px 0 18px; }

.wordmark {
  display: inline-block;
  max-width: 100%;
  color: var(--ink);
  font: 500 clamp(14px, 3.6vw, 18px)/1.35 var(--serif);
  letter-spacing: 0.14em;
  text-decoration: none;
}
@media (max-width: 380px) {
  .wordmark { letter-spacing: 0.06em; }
}

main { padding-bottom: 24px; }

.works {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  margin-top: 12px;
}

.work-open { display: block; width: 100%; text-align: left; }
.work-frame {
  display: block;
  background: var(--bg);
  border: 1px solid var(--line);
}
.work-frame img { width: 100%; height: auto; }

.work-label { display: block; padding-top: 12px; }
.work-title {
  display: block;
  font: 500 15px/1.4 var(--serif);
  letter-spacing: 0.08em;
}
.work-date {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font: 400 12px/1.4 var(--sans);
  letter-spacing: 0.16em;
  font-variant-numeric: lining-nums;
}
.work-open:hover .work-title { text-decoration: underline; text-underline-offset: 0.25em; }

.series-note {
  max-width: 36em;
  margin-top: 80px;
}
.series-note h1 {
  font: 500 22px/1.45 var(--serif);
  letter-spacing: 0.18em;
}
.series-en {
  margin-top: 6px;
  color: var(--muted);
  font: 400 11px/1.5 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.series-lead {
  margin-top: 18px;
  font: 400 16px/1.95 var(--serif);
}

.contact {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.contact .page { padding: 28px 0 48px; }
.contact h2 {
  color: var(--ink);
  font: 500 14px/1.4 var(--serif);
  letter-spacing: 0.16em;
}
.contact section:first-child h2 { font-size: 16px; }
.contact section + section { margin-top: 32px; }
.contact section p {
  max-width: 36em;
  margin-top: 8px;
  font: 400 15px/1.85 var(--serif);
}
.contact section:first-child p { color: var(--ink); }
.contact-list { margin-top: 12px; }
.contact-list li { margin: 6px 0; }
.contact-list a {
  color: var(--ink);
  font: 400 15px/1.5 var(--serif);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.contact-list a:hover { text-decoration: underline; text-underline-offset: 0.22em; }
.colophon {
  margin-top: 28px;
  font: 400 12px/1.7 var(--sans);
  letter-spacing: 0.03em;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--ink);
}
.lightbox::backdrop { background: var(--bg); }
.lightbox[open] { display: block; }

.lb-layout {
  display: grid;
  height: 100%;
  min-height: 0;
  padding: 64px 20px 28px;
}
.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 0;
}
.lb-figure picture { display: flex; justify-content: center; min-height: 0; max-width: 100%; }
.lb-figure img {
  width: auto;
  max-width: min(920px, 100%);
  max-height: calc(100dvh - 210px);
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--bg);
}
.lb-caption { margin-top: 14px; text-align: center; }
.lb-count {
  color: var(--muted);
  font: 400 12px/1.4 var(--sans);
  letter-spacing: 0.12em;
  font-variant-numeric: lining-nums;
}
.lb-title {
  margin-top: 4px;
  font: 500 18px/1.4 var(--serif);
  letter-spacing: 0.08em;
}
.lb-date {
  margin-top: 2px;
  color: var(--muted);
  font: 400 12px/1.4 var(--sans);
  letter-spacing: 0.16em;
  font-variant-numeric: lining-nums;
}
.lb-dates {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 10px;
}
.lb-dates[hidden] { display: none; }
.lb-dates button {
  min-width: 44px;
  min-height: 36px;
  padding: 6px 8px;
  color: var(--muted);
  font: 400 12px/1 var(--sans);
  letter-spacing: 0.08em;
}
.lb-dates button[aria-pressed="true"] {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--ink);
}

.lb-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.lb-nav button {
  width: 44px;
  height: 44px;
  font: 400 20px/1 var(--sans);
}
.lb-nav button:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  font: 400 22px/1 var(--sans);
}

@media (min-width: 760px) {
  .page { width: min(1080px, calc(100% - 96px)); }
  .works { grid-template-columns: 1fr 1fr; gap: 80px 48px; margin-top: 28px; }
  .series-note { margin-top: 96px; }
  .contact .page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }
  .contact section:first-child,
  .contact .colophon { grid-column: 1 / -1; }
  .lb-layout { padding: 48px 72px 36px; }
  .lb-figure img { max-height: calc(100dvh - 180px); }
}

@media (min-width: 1100px) {
  .lb-nav {
    position: absolute;
    inset: 0;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0 16px;
    pointer-events: none;
  }
  .lb-nav button { pointer-events: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Earlier series pages stay in the repo and are not part of the gallery. */
body[data-page="series"] { display: none; }
