:root {
  --ink: #1a1a19;
  --ink-2: #45453f;
  --muted: #66665f;
  --paper: #fbfaf7;
  --line: rgba(26, 26, 25, 0.12);
  --dark: #1c1c1b;
  --on-dark: #f1efea;
  --on-dark-muted: rgba(241, 239, 234, 0.6);
  --wrap: 1360px;
  --soft: #f2f0ea;
  --gutter: clamp(16px, 3.2vw, 48px);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Martel Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html:has(dialog[open]) {
  overflow: hidden;
}

::selection {
  background: #e3eeee;
  color: var(--ink);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.eyebrow,
.cta,
.site-nav a,
.back,
.p-meta dt,
.lb-count {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}

.arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease);
}

a:hover .arrow {
  transform: translateX(5px);
}

a:hover .arrow-back {
  transform: translateX(-5px);
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px;
}

.brand img {
  width: auto;
  height: 44px;
}

.site-nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 32px);
}

.site-nav a {
  position: relative;
  padding-block: 6px;
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Home */

.intro {
  padding-block: clamp(16px, 2.6vw, 40px) clamp(24px, 3vw, 44px);
}

.intro-text {
  max-width: 60ch;
  margin: 0;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 300;
  line-height: 1.38;
}

.work {
  padding-bottom: clamp(64px, 8vw, 112px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px) clamp(14px, 1.8vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: block;
  text-decoration: none;
}

.card-media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 7%;
  overflow: hidden;
  background: var(--tint);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.8s var(--ease);
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.card-text {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.3;
}

.card-tags {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.card .arrow {
  color: var(--muted);
}

.card:hover .card-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.card:hover .arrow {
  color: var(--ink);
}

.statement {
  padding-block: clamp(56px, 7vw, 104px);
  border-top: 1px solid var(--line);
}

.statement-text {
  max-width: 34ch;
  margin: 0 0 1.8rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* Project page */

.p-hero {
  padding-block: clamp(24px, 3.5vw, 48px) clamp(88px, 9vw, 136px);
  background: var(--tint);
}

.back {
  display: inline-flex;
  gap: 0.6em;
  margin-bottom: clamp(18px, 2.6vw, 30px);
  text-decoration: none;
}

.p-hero .eyebrow {
  color: var(--ink-2);
}

.p-title {
  margin: 0 0 clamp(18px, 2.6vw, 32px);
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.p-meta {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 20px clamp(24px, 5vw, 80px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.p-meta dl {
  display: grid;
  align-content: start;
  gap: 14px;
  margin: 0;
}

.p-meta dt {
  margin-bottom: 2px;
  color: var(--ink-2);
}

.p-meta dd {
  margin: 0;
}

.p-desc p {
  max-width: 60ch;
  margin: 0 0 1em;
  font-size: 1.02rem;
}

.p-feature {
  margin-top: calc(-1 * clamp(64px, 7vw, 104px));
}

.shot {
  display: block;
  cursor: zoom-in;
}

.shot img {
  width: auto;
  max-height: 86vh;
  margin-inline: auto;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 48px);
  padding-block: clamp(24px, 3vw, 48px) clamp(80px, 10vw, 144px);
}

.gallery-cols {
  display: block;
  columns: 2;
  column-gap: clamp(20px, 2.6vw, 40px);
}

.gallery-cols .shot {
  margin-bottom: clamp(20px, 2.6vw, 40px);
  break-inside: avoid;
}

.gallery-cols .shot img {
  width: 100%;
  max-height: none;
}

.gallery-end {
  height: clamp(80px, 10vw, 144px);
}

.next {
  display: block;
  padding-block: clamp(44px, 6vw, 80px);
  background: var(--tint);
  text-decoration: none;
}

.next-inner {
  display: block;
}

.next .eyebrow {
  display: block;
  color: var(--ink-2);
}

.next-title {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* About */

.about {
  padding-block: clamp(28px, 4.5vw, 64px) clamp(80px, 10vw, 144px);
}

.about-title {
  margin: 0 0 clamp(28px, 4vw, 56px);
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.about-title em {
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 28px clamp(28px, 6vw, 96px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.about-lead {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 300;
  line-height: 1.3;
}

.about-body p {
  margin: 0 0 1.1em;
  font-size: 1.05rem;
}

.about-body .cta {
  margin-top: 0.8rem;
}

/* Contact */

.contact {
  padding-block: clamp(64px, 8vw, 112px) 28px;
  background: var(--soft);
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.contact .eyebrow {
  color: var(--muted);
}

.contact-lede {
  max-width: 40ch;
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 300;
  line-height: 1.35;
}

.contact-email {
  display: inline-block;
  padding-bottom: 0.08em;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.6vw, 2.75rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease);
}

.contact-email:hover {
  background-size: 100% 1px;
}

.contact-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-foot a {
  text-decoration: none;
}

.contact-foot a:hover {
  color: var(--ink);
}

/* Image viewer */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}

.lightbox::backdrop {
  background: var(--paper);
}

.lb-figure {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 72px clamp(12px, 7vw, 104px);
}

.lb-img {
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 144px);
  object-fit: contain;
}

.lb-count {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
}

.lb-btn {
  position: fixed;
  width: 56px;
  height: 56px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 300 2rem/1 var(--serif);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lb-btn:hover,
.lb-btn:focus-visible {
  opacity: 1;
}

.lb-close {
  top: 12px;
  right: 12px;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev {
  left: 8px;
}

.lb-next {
  right: 8px;
}

/* Smaller screens */

@media (max-width: 1180px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .p-meta,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .gallery-cols {
    columns: 1;
  }

  .lb-prev,
  .lb-next {
    top: auto;
    bottom: 10px;
    transform: none;
  }
}

@media (max-width: 520px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .brand img {
    height: 36px;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }
}

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


  .card-media img,
  .arrow {
    transition: none;
  }
}
