:root {
  color-scheme: dark;
  --background: #000;
  --surface: #111;
  --text: #eee;
  --muted: #9b9b9b;
  --line: #333;
  --content: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

body.lightbox-open { overflow: hidden; }

a { color: inherit; text-underline-offset: 0.2em; }
a:hover { color: #fff; }
img { display: block; max-width: 100%; }

.content-width {
  width: min(100%, calc(var(--content) + 2 * var(--gutter)));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 1rem;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: var(--background);
  transform: translateY(-120%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner,
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.site-header__inner { min-height: 5rem; }
.site-title { font-size: 1.05rem; font-weight: 650; text-decoration: none; }
.primary-nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }
.primary-nav a { color: var(--muted); text-decoration: none; }
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--text); }

.site-main { min-height: calc(100vh - 12rem); }
.hero { padding-block: clamp(7rem, 18vw, 15rem); }
.hero h1,
.section-intro h1,
.article h1,
.work-detail h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.92;
}
.hero__intro { max-width: 34rem; margin: 2.5rem 0 0; color: var(--muted); font-size: 1.2rem; }
.eyebrow {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-grid { display: grid; grid-template-columns: repeat(3, 1fr); padding-bottom: 7rem; }
.section-card {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 13rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  text-decoration: none;
}
.section-card + .section-card { border-left: 0; }
.section-card span { font-size: 1.35rem; }
.section-card small { align-self: end; grid-column: 1 / -1; color: var(--muted); }
.section-card:hover { background: var(--surface); }

.section-intro { padding-block: clamp(5rem, 11vw, 9rem); border-bottom: 1px solid var(--line); }
.section-intro .prose { margin-top: 2rem; }
.prose { max-width: 44rem; color: #d2d2d2; font-size: 1.08rem; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.page-list { padding-bottom: 7rem; }
.page-list__item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.page-list__item h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.5rem); font-weight: 500; }
.page-list__item h2 a { text-decoration: none; }
.page-list__item p { margin: 0.5rem 0 0; color: var(--muted); }
.text-link, .back-link { color: var(--muted); }

.article, .work-detail { padding-block: clamp(4rem, 10vw, 8rem); }
.article__header { margin: 3rem 0 4rem; }
.article__header p { max-width: 40rem; color: var(--muted); }
.article .prose { font-size: clamp(1.08rem, 2vw, 1.3rem); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 7vw, 6rem) clamp(1rem, 3vw, 2rem);
  padding-block: 5rem 8rem;
}
.work-card__image { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); }
.work-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.work-card__image:hover img { transform: scale(1.015); }
.work-card__details { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1rem; }
.work-card__details h2, .work-card__details p { margin: 0; }
.work-card__details h2 { font-size: 1.15rem; font-weight: 500; }
.work-card__details h2 a { text-decoration: none; }
.work-card__details p { color: var(--muted); }

.image-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, #080808, #191919);
  color: #777;
  text-align: center;
}
.image-placeholder small { overflow-wrap: anywhere; }

.work-detail__header { display: grid; grid-template-columns: 1fr minmax(16rem, 0.4fr); gap: 3rem; margin: 3rem 0 4rem; }
.work-meta { margin: 0; }
.work-meta div { padding: 1rem 0; border-top: 1px solid var(--line); }
.work-meta dt { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.work-meta dd { margin: 0.25rem 0 0; }
.work-detail__text { margin-bottom: 4rem; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.gallery__item { min-height: 15rem; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }

.lightbox {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgb(0 0 0 / 0.94);
}
.lightbox[hidden] { display: none; }
.lightbox__image { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: var(--text);
  color: var(--background);
  font: inherit;
  font-size: 1.8rem;
  cursor: pointer;
}

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.site-footer__inner { min-height: 7rem; }
.site-footer a { color: inherit; }

@media (max-width: 700px) {
  .site-header__inner { align-items: flex-start; flex-direction: column; gap: 0.75rem; padding-block: 1.15rem; }
  .primary-nav { width: 100%; justify-content: space-between; }
  .section-grid, .work-grid, .gallery, .work-detail__header { grid-template-columns: 1fr; }
  .section-card + .section-card { border-top: 0; border-left: 1px solid var(--line); }
  .section-card { min-height: 10rem; }
  .work-grid { gap: 3.5rem; }
  .page-list__item { align-items: start; grid-template-columns: 1fr; gap: 1rem; }
  .gallery__item { min-height: 12rem; }
  .site-footer__inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 0.25rem; }
  .site-footer__inner p { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work-card__image img { transition: none; }
}
