@property --neon-hue {
  syntax: "<number>";
  inherits: true;
  initial-value: 77;
}

:root {
  color-scheme: dark;
  --edge-offset: 16px;
  --control-size: 52px;
  --control-gap: 8px;
  --brand-gap: 10px;
  --brand-text-size: clamp(20px, 4.8vw, 28px);
  --brand-text-size-mobile: clamp(16px, 4.4vw, 20px);
  --language-text-size: calc(var(--brand-text-size) * 0.5);
  --language-text-size-mobile: clamp(11px, 3.1vw, 12px);
  --brand-width: clamp(144px, 22vw, 196px);
  --language-control-width: clamp(156px, 16vw, 168px);
  --language-button-inline-padding: 8px;
  --site-name-glow-duration: 1280ms;
  --controls-total-width: calc((var(--control-size) * 2) + (var(--control-gap) * 2) + var(--brand-gap) + var(--brand-width) + var(--language-control-width));
  --menu-top-gap: 8px;
  --menu-width: calc(var(--control-size) + var(--control-gap) + var(--control-size));
  --menu-height: calc(var(--menu-width) * 5 / 3);
  --menu-icon-size: calc(var(--control-size) - 2px);
  --menu-ink-top: #ffffff;
  --menu-ink-mid: #5e5e5e;
  --menu-ink-bottom: #000000;
  --floor-walk-duration: 4600ms;
  --floor-walk-distance: 10%;
  --floor-walk-scale: 1.26;
  --glass-anchor-top: 0px;
  --glass-anchor-left: 0px;
  --glass-panel-radius: clamp(14px, 2.1vw, 24px);
  --glass-closed-width: calc((var(--edge-offset) * 2) + var(--controls-total-width));
  --glass-closed-height: calc((var(--edge-offset) * 2) + var(--control-size));
  --glass-open-width: max(calc((var(--edge-offset) * 2) + var(--menu-width)), var(--glass-closed-width));
  --glass-open-height: calc((var(--edge-offset) * 2) + var(--control-size) + var(--menu-top-gap) + var(--menu-height));
  --glass-open-square-size: max(var(--glass-closed-width), var(--glass-open-height));
  --glass-blur: 14px;
  --glass-saturation: 122%;
  --glass-brightness: 105%;
  --glass-uniform-opacity: 0.5;
  --glass-surface-top-alpha: 0.14;
  --glass-surface-bottom-alpha: 0.05;
  --glass-border-alpha: 0.2;
  --ui-glow-sync-duration: 420ms;
  --ui-glow-sync-easing: ease-in-out;
  --ui-glow-phase-offset: 0ms;
  --button-glow-fast-duration: var(--ui-glow-sync-duration);
  --button-symbol-glow-fast-duration: var(--ui-glow-sync-duration);
  --menu-glow-fast-duration: var(--ui-glow-sync-duration);
  --menu-glow-fast-strong-duration: var(--ui-glow-sync-duration);
  --text-spectrum-fallback: #fff5a8;
  --text-spectrum-gradient: linear-gradient(to top, #ffff00 0%, #ffffff 100%);
  --neon-hue: 77;
  --neon-saturation: 100%;
  --neon-lightness: 50%;
  --surface-neon-chroma-duration: 2600ms;
  --surface-neon-alpha: 0.92;
  --surface-neon-blur: 60px;
  --surface-neon-inner-alpha: 0.72;
  --button-neon-scale: 1.45;
  --button-neon-alpha-scale: 1.22;
  --surface-neon-pulse-duration: 1400ms;
  --surface-neon-pulse-easing: ease-in-out;
  --menu-symbol-neon-alpha: 0.95;
  --menu-symbol-neon-size: 14px;
  --menu-symbol-neon-size-strong: 24px;
  --surface-neon-shadow:
    0 0 calc(var(--surface-neon-blur) * 0.58) rgb(255 255 255 / var(--surface-neon-inner-alpha)) inset,
    0 0 var(--surface-neon-blur) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / var(--surface-neon-alpha)),
    0 0 calc(var(--surface-neon-blur) * 1.95) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--surface-neon-alpha) * 0.56));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (max-width: 900px) {
  :root {
    --edge-offset: 8px;
    --control-gap: 4px;
    --brand-gap: 6px;
    --brand-text-size-mobile: clamp(16px, 4.4vw, 20px);
    --brand-width: clamp(92px, 28vw, 108px);
    --language-control-width: clamp(68px, 22vw, 84px);
    --language-button-inline-padding: 2px;
    --menu-height: calc(var(--menu-width) * 4 / 3);
  }

  .site-name {
    font-size: var(--brand-text-size-mobile);
  }

  .language-button-text {
    font-size: var(--language-text-size-mobile);
  }

  .top-left-controls {
    right: var(--edge-offset);
  }

  .site-name {
    flex: 0 0 auto;
    inline-size: auto;
    min-inline-size: 0;
  }

  .language-button {
    margin-inline-start: auto;
    margin-inline-end: 32px;
    flex: 0 0 auto;
    inline-size: auto;
    min-inline-size: max-content;
    padding: 0 var(--language-button-inline-padding);
    gap: 2px;
  }

  .language-button-text {
    overflow: visible;
    text-overflow: clip;
  }

  .language-button > .menu-link-icon {
    font-size: 18px;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, #000040 0%, #00ff88 100%);
  overflow: hidden;
  font-family: "Unbounded", sans-serif;
  font-style: normal;
  font-weight: 500;
  font-variation-settings: "wght" 500;
  animation: neon-chroma var(--surface-neon-chroma-duration) linear infinite alternate;
}

.page-about {
  background: linear-gradient(180deg, #000040 0%, #00ff88 100%);
}

.about-center-glass {
  position: fixed;
  top: 48%;
  left: 50%;
  z-index: 5;
  width: min(920px, calc(100vw - 40px));
  max-height: min(72vh, 760px);
  padding: clamp(18px, 3vw, 34px);
  border-radius: clamp(16px, 2.2vw, 28px);
  transform: translate(-50%, -50%);
  overflow: auto;
  background:
    linear-gradient(
      165deg,
      rgb(255 255 255 / 0.24) 0%,
      rgb(255 255 255 / 0.12) 28%,
      rgb(255 255 255 / 0.06) 68%,
      rgb(0 0 0 / 0.2) 100%
    ),
    rgb(6 10 32 / var(--glass-uniform-opacity));
  border: 1px solid rgb(255 255 255 / var(--glass-border-alpha));
  box-shadow:
    0 20px 48px rgb(0 0 0 / 0.52),
    inset 0 1px 0 rgb(255 255 255 / 0.24),
    inset 0 -1px 0 rgb(0 0 0 / 0.22);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)) brightness(var(--glass-brightness));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)) brightness(var(--glass-brightness));
}

