body, html {
  font-family: "Montserrat", sans-serif;
  position: relative;
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #111;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.background {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  width: 100vw;
  height: 100vh;
  position: relative;
  z-index: 0;
}

.img-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  background-color: #0f0f0f;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1);
  filter: brightness(0.8) contrast(0.9) saturate(0.9) blur(10px);
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
  display: block;
}

.img-wrapper img.loaded {
  opacity: 1;
  filter: brightness(1) contrast(1.1) saturate(1.1) blur(0);
}

/* Overlay + decorative */
@keyframes pulseOverlay {
  0%, 100% { opacity: 0.96; }
  50% { opacity: 1; }
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.90), rgba(0,0,0,0.96));
  mix-blend-mode: multiply;
  filter: contrast(1.1) brightness(0.95) saturate(1.05);
  pointer-events: none;
  z-index: 2;
  animation: pulseOverlay 6s ease-in-out infinite;
}

.background::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0,0,0,0) 70%, rgba(0,0,0,0.05) 100%);
  z-index: 0;
}

.overlay-bw {
  position: absolute;
  top: 75px;
  left: 12%;
  right: 12%;
  bottom: 2%;
  z-index: 3;
  pointer-events: none;
  backdrop-filter: grayscale(100%);
  -webkit-backdrop-filter: grayscale(100%);
}

/* Tag cloud */
.tag-cloud {
  position: absolute;
  top: 50%;
  left: 50%;

  width: clamp(320px, 80vw, 800px);
  height: clamp(400px, 70vh, 600px);

  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  perspective: 900px;
  z-index: 900;
  display: block;
  pointer-events: none;
}

.tag-cloud a {
  position: absolute;
  top: 55%;
  left: 50%;
  transform-origin: center center;
  color: #f2f2f2;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: color .18s ease, text-shadow .18s ease, transform .18s ease, opacity .18s ease;
  pointer-events: auto;
  will-change: transform, opacity;
  font-size: clamp(12px, 1.5vw, 18px);
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.tag-cloud a:hover {
  color: #ffd166;
  text-shadow: 0 0 12px rgba(255, 209, 102, .35);
  transform: translate(-50%, -50%) scale(1.25);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .tag-cloud {
    width: 80vw;
    height: 80vw;
    perspective: 700px;
  }

  .tag-cloud a {
    font-size: clamp(10px, 3.5vw, 14px);
    letter-spacing: 0.5px;
  }
}


@media (max-width: 320px) {
  .tag-cloud {
    width: 90vw;
    height: 80vw;
    perspective: 600px;
  }

  .tag-cloud a {
    font-size: 10px;
  }
}


.logo-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  pointer-events: none;
  text-align: center;
}

.logo {
  display: block;
  height: 35px;
  max-width: 100%;
  object-fit: contain;
  transition: height 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
  .logo img {
    height: 30px;
  }
}


.logo-container {
  opacity: 0;
  transition: opacity 2s ease;
}

.logo-container.visible {
  opacity: 1;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  align-items: center;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid #333;
  z-index: 1000;
}


.header-nav {
  margin-right: 2%;
  margin-left: auto;
  display: flex;
  gap: 20px;
}

.header-nav a {
  font-family: "Montserrat", sans-serif;
  color: #E0E0E0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s, text-shadow 0.3s;
}

.header-nav a:hover {
  text-shadow: 0 0 10px rgba(255, 255, 240, 0.6);
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #000;
  border-top: 0px solid #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0px;
  z-index: 5000;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-nav a {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-nav a:hover {
  color: #ffd166;
  text-shadow: 0 0 6px rgba(255, 209, 102, 0.4);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .footer-nav {
    gap: 16px;
  }

  .footer-nav a {
    font-size: clamp(11px, 3.5vw, 14px);
  }
}

/* === Mobile navigation === */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  cursor: pointer;
  z-index: 1100;
  transition: all 0.3s ease;
}

.burger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: #E0E0E0;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
  background: #bb86fc;
}
.burger-menu.active span:nth-child(2) {
  opacity: 0;
}
.burger-menu.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
  background: #bb86fc;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 1);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 1099;
}

.mobile-nav.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-nav a {
  color: #E0E0E0;
  font-size: 1.6rem;
  font-weight: 600;
  text-decoration: none;
  margin: 20px 0;
  transition: color 0.3s, text-shadow 0.3s;
}

.mobile-nav a:hover {
  color: #bb86fc;
  text-shadow: 0 0 10px rgba(187,134,252,0.7);
}

/* Responsive */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .burger-menu {
    display: flex;
    margin-left: auto;
  }
}

