/* Atmosphere & page shell */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(109, 255, 200, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 40%, rgba(196, 181, 255, 0.07), transparent 50%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
}

.bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
  animation: drift 18s var(--ease) infinite alternate;
}

.bg__blob--1 {
  width: min(75vw, 560px);
  height: min(75vw, 560px);
  top: -18%;
  left: -14%;
  background: radial-gradient(circle, rgba(40, 120, 100, 0.85) 0%, transparent 68%);
}

.bg__blob--2 {
  width: min(65vw, 480px);
  height: min(65vw, 480px);
  top: 25%;
  right: -16%;
  background: radial-gradient(circle, rgba(70, 55, 130, 0.7) 0%, transparent 68%);
  animation-delay: -6s;
  animation-duration: 22s;
}

.bg__blob--3 {
  width: min(60vw, 420px);
  height: min(60vw, 420px);
  bottom: -14%;
  left: 22%;
  background: radial-gradient(circle, rgba(120, 70, 40, 0.35) 0%, transparent 68%);
  animation-delay: -11s;
  animation-duration: 26s;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.45;
}

.bg__noise {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
}

.page--wide {
  max-width: 1480px;
}

.glass {
  position: relative;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.03) 50%,
    rgba(255, 255, 255, 0.06) 100%
  );
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.35);
  backdrop-filter: blur(var(--blur)) saturate(1.35);
  overflow: hidden;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  pointer-events: none;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass,
  .section-link,
  .tool-list a,
  .placeholder {
    background: rgba(18, 20, 28, 0.94);
  }
}