@media (max-width: 900px) {
  html {
    height: auto;
    overflow-y: auto !important;
  }

  body.page-home {
    height: auto;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
    -webkit-overflow-scrolling: touch;
  }

  .about-center-glass {
    left: 0;
    width: 100vw;
    max-width: none;
    transform: translateY(-50%);
    border-radius: 0;
  }

  body.page-home #home-main-glass {
    position: relative;
    z-index: 5;
    top: auto;
    left: auto;
    width: 100vw;
    max-width: 100vw;
    height: auto;
    transform: none;
    max-height: none;
    margin: var(--glass-open-height) 0 max(72px, calc(env(safe-area-inset-bottom) + 40px));
    border-radius: var(--glass-panel-radius) var(--glass-panel-radius) 0 0;
    overflow: visible;
    touch-action: auto;
    overscroll-behavior-y: auto;
  }

  body.page-home #home-main-glass .about-copy {
    display: block;
    padding-bottom: max(120px, calc(env(safe-area-inset-bottom) + 80px));
  }

  .page-contacts .about-center-glass {
    top: var(--glass-open-height);
    transform: none;
    max-height: calc(100dvh - var(--glass-open-height));
    border-radius: clamp(14px, 4vw, 24px);
  }

  .page-gallery .about-center-glass {
    top: var(--glass-open-height);
    transform: none;
    max-height: calc(100dvh - var(--glass-open-height));
    border-radius: clamp(14px, 4vw, 24px);
  }
}

@media (min-width: 901px) {
  .about-center-glass {
    top: 50%;
    left: 50%;
    width: min(78vmin, 860px);
    height: min(78vmin, 860px);
    max-height: none;
    transform: translate(-50%, -50%);
  }

  .page-home #home-main-glass {
    left: var(--glass-closed-width);
    top: var(--glass-closed-height);
    transform: none;
    max-height: calc(100dvh - var(--glass-closed-height));
  }

  .page-contacts .about-center-glass,
  .page-gallery .about-center-glass {
    left: var(--glass-closed-width);
    top: var(--glass-closed-height);
    transform: none;
    max-height: calc(100dvh - var(--glass-closed-height));
  }
}

.about-center-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgb(255 255 255 / 0.2) 0%,
      rgb(255 255 255 / 0.09) 10%,
      rgb(255 255 255 / 0.02) 32%,
      rgb(255 255 255 / 0) 70%
    );
}

.about-copy {
  position: relative;
  margin: 0;
  color: #ffffff;
  font-size: clamp(15px, 1.45vw, 22px);
  line-height: 1.46;
  letter-spacing: 0.01em;
  text-wrap: pretty;
  white-space: pre-line;
  text-shadow: none;
  filter: none;
  animation: none;
  font-style: inherit;
  font-weight: inherit;
  font-optical-sizing: inherit;
  font-variation-settings: inherit;
}

.page-contacts .contacts-center-glass {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

.page-contacts .contacts-line {
  width: 100%;
  margin: 0;
}

.page-contacts .contacts-line:nth-of-type(2) {
  margin-top: clamp(18px, 3.2vh, 40px);
}

.page-contacts .contacts-line:nth-of-type(3) {
  margin-top: clamp(26px, 4.6vh, 56px);
}

.page-contacts .contacts-line:nth-of-type(4) {
  margin-top: clamp(26px, 4.6vh, 56px);
}

.page-contacts .contacts-line:nth-of-type(5) {
  margin-top: clamp(26px, 4.6vh, 56px);
}

.page-contacts .contacts-line > .menu-link-icon {
  flex: 0 0 auto;
  transform: translateY(-0.12em);
}

.page-contacts .contact-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.page-contacts .contact-link-text {
  color: #ffffff;
}

.page-contacts .contact-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 6px;
}

.rain-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.chess-floor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50vh;
  height: 50dvh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
  --floor-image: none;
  background: #000000;
}

.chess-floor::before,
.chess-floor::after {
  content: "";
  position: absolute;
  inset: -2% -2% -12% -2%;
  background-image:
    linear-gradient(
      180deg,
      rgb(0 0 0 / 1) 0%,
      rgb(0 0 0 / 0.96) 10%,
      rgb(0 0 0 / 0.76) 24%,
      rgb(0 0 0 / 0.42) 44%,
      rgb(0 0 0 / 0.1) 66%,
      rgb(0 0 0 / 0) 100%
    ),
    var(--floor-image);
  background-position: center top, center bottom;
  background-size: 100% 100%, cover;
  background-repeat: no-repeat, no-repeat;
  transform-origin: center bottom;
  will-change: transform, opacity;
  animation: floor-walk var(--floor-walk-duration) linear infinite;
}

