/* ===================================================================
   custom.css — Jiayu Liu personal site tweaks
   =================================================================== */

/* =============== 1) Author avatar: no crop, rectangular =============== */
.author__avatar,
.author__avatar img {
  border-radius: 6px !important;
  -webkit-clip-path: none !important;
  clip-path: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
  max-width: 220px;
  margin: 0 auto;
  display: block;
}

.author__avatar img,
.avatar img {
  border: none !important;
  box-shadow: none !important;
  background: none !important;
  padding: 0 !important;
}

.author__avatar { text-align: center; margin-bottom: 1rem; }

@media (max-width: 768px) { .author__avatar img { max-width: 150px; } }

/* Center the complete author card at every viewport size. */
.sidebar > [itemscope] {
  width: min(100%, 220px);
  margin-right: auto;
  margin-left: auto;
}

.author__content {
  display: block !important;
  width: 100% !important;
  margin: -0.25rem auto 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  text-align: center !important;
}

.author__urls-wrapper {
  display: block !important;
  width: 100%;
}

.author__urls {
  position: relative !important;
  right: auto !important;
  display: block !important;
  width: max-content;
  max-width: 100%;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
  list-style: none;
  z-index: auto !important;
}

.author__urls::before,
.author__urls::after {
  display: none !important;
}

.sidebar .author__desktop {
  display: block !important;
}

/* Keep sidebar icons visible and aligned even if inherited icon styles change. */
.author__urls .fas {
  display: inline-block !important;
  width: 1.25em;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  color: #494e52 !important;
}

.author__urls .fab {
  display: inline-block !important;
  width: 1.25em;
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
  color: #494e52 !important;
}

.author__urls .ai {
  display: inline-block !important;
  width: 1.25em;
  font-family: "Academicons" !important;
  font-weight: 400 !important;
  color: #494e52 !important;
}

/* Reliable fallbacks for sidebar icons when web fonts are unavailable. */
.author__urls .fa-location-dot::before {
  content: "\1F4CD" !important;
}

.author__urls .fa-envelope::before {
  content: "\2709" !important;
}

.author__urls .ai-google-scholar::before {
  content: "\1F393" !important;
}

.author__urls .fa-bluesky::before {
  content: "\2601" !important;
}

.author__urls .fa-x-twitter::before {
  content: "\1D54F" !important;
}

.author__urls .fa-linkedin::before {
  content: "in" !important;
}

.author__urls .fa-location-dot::before,
.author__urls .fa-envelope::before,
.author__urls .ai-google-scholar::before,
.author__urls .fa-bluesky::before,
.author__urls .fa-x-twitter::before,
.author__urls .fa-linkedin::before {
  font-family: Arial, sans-serif !important;
  font-size: 0.9em;
}

.author__urls .fa-linkedin::before {
  font-weight: 700;
  letter-spacing: -0.08em;
}

/* Polished, responsive author card. */
.sidebar > [itemscope] {
  box-sizing: border-box;
  max-width: 240px;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.author__avatar {
  margin-bottom: 0.9rem;
}

.author__avatar img {
  max-width: 190px;
  border-radius: 10px !important;
}

.author__content .author__name {
  margin: 0 0 0.45rem !important;
  font-size: 1.25rem;
  line-height: 1.2;
}

.author__content .author__bio {
  margin: 0 !important;
  color: #66717a;
  font-size: 0.88rem;
  line-height: 1.45;
}

.author__urls-wrapper {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #edf0f2;
}

.author__urls {
  width: 100%;
}

.author__urls li {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin: 0.15rem 0;
  white-space: normal;
}

.author__urls a {
  display: flex !important;
  align-items: center;
  width: 100%;
  margin: 0 !important;
  padding: 0.2rem 0 !important;
  border-radius: 8px;
  font-size: 0.86rem !important;
  line-height: 1.25;
}

.author__urls a:hover {
  color: #006da3;
  text-decoration: none !important;
}

.author__urls .icon-pad-right {
  display: inline-flex !important;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px !important;
  height: 30px;
  margin-right: 0.65rem;
  padding: 0 !important;
  border-radius: 50%;
  background: #eef5f8;
  color: #315b70 !important;
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .sidebar > [itemscope] {
    width: min(100%, 280px);
    max-width: 280px;
    padding: 16px;
  }

  .author__avatar img {
    max-width: 210px;
  }
}

/* Fine-tune desktop vertical alignment with the main page heading. */
@media (min-width: 1024px) {
  .sidebar > [itemscope] {
    transform: translateY(-10px);
  }
}

/* ===================== 2) Force light theme ===================== */
html,
html[data-theme="dark"] { background: #fff !important; color: #222 !important; }

a { color: #0077b6; }
a:hover { color: #005a87; text-decoration: none; }

/* ===================== 4) Page & sidebar subtle tweaks ===================== */
.page__content { scroll-margin-top: 90px; }

.school-mark {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.25em;
  object-fit: contain;
  vertical-align: -0.12em;
}

@media (max-width: 925px) { .sidebar { padding-top: 0.5rem; } }

.page__footer, .page__footer:before, .page__footer:after {
  display: none !important;
}

.page__footer {
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* 标题大小（保留一份即可，避免冲突） */
.site-title, .site-title a { font-size: 1.25rem; line-height: 1.2; font-weight: 700; color:#111 !important; }
.greedy-nav a { padding: 0.4rem 0.6rem; }

/* ===== 手机端把 name / bio 居中（关键） ===== */
@media (max-width: 768px) {
  .author__content,
  .author__content .author__name,
  .author__content .author__bio {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
    width: 100%;
  }
  .author__avatar + .author__content { align-self: center; }
}
