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

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

@font-face {
  font-family: Manrope;
  src: url('./fonts/manrope.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #151413;
  --wall: #201e1b;
  --ink: #f4f0e8;
  --muted: #bcb5a9;
  --gold: #e3c493;
  --line: #49433b;
  --edge: clamp(1.25rem, 5vw, 5.25rem);
  --space: clamp(4rem, 9vw, 8rem);
  --display: Instrument, Georgia, serif;
  --body: Manrope, Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1rem/1.65 var(--body);
}
body:has(dialog[open]) { overflow: hidden; }
::selection { background: var(--gold); color: var(--ground); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: .95; }
h1, h2 { letter-spacing: -.025em; }
h2 { font-size: clamp(3rem, 6.5vw, 6rem); }
a { color: inherit; text-underline-offset: .3em; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 2 * var(--edge), 92rem); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 5;
  top: .75rem;
  left: var(--edge);
  padding: .65rem 1rem;
  background: var(--gold);
  color: var(--ground);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.skip-link:focus-visible { outline-color: var(--ink); }

.site-header { border-bottom: 1px solid var(--line); }
.masthead { min-height: 5.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.wordmark { font: 400 1.78rem/.95 var(--display); text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; flex-wrap: wrap; column-gap: clamp(1.125rem, 3.2vw, 3.25rem); }
.site-nav a, .small, .caption { font-size: .8125rem; line-height: 1.5; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--ink); text-decoration: underline; }
.nav-art { text-transform: uppercase; }
.muted, .caption { color: var(--muted); }
.arrow { width: 1em; height: 1em; flex: none; }
.text-link, .send {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  width: fit-content;
  min-height: 2.75rem;
  color: var(--gold);
  font-size: .875rem;
  font-weight: 700;
}
.text-link:hover { color: var(--ink); }

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  gap: clamp(1.75rem, 4.1vw, 5rem);
  align-items: center;
  padding-block: clamp(2.75rem, 5vw, 5rem) clamp(3.25rem, 6vw, 6.25rem);
}
.home-hero h1 { font-size: clamp(4.15rem, 8.2vw, 8.6rem); line-height: .83; }
.home-hero h1 em { display: block; font-weight: inherit; color: var(--gold); }
.home-intro > p { margin: 1.8rem 0 .8rem; color: var(--muted); }
.hero-picture { display: block; overflow: hidden; background: var(--wall); }
.hero-picture img {
  width: 100%;
  height: clamp(26rem, 44vw, 46rem);
  object-fit: cover;
  object-position: 50% 49%;
  transition: transform .65s var(--ease);
}
.hero-picture:hover img { transform: scale(1.025); }
.caption { display: flex; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; margin-top: .7rem; }
.caption a { color: var(--ink); }
.caption a:hover { color: var(--gold); }

.selected { padding-block: var(--space); background: var(--wall); }
.selected h2 { margin-bottom: clamp(2rem, 4.25vw, 4.5rem); }
.work-pair, .work-index { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); gap: clamp(1.5rem, 7.6vw, 8rem); }
.work-pair > :first-child { margin-top: clamp(2.5rem, 8vw, 8rem); }
.work-card { display: block; text-decoration: none; }
.work-card-media { display: block; overflow: hidden; background: var(--ground); }
.work-card img { width: 100%; object-fit: cover; transition: transform .65s var(--ease); }
.work-card:hover img { transform: scale(1.035); }
.work-card:hover .work-title { color: var(--gold); }
.work-card.gowtu img { aspect-ratio: 1.08; }
.work-card.krakti img { aspect-ratio: 1.12; object-position: 50% 31%; }
.work-card.libi img { aspect-ratio: 1.22; object-position: 50% 47%; }
.work-card.tent img { aspect-ratio: 1.28; }
.work-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .75rem;
  margin-top: .85rem;
  font: 400 clamp(1.9rem, 4.2vw, 3.75rem)/.99 var(--display);
}
.work-title .arrow { width: .52em; height: .52em; }
.work-card .small { display: block; margin-top: .45rem; }

.page-top { padding-block: clamp(3rem, 7vw, 7.25rem) clamp(2.75rem, 5vw, 5rem); }
.page-top h1, .page-title { font-size: clamp(3.6rem, 10vw, 9.5rem); }
.page-top > p { max-width: 38ch; margin-top: 1.1rem; color: var(--muted); }
.work-index { align-items: start; padding-bottom: var(--space); }
.work-index > :nth-child(2) { margin-top: clamp(2rem, 6.5vw, 6.5rem); }
.project { padding-block: var(--space); scroll-margin-top: 1rem; }
.project:nth-of-type(even) { background: var(--wall); }
.project-lede { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); align-items: end; gap: 1.5rem 3rem; margin-bottom: clamp(1.75rem, 4vw, 3.75rem); }
.project-lede .small { margin-top: .7rem; }
.project-copy { max-width: 49ch; }
.project-copy p { color: var(--muted); }
.project-copy a { margin-top: .5rem; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2.4vw, 2.2rem); align-items: start; }
.gallery-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery:has(> :only-child) { grid-template-columns: minmax(0, 43rem); }
.gallery-pair figure:nth-child(2) { margin-top: clamp(1.25rem, 5vw, 5rem); }
.gallery a { display: block; width: fit-content; max-width: 100%; }
.gallery a:hover img { opacity: .86; }
.gallery img { width: 100%; transition: opacity .3s var(--ease); }