.chess-floor::after {
  animation-delay: calc(var(--floor-walk-duration) * -0.5);
}

@keyframes floor-walk {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, var(--floor-walk-distance), 0) scale(var(--floor-walk-scale));
    opacity: 0;
  }
}

@media (min-width: 901px) {
  .chess-floor {
    --floor-image: none;
  }
}

.glass-ui {
  position: fixed;
  top: var(--glass-anchor-top);
  left: var(--glass-anchor-left);
  width: var(--glass-closed-width);
  height: var(--glass-closed-height);
  z-index: 10;
  border-radius: 0 0 var(--glass-panel-radius) var(--glass-panel-radius);
  background:
    linear-gradient(
      165deg,
      rgb(255 255 255 / 0.24) 0%,
      rgb(255 255 255 / 0.12) 28%,
      rgb(255 255 255 / 0.06) 68%,
      rgb(0 0 0 / 0.2) 100%
    ),
    rgb(6 10 32 / var(--glass-uniform-opacity));
  border: 1px solid rgb(255 255 255 / var(--glass-border-alpha));
  box-shadow:
    0 20px 48px rgb(0 0 0 / 0.52),
    inset 0 1px 0 rgb(255 255 255 / 0.24),
    inset 0 -1px 0 rgb(0 0 0 / 0.22);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)) brightness(var(--glass-brightness));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)) brightness(var(--glass-brightness));
  overflow: visible;
  transition: width 180ms ease, height 180ms ease;
}

.glass-ui:has(.menu-panel:not([hidden])) {
  width: var(--glass-open-width);
  height: var(--glass-open-height);
}

@media (max-width: 900px) {
  .glass-ui {
    left: 0;
    right: 0;
    width: 100vw;
    border-radius: 0 0 var(--glass-panel-radius) var(--glass-panel-radius);
  }

  .glass-ui:has(.menu-panel:not([hidden])) {
    width: 100vw;
  }
}

@media (min-width: 901px) {
  .glass-ui:has(.menu-panel:not([hidden])) {
    width: var(--glass-open-width);
    height: var(--glass-open-height);
  }
}

.glass-ui::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgb(255 255 255 / 0.2) 0%,
      rgb(255 255 255 / 0.09) 10%,
      rgb(255 255 255 / 0.02) 32%,
      rgb(255 255 255 / 0) 70%
    );
}

.glass-ui > * {
  position: relative;
  z-index: 1;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-style: inherit;
  font-weight: inherit;
  font-variation-settings: inherit;
}

@keyframes neon-chroma {
  0% {
    --neon-hue: 77;
  }
  18% {
    --neon-hue: 88;
  }
  36% {
    --neon-hue: 102;
  }
  54% {
    --neon-hue: 118;
  }
  72% {
    --neon-hue: 134;
  }
  100% {
    --neon-hue: 151;
  }
}

@keyframes neon-breathe {
  0%,
  100% {
    box-shadow:
      0 0 calc(var(--surface-neon-blur) * 0.45) rgb(255 255 255 / calc(var(--surface-neon-inner-alpha) * 0.75)) inset,
      0 0 calc(var(--surface-neon-blur) * 0.72) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--surface-neon-alpha) * 0.72)),
      0 0 calc(var(--surface-neon-blur) * 1.45) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--surface-neon-alpha) * 0.4));
  }
  50% {
    box-shadow:
      0 0 calc(var(--surface-neon-blur) * 0.58) rgb(255 255 255 / var(--surface-neon-inner-alpha)) inset,
      0 0 var(--surface-neon-blur) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / var(--surface-neon-alpha)),
      0 0 calc(var(--surface-neon-blur) * 1.95) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--surface-neon-alpha) * 0.56));
  }
}

@keyframes neon-breathe-button {
  0%,
  100% {
    box-shadow:
      0 0 calc(var(--surface-neon-blur) * 0.55 * var(--button-neon-scale)) rgb(255 255 255 / calc(var(--surface-neon-inner-alpha) * 0.78)) inset,
      0 0 calc(var(--surface-neon-blur) * 0.9 * var(--button-neon-scale)) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--surface-neon-alpha) * 0.82 * var(--button-neon-alpha-scale))),
      0 0 calc(var(--surface-neon-blur) * 1.9 * var(--button-neon-scale)) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--surface-neon-alpha) * 0.48 * var(--button-neon-alpha-scale)));
  }
  50% {
    box-shadow:
      0 0 calc(var(--surface-neon-blur) * 0.72 * var(--button-neon-scale)) rgb(255 255 255 / calc(var(--surface-neon-inner-alpha) * 0.9)) inset,
      0 0 calc(var(--surface-neon-blur) * 1.14 * var(--button-neon-scale)) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--surface-neon-alpha) * 0.92 * var(--button-neon-alpha-scale))),
      0 0 calc(var(--surface-neon-blur) * 2.45 * var(--button-neon-scale)) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--surface-neon-alpha) * 0.6 * var(--button-neon-alpha-scale)));
  }
}

@keyframes menu-symbol-glow {
  0%,
  100% {
    text-shadow:
      0 0 var(--menu-symbol-neon-size) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--menu-symbol-neon-alpha) * 0.82)),
      0 0 calc(var(--menu-symbol-neon-size) * 2.05) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--menu-symbol-neon-alpha) * 0.5));
    filter: drop-shadow(0 0 calc(var(--menu-symbol-neon-size) * 0.9) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--menu-symbol-neon-alpha) * 0.78)));
  }
  50% {
    text-shadow:
      0 0 var(--menu-symbol-neon-size-strong) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / var(--menu-symbol-neon-alpha)),
      0 0 calc(var(--menu-symbol-neon-size-strong) * 2.15) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--menu-symbol-neon-alpha) * 0.62));
    filter: drop-shadow(0 0 calc(var(--menu-symbol-neon-size-strong) * 0.95) hsl(var(--neon-hue) var(--neon-saturation) var(--neon-lightness) / calc(var(--menu-symbol-neon-alpha) * 0.94)));
  }
}

