.profile-main {
  width: min(1180px, calc(100% - 32px));
}

.page-back-home {
  margin: 0 0 14px;
}

.page-back-home a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  background: #ffffff;
  color: #123053;
  font-weight: 800;
}

.page-back-home a:hover,
.page-back-home a:focus-visible {
  color: #123053;
  text-decoration: none;
}

.profile-intro-body {
  line-height: 1.85;
}

.profile-intro-body > :first-child {
  margin-top: 0;
}

.profile-intro-body > :last-child {
  margin-bottom: 0;
}

.profile-lead {
  color: var(--text);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  font-weight: 800;
}

.profile-site-list {
  margin-top: 20px;
}

.profile-site-card + .profile-site-card {
  margin-top: 20px;
}

.profile-site-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: start;
  gap: 24px;
}

.profile-screen {
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e7edf5;
}

.profile-site-body > .profile-screen > img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  aspect-ratio: 1280 / 820;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.profile-screen:hover img,
.profile-screen:focus-visible img {
  transform: scale(1.012);
}

.profile-site-copy {
  line-height: 1.75;
}

.profile-site-copy .site-summary {
  margin: 0;
  color: var(--text);
  font-size: 1.04rem;
  font-weight: 700;
}

.profile-site-copy h3 {
  margin: 20px 0 8px;
  color: var(--text);
  font-size: 1rem;
}

.profile-site-copy ul {
  margin: 0;
  padding-left: 1.35em;
  color: var(--muted);
}

.profile-site-copy li + li {
  margin-top: 5px;
}

.profile-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 22px;
  padding: 0 20px;
}

.profile-visit:hover,
.profile-visit:focus-visible {
  text-decoration: none;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: var(--blue);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.28);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--green);
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 900px) {
  .profile-site-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .profile-main {
    width: min(100% - 22px, 1180px);
  }

  .page-back-home a {
    width: 100%;
  }

  .profile-site-body {
    gap: 18px;
  }

  .profile-site-copy h3 {
    margin-top: 16px;
  }

  .profile-visit {
    width: 100%;
    margin-top: 18px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    min-width: 54px;
    min-height: 46px;
    padding: 0 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-screen img,
  .back-to-top {
    transition: none;
  }
}
