@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&family=Rajdhani:wght@500;600;700&display=swap");

:root {
  --silver-bg: #0e0f11;
  --silver-1: #f0f3f5;
  --silver-2: #c2c8cf;
  --silver-3: #8f98a4;
  --silver-soft: rgba(238, 242, 246, 0.08);
  --accent-red-strong: rgba(255, 45, 85, 1);
  --accent-red-soft: rgba(255, 45, 85, 0.16);
  --indicator-strong: var(--accent-red-strong);
  --indicator-soft: var(--accent-red-soft);
  --indicator-border: rgba(255, 45, 85, 0.88);
  --contact-link-color: rgba(255, 45, 85, 0.74);
  --contact-link-hover: rgba(255, 45, 85, 1);
  --profile-title-color: rgba(255, 45, 85, 1);
  --profile-meta-color: rgba(255, 45, 85, 0.82);
  --profile-bio-color: rgba(255, 45, 85, 0.72);
  --flip-time: 1350ms;
  --return-time: 1050ms;
  --hover-time-slow: 760ms;
  --team-nav-offset: 86px;
}

body[data-page="team"] {
  background: #000;
  color: var(--silver-1);
  overflow: hidden;
  overscroll-behavior: none;
}

.page-main.minimalistic-view {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  display: block;
  min-height: calc(100vh - var(--team-nav-offset));
  position: relative;
}

.team-hero {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--team-nav-offset));
  z-index: 1;
  touch-action: none;
}

.team-background-root {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #000;
}

.team-stage {
  position: relative;
  min-height: calc(100vh - var(--team-nav-offset));
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 2vh 5vw 4vh;
}

.stack-cluster {
  position: relative;
  width: min(60vw, 740px);
  height: min(64vh, 620px);
  transform: translateY(-4.2vh);
}

.image-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.team-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: rgba(233, 239, 244, 0.72);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-family: "Orbitron", "Segoe UI", sans-serif;
  border: none;
  box-shadow: none;
  transform-origin: center center;
  transition: opacity 0.3s ease, transform var(--hover-time-slow) cubic-bezier(0.17, 0.84, 0.24, 1), filter var(--hover-time-slow) cubic-bezier(0.17, 0.84, 0.24, 1);
  backdrop-filter: blur(2px);
  backface-visibility: hidden;
  pointer-events: none;
  will-change: transform, opacity, filter;
}

.team-placeholder.is-under {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateX(0deg) scale(1);
}

.team-placeholder.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateX(0deg) scale(1);
}

.team-placeholder.has-image {
  background: transparent;
}

.team-placeholder-image {
  width: min(72%, 460px);
  max-height: 82%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.4));
  pointer-events: none;
  user-select: none;
}

.team-placeholder.is-flipping-out {
  animation: cardFlipOut var(--flip-time) cubic-bezier(0.16, 0.84, 0.2, 1) forwards;
}

.team-placeholder.is-returning {
  animation: cardReturn var(--return-time) cubic-bezier(0.2, 0.82, 0.2, 1) forwards;
}

.team-placeholder.is-gone {
  opacity: 0;
  transform: translate3d(40px, -24px, 0) scale(0.98);
  filter: blur(10px);
}

@keyframes cardFlipOut {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
  60% {
    opacity: 0.38;
    transform: translate3d(24px, -14px, 0) scale(0.99);
    filter: blur(6px);
  }
  100% {
    opacity: 0;
    transform: translate3d(40px, -24px, 0) scale(0.98);
    filter: blur(10px);
  }
}

@keyframes cardReturn {
  0% {
    opacity: 0;
    transform: translate3d(32px, -18px, 0) scale(0.985);
    filter: blur(9px);
  }
  62% {
    opacity: 0.62;
    transform: translate3d(10px, -6px, 0) scale(0.995);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

.profile-indicator-line,
.pokemon-indicator-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 2px;
  transform-origin: left center;
  transform: rotate(var(--indicator-angle, 0deg)) scaleX(1);
  background: linear-gradient(90deg, var(--indicator-strong), var(--indicator-soft));
  opacity: 0.94;
  z-index: 19;
  transition: opacity 0.18s ease;
}

.profile-indicator-line.line-hidden,
.pokemon-indicator-line.line-hidden {
  opacity: 0;
}

.profile-indicator-line.is-animating,
.pokemon-indicator-line.is-animating {
  animation: indicatorGrow 1400ms cubic-bezier(0.16, 0.84, 0.2, 1) forwards;
}

@keyframes indicatorGrow {
  0% {
    transform: rotate(var(--indicator-angle, 0deg)) scaleX(0);
    opacity: 0.18;
  }
  100% {
    transform: rotate(var(--indicator-angle, 0deg)) scaleX(1);
    opacity: 0.94;
  }
}

.top-right-content-box {
  position: absolute;
  top: 0;
  right: calc(15vw - ((100vw - min(60vw, 740px)) / 2));
  transform: translate(0, -14%);
  transform-origin: 92% 12%;
  width: clamp(300px, 24vw, 410px);
  min-height: clamp(190px, 21vh, 280px);
  padding: clamp(0.9rem, 1.4vw, 1.2rem);
  background: linear-gradient(145deg, rgba(224, 230, 236, 0.21), rgba(162, 172, 182, 0.09));
  color: var(--silver-1);
  z-index: 20;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--indicator-border);
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transition: transform var(--hover-time-slow) cubic-bezier(0.17, 0.84, 0.24, 1), box-shadow var(--hover-time-slow) ease, filter var(--hover-time-slow) ease;
}

