/* === AVATAR (render as background; never distorts) === */
.author__avatar img { display: none !important; }

.author__avatar,
.author__content .author__avatar {
  width: 340px !important;
  height: 340px !important;
  max-width: 340px !important;
  max-height: 340px !important;
  box-sizing: border-box;
  border: 6px solid #fff;
  border-radius: 50%;
  margin: 0 auto;
  background-image: url('/images/profile_square.jpeg'); /* exact filename */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* === DESKTOP LAYOUT — two-column, no overlap; tighter gap === */
@media (min-width: 64em) {
  #main {
    display: flex !important;
    gap: 0.35rem !important;        /* tighten space between photo and text */
    align-items: flex-start;
    max-width: 1800px !important;
    margin: 0 auto !important;
  }

  .sidebar.sticky, .sidebar {
    flex: 0 0 440px !important;     /* sidebar width */
    max-width: 440px !important;
  }

  /* park the avatar against the RIGHT edge of the sidebar */
  .sidebar .author__avatar,
  .sidebar.sticky .author__avatar {
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  article.page, .page__content {
    flex: 1 1 auto !important;
    max-width: 1100px !important;   /* tweak 1100–1200 to taste */
  }
}

/* === MOBILE/TABLET LAYOUT === */
@media (max-width: 64em) {
  .author__avatar, .author__content .author__avatar {
    width: 240px !important; height: 240px !important;
  }
  /* hide only the mobile Follow toggle; keep real links if present */
  .author__urls-wrapper .btn { display: none !important; }
}

/* Turn OFF sticky behavior for the left column */
.sidebar.sticky { position: static !important; top: auto !important; }

/* Remove any Follow bubble/list wrappers entirely (if you don't use them) */
.author__urls-wrapper, .author__urls-toggle, .author__urls,
.author__content .author__urls-wrapper { display: none !important; }

/* === HEADER (name styling & placement) === */
.masthead, .masthead__inner-wrap { border-bottom: none !important; }

.masthead__inner-wrap {
  max-width: 1800px !important;
  margin: 0 auto !important;
}

/* Match theme font, make slightly smaller, unbolded, centered nicely */
.masthead .site-title,
.masthead__inner-wrap .site-title,
li.masthead__menu-item.masthead__menu-item--lg a.site-title,
.masthead__menu-item--lg > a {
  display: block;
  width: 440px;                        /* same as sidebar */
  text-align: center;
  margin: 0 0 0 50px !important;       /* keeps alignment over avatar */
  color: #000 !important;
  font-size: 2.6rem !important;        /* slightly smaller */
  font-weight: 400 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  letter-spacing: 0.3px;
  text-decoration: none !important;
  pointer-events: none;
  cursor: default;
}

/* --- MOBILE HEADER FIX: show/center the title on small screens --- */
@media (max-width: 48em) {
  /* Reset the masthead container padding so centering works cleanly */
  .masthead__inner-wrap { max-width: 100% !important; padding: 0 1rem; }

  /* Put the title back to auto width and center it */
  .masthead__menu-item--lg > a,
  .masthead .masthead__menu-item--lg > a,
  .masthead__inner-wrap .masthead__menu-item--lg > a,
  .masthead .site-title,
  .masthead__inner-wrap .site-title {
    display: block !important;
    width: auto !important;
    margin: 0 auto !important;   /* center */
    text-align: center !important;
    font-size: 2rem !important;  /* mobile size; tweak 1.9–2.2rem to taste */
    font-weight: 400 !important;
  }
}
