/* ─── Fonts ─────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/newsreader-normal-viet.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/newsreader-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/newsreader-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/newsreader-italic-viet.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/newsreader-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Reset / Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  color: #111111;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #111111; color: #FFFFFF; }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; height: auto; }

/* ─── Small-screen gate ─────────────────────────────────────────────────── */
.small-screen-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #FFFFFF;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.small-screen-rule {
  width: 44px;
  height: 1px;
  background: #111111;
  margin-bottom: 30px;
}

.small-screen-heading {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #111111;
}

.small-screen-sub {
  margin: 16px 0 0;
  font-size: 14px;
  color: #8A8A8A;
}

@media (max-width: 767px) {
  .small-screen-gate { display: flex; }
  .site-wrap { display: none; }
}

/* ─── Site wrap ─────────────────────────────────────────────────────────── */
.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Header ────────────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid #111111;
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 40px 18px;
}

.site-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #111111;
  transition: color 0.18s ease;
}
.site-name:hover { color: #8A8A8A; }

.site-nav {
  display: flex;
  gap: 34px;
}

.nav-link {
  font-size: 14px;
  color: #111111;
  transition: color 0.18s ease;
}
.nav-link:hover,
.nav-link--current { color: #8A8A8A; }

/* ─── Main content ──────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 40px 40px;
  width: 100%;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  max-width: 1120px;
  margin: 80px auto 0;
  padding: 20px 40px 34px;
  border-top: 1px solid #e6e6e3;
  display: flex;
  justify-content: flex-end;
  font-size: 12px;
  color: #8A8A8A;
  width: 100%;
}

/* ─── Home ──────────────────────────────────────────────────────────────── */
.home-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 44px;
}

.home-name {
  margin: 0;
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #111111;
}

.home-nav {
  display: flex;
  gap: 44px;
}

.home-link {
  font-size: 16px;
  color: #111111;
  transition: color 0.18s ease;
}
.home-link:hover { color: #8A8A8A; }

/* ─── Page heading ──────────────────────────────────────────────────────── */
.page-heading {
  margin: 0 0 44px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #111111;
}

/* ─── Back link ─────────────────────────────────────────────────────────── */
.back-link {
  display: inline-block;
  margin-bottom: 40px;
  font-size: 13px;
  color: #8A8A8A;
  transition: color 0.18s ease;
}
.back-link:hover { color: #111111; }

/* ─── Collection grid ───────────────────────────────────────────────────── */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 40px;
  row-gap: 56px;
}

.work-card {
  display: block;
  transition: opacity 0.18s ease;
}
.work-card:hover { opacity: 0.6; }

.work-card-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f0f0ec;
}

.work-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card-placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, #f6f6f4, #f6f6f4 9px, #efefec 9px, #efefec 18px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-card-placeholder span {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b6b6ae;
}

.work-card-title {
  margin-top: 13px;
  font-size: 14px;
  color: #111111;
}

.work-card-sub {
  margin-top: 3px;
  font-size: 13px;
  color: #8A8A8A;
}

/* ─── Work detail ───────────────────────────────────────────────────────── */
.work-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  column-gap: 64px;
  align-items: start;
}

.work-image-col { position: relative; }

.work-main-image {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

.work-image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: repeating-linear-gradient(45deg, #f6f6f4, #f6f6f4 9px, #efefec 9px, #efefec 18px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.work-thumb {
  width: 56px;
  height: 56px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.45;
  transition: opacity 0.18s ease, border-color 0.18s ease;
}

.work-thumb--active {
  opacity: 1;
  border-color: #111111;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-title-serif {
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-size: 27px;
  line-height: 1.15;
  color: #111111;
}

.work-artist {
  margin-top: 8px;
  font-size: 15px;
  color: #111111;
}

.work-dl {
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid #e6e6e3;
  display: grid;
  grid-template-columns: 96px 1fr;
  row-gap: 12px;
  column-gap: 16px;
}

.work-dl dt {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8A8A8A;
  align-self: baseline;
}

.work-dl dd {
  margin: 0;
  font-size: 14px;
  color: #111111;
  align-self: baseline;
}

.work-note {
  margin-top: 28px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  color: #2a2a2a;
  max-width: 30em;
}

.work-note p { margin: 0 0 1em; }
.work-note p:last-child { margin-bottom: 0; }

/* ─── Essays list ───────────────────────────────────────────────────────── */
.essays-list {
  display: flex;
  flex-direction: column;
}

.essay-row {
  display: flex;
  gap: 40px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid #e6e6e3;
  color: #111111;
  transition: color 0.18s ease;
}
.essay-row:hover { color: #8A8A8A; }

.essay-row-date {
  width: 120px;
  flex: none;
  align-self: baseline;
  font-size: 13px;
  color: #8A8A8A;
}

.essay-row-body {
  flex: 1;
  align-self: baseline;
}

.essay-row-title {
  display: block;
  font-family: "Newsreader", Georgia, serif;
  font-size: 23px;
  line-height: 1.2;
}

.essay-row-dek {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  color: #8A8A8A;
}

.essays-list-cap {
  border-top: 1px solid #e6e6e3;
}

/* ─── Essay reading page ─────────────────────────────────────────────────── */
.essay {
  max-width: 940px;
}

.essay-title {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #111111;
  max-width: 16em;
}

.essay-rule {
  height: 1px;
  background: #111111;
  margin: 24px 0 0;
}

.essay-meta {
  margin: 10px 0 24px;
  font-size: 13px;
  color: #8A8A8A;
  text-align: right;
}

/* Figure rail layout — rebuilt by essay-figures.js */
.essay-body {
  display: grid;
  grid-template-columns: minmax(0, 33em) 300px;
  column-gap: 56px;
  align-items: start;
}

.essay-text-flow {
  position: relative; /* offsetParent for paragraph measurement */
}

.essay-text-flow p {
  margin: 0 0 24px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 19px;
  line-height: 1.62;
  color: #1a1a1a;
  text-wrap: pretty;
}

.essay-text-flow p:last-child { margin-bottom: 0; }

/* Rail: position context for absolutely-placed sections */
.essay-rail {
  position: relative;
}

/* Each section is absolutely positioned; its height = the sticky range */
.essay-rail-section {
  position: absolute;
  width: 100%;
}

/* Figure group sticks within its section until the section exits the viewport */
.essay-figure-group {
  position: sticky;
  top: 80px;
}

.essay-figure {
  margin: 0;
}

.essay-figure + .essay-figure {
  margin-top: 28px;
}

.essay-figure img {
  width: 100%;
  height: auto;
}

.essay-figure figcaption {
  margin-top: 11px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #8A8A8A;
}

.essay-figure figcaption .fig-num {
  color: #111111;
}

/* ─── About ─────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  column-gap: 64px;
  align-items: start;
}

.about-heading {
  margin: 0 0 28px;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #111111;
}

.about-body {
  max-width: 34em;
}

.about-body p {
  margin: 0 0 22px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 18px;
  line-height: 1.62;
  color: #1a1a1a;
}

.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-photo-caption {
  margin-top: 11px;
  font-size: 12.5px;
  color: #8A8A8A;
}

/* ─── Lightbox ───────────────────────────────────────────────────────────── */
.lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}

.lb--open { display: flex; }

.lb-img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.lb-close {
  position: fixed;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease;
  padding: 4px 8px;
}

.lb-close:hover { opacity: 1; }

.js-lb { cursor: zoom-in; }
