html, body {
  margin: 0;
  padding: 0;
  background: black;
  width: 100%;
  min-height: 100%;
  min-height: -webkit-fill-available;
  font-family: sans-serif;
  overflow-x: hidden;
  color: white;
}

#bg {
  position: fixed;
  inset: 0;
  background-image: url('yuri-morozov-main.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(4px);
  transform: scale(1.04);
  z-index: 0;
}

#dark {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.48);
  z-index: 1;
}

.wrapper {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 110px 28px 120px;
  box-sizing: border-box;
}

.close-note {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 55px;
}

h1 {
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 60px;
  color: rgba(255,255,255,0.96);
  text-shadow: 0 0 18px rgba(0,0,0,0.65);
}

.back {
  display: inline-block;
  margin-bottom: 40px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.back[hidden] { display: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 34px;
}

.folder {
  display: block;
  padding: 28px 24px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  border-radius: 999px;
  text-align: center;
  transition: all 0.35s ease;
  box-shadow: 0 0 40px rgba(255,255,255,0.05), inset 0 0 20px rgba(255,255,255,0.04);
}

.folder:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.35);
  transform: scale(1.03);
}

.photo {
  display: block;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.photo img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  opacity: 0.82;
  filter: grayscale(12%) contrast(0.95);
  transition: all 0.35s ease;
}
.photo img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }

.photo img:hover {
  opacity: 1;
  filter: grayscale(0%) contrast(1);
  transform: scale(1.03);
}

#footer-note {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 3;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300;
  color: rgba(255,255,255,0.72);
  text-shadow: 0 0 10px rgba(0,0,0,0.45);
}

#scrollTopBtn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255,255,255,0.92);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.35s ease;
  z-index: 9999;
}

#scrollTopBtn.show { opacity: 1; pointer-events: auto; }
#scrollTopBtn:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }

@media (max-width: 768px) {
  .wrapper { padding: 80px 20px 90px; }
  h1 { font-size: 18px; }
  .grid { grid-template-columns: 1fr; gap: 24px; }
  .photo img { height: auto; }
  #footer-note { bottom: calc(18px + env(safe-area-inset-bottom)); font-size: 8px; width: 90%; text-align: center; }
}
