:root {
  --max-content-width: 1400px;
  --page-pad: clamp(18px, 3.8vw, 56px);
  --column-gap: clamp(20px, 3.3vw, 48px);
  --row-gap: clamp(26px, 5vw, 72px);
  --photo-border-width: clamp(7px, 0.9vw, 11px);
  --card-border: #f7f7f4;
  --card-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
  --text-light: #f1f4ff;
  --button-bg: rgba(255, 255, 255, 0.2);
  --button-border: rgba(255, 255, 255, 0.5);
  --button-bg-hover: rgba(255, 255, 255, 0.28);
  --noise-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='600' height='600' filter='url(%23n)'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font: inherit;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Archivo Black", "Segoe UI", Arial, sans-serif;
  color: var(--text-light);
  background:
    radial-gradient(circle at 20% 18%, rgba(66, 102, 255, 0.78), rgba(22, 53, 225, 0) 34%),
    radial-gradient(circle at 78% 82%, rgba(58, 88, 248, 0.74), rgba(18, 39, 194, 0) 32%),
    linear-gradient(180deg, #1941e7 0%, #1032d6 45%, #0d2ac9 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    var(--noise-texture);
  background-size:
    100% 100%,
    600px 600px;
  mix-blend-mode: overlay;
  filter: contrast(20%) brightness(100%);
  opacity: 1;
}

.container {
  width: min(var(--max-content-width), 100% - (var(--page-pad) * 2));
  margin-inline: auto;
}

.page-shell {
  padding-top: clamp(26px, 5vw, 52px);
  padding-bottom: 36px;
}

.site-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: clamp(28px, 6vw, 72px);
}

.logo-link {
  display: block;
}

.logo {
  width: clamp(160px, 20vw, 278px);
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25));
}

.question-button {
  position: absolute;
  right: 0;
  top: 6px;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25));
  z-index: 30;
}

.question-button img {
  width: clamp(30px, 3vw, 44px);
  height: clamp(30px, 3vw, 44px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--row-gap) var(--column-gap);
}

.photo-card {
  margin: 0;
  width: 100%;
  justify-self: center;
  max-width: 420px;
  transition: transform 160ms ease;
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--photo-border-width) solid var(--card-border);
  border-radius: 2px;
  box-shadow: var(--card-shadow);
  background: #fff;
}

.photo-card:nth-child(6n + 1),
.photo-card:nth-child(6n + 4) {
  margin-top: clamp(0px, 2vw, 22px);
}

.photo-card:nth-child(6n + 2),
.photo-card:nth-child(6n + 5) {
  margin-top: clamp(10px, 2.5vw, 36px);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(24px, 4vw, 48px);
}

.load-more,
.close-about {
  min-width: 140px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  color: #1941e7;
  font-size: 0.98rem;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
  box-shadow: 0 10px 20px rgba(9, 24, 123, 0.26);
}

.load-more:hover,
.close-about:hover {
  background: #dce5ff;
  transform: translateY(-1px);
  box-shadow: 0 13px 24px rgba(9, 24, 123, 0.3);
}

.load-more:active,
.close-about:active {
  transform: translateY(0);
  box-shadow: 0 8px 16px rgba(9, 24, 123, 0.24);
}

.site-footer {
  margin-top: clamp(30px, 4vw, 64px);
  text-align: center;
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  color: #87a0ff;
}

.about-dialog {
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(66, 102, 255, 0.78), rgba(22, 53, 225, 0) 34%),
    radial-gradient(circle at 78% 82%, rgba(58, 88, 248, 0.74), rgba(18, 39, 194, 0) 32%),
    linear-gradient(180deg, #1941e7 0%, #1032d6 45%, #0d2ac9 100%);
  color: #fff;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  z-index: 20;
}

.about-dialog::backdrop {
  background: transparent;
}

.about-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    var(--noise-texture);
  background-size:
    100% 100%,
    600px 600px;
  mix-blend-mode: overlay;
  filter: contrast(20%) brightness(100%);
  opacity: 1;
}

.about-content {
  width: min(980px, 92vw);
  min-height: 100dvh;
  margin: 0 auto;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: clamp(18px, 2.2vw, 30px);
  position: relative;
  z-index: 2;
}

.about-content h2 {
  margin: 0;
  color: #87a0ff;
  font-size: clamp(1.2rem, 2.25vw, 2.1rem);
  letter-spacing: 0.01em;
}

.about-content p {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(2rem, 5.45vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: 0.005em;
}

.gallery-empty {
  text-align: center;
  font-size: 1.08rem;
  padding: 48px 12px;
}

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

@media (max-width: 620px) {
  :root {
    --page-pad: clamp(24px, 7vw, 34px);
    --photo-border-width: clamp(10px, 2vw, 14px);
  }

  .site-header {
    margin-bottom: clamp(24px, 9vw, 44px);
  }

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

  .photo-card {
    max-width: min(94vw, 410px);
  }

  .about-content p {
    max-width: 15ch;
    font-size: clamp(1.75rem, 10.4vw, 2.7rem);
    line-height: 1.05;
  }
}