.top-left-controls {
  position: absolute;
  top: var(--edge-offset);
  left: var(--edge-offset);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--control-gap);
  isolation: isolate;
  z-index: 2;
}

.brand-link {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: var(--brand-gap);
  color: inherit;
  text-decoration: none;
}

.brand-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  border-radius: 12px;
}

.language-button {
  position: relative;
  z-index: 3;
  flex: 0 0 var(--language-control-width);
  inline-size: var(--language-control-width);
  height: var(--control-size);
  padding: 0 var(--language-button-inline-padding);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-spectrum-fallback);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  cursor: pointer;
}

.language-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.language-button-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-spectrum-fallback);
  font-size: var(--language-text-size);
  line-height: 1;
  letter-spacing: 0.02em;
  font-style: inherit;
  font-weight: inherit;
  font-optical-sizing: inherit;
  font-variation-settings: inherit;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}

.language-button > .menu-link-icon {
  color: var(--text-spectrum-fallback);
  font-size: calc(var(--menu-icon-size) * 0.5);
  line-height: 1;
  font-variation-settings:
    "FILL" 0,
    "wght" 700,
    "GRAD" 0,
    "opsz" 48;
  user-select: none;
  -webkit-text-fill-color: currentColor;
}

.toggle-button {
  position: relative;
  z-index: 1;
  width: var(--control-size);
  height: var(--control-size);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-spectrum-fallback);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  will-change: auto;
  animation: none;
  transition: none;
}

.toggle-button:hover {
  background: transparent;
}

.toggle-button:active {
  background: transparent;
}

.toggle-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.menu-symbol {
  display: block;
  color: var(--text-spectrum-fallback);
  -webkit-text-fill-color: currentColor;
  font-size: var(--menu-icon-size);
  line-height: 1;
  font-variation-settings:
    "FILL" 0,
    "wght" 700,
    "GRAD" 0,
    "opsz" 48;
  text-shadow: none;
  filter: none;
  animation: none;
  user-select: none;
}

.site-logo {
  position: relative;
  z-index: 3;
  display: block;
  width: var(--control-size);
  height: var(--control-size);
  border-radius: 0;
  background: transparent url("assets/triforce-logo-clean.png") center / contain no-repeat;
  filter: drop-shadow(0 0 4px rgb(88 144 255 / 0.42));
  box-shadow: none;
}

.site-name {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  flex: 0 0 var(--brand-width);
  height: var(--control-size);
  inline-size: var(--brand-width);
  min-inline-size: var(--brand-width);
  margin-left: 0;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  font-size: var(--brand-text-size);
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow:
    0 0 6px rgb(0 0 255 / 0.38),
    0 0 16px rgb(0 0 255 / 0.26);
  filter: drop-shadow(0 0 8px rgb(0 0 255 / 0.24));
  animation: site-name-yellow-glow var(--site-name-glow-duration) ease-in-out infinite;
}

