* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #050505;
  color: #f3f3f3;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
}

img {
  max-width: 100%;
}

.site-shell {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: #0d0d0d;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  padding: 20px 28px 18px;
  background: #090909;
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-block;
  color: #f7f7f7;
  text-decoration: none;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0em;
  text-transform: normal;
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif
}

.site-nav a {
  color: #f7f7f7;
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
  text-decoration: none;
}

.site-nav a + a {
  margin-left: 22px;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
}

.nav {
  padding: 1rem 2rem;
  background: #090909;
  border-bottom: 1px solid #222;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.nav a {
  color: #d7d7d7;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: lowercase;
}

.nav a:hover,
.nav a.active {
  color: #fff;
}

.main {
  padding: 22px 20px 10px;
  background: #0f0f0f;
  flex: 1;
}

.gallery-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(160px, 24vw, 360px);
  gap: 10px;
}

.gallery-item:nth-child(18n + 1),
.gallery-item:nth-child(18n + 5),
.gallery-item:nth-child(18n + 9) {
  grid-column: span 5;
}

.gallery-item:nth-child(18n + 2),
.gallery-item:nth-child(18n + 6),
.gallery-item:nth-child(18n + 7),
.gallery-item:nth-child(18n + 16),
.gallery-item:nth-child(18n + 17),
.gallery-item:nth-child(18n + 18) {
  grid-column: span 4;
}

.gallery-item:nth-child(18n + 3),
.gallery-item:nth-child(18n + 4),
.gallery-item:nth-child(18n + 8),
.gallery-item:nth-child(18n + 11),
.gallery-item:nth-child(18n + 12),
.gallery-item:nth-child(18n + 13),
.gallery-item:nth-child(18n + 15) {
  grid-column: span 3;
}

.gallery-item:nth-child(18n + 10),
.gallery-item:nth-child(18n + 14) {
  grid-column: span 6;
}

.gallery-item {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: center;
  cursor: pointer;
  color: inherit;
  overflow: hidden;
}

.gallery-item img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid #2b2b2b;
  background: #111;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-item:hover img {
  opacity: 0.9;
  transform: translateY(-1px);
}

.gallery-caption {
  font-size: 11px;
  color: #c9c9c9;
  margin-top: 8px;
  line-height: 1.5;
}

.gallery-caption a {
  color: #f1f1f1;
  text-decoration: none;
}

.gallery-caption a:hover {
  text-decoration: underline;
}

.page-content {
  padding: 1rem;
  color: #efefef;
  flex: 1;
}

.page-content h1,
.page-content h2,
.page-content h3 {
  margin-top: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-content p {
  font-size: 1.2rem;
  line-height: 1.54;
  color: #d8d8d8;
  max-width: 650px;
  padding: 1rem
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.contact-list li {
  margin-bottom: 10px;
  color: #d9d9d9;
}

.contact-list a {
  color: #ffffff;
}

.contact-form {
  width: 100%;
  max-width: 620px;
  margin-top: 20px;
}

.contact-form-group {
  margin-bottom: 16px;
}

.contact-form label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d3d3d3;
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: #111;
  border: 1px solid #333;
  color: #fff;
  padding: 12px;
  font: inherit;
}

.contact-form button {
  background: #fff;
  color: #111;
  border: 0;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer {
  padding: 20px 24px 40px;
  text-align: center;
  font-size: 12px;
  color: #8b8b8b;
  border-top: 1px solid #222;
  background: #090909;
  margin-top: auto;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal.hidden {
  display: none;
}

.modal-box {
  width: min(100%, 900px);
  background: #111;
  border: 1px solid #333;
  padding: 18px;
  position: relative;
}

.modal-box img {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: #000;
}

.modal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: #f2f2f2;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-close {
  background: transparent;
  color: #fff;
  border: 1px solid #444;
  padding: 6px 10px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .gallery-item:nth-child(n) {
    grid-column: auto;
    height: auto;
  }

  .gallery-item img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-item:nth-child(n) {
    grid-column: 1 / -1;
  }

  .gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .topbar,
  .nav,
  .main,
  .page-content,
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-links {
    flex-direction: column;
    gap: 8px;
  }

  .nav a {
    display: inline-block;
  }
}
