﻿:root {
  --bg: #090f14;
  --panel: #090f14;
  --ink: #b8c7d5;
  --muted: #7e94a8;
  --line: #1f3244;
  --accent: #26d9ff;
  --accent-soft: #123042;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.35);
  --orb-scroll-a: 0px;
  --orb-scroll-b: 0px;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  top: calc(-8vmax + var(--orb-scroll-a));
  right: -8vmax;
  bottom: calc(-8vmax - var(--orb-scroll-a));
  left: -8vmax;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
  filter: blur(24px);
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: opacity 220ms ease;
}

body::before {
  background:
    radial-gradient(34vmax 34vmax at 18% 24%, rgba(36, 220, 214, 0.62), rgba(36, 220, 214, 0) 68%),
    radial-gradient(30vmax 30vmax at 82% 26%, rgba(44, 197, 143, 0.58), rgba(44, 197, 143, 0) 68%),
    radial-gradient(36vmax 36vmax at 56% 80%, rgba(28, 82, 188, 0.62), rgba(28, 82, 188, 0) 68%);
  animation: orbDriftA 16s ease-in-out infinite alternate;
}

body::after {
  top: calc(-8vmax + var(--orb-scroll-b));
  bottom: calc(-8vmax - var(--orb-scroll-b));
  background:
    radial-gradient(33vmax 33vmax at 76% 66%, rgba(43, 206, 200, 0.54), rgba(43, 206, 200, 0) 68%),
    radial-gradient(28vmax 28vmax at 22% 72%, rgba(43, 173, 132, 0.5), rgba(43, 173, 132, 0) 68%),
    radial-gradient(31vmax 31vmax at 46% 20%, rgba(33, 88, 201, 0.54), rgba(33, 88, 201, 0) 68%);
  animation: orbDriftB 22s ease-in-out infinite alternate;
}

body.static-bg {
  background: #20242a;
}

body.static-bg::before,
body.static-bg::after {
  opacity: 0;
  animation: none;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(860px, 94vw);
  margin: 1.2rem auto 2rem;
}

.bg-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(71, 100, 126, 0.45);
  background: rgba(13, 20, 28, 0.5);
  color: var(--ink);
  font-size: 0.76rem;
  backdrop-filter: blur(10px);
}

.bg-toggle input {
  accent-color: #2ac8e5;
}

.topbar {
  margin-bottom: 0.75rem;
}

.menu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(71, 100, 126, 0.45);
  background: rgba(13, 20, 28, 0.45);
  backdrop-filter: blur(10px);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.brand-text {
  font-family: "Poppins", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-link:hover .brand-text,
.brand-link:focus-visible .brand-text {
  color: var(--ink);
}

.menu-links {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.menu-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.menu-link:hover,
.menu-link:focus-visible {
  color: var(--ink);
  border-color: rgba(38, 217, 255, 0.28);
  background: rgba(38, 217, 255, 0.1);
}

h1, h2, h3 {
  font-family: "Poppins", sans-serif;
}

.layout {
  display: block;
}

.content-panel {
  position: relative;
  background: var(--panel);
  border: 1px solid transparent;
  border-radius: 18px;
  box-shadow: none;
  padding: 1rem 1.2rem;
  min-height: calc(100vh - 8rem);
}

body:not(.static-bg) .content-panel {
  box-shadow: 0 0 10px rgba(42, 200, 229, 0.08);
}

body:not(.static-bg) .content-panel::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 22px;
  pointer-events: none;
  z-index: -1;
  box-shadow:
    0 0 8px rgba(42, 200, 229, 0.1),
    0 0 18px rgba(30, 178, 198, 0.08),
    0 0 30px rgba(19, 150, 165, 0.06);
  animation: glowRadiusDrift 7.2s ease-in-out infinite;
}

.content-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

#note-title {
  margin: 0 0 0.9rem;
}

.prose {
  line-height: 1.7;
}

.prose img {
  width: min(100%, 760px);
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.prose a {
  color: var(--accent);
}

.prose blockquote {
  margin: 1rem 0;
  padding: 0.75rem 0.9rem;
  border-left: 4px solid #2ac8e5;
  background: #0c2433;
  border-radius: 8px;
}

@media (max-width: 640px) {
  .menu-bar {
    flex-wrap: wrap;
  }
}

@keyframes orbDriftA {
  0% {
    transform: translate3d(-14vw, -10vh, 0) scale(1);
  }
  100% {
    transform: translate3d(14vw, 10vh, 0) scale(1.06);
  }
}

@keyframes orbDriftB {
  0% {
    transform: translate3d(12vw, 9vh, 0) scale(1.02);
  }
  100% {
    transform: translate3d(-12vw, -9vh, 0) scale(0.96);
  }
}

@keyframes glowRadiusDrift {
  0% {
    box-shadow:
      0 0 7px rgba(42, 200, 229, 0.09),
      0 0 16px rgba(30, 178, 198, 0.07),
      0 0 27px rgba(19, 150, 165, 0.05);
  }
  22% {
    box-shadow:
      0 0 10px rgba(42, 200, 229, 0.11),
      0 0 22px rgba(30, 178, 198, 0.09),
      0 0 36px rgba(19, 150, 165, 0.06);
  }
  47% {
    box-shadow:
      0 0 6px rgba(42, 200, 229, 0.08),
      0 0 13px rgba(30, 178, 198, 0.06),
      0 0 22px rgba(19, 150, 165, 0.05);
  }
  71% {
    box-shadow:
      0 0 9px rgba(42, 200, 229, 0.1),
      0 0 20px rgba(30, 178, 198, 0.08),
      0 0 32px rgba(19, 150, 165, 0.06);
  }
  100% {
    box-shadow:
      0 0 7px rgba(42, 200, 229, 0.09),
      0 0 16px rgba(30, 178, 198, 0.07),
      0 0 26px rgba(19, 150, 165, 0.05);
  }
}
