.employeesPage {
  --color-content-secondary: var(--color-gray-700);
  position: relative;
  width: 100%;
  min-width: 320px;
  height: 100svh;
  overflow: hidden;
  background: var(--color-surface-tertiary);
  color: var(--color-content-secondary);
}

.decorations { position: absolute; inset: 0; pointer-events: none; }
.decorationTop,
.decorationCenter,
.decorationBottom {
  position: absolute;
  max-width: none;
  color: var(--color-surface-secondary);
  opacity: 1;
  will-change: transform;
  animation: decorationArrival var(--duration-decoration-arrival) var(--easing-decoration-arrival) both;
}
.decorationTop {
  --decoration-from-x: -188.695px;
  --decoration-from-y: 233.6px;
  top: -171px;
  left: calc(50% + 83px);
  width: 410px;
  height: 410px;
}
.decorationCenter {
  --decoration-from-x: -288px;
  --decoration-from-y: 126px;
  top: 24px;
  left: calc(50% - 117px);
  width: 811px;
  height: 811px;
}
.decorationBottom {
  --decoration-from-x: -188.695px;
  --decoration-from-y: -140.4px;
  top: 637px;
  left: calc(50% + 83px);
  width: 410px;
  height: 410px;
}
.decorationTop [data-ornament-outer-square],
.decorationBottom [data-ornament-outer-square] {
  transform-box: view-box;
  transform-origin: 205px 205px;
  animation: sideSquareArrival var(--duration-decoration-arrival) var(--easing-decoration-arrival) both;
}

.employeeProfile {
  position: absolute;
  top: clamp(64px, 9svh, 96px);
  left: clamp(40px, calc(12.5vw - 56px), 124px);
  z-index: 2;
  display: flex;
  width: 343px;
  flex-direction: column;
  gap: var(--space-employee-profile);
}

.employeeProfileImage { position: relative; width: 343px; height: 426px; overflow: hidden; }
.employeeProfileImage img { display: block; width: 100%; height: 100%; object-fit: cover; animation: profileReveal 240ms ease-out; }
.employeeProfileText { display: flex; flex-direction: column; gap: var(--space-employee-copy); overflow-wrap: break-word; }
.employeeProfileText h1 { margin: 0; font-family: var(--font-family-heading); font-size: var(--font-size-employee-heading); font-weight: var(--font-weight-heading); line-height: var(--line-height-employee-heading); }
.employeeProfileText p { margin: 0; }
.employeeQuote { white-space: pre-line; font-family: var(--font-family-body); font-size: var(--font-size-employee-body); font-weight: var(--font-weight-body); line-height: var(--line-height-employee-body); }
.employeeTags { display: flex; flex-wrap: wrap; gap: 0 6px; color: var(--color-content-muted-on-light); font-family: var(--font-family-body); font-size: var(--font-size-body-s); line-height: var(--line-height-body-s); }
.employeeSocial { display: flex; align-items: center; gap: var(--space-employee-social-icons); margin-top: calc(var(--space-purple) - var(--space-employee-copy)); }
.employeeSocialIcon {
  display: block;
  width: var(--size-employee-social-icon);
  height: var(--size-employee-social-icon);
  background-color: var(--color-content-inverse);
  transition: background-color var(--duration-interactive-color) var(--easing-interactive-color);
  -webkit-mask-image: var(--social-icon);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: var(--social-icon);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}
.employeeSocial a.employeeSocialIcon:focus-visible { outline: var(--border-width-focus) solid var(--color-border-focus); outline-offset: var(--space-gray); }
.employeeSocial a.employeeSocialIconLinkedIn { background-color: var(--color-social-linkedin); }

