/* Shared profile header. Load after the theme and page-specific styles. */
.wrapper > header.profile-header {
  --profile-ink: #193d59;
  --profile-muted: #475569;
  --profile-rule: #dce3e9;
  --profile-hover: #eaf3f5;
  --profile-focus: #237872;
  box-sizing: border-box;
  padding-top: 48px;
  padding-bottom: 12px;
  color: var(--profile-ink);
  font-family: var(--site-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  text-align: left;
}
header.profile-header *,
header.profile-header *::before,
header.profile-header *::after { box-sizing: border-box; }
header.profile-header [hidden] { display: none !important; }
.wrapper > header.profile-header > .image.avatar {
  position: relative;
  width: 210px;
  max-width: 84%;
  height: auto;
  aspect-ratio: 4 / 4.4;
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid rgba(25, 61, 89, .08);
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .065);
}
.wrapper > header.profile-header > .image.avatar > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  transform: none;
}
header.profile-header .profile-identity { min-width: 0; }
header.profile-header .profile-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 8px;
  margin: 0 0 7px;
  color: var(--profile-ink);
  font-family: var(--site-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 24px;
  line-height: 1.2;
}
header.profile-header .profile-name-en { font-size: 24px; font-weight: 700; white-space: nowrap; }
header.profile-header .profile-name-secondary { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
header.profile-header .profile-name-divider { margin: 0; color: var(--profile-muted); font-size: 14px; font-weight: 400; }
header.profile-header .profile-name-zh {
  color: var(--profile-ink);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}
header.profile-header .profile-position {
  display: block;
  max-width: none;
  margin: 0;
  color: var(--profile-muted);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.55;
}
header.profile-header .profile-position a { color: inherit; text-decoration: none; white-space: nowrap; }
header.profile-header .profile-position a:hover { color: var(--profile-focus); text-decoration: underline; text-underline-offset: .2em; }
header.profile-header .profile-action-row { margin-top: 14px; }
header.profile-header .profile-primary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 210px;
  max-width: 100%;
  min-width: 0;
}
header.profile-header .profile-primary a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #cbd7df;
  border-radius: 5px;
  background: transparent;
  color: var(--profile-ink);
  font: 600 14px/1.25 var(--site-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  text-decoration: none;
  white-space: nowrap;
}
header.profile-header .profile-primary a:hover { border-color: #a5bdca; background: var(--profile-hover); color: var(--profile-ink); }
header.profile-header .profile-primary i { font-size: 14px; }
header.profile-header .profile-filetype { margin-left: 2px; font-size: 14px; font-weight: 500; }
header.profile-header .profile-contact { width: 100%; max-width: 100%; margin: 8px 0 0; text-align: left; }
header.profile-header .social-icons.profile-secondary {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  width: 210px;
  max-width: 100%;
  margin: 0;
}
header.profile-header .social-icons.profile-secondary a,
header.profile-header .social-icons.profile-secondary .profile-copy {
  display: inline-flex;
  flex: 0 0 30px;
  justify-content: center;
  align-items: center;
  width: 30px;
  min-width: 30px;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--profile-muted) !important;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}
header.profile-header .social-icons.profile-secondary i { font-size: 16px; }
header.profile-header .social-icons.profile-secondary a:hover,
header.profile-header .social-icons.profile-secondary .profile-copy:hover {
  color: var(--profile-focus) !important;
  background: transparent;
  box-shadow: none;
  transform: none;
}
header.profile-header .profile-copy:disabled { cursor: wait; }
header.profile-header .profile-copy-status {
  display: block;
  min-height: 16px;
  margin-top: 2px;
  color: var(--profile-focus);
  font: 11px/1.4 var(--site-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}
header.profile-header .profile-copy-status[data-copy-state="error"] { color: var(--profile-muted); }
header.profile-header .profile-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
header.profile-header a:focus-visible,
header.profile-header button:focus-visible { outline: 2px solid var(--profile-focus); outline-offset: 3px; }
@media (min-width: 1101px) {
  .wrapper > header.profile-header { width: 250px; max-height: calc(100vh - 64px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c1d0d9 transparent; }
}
@media (max-width: 1100px) {
  .wrapper > header.profile-header {
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr);
    column-gap: 24px;
    align-items: start;
    position: static;
    float: none;
    width: auto;
    max-height: none;
    overflow: visible;
    padding: 28px 0 16px;
  }
  .wrapper > header.profile-header > .image.avatar { grid-column: 1; grid-row: 1 / span 3; width: 144px; max-width: 100%; margin: 0; }
  header.profile-header .profile-identity { grid-column: 2; grid-row: 1; }
  header.profile-header .profile-action-row { grid-column: 2; grid-row: 2; margin-top: 12px; }
  header.profile-header .profile-primary { width: 228px; }
  header.profile-header .profile-contact { grid-column: 2; grid-row: 3; margin-top: 8px; }
}
@media (max-width: 600px) {
  .wrapper > header.profile-header { grid-template-columns: 100px minmax(0, 1fr); column-gap: 16px; padding-top: 20px; }
  .wrapper > header.profile-header > .image.avatar { grid-row: 1 / span 2; width: 100px; }
  header.profile-header .profile-name { gap: 3px 7px; }
  header.profile-header .profile-name-divider { display: none; }
  header.profile-header .profile-position { font-size: 14.5px; line-height: 1.5; }
  header.profile-header .profile-action-row { margin-top: 10px; }
  header.profile-header .profile-primary { width: 100%; gap: 6px; }
  header.profile-header .profile-primary a { gap: 5px; padding-left: 5px; padding-right: 5px; }
  header.profile-header .profile-contact { grid-column: 1 / -1; grid-row: 3; margin-top: 10px; }
}
@media (max-width: 360px) {
  .wrapper > header.profile-header { grid-template-columns: 90px minmax(0, 1fr); column-gap: 14px; }
  .wrapper > header.profile-header > .image.avatar { width: 90px; }
}
@media (prefers-color-scheme: dark) {
  .wrapper > header.profile-header { --profile-ink: #d0e8f8; --profile-muted: #b1bfcc; --profile-rule: #334453; --profile-hover: #243947; --profile-focus: #7ed0c5; }
  header.profile-header .profile-primary a { border-color: #536777; }
  header.profile-header .profile-primary a:hover { border-color: #7892a4; }
}
@media (prefers-reduced-motion: reduce) {
  header.profile-header *, header.profile-header *::before, header.profile-header *::after { animation: none !important; transition: none !important; }
}
@media print {
  .wrapper > header.profile-header { max-height: none; overflow: visible; }
  header.profile-header .profile-copy { display: none; }
  header.profile-header .profile-copy-status { min-height: 0; }
}
