body {
  margin: 0;
  background: linear-gradient(#8fd3ff, #0a1a2f);
  transition: background 1s ease;
  font-family: 'Libre Baskerville', serif;
  color: #f2f6ff;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.05;
  z-index: 9999;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,0) 60%,
    rgba(0,0,0,0.25) 100%
  );
  z-index: 9998;
}


@keyframes float {
  from { transform: translateY(0); opacity: 0.7; }
  to   { transform: translateY(-100vh); opacity: 0; }
}

.bubble {
  position: fixed;
  bottom: -20px;
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  animation: float 10s linear infinite;
}

.layer {
  padding: 160px 40px;
  position: relative;
  backdrop-filter: blur(2px);
  overflow: hidden;
  transition: background 0.6s ease;
}

.layer + .layer::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45),
    transparent
  );
  pointer-events: none;
}

.layer.surface {
  background: linear-gradient(
    to bottom,
    rgba(143, 211, 255, 0.0) 0%,
    rgba(0, 60, 120, 0.10) 100%
  );
}

.layer.shallow {
  background: linear-gradient(
    to bottom,
    rgba(0, 60, 120, 0.10) 0%,
    rgba(0, 50, 110, 0.18) 100%
  );
}

.layer.mid {
  background: linear-gradient(
    to bottom,
    rgba(0, 50, 110, 0.18) 0%,
    rgba(0, 40, 100, 0.28) 100%
  );
}

.layer.deep {
  background: linear-gradient(
    to bottom,
    rgba(0, 40, 100, 0.28) 0%,
    rgba(0, 30, 90, 0.40) 100%
  );
}

.layer.abyss {
  background: linear-gradient(
    to bottom,
    rgba(0, 30, 90, 0.40) 0%,
    rgba(0, 20, 70, 0.55) 100%
  );
}

.layer.underdeep {
  background: linear-gradient(
    to bottom,
    rgba(0, 20, 70, 0.55) 0%,
    rgba(0, 15, 55, 0.70) 100%
  );
}

.layer.trench {
  background: linear-gradient(
    to bottom,
    rgba(0, 15, 55, 0.70) 0%,
    rgba(0, 10, 40, 0.82) 100%
  );
}

.layer.void {
  background: linear-gradient(
    to bottom,
    rgba(0, 10, 40, 0.82) 0%,
    rgba(0, 5, 25, 0.92) 100%
  );
}

.layer.forgotten {
  background: linear-gradient(
    to bottom,
    rgba(0, 5, 25, 0.92) 0%,
    rgba(0, 3, 15, 1) 100%
  );
}

.layer.shallow video { filter: brightness(0.95); }
.layer.mid video { filter: brightness(0.92); }
.layer.deep video { filter: brightness(0.88); }
.layer.abyss video { filter: brightness(0.82); }
.layer.underdeep video { filter: brightness(0.75); }
.layer.trench video { filter: brightness(0.68); }
.layer.void video { filter: brightness(0.6); }
.layer.forgotten video { filter: brightness(0.5); }

.video-entry-container {
  margin-bottom: 30px;
}

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

.video-entry {
  width: 100%;
  height: 180px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-entry video {
  width: 100%;
  height: 100%;
  opacity: 0.6;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
  
}

.video-entry:hover video {
  opacity: 1;
  transform: scale(1.25);
  z-index: 2;
  filter: brightness(1.05);
}

.entry-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.entry-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.3s ease;
}

.entry-title:hover {
  color: #ffffff;
}

.entry-content {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(230, 240, 255, 0.85);
  margin-top: 8px;
  max-width: 500px;
}

.video-entry-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 35px;
  transition: all 0.4s ease;
}

.video-entry:hover video {
  transform: scale(1.02);
  transition: transform 0.4s ease;
  object-fit: cover;        /* show full video */
  z-index: 5;
}

.video-entry-container:hover {
  transform: translateY(-6px);
}

.entry-meta {
  font-size: 0.75rem;
  color: rgba(200, 210, 230, 0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.layer.surface .entry-title {
  text-shadow: 0 0 6px rgba(200, 230, 255, 0.4);
}

.video-entry video {
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-entry {
  position: relative;
}

.video-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 26, 47, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.video-loader::after {
  content: "";
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.archive-note {
  font-family: "Georgia", serif;
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 40px;
  transition: opacity 0.4s ease;
  width: 100%;
  text-align: center;
}

#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 10px 16px;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.3s ease;
}

#backToTop:hover {
  transform: translateY(-3px);
}

