:root {
  --ink: #1d1d1b;
  --muted: #767570;
  --line: #deddd8;
  --paper: #ffffff;
  --accent: #e04f3f;
  --page-width: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

body:has(dialog[open]) {
  overflow: hidden;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.site-header,
.page-shell,
.site-footer {
  width: min(calc(100% - (var(--gutter) * 2)), var(--page-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.wordmark,
.site-nav,
.eyebrow,
.work-count,
.intro-meta,
.artwork-caption,
.footer-label,
.footer-description,
.footer-note {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wordmark {
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: 0;
  text-transform: none;
}

.site-nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
}

.site-nav a {
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.intro {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(42px, 8vw, 128px);
  align-items: center;
  min-height: 560px;
  padding-block: clamp(32px, 5vw, 64px) clamp(88px, 12vw, 152px);
}

.portrait-frame {
  margin: 0;
}

.portrait-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 0.78;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(0.86);
}

.intro-copy {
  max-width: 590px;
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--accent);
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

h1 {
  margin-bottom: 30px;
  font-size: clamp(48px, 7vw, 92px);
}

.bio-placeholder {
  max-width: 480px;
  margin-bottom: 38px;
  color: #42413d;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-bottom: 34px;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.works {
  padding-bottom: clamp(96px, 14vw, 180px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 8px;
}

.section-heading .eyebrow {
  margin-bottom: 16px;
  font-size: clamp(15px, 1.8vw, 21px);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(38px, 5vw, 64px);
}

.work-count {
  margin-bottom: 5px;
  color: var(--muted);
  white-space: nowrap;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 5vw, 72px) clamp(14px, 2.5vw, 32px);
  padding-top: 16px;
}

.artwork {
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

.image-wrap {
  display: block;
  overflow: hidden;
  background: #f2f1ef;
}

.artwork img {
  display: block;
  width: 100%;
  aspect-ratio: 0.717;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 500ms ease;
}

.artwork:hover img,
.artwork:focus-visible img {
  transform: scale(1.07);
  filter: saturate(1.1);
}

.artwork-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  color: var(--muted);
}

.artwork-info {
  display: grid;
  gap: 2px;
}

.artwork-info > span:first-child {
  color: var(--ink);
}

.artwork-medium {
  color: var(--muted);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding-block: 24px 32px;
  border-top: 1px solid var(--line);
}

.contact-footer {
  grid-template-columns: 1fr;
}

.contact-page {
  min-height: calc(100vh - 128px);
  padding-block: clamp(64px, 10vw, 140px) clamp(96px, 14vw, 180px);
}

.contact-page-inner {
  max-width: 720px;
}

.contact-page h1 {
  margin-bottom: 24px;
  font-size: clamp(48px, 7vw, 92px);
}

.contact-page-intro {
  max-width: 580px;
  margin-bottom: 44px;
  color: #42413d;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.footer-label {
  margin-bottom: 0;
  color: var(--muted);
}

.footer-description,
.footer-note {
  margin-bottom: 0;
  color: var(--muted);
}
.footer-note {
  text-align: right;
}

.contact-form-wrap {
  min-width: 0;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  font: 15px/1.45 "Manrope", sans-serif;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  transition: border-color 180ms ease;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--ink);
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: var(--accent);
}

.message-field {
  grid-column: 1 / -1;
}

.contact-form button {
  width: fit-content;
  padding: 0 0 5px;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ink);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-form button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.contact-form button span {
  margin-left: 8px;
  color: var(--accent);
}

.form-status,
.field-error {
  min-height: 0;
  color: var(--accent);
  font-size: 12px;
}

.form-success {
  margin-bottom: 16px;
  color: var(--ink);
}

.form-error:empty,
.form-success:empty,
.field-error:empty {
  display: none;
}

.lightbox {
  width: fit-content;
  max-width: 92vw;
  overflow: visible;
  padding: 0;
  color: var(--paper);
  background: transparent;
  border: 0;
}

.lightbox::backdrop {
  background: rgb(24 24 22 / 88%);
}

.lightbox-inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.lightbox-visual {
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.lightbox-title {
  margin-bottom: 0;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.close-button {
  position: absolute;
  top: 0;
  right: -44px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: var(--paper);
  background: none;
  border: 0;
  cursor: pointer;
}

.close-button span {
  color: var(--paper);
  font-size: 28px;
  line-height: 1;
}

@media (max-width: 720px) {
  .close-button {
    top: 10px;
    right: 10px;
    transform: none;
  }

  .site-header {
    min-height: 60px;
  }

  .site-nav {
    gap: 12px;
    font-size: 10px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 46px;
    padding-block: 32px 88px;
  }

  .portrait-frame {
    width: min(100%, 360px);
  }

  .portrait-frame img {
    aspect-ratio: 0.86;
  }

  h1 {
    margin-bottom: 22px;
  }

  .bio-placeholder {
    font-size: 17px;
  }

  .section-heading {
    display: block;
  }

  .work-count {
    margin-top: 20px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 12px;
    padding-top: 28px;
  }

  .artwork-caption {
    display: block;
    font-size: 9px;
  }

  .artwork-caption > span:last-child {
    display: block;
  }

  .artwork-info {
    display: block;
  }

  .artwork-medium {
    margin-top: 3px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .message-field {
    grid-column: auto;
  }

  .footer-note {
    margin-top: 24px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .artwork img,
  .site-nav a,
  .text-link {
    transition: none;
  }
}