.employeeCarousel {
  position: absolute;
  top: 0;
  left: calc(50% + clamp(144px, calc(6.55vw + 93.7px), 188px));
  z-index: 3;
  width: 200px;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.employeeCarousel::-webkit-scrollbar { display: none; }
.employeeCarousel:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: -2px; }
.employeeCarouselTrack { display: flex; flex-direction: column; gap: 10px; }
.employeeCarouselItem { position: relative; width: 200px; height: 249px; flex: 0 0 249px; overflow: hidden; border: 0; background: transparent; cursor: pointer; padding: 0; transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.employeeCarouselItem img { display: block; width: 100%; height: 100%; object-fit: cover; }
.employeeCarouselItem[data-glitch] .employeeCarouselImageActive { animation: employeeColorGlitch var(--duration-employee-color-glitch) steps(1, end) both; }
.employeeCarouselItem:hover { transform: scale(0.9); }
.employeeCarouselItem:focus-visible { outline: 3px solid var(--color-border-focus); outline-offset: -3px; }

@media (min-width: 768px) and (max-width: 1199px) {
  .decorationTop {
    --decoration-from-x: -628.003px;
    --decoration-from-y: 435.11px;
  }
  .decorationCenter {
    --decoration-from-x: -205.5px;
    --decoration-from-y: 81px;
  }
  .decorationBottom {
    --decoration-from-x: 135.797px;
    --decoration-from-y: -372.89px;
  }
  .employeeProfile { width: 368px; }
  .employeeProfileImage { width: 368px; height: 458px; }
}

@media (min-width: 1200px) {
  .decorationTop {
    --decoration-from-x: -768px;
    --decoration-from-y: 394px;
  }
  .decorationCenter {
    --decoration-from-x: -288px;
    --decoration-from-y: -1px;
  }
  .decorationBottom {
    --decoration-from-x: 192px;
    --decoration-from-y: -414px;
  }
}

@media (min-width: 768px) and (max-height: 750px) {
  .employeeProfile { transform: scale(0.85); transform-origin: top left; }
}

@media (min-width: 768px) and (max-height: 620px) {
  .employeeProfile { transform: scale(0.7); }
}

@media (max-width: 767px) {
  .decorationTop { left: calc(50% + 83.5px); }
  .decorationCenter { left: calc(50% - 116.5px); }
  .decorationBottom { left: calc(50% + 83.5px); }
  .employeeProfile { top: clamp(180px, 25svh, 220px); left: 16px; width: min(343px, calc(100vw - 32px)); gap: var(--space-employee-copy); }
  .employeeProfileImage { width: min(100%, max(160px, calc(100svh - 475px))); height: auto; aspect-ratio: 343 / 426; }
  .employeeProfileText h1 { font-size: var(--font-size-heading-h2); line-height: var(--line-height-heading-h2); }
  .employeeQuote { font-size: var(--font-size-body-s); line-height: var(--line-height-body-s); }
  .employeeTags { font-size: var(--font-size-caption); line-height: var(--line-height-caption); }
  .employeeSocial { margin-top: 0; }
  .employeeCarousel { top: 40px; left: 0; width: 100%; height: 140px; overflow-x: auto; overflow-y: hidden; }
  .employeeCarouselTrack { width: max-content; flex-direction: row; gap: 16px; }
  .employeeCarouselItem { width: 112px; height: 140px; flex-basis: 112px; }
}

@media (max-width: 767px) and (max-height: 650px) {
  .employeeProfile { transform: scale(0.9); transform-origin: top left; }
}

@media (prefers-reduced-motion: reduce) {
  .decorationTop,
  .decorationCenter,
  .decorationBottom,
  .employeeProfileImage img,
  .employeeCarouselItem,
  .employeeCarouselItem[data-glitch] .employeeCarouselImageActive { animation: none; transition: none; }
  .decorationTop [data-ornament-outer-square],
  .decorationBottom [data-ornament-outer-square] {
    animation: none;
    transform: rotate(135deg);
  }
}

@keyframes decorationArrival {
  from { transform: translate(var(--decoration-from-x), var(--decoration-from-y)); }
  to { transform: translate(0, 0); }
}

@keyframes sideSquareArrival {
  from { transform: rotate(45deg); }
  to { transform: rotate(135deg); }
}

@keyframes profileReveal {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

@keyframes employeeColorGlitch {
  0%, 100% { filter: grayscale(0); transform: translateX(0); }
  18% { filter: grayscale(1) contrast(1.3); transform: translateX(-3px); }
  32% { filter: grayscale(0) saturate(1.6); transform: translateX(2px); }
  46% { filter: grayscale(0.8); transform: translateX(-1px); }
  64% { filter: grayscale(0) saturate(1.35); transform: translateX(1px); }
  78% { filter: grayscale(0.25); transform: translateX(0); }
}

.employeeProfilePanel { display: contents; }
.employeeSocialIconFigma { --social-icon: url(../media/footer/social-telegram.svg); }
.employeeSocialIconX { --social-icon: url(../media/footer/social-vk.svg); }
.employeeSocialIconInstagram { --social-icon: url(../media/footer/social-behance.svg); }
.employeeSocialIconLinkedIn { --social-icon: url(../media/footer/social-dribbble.svg); }
