* {
  box-sizing: border-box;
}

:root {
  --paper: #fbfaf7;
  --ink: #161616;
  --soft-ink: #525252;
  --line: #dad4c9;
  --moss: #4c6a54;
  --clay: #8e3f2f;
  --white: #ffffff;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Roboto", sans-serif;
}

body.lightbox_open {
  overflow: hidden;
}

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

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

.page {
  min-height: 100vh;
}

main {
  border-top: 1px solid var(--line);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(100%, 1400px);
  margin: 0 auto;
  padding: 16px 18px;
  background: var(--paper);
}

.brand {
  font-family: "Ramaraja", serif;
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1;
}

.nav_toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.menu_tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.menu_icon {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.menu_icon span {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 8px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.sr_only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.links_list {
  grid-column: 1 / -1;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

.links_list a {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}

.links_list a:hover,
.links_list a:focus-visible {
  border-color: var(--ink);
}

.nav_toggle:checked + .menu_tab + .links_list {
  display: flex;
}

.nav_toggle:checked + .menu_tab {
  background: var(--ink);
}

.nav_toggle:checked + .menu_tab .menu_icon span {
  background: var(--white);
}

.nav_toggle:checked + .menu_tab .menu_icon span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav_toggle:checked + .menu_tab .menu_icon span:nth-child(2) {
  opacity: 0;
}

.nav_toggle:checked + .menu_tab .menu_icon span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.gallery_header {
  width: min(100%, 1760px);
  margin: 0 auto;
  padding: 40px 18px 24px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 14px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--moss);
  font-size: 0.95rem;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-family: "Ramaraja", serif;
  font-size: 3.8rem;
  font-weight: 400;
  line-height: 0.95;
}

.photo_container {
  width: min(100%, 1760px);
  margin: 0 auto;
  padding: 12px 18px 58px;
}

.gallery_masonry {
  column-count: 1;
  column-gap: 10px;
}

.gallery_top_grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.gallery_top_grid .image,
.gallery_masonry .image {
  width: 100%;
  margin: 0 0 10px;
  border-radius: 0;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
  break-inside: avoid;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.gallery_top_grid .image {
  margin-bottom: 0;
}

.gallery_top_grid .image:hover,
.gallery_masonry .image:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.12);
}

.top_button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  text-decoration: none;
  z-index: 30;
}

.top_button:hover,
.top_button:focus-visible {
  border-color: var(--ink);
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
}

.lightbox.is_open {
  opacity: 1;
  visibility: visible;
}

.lightbox_image {
  max-width: min(94vw, 1500px);
  max-height: calc(100vh - 48px);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.lightbox_close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-family: "Roboto", sans-serif;
  font-size: 1.35rem;
  cursor: pointer;
}

.lightbox_close:hover {
  background: var(--white);
}

.footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: min(100%, 1760px);
  margin: 0 auto;
  padding: 26px 18px 36px;
  border-top: 1px solid var(--line);
  color: var(--soft-ink);
}

.footer_identity {
  display: grid;
  gap: 6px;
}

.footer_identity p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.footer_identity span {
  line-height: 1.5;
}

.footer_links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer a {
  width: fit-content;
  color: var(--clay);
  font-weight: 800;
}

@media (min-width: 390px) {
  .brand {
    font-size: 2rem;
  }
}

@media (min-width: 720px) {
  .topbar {
    display: flex;
    justify-content: space-between;
    padding: 18px 26px;
  }

  .brand {
    font-size: 2.8rem;
  }

  .menu_tab {
    display: none;
  }

  .links_list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-top: 0;
  }

  .links_list a {
    background: transparent;
  }

  .gallery_header {
    padding: 58px 34px 34px;
  }

  h1 {
    font-size: 5.8rem;
  }

  .photo_container {
    padding-right: 34px;
    padding-left: 34px;
  }

  .gallery_masonry {
    column-count: 2;
    column-gap: 12px;
  }

  .gallery_top_grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
  }

  .gallery_masonry .image {
    margin-bottom: 12px;
  }

  .top_button {
    right: 24px;
    bottom: 24px;
  }

  .footer {
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: start;
    padding-right: 34px;
    padding-left: 34px;
  }

  .footer_links {
    justify-content: flex-end;
  }
}

@media (min-width: 1280px) {
  .topbar {
    width: min(100%, 1640px);
    padding-right: clamp(24px, 2vw, 48px);
    padding-left: clamp(24px, 2vw, 48px);
  }

  .gallery_header {
    padding-top: 68px;
  }

  .gallery_masonry {
    column-gap: 14px;
  }

  .gallery_top_grid {
    gap: 14px;
    margin-bottom: 14px;
  }

  .gallery_masonry .image {
    margin-bottom: 14px;
  }
}