@media (max-width: 900px) {
  .site-name {
    font-size: var(--brand-text-size-mobile);
  }

  .language-button-text {
    font-size: var(--language-text-size-mobile);
  }

  .brand-link {
    min-inline-size: 0;
  }

  .site-name {
    flex: 0 0 auto;
    inline-size: auto;
    min-inline-size: max-content;
    max-inline-size: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .language-button {
    margin-inline-start: auto;
    margin-inline-end: 32px;
    flex: 0 0 auto;
    inline-size: auto;
    min-inline-size: max-content;
    padding-inline: var(--language-button-inline-padding);
    gap: 2px;
  }

  .language-button-text {
    overflow: visible;
    text-overflow: clip;
  }

  .language-button > .menu-link-icon {
    font-size: 18px;
  }
}

.menu-panel {
  position: absolute;
  z-index: 2;
  top: calc(var(--edge-offset) + var(--control-size) + var(--menu-top-gap));
  left: var(--edge-offset);
  width: var(--menu-width);
  aspect-ratio: 3 / 5;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  box-shadow: none;
  animation: none;
}

.language-panel {
  left: var(--edge-offset);
  right: auto;
  width: max-content;
  min-width: max-content;
  aspect-ratio: auto;
}

.language-panel .menu-link {
  padding-inline-start: var(--language-button-inline-padding);
  padding-inline-end: 0;
  font-size: var(--language-text-size);
}

@media (max-width: 900px) {
  .menu-panel:not(.language-panel) {
    aspect-ratio: 3 / 4;
  }

  .language-panel .menu-link {
    font-size: var(--language-text-size-mobile);
  }
}

.menu-list {
  margin: 0;
  padding: 0;
  width: 100%;
  list-style: none;
  display: grid;
  gap: 6px;
}

.menu-action {
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.language-menu-list {
  gap: 6px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: flex-start;
  padding: 10px 8px;
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  line-height: 1.2;
  transition: filter 160ms ease;
}

.language-option {
  justify-content: flex-start;
}

.menu-link > span:last-child {
  white-space: nowrap;
  color: var(--text-spectrum-fallback);
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
  animation: none;
}

.menu-link > span {
  display: inline-block;
  color: #ffffff;
  background-image: none;
  -webkit-text-fill-color: #ffffff;
  transition: text-shadow 160ms ease, filter 160ms ease;
}

.menu-link > .menu-link-icon,
.menu-link > .menu-home-icon,
.page-contacts .contact-link > .menu-link-icon {
  color: var(--text-spectrum-fallback);
  -webkit-text-fill-color: currentColor;
}

@supports ((-webkit-background-clip: text) and (-webkit-text-fill-color: transparent)) {
  .menu-symbol,
  .language-button-text,
  .menu-link > span:last-child {
    background-image: var(--text-spectrum-gradient);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

}

#site-menu .menu-link > span:last-child {
  color: #ffffff;
  background-image: none;
  -webkit-text-fill-color: #ffffff;
}

#toggle-language .language-button-text,
#toggle-language .menu-link-icon,
#language-menu .menu-link > span,
#language-menu .menu-link > span:last-child {
  color: #ffffff;
  background-image: none;
  -webkit-text-fill-color: #ffffff;
  text-shadow: none;
  filter: none;
}

@keyframes site-name-yellow-glow {
  0%,
  100% {
    text-shadow:
      0 0 5px rgb(0 0 255 / 0.34),
      0 0 12px rgb(0 0 255 / 0.22);
    filter: drop-shadow(0 0 7px rgb(0 0 255 / 0.2));
  }
  50% {
    text-shadow:
      0 0 10px rgb(0 0 255 / 0.72),
      0 0 24px rgb(0 0 255 / 0.56),
      0 0 36px rgb(0 0 255 / 0.4);
    filter: drop-shadow(0 0 15px rgb(0 0 255 / 0.36));
  }
}

.menu-link-icon {
  flex: 0 0 auto;
  color: var(--text-spectrum-fallback);
  -webkit-text-fill-color: currentColor;
  font-size: 22px;
  line-height: 1;
  font-variation-settings:
    "FILL" 0,
    "wght" 700,
    "GRAD" -25,
    "opsz" 48;
}

.menu-home-icon {
  flex: 0 0 auto;
  color: var(--text-spectrum-fallback);
  -webkit-text-fill-color: currentColor;
  font-size: 22px;
  line-height: 1;
  font-variation-settings:
    "FILL" 1,
    "wght" 700,
    "GRAD" 200,
    "opsz" 48;
}

@supports ((-webkit-background-clip: text) and (-webkit-text-fill-color: transparent)) {
  .menu-link > .menu-link-icon,
  .menu-link > .menu-home-icon,
  .language-button > .menu-link-icon,
  .page-contacts .contact-link > .menu-link-icon {
    background-image: var(--text-spectrum-gradient);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

#site-menu .menu-link > .menu-link-icon,
#site-menu .menu-link > .menu-home-icon {
  color: #ffffff;
  background-image: none;
  -webkit-text-fill-color: #ffffff;
}

.page-contacts .contact-link > .menu-link-icon {
  color: #ffffff;
  background-image: none;
  -webkit-text-fill-color: #ffffff;
  text-shadow: none;
  filter: none;
}

.menu-link:hover {
  background: transparent;
}

.menu-panel:not([hidden]) .menu-link > span {
  mix-blend-mode: normal;
  will-change: auto;
  animation: none;
  text-shadow: none;
  filter: none;
}

.menu-link:hover > span,
.menu-link:active > span,
.menu-link:focus-visible > span,
.menu-link[aria-current="page"] > span {
  animation: none;
  text-shadow: none;
  filter: none;
}

.menu-link:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.menu-panel[hidden] {
  display: none;
}

.rain-cursor-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483600;
  overflow: hidden;
}

.cursor-rune {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg) scale(0.88);
  transform-origin: center center;
  font-size: var(--cursor-rune-size, 18px);
  line-height: 1;
  letter-spacing: 0;
  color: hsl(var(--cursor-rune-hue, 240) 100% var(--cursor-rune-lightness, 62%) / 0.98);
  text-shadow:
    0 0 calc(var(--cursor-rune-blur, 8px) * 0.55) hsl(var(--cursor-rune-hue, 240) 100% 78% / 0.96),
    0 0 var(--cursor-rune-blur, 8px) hsl(var(--cursor-rune-hue, 240) 100% 56% / 0.78),
    0 0 calc(var(--cursor-rune-blur, 8px) * 1.85) hsl(var(--cursor-rune-hue, 240) 100% 50% / 0.42);
  filter: drop-shadow(0 0 calc(var(--cursor-rune-blur, 8px) * 0.62) hsl(var(--cursor-rune-hue, 240) 100% 62% / 0.62));
  font-weight: var(--cursor-rune-weight, 650);
  user-select: none;
  will-change: transform, opacity, filter;
}

.cursor-rune--run {
  animation: cursor-rune-fall var(--cursor-rune-life, 520ms) cubic-bezier(0.22, 0.74, 0.26, 1) forwards;
}

@keyframes cursor-rune-fall {
  0% {
    opacity: var(--cursor-rune-opacity, 0.92);
    transform: translate(-50%, -50%) rotate(0deg) scale(0.9);
    filter: drop-shadow(0 0 calc(var(--cursor-rune-blur, 8px) * 0.78) hsl(var(--cursor-rune-hue, 240) 100% 68% / 0.74));
  }
  32% {
    opacity: calc(var(--cursor-rune-opacity, 0.92) * 0.98);
  }
  66% {
    opacity: calc(var(--cursor-rune-opacity, 0.92) * 0.56);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--cursor-rune-dx, 0px)), calc(-50% + var(--cursor-rune-dy, 72px)))
      rotate(var(--cursor-rune-rotate, 0deg))
      scale(1.02);
    filter: drop-shadow(0 0 calc(var(--cursor-rune-blur, 8px) * 0.4) hsl(var(--cursor-rune-hue, 240) 100% 56% / 0.34));
  }
}

