@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f5f4ed;
  --ink: #202b25;
  --muted: #46544b;
  --rule: #d3d9cd;
  --frame: #eeeee6;
  --sage: #e0e7da;
  --hero-bg: #1b342e;
  --hero-text: #fffaf0;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --side: clamp(17px, 5cqw, 64px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 14px;
}

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

body {
  container: page / inline-size;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 14px / 1.5 var(--sans);
}

body:has(.image-dialog[open]) {
  overflow: hidden;
}

h1, h2, p, figure {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

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

:focus-visible {
  outline: 2px solid #40785e;
  outline-offset: 4px;
}

.shell {
  width: min(1240px, 100% - var(--side) * 2);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  background: var(--paper);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.site-header,
.site-header nav {
  display: flex;
  align-items: center;
}

.site-header {
  min-height: 84px;
  justify-content: space-between;
  gap: 12px;
}

.site-brand {
  flex: none;
  width: min(300px, 100%);
}

.wordmark {
  position: relative;
  display: block;
  aspect-ratio: 4.9;
  overflow: hidden;
}

.wordmark img {
  position: absolute;
  top: 50%;
  left: 49.2%;
  width: 106%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
  filter: grayscale(1) contrast(1.3);
  mix-blend-mode: multiply;
}

.site-header nav {
  gap: clamp(13px, 4cqw, 32px);
  font-size: 13px;
}

.site-header nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: none;
}

.site-header nav a:hover {
  text-decoration: underline;
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(324px, 57cqw, 560px);
  background: var(--hero-bg);
}

.hero-image {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 53% 52%;
}

.hero-actions {
  padding-block-end: clamp(20px, 3.5cqw, 40px);
}

.hero-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 13px;
  padding-inline: 14px;
  background: #f7f4e7;
  color: #1b3026;
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
}

.hero-button:hover {
  background: #e2e9d9;
}

.hero-button:focus-visible {
  outline-color: var(--hero-text);
}

.portfolio {
  padding-block: clamp(26px, 4.9cqw, 42px) clamp(33px, 5cqw, 46px);
}

.portfolio > h2 {
  margin-bottom: clamp(15px, 2.6cqw, 24px);
}

h2 {
  font: 400 clamp(31px, 5cqw, 44px) / 1 var(--serif);
}

.pdf-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-top: clamp(12px, 2.6cqw, 24px);
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  text-decoration: underline;
}

.pdf-link:hover,
.contact a:hover {
  text-decoration-thickness: 2px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2.1cqw, 19px);
}

.photo-link {
  display: block;
  cursor: zoom-in;
}

.photo-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 2.7;
  object-fit: contain;
  background: var(--frame);
}

.photo-link:hover {
  outline: 1px solid var(--muted);
  outline-offset: 3px;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  align-items: start;
  gap: 12px clamp(16px, 3cqw, 30px);
  border-top: 1px solid var(--rule);
  padding-block: clamp(22px, 3.7cqw, 32px) clamp(30px, 5cqw, 43px);
}

.about h2 {
  font-size: clamp(30px, 4.8cqw, 41px);
}

.about-heading {
  display: grid;
  gap: 14px;
}

.about-portrait {
  width: 112px;
  height: auto;
}

.about-copy {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(14px, 2cqw, 16px);
  line-height: 1.6;
}

.about-copy p + p {
  margin-top: 10px;
}

.contact {
  padding-block: 22px;
  background: var(--sage);
}

.contact-inner,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.contact-inner {
  justify-content: space-between;
  gap: 10px 20px;
}

.contact h2 {
  margin-bottom: 8px;
  font-size: clamp(25px, 4cqw, 34px);
  line-height: 1.1;
}

.contact p {
  max-width: 46ch;
  font-size: 13px;
}

.contact-actions {
  column-gap: 15px;
}

.contact a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 13px;
  font-weight: 560;
}

@container page (max-width: 510px) {
  .site-header {
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding-top: 12px;
  }

  .site-header nav {
    gap: 24px;
  }
}

@container page (max-width: 445px) {
  .hero-image {
    object-position: 47% 52%;
  }

  .about {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .contact {
    padding-block: 18px;
  }
}

.image-dialog {
  max-width: min(1200px, calc(100vw - 30px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  background: #112820;
  color: var(--hero-text);
}

.image-dialog::backdrop {
  background: #101c19e8;
}

.image-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 10px 2px 16px;
  font-size: 14px;
}

.image-close {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.image-close:hover {
  text-decoration: underline;
}

.image-close:focus-visible {
  outline-color: var(--hero-text);
  outline-offset: -4px;
}

.image-close span {
  font-size: 22px;
  line-height: 1;
}

.image-full {
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 80px);
  margin: auto;
  object-fit: contain;
}

.external-arrow {
  position: relative;
  display: inline-block;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
}

.external-arrow::before,
.external-arrow::after {
  position: absolute;
  content: "";
}

.external-arrow::before {
  top: 1px;
  right: 1px;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.external-arrow::after {
  top: 5px;
  left: 0;
  width: 12px;
  border-top: 1.5px solid currentColor;
  transform: rotate(-45deg);
}
