:root {
  --kk-motif-opacity: 0.08;
  --kk-motif-size: 300px;
}

html[data-theme="plain"] {
  --kk-motif-opacity: 0;
}

body {
  position: relative;
  overflow-x: hidden;
}

body:not(.essay-page)::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('assets/neural-motif.svg');
  background-size: var(--kk-motif-size) var(--kk-motif-size);
  opacity: var(--kk-motif-opacity);
  z-index: -1;
  pointer-events: none;
  animation: drift 40s infinite linear;
}

@media (prefers-reduced-motion: reduce) {
  body:not(.essay-page)::before {
    animation: none;
  }
}

@keyframes drift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: var(--kk-motif-size) calc(var(--kk-motif-size) * -1);
  }
}
/* Essay page contrast fixes */
.essay-page {
  --kk-motif-opacity: 0.04;
  background-color: #ffffff;
}

.essay-page body {
    color: #1f2937;
}

.essay-page h1, .essay-page h2, .essay-page h3 {
    color: #111827;
}

.essay-page a {
    color: #0891b2;
}

.essay-page .glass-card {
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}