html {
  scroll-behavior: smooth;
}

:root {
  --bg: #6f0b09;
  --ink: #f3e8c8;
  --muted: rgba(243, 232, 200, 0.72);
  --line: rgba(243, 232, 200, 0.22);
  color: var(--ink);
  background: var(--bg);
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-weight: 200;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 24px clamp(20px, 4vw, 68px) 0;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  color: var(--ink);
  font-size: 14px;
  font-weight: 200;
}

.nav-right {
  justify-content: flex-end;
  gap: clamp(18px, 2vw, 30px);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--ink);
}

.social-link svg {
  width: 26px;
  height: 26px;
  display: block;
}

.photography-page {
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - 86px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.photo-viewer {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: clamp(460px, 72vh, 820px);
  padding: clamp(34px, 5vw, 72px) clamp(54px, 8vw, 112px);
}

.photo-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 1500px);
  min-width: 0;
  max-width: 100%;
  max-height: 78vh;
  margin: 0;
}

.photo-frame img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  filter: saturate(0.9) contrast(0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  cursor: zoom-in;
}

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

.change-image {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 5px 7px;
  border: 1px solid rgba(243, 232, 200, 0.45);
  background: rgba(111, 11, 9, 0.55);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 200;
  line-height: 1;
  opacity: 0;
  transition: opacity 160ms ease;
}

.photo-frame:hover .change-image,
.photo-frame:focus-within .change-image {
  opacity: 1;
}

.viewer-arrow {
  position: fixed;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 52px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 30px;
  font-weight: 200;
  line-height: 1;
  transform: translateY(-50%);
}

.viewer-arrow:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

.viewer-arrow:disabled {
  cursor: default;
  opacity: 0.35;
}

.viewer-prev {
  left: 24px;
}

.viewer-next {
  right: 24px;
}

.section-contact {
  display: grid;
  place-items: center;
  padding: clamp(58px, 7vw, 104px) clamp(24px, 4vw, 72px) clamp(44px, 5vw, 76px);
}

.section-contact p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 200;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 820px) {
  .site-header {
    min-height: 70px;
    padding-inline: 20px;
  }

  .nav-left {
    flex-wrap: wrap;
    gap: 14px 18px;
  }

  .nav-right {
    gap: 12px;
  }

  .photo-viewer {
    min-height: clamp(360px, 68vh, 640px);
    padding: 22px 34px;
  }

  .photo-frame,
  .photo-frame img {
    max-width: 100%;
    max-height: 76vh;
  }

  .change-image {
    opacity: 1;
    font-size: 10px;
  }

  .viewer-arrow {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .viewer-prev {
    left: 4px;
  }

  .viewer-next {
    right: 4px;
  }

  .section-contact {
    padding-block: 44px 38px;
  }
}

@media (pointer: coarse) {
  .viewer-arrow {
    width: 44px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .change-image {
    transition: none;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(34px, 5vw, 72px);
  background: rgba(111, 11, 9, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  width: auto;
  height: auto;
  max-width: min(88vw, 1500px);
  max-height: 82vh;
  object-fit: contain;
  cursor: default;
  filter: none;
  image-rendering: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 24px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #f3e8c8;
  cursor: pointer;
}

.lightbox-close::before,
.lightbox-close::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 16px;
  height: 1px;
  background: currentColor;
}

.lightbox-close::before {
  transform: rotate(45deg);
}

.lightbox-close::after {
  transform: rotate(-45deg);
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 52px;
  border: 0;
  background: transparent;
  color: #f3e8c8;
  cursor: pointer;
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 30px;
  font-weight: 200;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .lightbox {
    padding: 22px;
  }

  .lightbox img {
    max-width: 92vw;
    max-height: 78vh;
  }

  .lightbox-arrow {
    width: 30px;
    height: 44px;
    font-size: 24px;
  }

  .lightbox-prev {
    left: 4px;
  }

  .lightbox-next {
    right: 4px;
  }
}
