@font-face {
  font-family: Instrument Serif;
  src: url("fonts/instrument-serif.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: Instrument Serif;
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #171714;
  --muted: #5f5c55;
  --line: #dedbd4;
  --serif: "Instrument Serif", Georgia, serif;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #fff;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible { outline: 2px solid #71604b; outline-offset: 5px; }
img { display: block; }
.wrap { width: min(89%, 1392px); margin-inline: auto; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
  background: #211e1b;
  color: #fffaf2;
}

.cover, .cover img, .cover::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover { z-index: -1; }
.cover img { object-fit: cover; object-position: 57% center; }
.cover::after {
  content: "";
  background:
    linear-gradient(180deg, #0d0d0db5 0%, transparent 28%, #0d0d0d29 46%, #0d0d0def 100%),
    linear-gradient(90deg, #10100fc2, #10100f52 46%, transparent 76%);
}

.cover figcaption {
  position: absolute;
  z-index: 1;
  right: max(5.5vw, calc((100% - 1392px) / 2));
  bottom: 20px;
  color: #e0d9cf;
  font-size: 11px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 25px;
  border-bottom: 1px solid #fffaf24d;
}

.wordmark { font: 29px/1 var(--serif); }
.nav-links { display: flex; gap: clamp(20px, 5vw, 55px); font-size: 14px; }

.intro { padding-block: clamp(72px, 16svh, 180px) clamp(80px, 12svh, 145px); }

.intro-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  letter-spacing: .15em;
  color: #f3e7d6;
}

.intro-line::before {
  content: "";
  width: 28px;
  height: 1px;
  background: #efcca0;
}

.intro h1 { margin-block: 14px 22px; font-weight: 400; }

.intro h1 em {
  display: block;
  font: italic 400 clamp(70px, 12.4vw, 174px)/.9 var(--serif);
  letter-spacing: -.025em;
}

.intro h1 span {
  display: block;
  margin-top: 12px;
  font: 400 clamp(32px, 5vw, 64px)/1.15 "Songti SC", "Noto Serif CJK SC", serif;
  letter-spacing: .055em;
}

.credentials {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #ebe3d8;
  font-size: 12px;
  line-height: 1.7;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.hero-actions a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid #fffaf29c;
  border-radius: 100px;
  font-size: 13px;
}

.hero-actions a:hover { background: #fffaf226; text-decoration: none; }
.hero-actions .hero-primary { background: #fffaf2; color: var(--ink); }
.hero-actions .hero-primary:hover { background: #f2e2cc; }
.hero :focus-visible { outline-color: #efcca0; }

.sample-note, .gallery figcaption a, .footer { color: var(--muted); font-size: 12px; }

.work { padding-block: clamp(60px, 9vw, 136px); }

.work-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
  margin-bottom: clamp(22px, 4vw, 50px);
}

.work-heading h2 { font: 400 clamp(32px, 4vw, 58px)/1.15 "Songti SC", "Noto Serif CJK SC", serif; }

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  column-gap: 3%;
  row-gap: clamp(32px, 6vw, 84px);
}

.gallery figure:nth-child(1) { grid-column: 1 / span 6; }
.gallery figure:nth-child(2) { grid-column: 8 / span 5; margin-top: clamp(34px, 8vw, 100px); }
.gallery figure:nth-child(3) { grid-column: 3 / span 8; }

.photo { display: block; cursor: zoom-in; background: #edeae4; }
.photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.gallery figure:nth-child(3) img { aspect-ratio: 3 / 2; }

.gallery figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-top: 10px;
}

.gallery h3 { font-size: 16px; font-weight: 500; }

.notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(24px, 6vw, 84px);
  border-top: 1px solid var(--line);
  padding-block: clamp(40px, 7vw, 92px);
}

.notes h2, .note h3 {
  font: 400 clamp(23px, 3.1vw, 42px)/1.25 "Songti SC", "Noto Serif CJK SC", serif;
}

.note { max-width: 34em; }
.note h3 { font-size: clamp(21px, 2.15vw, 30px); }
.note p { margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.9; }

.about {
  border-top: 1px solid var(--line);
  padding-block: clamp(30px, 5vw, 66px);
}

.about h2 { color: var(--muted); font-size: 14px; font-weight: 500; }
.about-name { font: 400 clamp(62px, 8vw, 110px)/1 var(--serif); margin-top: 12px; }
.contact {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-block: 21px;
}

dialog {
  max-width: min(94vw, 1400px);
  max-height: 96svh;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  padding: 52px 14px 14px;
}

dialog::backdrop { background: #21201ac9; }
dialog img { max-width: 100%; max-height: 74svh; object-fit: contain; }
dialog figcaption { padding-top: 10px; font-size: 13px; }

.close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .wrap { width: 90%; }
  .nav { padding-block: 16px; }
  .nav-links { gap: 18px; }
  .cover img { object-position: 62% center; }
  .cover figcaption { right: 5%; bottom: 15px; }
  .intro { padding-block: 64px 64px; }
  .intro h1 em { font-size: clamp(67px, 18vw, 108px); }
  .credentials { gap: 2px; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery figure:nth-child(n) { grid-column: 1; margin-top: 0; }
  .notes { grid-template-columns: minmax(0, 1fr); }
}

@media (hover: hover) and (pointer: fine) {
  body { cursor: url("images/aperture-cursor.png") 14 14, auto; }
  a { cursor: pointer; }
  .photo { cursor: zoom-in; }
}

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