body {
  font-family: sans-serif;
  margin: 0;
  background: #0a0a0a;
  color: #fff;
  display: flex;
  height: 100vh;
  overflow: hidden;
}


.sidebar {
  flex: 0 0 300px;
  padding: 2rem;
  box-sizing: border-box;
  text-align: center;
}

.sidebar h1 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.sidebar p {
  line-height: 1.5;
  color: #ccc;
}

.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease;
}

.grid-container {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  box-sizing: border-box;
  max-width: 100%;
  gap: 32px;
}


.grid-item {
  width: calc((100% - 64px) / 3);
  margin-bottom: 32px;
  box-sizing: border-box;
}

.grid-item img {
  border-radius: 8px;
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.grid-item img:hover {
  transform: scale(1.03);
}


.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}


.overlay.active {
  opacity: 1;
  pointer-events: auto;
}


.overlay-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  transform: translateY(50px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.overlay.active img {
  transform: translateY(0);
  opacity: 1;
}

.overlay-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  /* transition: opacity 0.2s ease; */
}

.overlay-btn:hover {
  opacity: 1;
}

.overlay-btn img {
  width: 32px;
  height: 32px;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateY(-50%);
  pointer-events: none;
}

.nav-btn {
  pointer-events: auto;
}

.collection-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: url("icons/stack.svg") no-repeat center center / contain;
  opacity: 1;
  pointer-events: none; /* prevents blocking clicks */
  z-index: 2;
}

.image-wrapper {
  position: relative;
}

.image-wrapper img.grid-image {
  display: block;
  border-radius: 8px;
  width: 100%;
  height: auto;
  transition: transform 0.2s ease;
}

.image-wrapper img.grid-image:hover {
  transform: scale(1.03);
}
/* --- Mobile mode --- */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    flex: none;
    width: 100%;
    padding: 1rem 1.5rem;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  }

  /* Left group: profile + header */
  .sidebar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0;
    object-fit: cover;
  }

  .sidebar h1 {
    margin: 0;
    font-size: 1.2rem;
  }

  /* Right-aligned tagline */
  .sidebar p {
    margin: 0;
    font-size: 0.9rem;
    color: #aaa;
    text-align: right;
  }

  .grid-container {
    flex: 1;
    padding: 1rem;
  }

  .grid-item {
    width: 100%;
    margin-bottom: 16px;
  }

}
