:root {
  --bg: #f5f2ea;
  --text: #131313;
  --muted: #5f5b55;
  --line: #d8d2c7;
  --overlay: rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  line-height: 1.7;
}

.intro-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.intro-row {
  min-height: 8.5rem;
  padding: 1.3rem 0 1.1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem;
}

.site-name {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 0.94;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-tagline {
  margin: 0;
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  color: var(--muted);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 242, 234, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: clamp(0.9rem, 3vw, 2.1rem);
  padding: 0.75rem 0;
}

.top-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  border-color: currentColor;
}

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

h1,
h2,
p,
figcaption,
a,
button {
  font-family: "Manrope", system-ui, sans-serif;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.container {
  width: min(1120px, 90vw);
  margin-inline: auto;
}

.section {
  padding: clamp(3.3rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 3rem;
}

.hero {
  position: relative;
  min-height: 100vh;
  border: none;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 55%);
}

.bio-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.4rem, 4vw, 4rem);
  align-items: center;
}

#aboutText {
  margin: 0;
  max-width: 52ch;
  color: #22201c;
  text-align: justify;
  text-justify: inter-word;
}

.bio-role {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.bio-image-wrap {
  margin: 0;
}

#aboutImage {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #ebe5d9;
}

.gallery-carousel {
  position: relative;
  --caption-space: 2.1rem;
}

.gallery-nav {
  position: absolute;
  top: calc((100% - var(--caption-space)) / 2);
  transform: translateY(-50%);
  z-index: 2;
  border: 1px solid var(--line);
  background: #f8f5ee;
  color: var(--text);
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-nav:disabled {
  opacity: 0.4;
  cursor: default;
}

#galleryPrev {
  left: 0.45rem;
}

#galleryNext {
  right: 0.45rem;
}

.gallery-viewport {
  overflow: hidden;
}

.gallery-track {
  display: flex;
  gap: 1.2rem;
  transition: transform 0.35s ease;
}

.gallery-item {
  margin: 0;
  min-width: calc((100% - 2.4rem) / 3);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #ebe5d9;
}

.gallery-item figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-wrap {
  padding-bottom: 0.5rem;
}

.contact-section {
  padding: 2rem 0 2.3rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
}

.contact-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
}

.contact-icon svg {
  width: 100%;
  height: 100%;
}

.contact-list a:hover,
.contact-list a:focus-visible {
  opacity: 0.75;
}

.empty-state {
  color: var(--muted);
  font-style: italic;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(9, 9, 9, 0.9);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: clamp(0.9rem, 2.3vw, 2rem);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-height: 92vh;
}

#lightboxImage {
  max-height: calc(92vh - 2.2rem);
  width: auto;
  max-width: min(94vw, 1200px);
  margin-inline: auto;
  object-fit: contain;
}

#lightboxCaption {
  margin-top: 0.55rem;
  color: #ddd7cd;
  text-align: center;
  font-size: 0.86rem;
}

.lightbox-nav,
.lightbox-close {
  border: none;
  cursor: pointer;
  color: #efeae0;
  background: transparent;
}

.lightbox-nav {
  font-size: clamp(1.9rem, 4vw, 3rem);
  padding: 0.4rem 0.6rem;
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.85rem;
  font-size: 2rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
}

@media (max-width: 900px) {
  .gallery-item {
    min-width: calc((100% - 1.2rem) / 2);
  }

  .intro-row {
    min-height: 7rem;
    grid-template-columns: 1fr;
    align-items: end;
    gap: 0.5rem;
  }

  .site-tagline {
    white-space: normal;
  }
}

@media (max-width: 720px) {
  .bio-grid {
    grid-template-columns: 1fr;
  }

  .gallery-carousel {
    position: relative;
    --caption-space: 2.3rem;
  }

  .gallery-item {
    min-width: 100%;
  }

  .top-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-inline: 5vw;
  }

  .lightbox {
    grid-template-columns: 1fr;
  }

  .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .lightbox-prev {
    left: 0.2rem;
  }

  .lightbox-next {
    right: 0.2rem;
  }
}