.top-right-content-box.profile-hidden {
  clip-path: inset(100% 0 0 0);
  opacity: 0.28;
}

.top-right-content-box.profile-reveal {
  animation: profileRevealUp 720ms cubic-bezier(0.2, 0.78, 0.2, 1) forwards;
}

@keyframes profileRevealUp {
  0% {
    clip-path: inset(100% 0 0 0);
    opacity: 0.28;
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

.content-kicker {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--profile-meta-color);
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  font-weight: 600;
}

.content-name {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  letter-spacing: 0.02em;
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}

.content-role {
  margin: 0.35rem 0 0.8rem;
  color: var(--profile-meta-color);
  font-size: clamp(0.92rem, 1.2vw, 1.04rem);
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.content-bio {
  margin: 0;
  color: var(--profile-bio-color);
  line-height: 1.55;
  font-size: clamp(0.88rem, 1.03vw, 1rem);
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  font-weight: 500;
}

.bottom-left-block {
  position: absolute;
  left: calc(10vw - ((100vw - min(60vw, 740px)) / 2));
  bottom: 0;
  transform: translate(50px, 22%);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: clamp(190px, 20vw, 260px);
  z-index: 24;
}

.pokemon-card-link {
  min-height: 120px;
  padding: 1rem;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--silver-1);
  background:
    linear-gradient(145deg, rgba(244, 247, 250, 0.22), rgba(150, 160, 170, 0.11)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-right-color: var(--indicator-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
  transform-origin: 18% 80%;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-weight: 700;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: filter var(--hover-time-slow) cubic-bezier(0.17, 0.84, 0.24, 1), opacity var(--hover-time-slow) cubic-bezier(0.17, 0.84, 0.24, 1), transform var(--hover-time-slow) cubic-bezier(0.17, 0.84, 0.24, 1), box-shadow var(--hover-time-slow) ease;
}

.pokemon-card-link::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 2px;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.08) 32%, rgba(255, 255, 255, 0) 55%);
  opacity: 0.52;
}

.pokemon-card-link.is-transitioning-blur {
  filter: blur(3px);
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
  box-shadow: none;
}

.pokemon-card-link.pokemon-hidden {
  clip-path: inset(0 0 0 100%);
  opacity: 0.22;
}

.pokemon-card-link.pokemon-reveal {
  animation: pokemonRevealFromRight 720ms cubic-bezier(0.2, 0.78, 0.2, 1) forwards;
}

