:root {
  --bg: #faf9f7;
  --text: #1f1f1f;
  --muted: #6b6b6b;
  --line: #e6e2dc;
  --overlay: rgba(250, 249, 247, 0.96);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --max-width: 1100px;
  --header-space: clamp(3rem, 8vw, 6rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

#page {
  min-height: 100vh;
}

.site-header {
  padding: var(--header-space) 1.5rem 3rem;
  text-align: center;
}

.site-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.site-subtitle {
  margin: 0.75rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-subtitle:empty {
  display: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
}

.site-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}

.site-nav a:hover {
  opacity: 0.55;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.section-label {
  margin: 0 0 2rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  letter-spacing: 0.08em;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem 1.5rem;
}

.work-item {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  transition: opacity 0.2s ease;
}

.work-item:hover {
  opacity: 0.82;
}

.work-thumb {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ece8e2;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
  color: #333;
}

.testimonials-grid {
  display: grid;
  gap: 1.5rem;
}

.testimonial-card {
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--line);
  background: #fff;
}

.testimonial-quote {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  font-style: italic;
}

.testimonial-author {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.contact-details {
  text-align: center;
  font-size: 1rem;
}

.contact-details p {
  margin: 0.35rem 0;
}

.contact-details a {
  border-bottom: 1px solid currentColor;
}

.site-footer {
  padding: 2rem 1.5rem 3rem;
}

.album-view {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--overlay);
  backdrop-filter: blur(8px);
}

.album-view[hidden] {
  display: none !important;
}

.album-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.back-button {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.album-counter {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.album-stage {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  min-height: 0;
  padding: 1rem 0.5rem 2rem;
}

.album-figure {
  margin: 0;
  height: min(72vh, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-figure img {
  max-height: 72vh;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

.album-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: var(--muted);
  touch-action: manipulation;
  transition: color 0.2s ease;
}

.album-nav-icon {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  opacity: 0.45;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.6));
  transition: opacity 0.2s ease;
}

.album-nav:hover .album-nav-icon,
.album-nav:focus-visible .album-nav-icon {
  opacity: 0.75;
  color: var(--text);
}

body.album-open {
  overflow: hidden;
}

@media (min-width: 700px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .work-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .album-toolbar {
    padding: 1rem 1.25rem;
  }

  .album-stage {
    position: relative;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    padding: 0.5rem 0;
    overflow: hidden;
  }

  .album-figure {
    grid-column: 1;
    grid-row: 1;
    height: 100%;
    min-height: 0;
    padding: 0 0.75rem;
    touch-action: pan-y pinch-zoom;
  }

  .album-figure img {
    max-height: 100%;
  }

  .album-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 18%;
    min-width: 2.75rem;
    max-width: 4.5rem;
    height: auto;
    color: rgba(255, 255, 255, 0.85);
  }

  .album-nav-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.3;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.35));
  }

  .album-nav-prev {
    left: 0;
    padding-left: max(0.35rem, env(safe-area-inset-left));
    justify-content: flex-start;
  }

  .album-nav-next {
    right: 0;
    padding-right: max(0.35rem, env(safe-area-inset-right));
    justify-content: flex-end;
  }

  .album-nav:active .album-nav-icon {
    opacity: 0.55;
  }
}
