:root {
  color-scheme: light;
  --bg: #fbfaf6;
  --text: #292e27;
  --muted: #696c62;
  --accent: #4a5844;
  --line: #e1e4d7;
  --surface: #f1f3eb;
  --reflection: rgba(255, 255, 255, 0.72);
  --ambient: rgba(230, 239, 216, 0.35);
  --motif-opacity: 0.14;
  --image-bg: #e6e5dd;
  --selection: #dfe5d6;
  --instagram: #b52e72;
  --facebook: #2164c2;
  --header-height: 102px;
  --sans: "DM Sans", Arial, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --content-width: 1280px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1e2a23;
  --text: #f2efe5;
  --muted: #bec7b7;
  --accent: #d9c38b;
  --line: #3b4c3d;
  --surface: #29382c;
  --reflection: rgba(255, 255, 255, 0.055);
  --ambient: rgba(184, 206, 153, 0.035);
  --motif-opacity: 0.18;
  --image-bg: #2b382d;
  --selection: #46503b;
  --instagram: #f28abe;
  --facebook: #82b6ff;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  background:
    radial-gradient(ellipse 900px 650px at 100% 0, var(--reflection), transparent 70%),
    radial-gradient(ellipse 800px 800px at 0 45%, var(--ambient), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--selection);
  color: var(--text);
}

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

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

button {
  font: inherit;
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.section-wrap,
.site-header,
.site-footer {
  width: min(var(--content-width), calc(100% - 112px));
  margin-inline: auto;
}

.site-chrome {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(120deg, var(--reflection), transparent 65%), var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--reflection);
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-height);
  gap: 24px;
}

.logo {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

nav {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  gap: 4px;
}

nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
}

nav a:hover,
nav a[aria-current] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

nav a,
.social-link,
.site-footer > a:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  transition: color 180ms ease;
}

nav a:hover,
.social-link:hover,
.site-footer > a:last-child:hover {
  color: var(--text);
}

.header-socials {
  display: flex;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-items: center;
  gap: 8px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  gap: 7px;
}

.instagram-link,
.instagram-link:hover {
  color: var(--instagram);
}

.facebook-link,
.facebook-link:hover {
  color: var(--facebook);
}

.social-link:hover {
  background: var(--surface);
  border-radius: 50%;
}