@keyframes pokemonRevealFromRight {
  0% {
    clip-path: inset(0 0 0 100%);
    opacity: 0.22;
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

.contact-links.is-transitioning-blur {
  filter: blur(3px);
  opacity: 0;
  transform: translateY(1px);
}

.contact-links.is-transitioning-blur a {
  color: #000;
  text-shadow: none;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.46rem;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  padding: 0.36rem 0.54rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-right-width: 2px;
  border-right-style: solid;
  border-right-color: var(--indicator-border);
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-decoration: none;
  color: var(--contact-link-color);
  font-size: 0.96rem;
  line-height: 1.2;
  transition: color 0.2s ease, text-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.link-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
}

.link-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.link-label {
  display: inline-block;
}

.contact-links a:hover {
  color: var(--contact-link-hover);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  border-right-width: 2px;
  border-right-style: solid;
  border-right-color: var(--indicator-border);
  text-shadow: 0 0 10px var(--contact-link-hover);
}

.light-streak {
  display: none;
}

.light-streak.blue {
  background: none;
}

.light-streak.red {
  background: none;
}

@media (hover: hover) and (pointer: fine) {
  .image-stack:hover .team-placeholder.is-active,
  .image-stack:active .team-placeholder.is-active,
  .image-stack:focus-within .team-placeholder.is-active {
    transform: translate3d(0, 0, 0) rotateX(0deg) scale(1.045);
  }

  .top-right-content-box:hover {
    transform: translate(0, -14%) scale(1.033);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
    filter: saturate(1.06);
  }

  .top-right-content-box.profile-hidden:hover {
    transform: translate(0, -14%);
    box-shadow: none;
    filter: none;
  }

  .pokemon-card-link:hover {
    transform: scale(1.034) translateY(-2px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      inset 0 -1px 0 rgba(255, 255, 255, 0.12),
      0 12px 24px rgba(0, 0, 0, 0.28);
  }

  .pokemon-card-link.is-transitioning-blur:hover {
    transform: scale(0.985);
    box-shadow: none;
  }
}

@media (max-width: 980px) {
  :root {
    --team-nav-offset: 118px;
  }

  .team-stage {
    place-items: end center;
    padding: 1.25rem 1.25rem 2rem;
  }

  .stack-cluster {
    width: min(92vw, 620px);
    height: min(52vh, 500px);
    margin-bottom: 14vh;
    transform: translateY(-1.2vh);
  }

  .image-stack {
    width: 100%;
    height: 100%;
  }

  .top-right-content-box {
    top: 0;
    right: calc(15vw - ((100vw - min(92vw, 620px)) / 2));
    transform: translate(0, -108%);
    width: min(74vw, 410px);
    min-height: 170px;
    padding: 0.8rem;
  }

  .bottom-left-block {
    left: calc(10vw - ((100vw - min(92vw, 620px)) / 2));
    bottom: 0;
    transform: translate(50px, 110%);
    width: min(74vw, 290px);
  }

  .pokemon-card-link {
    min-height: 88px;
  }
}

@media (max-width: 640px) {
  :root {
    --team-nav-offset: 118px;
  }

  .team-hero {
    touch-action: pan-y;
  }

  .team-stage {
    place-items: center;
    padding: 0.55rem 0.75rem 0.9rem;
  }

  .stack-cluster {
    width: min(90vw, 360px);
    max-height: calc(100svh - var(--team-nav-offset) - 1rem);
    height: auto;
    margin-bottom: 0;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(0.45rem, 1.4svh, 0.75rem);
  }

  .top-right-content-box {
    order: 1;
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    bottom: auto;
    transform: none;
    transform-origin: center center;
    width: min(90vw, 340px);
    min-height: 0;
    max-height: clamp(116px, 20svh, 165px);
    padding: 0.62rem 0.72rem;
    overflow: hidden;
    box-shadow: none;
  }

  .content-kicker {
    margin-bottom: 0.34rem;
    font-size: 0.64rem;
  }

  .content-name {
    font-size: clamp(1.1rem, 5.3vw, 1.35rem);
  }

  .content-role {
    margin: 0.2rem 0 0.42rem;
    font-size: clamp(0.74rem, 3.5vw, 0.84rem);
  }

  .content-bio {
    font-size: clamp(0.7rem, 3.35vw, 0.83rem);
    line-height: 1.34;
  }

  .image-stack {
    order: 2;
    width: min(84vw, 340px);
    height: auto;
    aspect-ratio: 3 / 4;
    flex: 0 0 auto;
  }

  .team-placeholder-image {
    width: min(95%, 305px);
    max-height: 90%;
  }

  .bottom-left-block {
    order: 3;
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    width: min(72vw, 250px);
    gap: 0.54rem;
  }

  .profile-indicator-line,
  .pokemon-indicator-line {
    display: none !important;
  }

  .top-right-content-box.profile-hidden {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }

  .top-right-content-box.profile-reveal {
    animation: none;
  }

  .pokemon-card-link {
    min-height: 68px;
    padding: 0.6rem;
    font-size: 0.66rem;
    letter-spacing: 0.07em;
    border-top-color: var(--indicator-border);
    border-right-color: rgba(255, 255, 255, 0.28);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(255, 255, 255, 0.08),
      0 6px 14px rgba(0, 0, 0, 0.2);
  }

  .pokemon-card-link.pokemon-hidden {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }

  .pokemon-card-link.pokemon-reveal {
    animation: none;
  }

  .contact-links {
    gap: 0.4rem;
  }

  .contact-links a {
    padding: 0.3rem 0.44rem;
    font-size: 0.79rem;
    line-height: 1.1;
    border-right-color: rgba(255, 255, 255, 0.24);
  }

  .link-icon {
    width: 15px;
    height: 15px;
  }
}
