:root {
  --about-text: #000000;
  --about-muted: #5f5f5f;
  --about-soft: #f5f5f5;
  --about-line: #e8e8e8;
  --about-highlight: #339cff;
}

body[data-page="about"] {
  --font-sans: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: #ffffff;
}

.about-page {
  padding: clamp(72px, 9vw, 136px) 0 0;
}

.about-hero {
  width: min(960px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 44px;
}

.intro-panel {
  width: min(480px, 100%);
}

.intro-name {
  margin: 0;
  color: var(--about-text);
  font-size: clamp(1.9rem, 3vw, 2rem);
  line-height: 1.2;
  font-weight: 400;
}

.intro-title,
.intro-connect,
.intro-description {
  margin: 16px 0 0;
  color: var(--about-muted);
  font-size: 14.4px;
  line-height: 1.45;
  font-weight: 400;
  white-space: pre-wrap;
  word-break: break-word;
}

.intro-description {
  margin-top: 26px;
  min-height: 128px;
}

.portrait-panel {
  width: 214px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 18px;
  margin-right: 0;
}

.portrait-frame {
  position: relative;
  width: 214px;
  height: 268px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.portrait-frame:focus-visible {
  outline: 2px solid #9dc8ff;
  outline-offset: 4px;
  border-radius: 12px;
}

.portrait-card {
  position: absolute;
  left: 50%;
  top: 16px;
  width: 178px;
  height: 236px;
  margin-left: -89px;
  border-radius: 10px;
  border: 5.34px solid rgba(255, 255, 255, 0.95);
  background: #f0f0f0 center / cover no-repeat;
  box-shadow: 0 4px 8px rgba(24, 24, 24, 0.048);
  transition: transform 320ms cubic-bezier(0.2, 0.7, 0.25, 1), opacity 320ms ease;
}

.portrait-card[hidden] {
  display: none !important;
}

.portrait-card[data-layer="back"] {
  z-index: 1;
  transform: translate(17px, -3px) rotate(5.59deg);
  opacity: 1;
}

.portrait-card[data-layer="middle"] {
  z-index: 2;
  transform: translate(-7px, 0) rotate(-4.33deg);
  opacity: 1;
}

.portrait-card[data-layer="front"] {
  z-index: 3;
  transform: translate(0, 0) rotate(0deg);
  opacity: 1;
}

.portrait-card.is-animating {
  transition-duration: 380ms;
}

.corner-button {
  border: 0;
  background: none;
  color: #111111;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  cursor: default;
  min-height: 14px;
  opacity: 0;
  visibility: hidden;
  animation: corner-breathe 2.7s ease-in-out infinite;
}

.corner-button.is-visible {
  opacity: 1;
  visibility: visible;
}

@keyframes corner-breathe {
  0% {
    opacity: 0.22;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.22;
  }
}

.view-filter {
  width: min(960px, 100%);
  margin: clamp(30px, 4vw, 48px) auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.view-filter-btn {
  padding: 8px 34px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  background: #ffffff;
  border-radius: 20px;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

.view-filter-btn:hover,
.view-filter-btn:focus-visible {
  transform: translateY(-1px);
}

.view-filter-btn.is-active {
  background: var(--accent);
  color: #ffffff;
}

.about-view {
  width: min(680px, 100%);
  margin: 56px auto 0;
}

.about-page > .site-footer-copy {
  margin-top: clamp(108px, 13.5vw, 180px);
  margin-bottom: 0;
  display: flow-root;
}

.about-page > .site-footer-copy.has-range-bg {
  padding-bottom: 0;
}

.about-page > .site-footer-copy > :last-child {
  margin-bottom: 0 !important;
}

.resume-group + .resume-group {
  margin-top: 64px;
}

.resume-group-title {
  margin: 0 0 48px;
  color: var(--about-text);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
}

.resume-group-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.position-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 36px;
}

.position-icon {
  width: 64px;
  height: 64px;
  border-radius: 5px;
  background: var(--about-soft) center / cover no-repeat;
}

.position-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.position-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.position-title {
  margin: 0;
  color: var(--about-text);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 400;
}

.position-term-loc {
  display: flex;
  align-items: center;
  gap: 36px;
  color: var(--about-text);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  white-space: nowrap;
}

.position-mid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
}

.position-role-wrap {
  width: min(323px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.position-role,
.position-dept {
  margin: 0;
  color: #2b2b2b;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
  white-space: pre-wrap;
  word-break: break-word;
}

.fold-toggle {
  border: 0;
  background: none;
  color: #5f5f5f;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 1px 5px 1px 0;
  margin-left: auto;
  white-space: nowrap;
  overflow: visible;
  transition: opacity 220ms ease, transform 280ms ease, max-height 280ms ease, margin 280ms ease, padding 280ms ease;
}

.fold-toggle .caret {
  display: inline-block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
  margin-top: 0;
  margin-right: 1px;
  transition: transform 180ms ease;
}

.position-detail-drawer {
  --drawer-closed-height: 28px;
  --drawer-open-height: 240px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  overflow: hidden;
  max-height: var(--drawer-closed-height);
  transition: max-height 420ms cubic-bezier(0.23, 0.68, 0.28, 1);
}

.position-detail-drawer.is-open {
  max-height: var(--drawer-open-height);
}

.fold-toggle--more {
  margin-top: 4px;
}

.position-detail-drawer.is-open .fold-toggle--more {
  opacity: 0;
  transform: translateY(14px);
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.fold-toggle--collapse {
  opacity: 0;
  transform: translateY(-10px);
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.fold-toggle--collapse .caret {
  transform: rotate(-135deg);
}

.position-detail-drawer.is-open .fold-toggle--collapse {
  opacity: 1;
  transform: translateY(0);
  max-height: 32px;
  margin-top: 10px;
  padding: 1px 0;
  pointer-events: auto;
}

.position-detail {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #5f5f5f;
  font-size: 12px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(-4px);
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 280ms ease, transform 320ms ease, max-height 360ms ease, margin 320ms ease;
}

.position-detail-drawer.is-open .position-detail {
  opacity: 1;
  transform: translateY(0);
  max-height: 2200px;
  margin-top: 4px;
  pointer-events: auto;
}

.position-detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
}

.position-detail-label {
  color: #5f5f5f;
}

.position-detail-chip {
  border-radius: 10px;
  background: var(--about-soft);
  padding: 4px 8px;
  color: #5f5f5f;
  line-height: 1.35;
  white-space: nowrap;
}

.position-detail-markdown > :first-child {
  margin-top: 0;
}

.position-detail-markdown > :last-child {
  margin-bottom: 0;
}

.position-detail-markdown p {
  margin: 0.35em 0;
}

.position-detail-markdown ul,
.position-detail-markdown ol {
  margin: 0.4em 0;
  padding-left: 1.3em;
}

.position-detail-markdown a {
  color: #1d4ed8;
  text-decoration: underline;
}

.timeline-toolbar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.timeline-sort {
  position: relative;
  width: fit-content;
}

.timeline-sort-trigger {
  border: 0;
  background: none;
  color: #5f5f5f;
  font-size: 12px;
  line-height: 1.2;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.timeline-sort-trigger .caret {
  width: 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.timeline-sort-trigger[aria-expanded="true"] .caret {
  transform: rotate(-135deg) translate(-2px, 1px);
}

.timeline-sort-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 12;
  min-width: 146px;
  padding: 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--about-line);
  box-shadow: 0 8px 20px rgba(26, 26, 26, 0.12);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.timeline-sort-menu[hidden] {
  display: none !important;
}

.timeline-sort-item {
  border: 0;
  background: none;
  text-align: left;
  color: #454545;
  font-size: 12px;
  line-height: 1.35;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.timeline-sort-item:hover,
.timeline-sort-item:focus-visible,
.timeline-sort-item.is-active-cate {
  background: #f5f5f5;
}

.timeline-sort-year-wrap {
  position: relative;
}

.timeline-sort-year-trigger {
  width: 100%;
  padding-right: 18px;
}

.timeline-sort-year-wrap:hover > .timeline-sort-year-trigger,
.timeline-sort-year-wrap:focus-within > .timeline-sort-year-trigger {
  background: #f5f5f5;
}

.timeline-sort-year-wrap::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1px solid #7c7c7c;
  border-bottom: 1px solid #7c7c7c;
  transform: translateY(-50%) rotate(-45deg);
  pointer-events: none;
}

.timeline-year-submenu {
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  min-width: 100px;
  max-height: 180px;
  overflow: auto;
  padding: 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--about-line);
  box-shadow: 0 8px 20px rgba(26, 26, 26, 0.12);
}

.timeline-sort-year-wrap:hover .timeline-year-submenu,
.timeline-sort-year-wrap:focus-within .timeline-year-submenu,
.timeline-sort-year-wrap.is-open .timeline-year-submenu {
  display: block;
}

.timeline-sort-cate-list {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #ececec;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.timeline-year-submenu button {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  color: #454545;
  font-size: 12px;
  line-height: 1.35;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
}

.timeline-year-submenu button:hover,
.timeline-year-submenu button:focus-visible {
  background: #f5f5f5;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.timeline-date {
  margin: 0;
  color: #000000;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.timeline-location {
  margin: 0;
  color: #000000;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
  text-align: left;
  white-space: normal;
}

.timeline-event {
  margin: 0;
  color: #000000;
  font-size: 12px;
  line-height: 1.65;
  font-weight: 400;
  white-space: pre-wrap;
  word-break: break-word;
}

.timeline-event .timeline-link {
  color: rgb(51, 156, 255);
  text-decoration: none;
}

.timeline-empty,
.resume-empty {
  margin: 0;
  color: #8a8a8a;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .about-hero {
    width: min(680px, 100%);
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .portrait-panel {
    order: -1;
    align-self: center;
    margin-right: 0;
    width: 214px;
    align-items: center;
  }

  .about-view {
    margin-top: 44px;
  }

  .view-filter {
    margin-top: clamp(15px, 2vw, 24px);
    width: min(680px, 100%);
  }
}

@media (max-width: 720px) {
  .about-page {
    padding-top: 56px;
  }

  .intro-name {
    font-size: 1.75rem;
  }

  .intro-title,
  .intro-connect,
  .intro-description {
    font-size: 14.4px;
  }

  .portrait-panel {
    width: 65vw;
    max-width: 65vw;
    min-width: 160px;
    padding-bottom: 16px;
  }

  .portrait-frame {
    width: 65vw;
    height: calc(65vw * 1.2523);
    max-height: 390px;
  }

  .portrait-card {
    width: 83.2%;
    height: 88.1%;
    top: 6%;
    left: 50%;
    margin-left: -41.6%;
    border-width: 3%;
  }

  .portrait-card[data-layer="back"] {
    transform: translate(8%, -1.2%) rotate(5.59deg);
  }

  .portrait-card[data-layer="middle"] {
    transform: translate(-3.3%, 0) rotate(-4.33deg);
  }

  .portrait-card[data-layer="front"] {
    transform: translate(0, 0) rotate(0deg);
  }

  .view-filter {
    gap: 10px;
  }

  .view-filter-btn {
    padding: 7px 26px;
    font-size: 0.88rem;
  }

  .position-item {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 16px;
  }

  .position-icon {
    width: 56px;
    height: 56px;
  }

  .position-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .position-term-loc {
    gap: 14px;
    flex-wrap: wrap;
    white-space: normal;
  }

  .position-mid {
    flex-direction: column;
    align-items: flex-start;
  }

  .position-role-wrap {
    width: 100%;
  }

  .fold-toggle {
    margin-left: 0;
  }

  .timeline-head {
    flex-direction: column;
    gap: 6px;
  }

  .timeline-date {
    font-size: 16px;
  }

  .timeline-location {
    text-align: left;
    white-space: normal;
  }
}
