:root {
  --site-panel-opacity: 0.88;
  --site-panel-soft-opacity: 0.92;
  --site-panel-blur: 18px;
  --site-surface-rgb: 12, 19, 29;
  --site-bg-image: url("/images/site-background.webp");
  --site-bg-size: min(680px, 82vw);
  --site-pointer-x: 50vw;
  --site-pointer-y: 42vh;
  --site-pointer-shift-x: 0px;
  --site-pointer-shift-y: 0px;
  --site-light-drift-x: 0px;
  --site-light-drift-y: 0px;
  --site-grid-drift-x: 0px;
  --site-grid-drift-y: 0px;
  --site-grid-drift-x-inverse: 0px;
  --site-grid-drift-y-deep: 0px;
}

html[data-bs-theme="light"] {
  --site-surface-rgb: 255, 255, 255;
}

html {
  background-color: #08111a !important;
  background-image: var(--site-bg-image) !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  background-size: cover !important;
}

body {
  background: transparent !important;
  position: relative;
  min-height: 100vh;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::after {
  z-index: -1;
  background:
    radial-gradient(
      34rem circle at var(--site-pointer-x) var(--site-pointer-y),
      rgba(88, 205, 255, 0.24),
      rgba(88, 205, 255, 0.08) 34%,
      transparent 69%
    ),
    linear-gradient(
      118deg,
      transparent 0 39%,
      rgba(116, 219, 255, 0.12) 44%,
      rgba(116, 219, 255, 0.05) 49%,
      transparent 55% 100%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(128, 218, 255, 0.055) 0 1px,
      transparent 1px 84px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(128, 218, 255, 0.04) 0 1px,
      transparent 1px 84px
    ),
    linear-gradient(180deg, rgba(4, 8, 14, 0.46), rgba(4, 8, 14, 0.58)),
    radial-gradient(circle at center, rgba(12, 19, 29, 0.05), rgba(12, 19, 29, 0.34));
  background-size:
    auto,
    72rem 72rem,
    84px 84px,
    84px 84px,
    auto,
    auto;
  background-position:
    center,
    calc(50% + var(--site-light-drift-x)) calc(50% + var(--site-light-drift-y)),
    var(--site-grid-drift-x) var(--site-grid-drift-y),
    var(--site-grid-drift-x-inverse) var(--site-grid-drift-y-deep),
    center,
    center;
}

html[data-bs-theme="light"] body::after {
  background:
    radial-gradient(
      34rem circle at var(--site-pointer-x) var(--site-pointer-y),
      rgba(52, 131, 214, 0.18),
      rgba(52, 131, 214, 0.06) 36%,
      transparent 70%
    ),
    linear-gradient(
      118deg,
      transparent 0 40%,
      rgba(58, 141, 224, 0.11) 45%,
      rgba(58, 141, 224, 0.045) 49%,
      transparent 55% 100%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(49, 106, 180, 0.055) 0 1px,
      transparent 1px 84px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(49, 106, 180, 0.04) 0 1px,
      transparent 1px 84px
    ),
    linear-gradient(180deg, rgba(242, 247, 255, 0.32), rgba(235, 243, 255, 0.48)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.03), rgba(226, 237, 255, 0.24));
  background-size:
    auto,
    72rem 72rem,
    84px 84px,
    84px 84px,
    auto,
    auto;
  background-position:
    center,
    calc(50% + var(--site-light-drift-x)) calc(50% + var(--site-light-drift-y)),
    var(--site-grid-drift-x) var(--site-grid-drift-y),
    var(--site-grid-drift-x-inverse) var(--site-grid-drift-y-deep),
    center,
    center;
}

@media (prefers-reduced-motion: reduce), (hover: none) {
  body::after,
  html[data-bs-theme="light"] body::after {
    background-position:
      center,
      center,
      0 0,
      0 0,
      center,
      center;
  }
}

main,
header,
footer,
.top-app-bar,
.footer {
  background: transparent !important;
}

html[data-bs-theme="light"] body {
  color: #13233d;
}

.top-app-bar,
.dropdown-menu,
.offcanvas,
.card,
.component,
.accordion-item,
.list-group-item,
.modal-content,
.page-link,
.alert,
.taxonomy,
.archive,
.sidebar .card,
.post-panel,
.search-stat {
  background-color: rgba(var(--site-surface-rgb), var(--site-panel-opacity)) !important;
  backdrop-filter: blur(var(--site-panel-blur));
  -webkit-backdrop-filter: blur(var(--site-panel-blur));
}

.mode-dropdown-menu .panel-opacity-control {
  min-width: 220px;
}

.mode-dropdown-menu .panel-opacity-control .form-range {
  margin-bottom: 0.35rem;
}

.mode-dropdown-menu .panel-opacity-control__value {
  font-variant-numeric: tabular-nums;
}

.footer {
  position: relative;
  overflow: visible;
}

.bottom-easter-egg {
  position: absolute;
  left: clamp(16px, 2vw, 28px);
  bottom: clamp(10px, 2vw, 18px);
  z-index: 4;
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  pointer-events: none;
}

.bottom-easter-egg__hint,
.bottom-easter-egg__card {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.bottom-easter-egg__hint {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  max-width: 16rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  pointer-events: auto;
  text-align: left;
}

.bottom-easter-egg.is-hint-visible .bottom-easter-egg__hint,
.bottom-easter-egg.is-card-visible .bottom-easter-egg__card {
  opacity: 1;
  transform: translateY(0);
}

.bottom-easter-egg.is-card-visible {
  pointer-events: auto;
}

.bottom-easter-egg__hint:hover {
  color: rgba(255, 255, 255, 1);
}

.bottom-easter-egg__hint:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 4px;
}

.bottom-easter-egg__card {
  display: inline-flex;
  flex-direction: column;
  min-width: 12.5rem;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  text-decoration: none;
  color: #f5f8ff;
  background: linear-gradient(145deg, rgba(14, 24, 38, 0.92), rgba(31, 52, 79, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 36px rgba(3, 8, 16, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bottom-easter-egg__card:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.bottom-easter-egg__card-title {
  font-size: 0.92rem;
  font-weight: 700;
}

html[data-bs-theme="light"] .bottom-easter-egg__hint {
  color: rgba(23, 35, 58, 0.88);
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.42);
}

html[data-bs-theme="light"] .bottom-easter-egg__hint:hover {
  color: rgba(12, 28, 56, 1);
}

html[data-bs-theme="light"] .bottom-easter-egg__hint:focus-visible {
  outline-color: rgba(40, 74, 128, 0.5);
}

html[data-bs-theme="light"] .bottom-easter-egg__card {
  color: #112341;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(226, 236, 252, 0.88));
  border-color: rgba(126, 154, 198, 0.28);
  box-shadow: 0 18px 36px rgba(97, 128, 170, 0.18);
}

html[data-bs-theme="light"] .bottom-easter-egg__card:hover {
  color: #0a1b35;
}

@media (max-width: 767.98px) {
  .bottom-easter-egg {
    right: 1rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .bottom-easter-egg__card {
    min-width: min(14rem, calc(100vw - 2rem));
  }
}