@keyframes menu-link-glow-fast {
  0%,
  100% {
    text-shadow:
      0 0 6px rgb(255 255 0 / 0.8),
      0 0 14px rgb(255 255 0 / 0.55),
      0 0 30px rgb(255 255 0 / 0.34);
    filter: brightness(1.05) drop-shadow(0 0 7px rgb(255 255 0 / 0.5));
  }
  50% {
    text-shadow:
      0 0 11px rgb(255 255 0 / 0.98),
      0 0 23px rgb(255 255 0 / 0.74),
      0 0 44px rgb(255 255 0 / 0.5);
    filter: brightness(1.13) drop-shadow(0 0 11px rgb(255 255 0 / 0.72));
  }
}

@keyframes menu-link-glow-fast-strong {
  0%,
  100% {
    text-shadow:
      0 0 10px rgb(255 255 0 / 0.96),
      0 0 24px rgb(255 255 0 / 0.74),
      0 0 46px rgb(255 255 0 / 0.52);
    filter: brightness(1.12) drop-shadow(0 0 10px rgb(255 255 0 / 0.7));
  }
  50% {
    text-shadow:
      0 0 14px rgb(255 255 0 / 1),
      0 0 30px rgb(255 255 0 / 0.84),
      0 0 58px rgb(255 255 0 / 0.62);
    filter: brightness(1.2) drop-shadow(0 0 14px rgb(255 255 0 / 0.84));
  }
}

@keyframes button-yellow-glow-fast {
  0%,
  100% {
    box-shadow:
      0 0 6px rgb(255 255 0 / 0.8),
      0 0 16px rgb(255 255 0 / 0.58),
      0 0 34px rgb(255 255 0 / 0.38);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      0 0 10px rgb(255 255 0 / 0.96),
      0 0 24px rgb(255 255 0 / 0.78),
      0 0 52px rgb(255 255 0 / 0.54);
    filter: brightness(1.06);
  }
}

@keyframes button-yellow-glow-fast-strong {
  0%,
  100% {
    box-shadow:
      0 0 9px rgb(255 255 0 / 0.92),
      0 0 24px rgb(255 255 0 / 0.74),
      0 0 50px rgb(255 255 0 / 0.52);
    filter: brightness(1.04);
  }
  50% {
    box-shadow:
      0 0 13px rgb(255 255 0 / 1),
      0 0 32px rgb(255 255 0 / 0.86),
      0 0 66px rgb(255 255 0 / 0.62);
    filter: brightness(1.12);
  }
}

@keyframes button-symbol-yellow-glow-fast {
  0%,
  100% {
    text-shadow:
      0 0 5px rgb(255 255 0 / 0.78),
      0 0 10px rgb(255 255 0 / 0.48);
    filter: drop-shadow(0 0 5px rgb(255 255 0 / 0.56));
  }
  50% {
    text-shadow:
      0 0 8px rgb(255 255 0 / 0.96),
      0 0 16px rgb(255 255 0 / 0.68);
    filter: drop-shadow(0 0 8px rgb(255 255 0 / 0.76));
  }
}

.page-gallery .gallery-center-glass {
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  padding: clamp(14px, 2.2vw, 22px);
}

.page-gallery .coverflow-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  border-radius: clamp(12px, 1.8vw, 22px);
}

.page-gallery .coverflow-shell::before {
  content: "";
  position: absolute;
  inset: 6% 8% 16%;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgb(255 255 255 / 0.08) 0%, rgb(255 255 255 / 0) 62%),
    radial-gradient(circle at 50% 74%, rgb(255 240 128 / 0.14) 0%, rgb(255 240 128 / 0) 68%);
  filter: blur(22px);
  z-index: 0;
}

.page-gallery .coverflow-stage {
  --cf-card-width: clamp(180px, 40%, 360px);
  --cf-card-height: var(--cf-card-width);
  position: relative;
  width: 100%;
  height: min(100%, 100cqh);
  min-height: clamp(240px, 52vh, 520px);
  perspective: 1180px;
  perspective-origin: 50% 46%;
  transform-style: preserve-3d;
  touch-action: pan-y;
  outline: none;
  z-index: 1;
}

.page-gallery .coverflow-stage:focus-visible {
  border-radius: 12px;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.92);
}

.page-gallery .coverflow-card {
  --cf-x: 0px;
  --cf-z: 0px;
  --cf-rot: 0deg;
  --cf-scale: 0.85;
  --cf-opacity: 0;
  --cf-sat: 0.82;
  --cf-brightness: 0.72;
  --cf-blur: 0px;
  --cf-zindex: 1;
  --cf-pointer: none;
  position: absolute;
  top: 45%;
  left: 50%;
  width: var(--cf-card-width);
  aspect-ratio: 1 / 1;
  border-radius: clamp(18px, 2.2vw, 28px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: var(--cf-opacity);
  pointer-events: var(--cf-pointer);
  z-index: var(--cf-zindex);
  transform-style: preserve-3d;
  transform:
    translate3d(calc(var(--cf-x) - 50%), -50%, var(--cf-z))
    rotateY(var(--cf-rot))
    scale(var(--cf-scale));
  filter: saturate(var(--cf-sat)) brightness(var(--cf-brightness)) blur(var(--cf-blur));
  transition:
    transform 260ms cubic-bezier(0.24, 0.88, 0.26, 1),
    opacity 220ms ease,
    filter 260ms ease;
}

.page-gallery .coverflow-card::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle, rgb(255 255 255 / 0.62) 0%, rgb(255 255 255 / 0.36) 28%, rgb(255 255 255 / 0.14) 52%, rgb(255 255 255 / 0.02) 70%, rgb(255 255 255 / 0) 100%);
  filter: blur(12px);
  opacity: 0.72;
  transform: translateZ(-1px) scale(1);
  transition: opacity 180ms ease, transform 260ms ease;
}

.page-gallery .coverflow-card:focus-visible {
  outline: none;
}

.page-gallery .coverflow-card:focus-visible .coverflow-card-surface {
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.9);
}

