/* Left column: allow scroll when content (nav + news) is taller than the viewport */
body .wrapper > header {
  --profile-avatar-size: 200px;
  max-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 1.5rem;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  body .wrapper > header {
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
  }
}

/* Portrait + icons: same width as avatar (200px) so the row shares one vertical center axis */
.profile-header-block {
  width: var(--profile-avatar-size);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  box-sizing: border-box;
}

.profile-header-block .round-logo {
  display: block;
  float: none;
  margin: 0 auto;
  width: var(--profile-avatar-size);
  height: var(--profile-avatar-size);
  max-width: 100%;
  object-fit: cover;
  box-sizing: border-box;
}

/* Override theme rules that can shift the avatar or icons */
body .wrapper > header .profile-header-block img.round-logo {
  float: none !important;
}

/* Four equal columns = same width as avatar row, icons centered in each cell */
.profile-social {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  width: 100%;
  margin: 0.65rem 0 0;
  padding: 0;
  box-sizing: border-box;
  align-items: center;
  justify-items: center;
}

.profile-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 2.75rem;
  aspect-ratio: 1;
  margin: 0;
  color: #b0b0b0;
  line-height: 0;
  transition: color 0.2s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.profile-social__link:hover {
  color: #f0f0f0;
  transform: translateY(-1px);
}

/* Identical SVG canvas for every icon */
.profile-social__link svg {
  width: 1.375rem;
  height: 1.375rem;
  display: block;
  flex-shrink: 0;
}

/* Section directory: left-aligned, same column width as avatar block */
.sidebar-nav {
  width: var(--profile-avatar-size, 200px);
  max-width: 100%;
  margin: 1rem auto 0;
  padding: 0.85rem 0 0;
  box-sizing: border-box;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.sidebar-nav li {
  margin: 0;
  padding: 0;
}

.sidebar-nav li + li {
  margin-top: 0.15rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.35rem 0 0.35rem 0.6rem;
  margin-left: -0.6rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  color: #8ab4e8;
  border-left: 2px solid transparent;
  border-radius: 0 2px 2px 0;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.sidebar-nav a:hover {
  color: #c5daf8;
  border-left-color: rgba(138, 180, 232, 0.55);
  background-color: rgba(255, 255, 255, 0.04);
}

/* Latest news under sidebar nav */
.sidebar-news {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #c4c4c4;
}

.sidebar-news h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  padding: 0;
  color: #e8e8e8;
  border: none;
  text-align: center;
}

.sidebar-news a {
  color: #9ecfff;
}

.sidebar-news a:hover {
  color: #cfe6ff;
}

.sidebar-news ul {
  margin: 0.35em 0 0.85em 1.1em;
  padding: 0;
}

.sidebar-news p,
.sidebar-news span {
  margin: 0.25em 0;
}
