:root {
  --paper: #f6f5f1;
  --ink: #181817;
  --muted: #77756f;
  --line: #d9d6ce;
  --accent: #ff6036;
  --page-x: clamp(22px, 6vw, 104px);
  --content-width: 1420px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
  font: inherit;
}

.site-header,
.hero,
.gallery-section,
.notes-section,
.site-footer {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding-right: var(--page-x);
  padding-left: var(--page-x);
}

.site-header {
  display: flex;
  min-height: 122px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -2.5px;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.site-nav {
  display: flex;
  gap: clamp(28px, 5vw, 76px);
}

.site-nav a {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -1px;
}

.site-nav span {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0;
}

.site-nav a::after {
  position: absolute;
  right: -11px;
  bottom: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  content: "";
}

.site-nav a.active::after,
.site-nav a:hover::after {
  background: var(--accent);
}

.menu-toggle {
  display: none;
}

.hero {
  padding-top: clamp(104px, 14vw, 210px);
  padding-bottom: clamp(90px, 13vw, 190px);
}

.eyebrow,
.gallery-count,
.hero-copy,
.hero-index,
.hero-rule p,
.viewer-meta,
.viewer-footer {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.11em;
  line-height: 1.9;
  text-transform: uppercase;
}

.eyebrow,
.gallery-count,
.hero-index,
.hero-rule,
.viewer-footer {
  color: var(--muted);
}

.hero-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(88px, 16vw, 232px);
  font-weight: 600;
  letter-spacing: -0.105em;
  line-height: 0.91;
}

h1 span {
  color: var(--accent);
}

.hero-index {
  padding-bottom: 18px;
  text-align: right;
}

.hero-copy {
  display: flex;
  gap: 28px;
  margin: 34px 0 0;
  color: var(--ink);
  font-size: 12px;
  text-transform: none;
}

.hero-copy span {
  color: var(--muted);
}

.social-row {
  display: flex;
  width: min(100%, 360px);
  align-items: center;
  justify-content: space-between;
  margin-top: 34px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.11em;
  line-height: 1.9;
  text-transform: uppercase;
}

.social-row > span {
  color: var(--muted);
}

.social-row a {
  transition: color 180ms ease;
}

.social-row a:hover {
  color: var(--accent);
}

.hero-rule {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 108px;
}

.hero-rule span {
  width: 68px;
  height: 1px;
  background: var(--ink);
}

.hero-rule p {
  margin: 0;
  font-size: 9px;
}

.gallery-section {
  padding-bottom: clamp(120px, 16vw, 220px);
}

.gallery-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.gallery-intro p {
  margin: 0;
}

.gallery-grid {
  display: grid;
  margin-top: 38px;
  gap: clamp(50px, 7vw, 112px) clamp(22px, 5vw, 86px);
  grid-template-columns: repeat(12, 1fr);
}

.work-card {
  grid-column: span 6;
}

.work-card:nth-child(3n + 1) {
  grid-column: span 7;
}

.work-card:nth-child(3n + 2) {
  grid-column: span 5;
  padding-top: clamp(34px, 8vw, 130px);
}

.work-card:nth-child(3n) {
  grid-column: 3 / span 8;
}

.work-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.work-visual {
  position: relative;
  overflow: hidden;
  background: #e5e2da;
}

.work-card:nth-child(3n + 1) .work-visual {
  aspect-ratio: 1.34;
}

.work-card:nth-child(3n + 2) .work-visual {
  aspect-ratio: 0.9;
}

.work-card:nth-child(3n) .work-visual {
  aspect-ratio: 1.47;
}

.work-visual::after {
  position: absolute;
  inset: 0;
  border: 0 solid rgba(246, 245, 241, 0.72);
  content: "";
  transition: border-width 380ms ease;
}

.work-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(0.2, 0.65, 0.3, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.work-link:hover .work-visual::after {
  border-width: 11px;
}

.work-link:hover img {
  transform: scale(1.045);
}

.upcoming-visual {
  display: grid;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, transparent 49.8%, var(--line) 50%, transparent 50.2%),
    linear-gradient(45deg, transparent 49.8%, var(--line) 50%, transparent 50.2%);
  place-items: center;
}

.upcoming-mark {
  padding: 7px 10px;
  color: var(--muted);
  background: var(--paper);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.14em;
}

.upcoming-card .work-info {
  display: block;
}

.upcoming-card .work-info p {
  margin-top: 7px;
}

.preview-mark {
  position: absolute;
  right: 13px;
  bottom: 11px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.16em;
  pointer-events: none;
  text-transform: uppercase;
}

.work-info {
  display: grid;
  padding-top: 17px;
  gap: 6px 16px;
  grid-template-columns: 1fr auto;
}

.work-info h2,
.work-info p {
  margin: 0;
}

.work-info h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.7px;
}

.work-info p {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.7;
}

.work-info .story-label {
  grid-row: span 2;
  color: var(--ink);
  text-align: right;
}

.notes-section {
  padding-top: clamp(96px, 14vw, 180px);
  padding-bottom: clamp(100px, 16vw, 220px);
  border-top: 1px solid var(--line);
}