.about, .contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 8vw, 8rem); padding-block: var(--space); align-items: start; }
.about h1, .contact h1 { margin-bottom: clamp(1.5rem, 5vw, 3.5rem); }
.about h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
.about .lead { margin: 0 0 1rem; font: 400 clamp(1.95rem, 3.7vw, 3.35rem)/1.04 var(--display); }
.about .bio > p:not(.lead), .contact .muted { max-width: 43ch; }
.about .bio > p + p { margin-top: 1rem; }
.about .text-link { margin-top: 1.35rem; }
.about figure { margin-top: clamp(.5rem, 3vw, 2.5rem); }
.about figure img { width: 100%; max-height: 47rem; object-fit: cover; object-position: 50% 36%; }
.contact .email { display: inline-block; margin: 1.15rem 0 .5rem; overflow-wrap: anywhere; }
.contact .social { display: block; }
.contact form { margin-top: clamp(.25rem, 2.6vw, 2.3rem); }
.field { display: grid; gap: .4rem; margin-bottom: 1.45rem; }
.field label { font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  background: var(--wall);
  color: var(--ink);
  border: 1px solid #716758;
  border-radius: 0;
  caret-color: var(--gold);
  padding: .7rem .8rem;
}
.field input { min-height: 3.1rem; }
.field textarea { min-height: 10rem; resize: vertical; }
.field input:user-invalid, .field textarea:user-invalid { border-color: #e8ae9e; }
.send { background: var(--gold); color: var(--ground); border: 1px solid var(--gold); padding: .6rem 1.1rem; justify-content: space-between; }
.send:hover { background: var(--ink); border-color: var(--ink); }
.send:disabled { cursor: wait; opacity: .75; }
.form-note { margin: .8rem 0 1rem; max-width: 56ch; }
.standalone { min-height: 55vh; padding-block: var(--space); }
.standalone > p { margin: 1.5rem 0 1rem; max-width: 45ch; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { min-height: 5.75rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem 1.5rem; padding-block: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.35rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.footer-links a:hover { color: var(--ink); }

.viewer { border: 0; background: var(--ground); color: var(--ink); width: min(100% - 2rem, 66rem); max-height: calc(100dvh - 2rem); padding: 1rem; overscroll-behavior: contain; }
.viewer::backdrop { background: rgb(9 8 7 / 91%); }
.viewer img { width: 100%; height: min(69dvh, 55rem); object-fit: contain; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-top: .75rem; flex-wrap: wrap; }
.viewer-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
.viewer button { color: var(--ink); background: var(--wall); border: 1px solid var(--line); min-height: 2.75rem; padding: .3rem .65rem; font-size: .8125rem; }
.viewer button:hover { border-color: var(--gold); }

@media (max-width: 52rem) {
  .home-hero { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: 1.25rem; }
  .home-hero h1 { font-size: clamp(3.9rem, 10vw, 6.1rem); }
  .hero-picture img { height: clamp(23rem, 63vw, 33rem); }
  .work-pair, .work-index { gap: 1.6rem; }
  .about, .contact { gap: 2rem; }
}

@media (max-width: 39rem) {
  .masthead { gap: .1rem; align-items: flex-start; flex-direction: column; padding-top: .9rem; }
  .wordmark { display: inline-flex; align-items: center; min-height: 2rem; }
  .site-nav { width: 100%; justify-content: space-between; gap: .25rem .7rem; }
  .home-hero { display: flex; flex-direction: column; align-items: stretch; gap: 1.15rem; padding-top: 2.2rem; }
  .home-hero h1 { font-size: clamp(3rem, 14.2vw, 5.1rem); line-height: .92; }
  .home-hero h1 em { display: inline; }
  .home-intro > p { margin: .6rem 0 .13rem; }
  .hero-picture img { height: clamp(21.8rem, 104vw, 33rem); }
  .work-pair, .work-index, .project-lede, .about, .contact { grid-template-columns: minmax(0, 1fr); }
  .work-pair, .work-index { gap: 2.5rem; }
  .work-pair > :first-child, .work-index > :nth-child(2) { margin-top: 0; }
  .work-pair > :nth-child(2) { margin-inline-start: 11%; }
  .work-pair > :first-child { margin-inline-end: 11%; }
  .gallery { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .gallery figure:nth-child(2) { margin: 0 0 0 7%; }
  .gallery figure:nth-child(3) { margin-right: 7%; }
  .about figure { margin: 0; }
  .contact form { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