.page-gallery .coverflow-card-surface {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: box-shadow 260ms ease, border-color 260ms ease;
}

.page-gallery .coverflow-card-glass {
  display: none;
}

.page-gallery .coverflow-card-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.page-gallery .coverflow-card[aria-current="true"] {
  --cf-sat: 1;
  --cf-brightness: 1;
}

.page-gallery .coverflow-card[aria-current="true"] .coverflow-card-surface {
  border-color: transparent;
  box-shadow: none;
}

.page-gallery .coverflow-card[aria-current="true"]::before {
  opacity: 0.88;
  transform: translateZ(-1px) scale(1.08);
}

.page-gallery .coverflow-card:active .coverflow-card-surface {
  box-shadow: none;
}

.page-gallery .coverflow-card:active::before {
  opacity: 0;
}

.page-gallery .coverflow-controls {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: clamp(8px, 1.4vw, 16px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 16px);
  z-index: 2;
}

.page-gallery .coverflow-nav-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 999px;
  background: rgb(10 10 10 / 0.46);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 8px 20px rgb(0 0 0 / 0.34),
    inset 0 1px 0 rgb(255 255 255 / 0.24);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.page-gallery .coverflow-nav-button:hover,
.page-gallery .coverflow-nav-button:focus-visible {
  border-color: rgb(255 255 255 / 0.42);
  background: rgb(18 18 18 / 0.58);
}

.page-gallery .coverflow-nav-button:active {
  transform: scale(0.95);
}

.page-gallery .coverflow-nav-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.page-gallery .coverflow-nav-button > .material-symbols-rounded {
  font-size: 24px;
  line-height: 1;
  font-variation-settings:
    "FILL" 0,
    "wght" 700,
    "GRAD" -25,
    "opsz" 48;
}

.page-gallery .coverflow-status {
  margin: 0;
  min-width: 52px;
  text-align: center;
  font-size: clamp(13px, 1.2vw, 15px);
  color: #ffffff;
  letter-spacing: 0.02em;
}

.page-gallery .coverflow-viewer {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: center;
  padding: clamp(20px, 3.2vw, 34px);
}

.page-gallery .coverflow-viewer[hidden] {
  display: none;
}

.page-gallery .coverflow-viewer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background:
    radial-gradient(circle at 50% 18%, rgb(0 0 255 / 0.24) 0%, rgb(0 0 255 / 0) 54%),
    rgb(0 0 0 / 0.74);
  backdrop-filter: blur(7px) saturate(118%);
  -webkit-backdrop-filter: blur(7px) saturate(118%);
  cursor: pointer;
}

