/* Final small polish: real avatar image, subtitle alignment, and heading scale. */
#avatar,
#sidebar #avatar,
#sidebar img#avatar,
#sidebar .profile-wrapper img,
#sidebar .avatar {
  width: 7.35rem !important;
  height: 7.35rem !important;
  max-width: 7.35rem !important;
  max-height: 7.35rem !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 999px !important;
  border: 3px solid #ffffff !important;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.55) !important;
  background: #111821 !important;
}

/* Use your current GitHub profile avatar reliably instead of the old Twitter image. */
#avatar,
#sidebar #avatar,
#sidebar img#avatar,
#sidebar .profile-wrapper img,
#sidebar .avatar {
  content: url('https://avatars.githubusercontent.com/u/85572022?v=4') !important;
}

/* Make the subtitle under Shervoni clean, readable, and aligned. */
#sidebar .site-subtitle {
  display: block !important;
  max-width: 14.75rem !important;
  margin-top: 0.75rem !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  color: #4b5563 !important;
  font-size: 0.95rem !important;
  line-height: 1.55 !important;
  font-style: normal !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
}

html[data-mode="dark"] #sidebar .site-subtitle,
html.dark #sidebar .site-subtitle,
html[data-bs-theme="dark"] #sidebar .site-subtitle {
  color: #aeb6c2 !important;
}

/* Smaller page headings everywhere: home, categories, tags, archives, about, and posts. */
html body #core-wrapper h1,
html body #main-wrapper h1,
html body main h1,
html body .post-title,
html body .page-title,
html body .dynamic-title,
html body #page h1,
html body #post h1,
html body .post-content h1,
html body .page-content h1,
html body #categories h1,
html body #tags h1,
html body #archives h1,
html body h1.dynamic-title,
html body div[class*="content"] > h1:first-child {
  font-size: clamp(1.85rem, 3vw, 2.65rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.045em !important;
  font-weight: 800 !important;
}

html body #core-wrapper h2,
html body #main-wrapper h2,
html body main h2,
html body .post-content h2,
html body .page-content h2 {
  font-size: clamp(1.35rem, 2.15vw, 1.95rem) !important;
  line-height: 1.2 !important;
  letter-spacing: -0.035em !important;
  font-weight: 750 !important;
}

/* Homepage and related-card headings: smaller and cleaner. */
#post-list .card-title,
#post-list .card-title a,
#post-list h1,
#post-list h2,
#post-list h3,
.post-tail-wrapper .card-title,
.post-tail-wrapper .card-title a,
.related-posts .card-title,
.related-posts .card-title a,
#related-posts .card-title,
#related-posts .card-title a {
  font-size: clamp(1.18rem, 1.7vw, 1.75rem) !important;
  line-height: 1.14 !important;
  letter-spacing: -0.035em !important;
}

#post-list .card-title,
#post-list .card-title a {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 900px) {
  #avatar,
  #sidebar #avatar,
  #sidebar img#avatar,
  #sidebar .profile-wrapper img,
  #sidebar .avatar {
    width: 6.4rem !important;
    height: 6.4rem !important;
    max-width: 6.4rem !important;
    max-height: 6.4rem !important;
  }

  html body #core-wrapper h1,
  html body #main-wrapper h1,
  html body main h1,
  html body .post-title,
  html body .page-title,
  html body .dynamic-title {
    font-size: clamp(1.65rem, 7vw, 2.2rem) !important;
  }

  #post-list .card-title,
  #post-list .card-title a {
    white-space: normal !important;
  }
}