.theme-toggle {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

nav a[aria-current],
.theme-toggle {
  background-image: linear-gradient(135deg, var(--reflection), transparent 70%);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.theme-sun,
[data-theme="dark"] .theme-moon {
  display: none;
}

[data-theme="dark"] .theme-sun {
  display: block;
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.instagram-dot {
  fill: currentColor;
  stroke: none;
}

.social-link span {
  display: none;
}

.hero-banner {
  padding-block: 74px 0;
}

.hero-banner,
.about,
.album-heading {
  position: relative;
  isolation: isolate;
}

.hero-banner::before,
.about::before,
.album-heading::before {
  position: absolute;
  z-index: -1;
  content: "";
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: var(--motif-opacity);
  pointer-events: none;
}

.hero-banner::before {
  top: 52px;
  right: 12px;
  width: clamp(160px, 24vw, 280px);
  height: 210px;
  background-image: url("assets/camera.svg");
  transform: rotate(12deg);
}

.about::before {
  bottom: 36px;
  left: 4%;
  width: 220px;
  height: 260px;
  background-image: url("assets/lens.svg");
  transform: rotate(-18deg);
}

.album-heading::before {
  top: 32px;
  right: 24px;
  width: 180px;
  height: 210px;
  background-image: url("assets/lens.svg");
  transform: rotate(18deg);
}

.hero-banner-content.section-wrap {
  width: 100%;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
}

em {
  color: var(--accent);
  font-weight: inherit;
}

.hero-title {
  margin-top: 24px;
  font-size: clamp(3.5rem, 7.6vw, 7rem);
  line-height: 1.07;
  letter-spacing: -0.055em;
}

.hero-introduction {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-block: 30px 48px;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.text-link,
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 28px;
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
  font-size: 0.82rem;
}

.text-link span,
.contact-link span {
  transition: transform 180ms ease;
}

.text-link:hover span,
.contact-link:hover span {
  transform: translate(2px, -2px);
}

.hero-photograph > img {
  aspect-ratio: 2.15 / 1;
  object-fit: cover;
  object-position: center;
  background: var(--image-bg);
}

.hero-photograph figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
  color: var(--muted);
  font-size: 0.65rem;
}

.work {
  padding-block: 108px 100px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 40px;
}

.section-heading h2 {
  margin-top: 12px;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.section-heading > p {
  color: var(--muted);
  font-size: 0.78rem;
}

.portfolio-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 52px 32px;
}

.work-category {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.category-heading {
  display: flex;
  order: 1;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
}

.category-heading .eyebrow {
  font-size: 0.59rem;
  letter-spacing: 0.12em;
}

.category-heading h3 {
  margin-top: 4px;
  font-size: 1.8rem;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.category-note {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}

.category-cover {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: 12px;
  background: var(--image-bg);
}

.category-cover img {
  grid-area: 1 / 1;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--image-bg);
  opacity: 0;
  transition: opacity 900ms ease, transform 600ms ease;
}

.category-cover img.is-active {
  opacity: 1;
}

.category-cover:hover img {
  transform: scale(1.035);
}

.cover-action {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  font-size: 1.15rem;
  border-radius: 50%;
}

.category-slideshow {
  position: relative;
}

.slideshow-controls {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.7rem;
}

.slideshow-toggle {
  min-width: 64px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.slideshow-toggle:hover {
  border-color: var(--accent);
}

.slideshow-toggle:disabled {
  cursor: not-allowed;
}

.slideshow-message:not(:empty) {
  position: absolute;
  inset: auto 0 0;
  padding: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.75rem;
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding-block: 88px 112px;
  border-top: 1px solid var(--line);
}

.about-heading h2 {
  margin-top: 24px;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.about-signature {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.85rem;
}

.story-copy {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.95;
}

.story-copy p + p {
  margin-top: 20px;
}

.story-copy .text-link {
  margin-top: 28px;
  color: var(--text);
}

.cta {
  padding: 88px 24px 96px;
  background: linear-gradient(125deg, var(--reflection), transparent 60%), var(--surface);
  text-align: center;
}

.cta h2 {
  margin-block: 24px 28px;
  font-size: clamp(2.8rem, 5.7vw, 5rem);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 32px;
}

.site-footer .logo {
  font-size: 1.3rem;
}

.site-footer p {
  color: var(--muted);
  font-size: 0.65rem;
}

.album-heading {
  padding-block: 52px 48px;
}

.album-back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 0.8rem;
}

.album-heading h1 {
  margin-block: 12px 16px;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.album-heading > p:last-child {
  color: var(--muted);
  font-size: 0.85rem;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 88px;
}

.gallery-photo {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: none;
  background: var(--image-bg);
  border-radius: 8px;
  cursor: zoom-in;
}

.gallery-photo img {
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  transition: transform 500ms ease;
}

.gallery-photo:hover img {
  transform: scale(1.025);
}

dialog.photo-viewer {
  position: fixed;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 72px;
  border: none;
  background: #171a16;
  color: #f7f5f0;
}

dialog.photo-viewer[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

dialog.photo-viewer::backdrop {
  background: #171a16;
}

body:has(.photo-viewer[open]) {
  overflow: hidden;
}

.viewer-figure {
  display: flex;
  max-width: 100%;
  max-height: 100%;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

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

.viewer-caption {
  color: #c1c6b8;
  font-size: 0.75rem;
}

.viewer-close,
.viewer-previous,
.viewer-next {
  position: absolute;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #53594d;
  border-radius: 50%;
  background: #252b21;
  color: #f7f5f0;
  cursor: pointer;
  font-size: 1.4rem;
}

.viewer-close:hover,
.viewer-previous:hover,
.viewer-next:hover {
  background: #3a4432;
}

.viewer-close {
  top: 18px;
  right: 18px;
}

.viewer-previous,
.viewer-next {
  top: 50%;
  transform: translateY(-50%);
}

.viewer-previous {
  left: 14px;
}

.viewer-next {
  right: 14px;
}

@media (max-width: 1000px) {
  .section-wrap,
  .site-header,
  .site-footer {
    width: calc(100% - 64px);
  }

  .category-note {
    display: none;
  }

  .about {
    gap: 40px;
  }

  .photo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 112px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 112px;
    gap: 0 16px;
    padding-block: 12px;
  }

  .site-header .logo {
    grid-column: 1;
    grid-row: 1;
    font-size: 1.5rem;
  }

  .header-socials {
    grid-column: 2;
    gap: 4px;
  }

  nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 4px;
  }

  nav a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  .about::before {
    width: 160px;
    height: 200px;
  }

}

@media (max-width: 600px) {
  .hero-banner::before,
  .about::before,
  .album-heading::before {
    display: none;
  }

  .section-wrap,
  .site-header,
  .site-footer {
    width: calc(100% - 40px);
  }

  .hero-banner {
    padding-top: 44px;
  }

  .hero-title {
    font-size: clamp(2.8rem, 10.5vw, 4rem);
  }

  .hero-introduction,
  .section-heading {
    flex-direction: column;
    align-items: start;
    gap: 20px;
  }

  .hero-introduction {
    margin-bottom: 32px;
  }

  .hero-photograph > img {
    aspect-ratio: 4 / 3;
  }

  .hero-photograph figcaption span:last-child {
    display: none;
  }

  .work {
    padding-block: 64px;
  }

  .portfolio-categories {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .category-note {
    display: block;
    max-width: 45%;
    text-align: right;
  }

  .category-heading h3 {
    font-size: 1.6rem;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 52px 64px;
  }

  .cta {
    padding-block: 64px;
  }

  .site-footer {
    flex-wrap: wrap;
    gap: 16px;
    padding-block: 24px;
  }

  .site-footer p {
    order: 1;
    width: 100%;
  }

  .album-heading {
    padding-block: 28px 36px;
  }

  .photo-gallery {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 48px;
  }

  dialog.photo-viewer {
    padding: 72px 16px 100px;
  }

  .viewer-previous,
  .viewer-next {
    top: auto;
    bottom: 20px;
    transform: none;
  }

  .viewer-previous {
    left: calc(50% - 60px);
  }

  .viewer-next {
    right: calc(50% - 60px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