.page-gallery .coverflow-viewer-panel {
  position: relative;
  z-index: 1;
  width: min(88vw, 1180px);
  max-height: min(84vh, 840px);
  border-radius: clamp(14px, 2.2vw, 24px);
  border: 1px solid rgb(95 120 255 / 0.44);
  background:
    linear-gradient(165deg, rgb(255 255 255 / 0.24) 0%, rgb(104 129 255 / 0.18) 34%, rgb(2 8 44 / 0.34) 74%, rgb(0 0 0 / 0.4) 100%),
    rgb(2 2 14 / var(--glass-uniform-opacity));
  box-shadow:
    0 24px 56px rgb(0 0 0 / 0.64),
    0 0 30px rgb(0 0 255 / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.24);
  backdrop-filter: blur(10px) saturate(124%);
  -webkit-backdrop-filter: blur(10px) saturate(124%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(10px, 1.8vw, 18px);
  padding: clamp(14px, 2.2vw, 24px);
}

.page-gallery .coverflow-viewer-figure {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  justify-content: center;
  overflow: hidden;
}

.page-gallery .coverflow-viewer-image {
  display: block;
  width: min(74vw, 940px);
  max-width: 100%;
  max-width: min(74vw, 940px);
  max-height: min(68vh, 720px);
  height: auto;
  object-fit: contain;
  object-position: center;
  margin-inline: auto;
  border-radius: clamp(10px, 1.4vw, 16px);
  border: 1px solid rgb(112 132 255 / 0.46);
  box-shadow:
    0 14px 30px rgb(0 0 0 / 0.5),
    0 0 16px rgb(0 0 255 / 0.28),
    0 0 32px rgb(0 0 255 / 0.16);
  background: #000000;
}

.page-gallery .coverflow-viewer-caption {
  display: none;
  margin: 0;
  color: #deebff;
  text-align: center;
  font-size: clamp(13px, 1.4vw, 17px);
  line-height: 1.3;
}

.page-gallery .coverflow-viewer-close,
.page-gallery .coverflow-viewer-arrow {
  --viewer-arrow-transform: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgb(105 126 255 / 0.46);
  border-radius: 999px;
  background: rgb(2 8 40 / 0.62);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: var(--viewer-arrow-transform);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
  box-shadow:
    0 8px 20px rgb(0 0 0 / 0.34),
    0 0 14px rgb(0 0 255 / 0.18);
}

.page-gallery .coverflow-viewer-close {
  position: absolute;
  top: 8px;
  right: 8px;
}

.page-gallery .coverflow-viewer-close:hover,
.page-gallery .coverflow-viewer-close:focus-visible,
.page-gallery .coverflow-viewer-arrow:hover,
.page-gallery .coverflow-viewer-arrow:focus-visible {
  border-color: rgb(142 159 255 / 0.78);
  background: rgb(8 18 74 / 0.74);
  box-shadow:
    0 8px 20px rgb(0 0 0 / 0.34),
    0 0 18px rgb(0 0 255 / 0.28);
}

.page-gallery .coverflow-viewer-close:active {
  transform: scale(0.95);
}

.page-gallery .coverflow-viewer-arrow:active {
  transform: var(--viewer-arrow-transform) scale(0.95);
}

.page-gallery .coverflow-viewer-close:focus-visible,
.page-gallery .coverflow-viewer-arrow:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.page-gallery .coverflow-viewer-close > .material-symbols-rounded,
.page-gallery .coverflow-viewer-arrow > .material-symbols-rounded {
  font-size: 24px;
  line-height: 1;
  font-variation-settings:
    "FILL" 0,
    "wght" 700,
    "GRAD" -25,
    "opsz" 48;
}

@media (max-width: 900px) {
  .page-gallery .gallery-center-glass {
    padding: 10px 10px 12px;
  }

  .page-gallery .coverflow-stage {
    --cf-card-width: clamp(130px, 52vw, 250px);
    --cf-card-height: var(--cf-card-width);
    min-height: clamp(260px, 56dvh, 560px);
    perspective: 980px;
  }

  .page-gallery .coverflow-card {
    width: var(--cf-card-width);
    top: 42%;
    transform:
      translate3d(calc(var(--cf-x) - 50%), -50%, var(--cf-z))
      rotateY(var(--cf-rot))
      scale(var(--cf-scale));
  }

  .page-gallery[data-gallery-reduced-motion="true"] .coverflow-card {
    transform: translate3d(calc(var(--cf-x) - 50%), -50%, 0) scale(var(--cf-scale));
  }

  .page-gallery .coverflow-controls {
    top: max(10px, calc(env(safe-area-inset-top) + 4px));
    bottom: auto;
    gap: 10px;
  }

  .page-gallery .coverflow-viewer {
    padding: 10px;
  }

  .page-gallery .coverflow-viewer-panel {
    width: min(94vw, 560px);
    max-height: min(82dvh, 760px);
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 8px;
    padding: 14px 54px 12px;
  }

  .page-gallery .coverflow-viewer-figure {
    justify-self: center;
  }

  .page-gallery .coverflow-viewer-image {
    width: 100%;
    max-width: min(82vw, 520px);
    max-height: min(66dvh, 620px);
  }

  .page-gallery .coverflow-viewer-arrow {
    position: absolute;
    top: 50%;
    --viewer-arrow-transform: translateY(-50%);
    width: 40px;
    height: 40px;
    z-index: 2;
  }

  .page-gallery .coverflow-viewer-arrow--prev {
    left: 8px;
  }

  .page-gallery .coverflow-viewer-arrow--next {
    right: 8px;
  }

  .page-gallery .coverflow-viewer-close {
    top: 6px;
    right: 6px;
  }
}

.page-gallery[data-gallery-reduced-motion="true"] .coverflow-stage {
  perspective: none;
}

.page-gallery[data-gallery-reduced-motion="true"] .coverflow-card {
  transition: opacity 120ms linear;
  transform: translate3d(calc(var(--cf-x) - 50%), -50%, 0) scale(var(--cf-scale));
  filter: saturate(1) brightness(1);
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }
  .toggle-button {
    animation: none;
    background: transparent;
    box-shadow: none;
    filter: none;
  }
  .menu-symbol {
    animation: none;
    color: var(--text-spectrum-fallback);
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
    filter: none;
  }
  .site-name {
    animation: none;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    text-shadow:
      0 0 5px rgb(0 0 255 / 0.28),
      0 0 12px rgb(0 0 255 / 0.16);
    filter: drop-shadow(0 0 7px rgb(0 0 255 / 0.14));
  }
  .about-copy {
    animation: none;
    color: #ffffff;
    text-shadow: none;
    filter: none;
  }
  .menu-panel {
    animation: none;
    box-shadow: none;
  }
  .menu-panel:not([hidden]) .menu-link > span,
  .menu-link:hover > span,
  .menu-link:active > span,
  .menu-link:focus-visible > span,
  .menu-link[aria-current="page"] > span {
    animation: none;
    text-shadow: none;
    filter: none;
  }
  .menu-link > span:last-child {
    animation: none;
    color: var(--text-spectrum-fallback);
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
    filter: none;
  }
  #site-menu .menu-link > span:last-child {
    color: #ffffff;
    background-image: none;
    -webkit-text-fill-color: #ffffff;
  }
  #site-menu .menu-link > .menu-link-icon,
  #site-menu .menu-link > .menu-home-icon {
    color: #ffffff;
    background-image: none;
    -webkit-text-fill-color: #ffffff;
  }
  #toggle-language .language-button-text,
  #toggle-language .menu-link-icon,
  #language-menu .menu-link > span,
  #language-menu .menu-link > span:last-child {
    color: #ffffff;
    background-image: none;
    -webkit-text-fill-color: #ffffff;
    text-shadow: none;
    filter: none;
  }
  .page-contacts .contact-link > .menu-link-icon {
    color: #ffffff;
    background-image: none;
    -webkit-text-fill-color: #ffffff;
    text-shadow: none;
    filter: none;
  }
  .chess-floor::before,
  .chess-floor::after {
    animation: none;
    transform: none;
    opacity: 1;
  }
  .chess-floor::after {
    display: none;
  }
  .rain-cursor-layer {
    display: none;
  }
  .page-gallery .coverflow-shell::before {
    filter: none;
  }
  .page-gallery .coverflow-card,
  .page-gallery .coverflow-card-surface,
  .page-gallery .coverflow-nav-button,
  .page-gallery .coverflow-viewer-close,
  .page-gallery .coverflow-viewer-arrow {
    transition: none;
  }
}

/* Keep local itshover SVG icons visible where legacy font-gradient rules set transparent text fill. */
.material-symbols-rounded[data-itshover-icon] {
  color: #ffffff !important;
  background-image: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  -webkit-text-fill-color: #ffffff !important;
}

.material-symbols-rounded[data-itshover-icon] > svg[data-itshover="true"] {
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: none !important;
}
