:root {
  --paper: #f7f7f5;
  --ink: #0a0a0a;
  --muted: #727272;
  --line: rgba(10, 10, 10, .12);
  --gold: #ad7d13;
  --pad: clamp(22px, 5vw, 78px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(160%) blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand img { width: 74px; height: 32px; object-fit: contain; }
.brand span { font-size: 1.25rem; font-weight: 650; letter-spacing: -.04em; }
.nav { display: flex; gap: clamp(22px, 3vw, 48px); align-items: center; }
.nav a { position: relative; font-size: .96rem; font-weight: 540; }
.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 130px var(--pad) 80px;
  overflow: hidden;
}
.hero-copy { width: min(1120px, 100%); }
.eyebrow { margin: 0 0 24px; color: var(--gold); font-size: .82rem; font-weight: 650; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 {
  max-width: 1000px;
  margin: 0;
  font-size: clamp(3.5rem, 8.8vw, 9.2rem);
  font-weight: 610;
  letter-spacing: -.075em;
  line-height: .93;
}
.hero h1 span { display: block; margin-left: clamp(0px, 12vw, 180px); }
.hero h1 .hero-first { margin-left: 0; }
.scroll-cue { position: absolute; bottom: 28px; left: var(--pad); font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; }
.scroll-cue::after { content: "\2193"; display: inline-block; margin-left: 10px; animation: drift 1.8s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateY(6px); } }

.work {
  scroll-margin-top: 78px;
  padding: 110px var(--pad) 140px;
  border-top: 1px solid var(--line);
}
.section-head { max-width: 1120px; display: flex; justify-content: space-between; align-items: end; gap: 30px; margin: 0 0 44px; }
.section-head h2 { margin: 0; font-size: clamp(2.8rem, 6vw, 6.6rem); font-weight: 600; letter-spacing: -.07em; line-height: 1; }
.section-head p { margin: 0 0 8px; color: var(--muted); }
.work-grid { width: min(1120px, 100%); display: grid; grid-template-columns: repeat(auto-fill, 310px); gap: 24px; justify-content: start; }
.project {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 22px;
  background: #111;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .11);
}
.project-preview { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22, 1, .36, 1), filter .4s ease; }
.project-link { position: absolute; inset: 0; display: flex; align-items: end; padding: 28px; }
.project-link::before { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); }
.project-meta { position: relative; width: 100%; display: flex; align-items: end; justify-content: space-between; gap: 20px; color: #fff; }
.project-kicker { display: block; margin-bottom: 7px; color: rgba(255,255,255,.7); font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; }
.project h3 { margin: 0; font-size: clamp(1.7rem, 3vw, 3rem); letter-spacing: -.045em; }
.project-arrow { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; font-size: 1.4rem; transition: .35s ease; }
.project:hover .project-arrow { color: #000; background: #fff; transform: rotate(-45deg); }
.project:hover .project-preview { transform: scale(1.025); filter: brightness(.76); }
.project-ai { background: #dce3cf; }
.project-ai .project-link::before { background: linear-gradient(transparent, #25341b80); }

.footer { display: flex; justify-content: space-between; gap: 24px; padding: 28px var(--pad) 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }

.gallery-page { background: #f3f3f1; }
.gallery-intro { min-height: 70svh; display: flex; flex-direction: column; justify-content: end; padding: 150px var(--pad) 82px; }
.gallery-intro h1 { margin: 0; font-size: clamp(4.5rem, 12vw, 12rem); font-weight: 610; letter-spacing: -.085em; line-height: .82; }
.gallery-intro-bottom { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-top: 55px; }
.gallery-intro p { width: min(390px, 100%); margin: 0; color: var(--muted); }
.count { color: var(--gold); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }
.gallery-wrap { padding: 40px clamp(34px, 12vw, 180px) 18vh; overflow: hidden; }
.gallery { --gallery-gap: clamp(14px, 1.8vw, 26px); width: min(820px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gallery-gap); align-items: start; }
.photo-group { grid-column: span 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gallery-gap); align-items: start; }
.photo { margin: 0; overflow: hidden; border-radius: clamp(14px, 1.5vw, 24px); background: #ddd; box-shadow: 0 24px 55px rgba(0,0,0,.08); transform: scale(1.55); transform-origin: center; will-change: opacity, filter, transform; }
.photo img { width: 100%; height: auto; aspect-ratio: var(--ratio, 4/5); object-fit: cover; }
.photo.wide img { aspect-ratio: 4/3; }
.photo.square img { aspect-ratio: 1; }
.gallery-end { padding: 0 var(--pad) 10vh; font-size: clamp(2.5rem, 7vw, 7rem); letter-spacing: -.07em; line-height: 1; }

@media (max-width: 900px) {
  .site-header { height: 68px; }
  .brand img { width: 58px; }
  .hero h1 span { margin-left: 0; }
  .work-grid { grid-template-columns: repeat(auto-fill, 310px); }
  .gallery { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .brand span { display: none; }
  .nav { gap: 20px; }
  .nav a { font-size: .9rem; }
  .hero { place-items: end start; min-height: 92svh; }
  .hero h1 { font-size: clamp(3rem, 13vw, 4.6rem); }
  .scroll-cue { display: none; }
  .section-head { display: block; }
  .section-head p { margin-top: 18px; }
  .project { border-radius: 18px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .gallery-intro { min-height: 60svh; }
  .gallery-intro-bottom { display: block; }
  .count { display: block; margin-top: 20px; }
  .gallery { grid-template-columns: 1fr; gap: 22px; }
  .photo-group { grid-column: 1; gap: 22px; }
  .footer { display: block; }
  .footer span { display: block; margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