.notes-copy {
  max-width: 1000px;
  margin: 26px 0 0;
  font-size: clamp(34px, 5.2vw, 76px);
  font-weight: 600;
  letter-spacing: -0.095em;
  line-height: 1.05;
}

.notes-copy span {
  color: #b0aea7;
}

.site-footer {
  display: grid;
  padding-top: 38px;
  padding-bottom: 54px;
  border-top: 1px solid var(--ink);
  gap: 30px;
  grid-template-columns: 1fr 1fr auto;
}

.site-footer p {
  margin: 3px 0 0;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.8;
  text-transform: uppercase;
}

.footer-meta {
  text-align: right;
}

.viewer {
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0;
  padding: clamp(70px, 9vw, 130px) var(--page-x) 48px;
  border: 0;
  color: var(--ink);
  background: var(--paper);
}

.viewer[open] {
  animation: reveal 320ms ease both;
}

.viewer::backdrop {
  background: rgba(24, 24, 23, 0.42);
}

.viewer-close {
  position: fixed;
  z-index: 3;
  top: 30px;
  right: var(--page-x);
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

.viewer-close span {
  position: absolute;
  top: 19px;
  left: 10px;
  width: 20px;
  height: 1px;
  background: var(--ink);
}

.viewer-close span:first-child {
  transform: rotate(45deg);
}

.viewer-close span:last-child {
  transform: rotate(-45deg);
}

.viewer-header {
  width: min(100%, 1120px);
  margin: 0 auto 46px;
}

.viewer-header h2 {
  margin: 4px 0 18px;
  font-size: clamp(50px, 9vw, 126px);
  letter-spacing: -0.105em;
  line-height: 0.96;
}

.viewer-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--ink);
}

.viewer-images {
  display: grid;
  width: min(100%, 1120px);
  margin: auto;
  gap: 22px;
  grid-template-columns: 1fr 1fr;
}

.viewer-visual {
  position: relative;
  overflow: hidden;
  background: #e5e2da;
}

.viewer-visual:first-child {
  grid-column: 1 / -1;
}

.viewer-images img {
  display: block;
  width: 100%;
  max-height: 800px;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.viewer-footer {
  display: flex;
  width: min(100%, 1120px);
  align-items: center;
  justify-content: space-between;
  margin: 60px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.viewer-footer p {
  margin: 0;
}

.viewer-footer button {
  border: 0;
  background: none;
  cursor: pointer;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  z-index: 10;
  bottom: 24px;
  left: 50%;
  padding: 10px 15px;
  opacity: 0;
  border: 1px solid rgba(246, 245, 241, 0.42);
  color: #fff;
  background: rgba(24, 24, 23, 0.88);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .site-header {
    min-height: 92px;
  }

  .brand {
    font-size: 25px;
    letter-spacing: -2px;
  }

  .menu-toggle {
    position: relative;
    z-index: 5;
    display: block;
    width: 30px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .menu-toggle span {
    position: absolute;
    right: 0;
    width: 24px;
    height: 1px;
    background: var(--ink);
    transition: transform 220ms ease, top 220ms ease;
  }

  .menu-toggle span:first-child {
    top: 7px;
  }

  .menu-toggle span:last-child {
    top: 15px;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    top: 11px;
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    top: 11px;
    transform: rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    z-index: 4;
    inset: 0;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--page-x);
    opacity: 0;
    background: var(--paper);
    gap: 28px;
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  .site-nav.open {
    visibility: visible;
    opacity: 1;
  }

  .site-nav a {
    font-size: 54px;
    letter-spacing: -4px;
  }

  .site-nav span {
    font-size: 10px;
  }

  .hero {
    padding-top: 100px;
    padding-bottom: 96px;
  }

  .hero-title-row {
    display: block;
  }

  h1 {
    margin-left: -5px;
    font-size: 128px;
  }

  .hero-index {
    margin: 32px 0 0;
    padding: 0;
    text-align: left;
  }

  .hero-copy {
    display: block;
    max-width: 280px;
    margin-top: 28px;
    line-height: 2;
  }

  .hero-copy span {
    display: block;
  }

  .hero-rule {
    margin-top: 68px;
  }

  .social-row {
    width: 100%;
    margin-top: 30px;
  }

  .gallery-grid {
    display: block;
    margin-top: 22px;
  }

  .work-card,
  .work-card:nth-child(3n + 1),
  .work-card:nth-child(3n + 2),
  .work-card:nth-child(3n) {
    margin-bottom: 62px;
    padding-top: 0;
  }

  .work-card:nth-child(2n) {
    width: 86%;
    margin-left: auto;
  }

  .work-card:nth-child(3n + 2) .work-visual {
    aspect-ratio: 0.96;
  }

  .work-info h2 {
    font-size: 19px;
  }

  .notes-copy {
    font-size: 47px;
  }

  .site-footer {
    display: block;
  }

  .site-footer p {
    margin-top: 22px;
  }

  .footer-meta {
    text-align: left;
  }

  .viewer {
    padding-top: 84px;
  }

  .viewer-header h2 {
    font-size: 62px;
  }

  .viewer-images {
    display: block;
  }

  .viewer-visual {
    margin-bottom: 14px;
  }

  .viewer-footer {
    display: block;
    margin-top: 38px;
  }

  .viewer-footer button {
    margin-top: 20px;
  }
}
