/* =========================================================
   wychmod 个人主页 & 简历页 - 共享样式
   基于 docs/assets/css/studio-tokens.css 设计系统
   Aesthetic: Editorial / magazine，研究者的数字书房
   ========================================================= */

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.me-page {
  margin: 0;
  font-family: var(--studio-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.6;
}

body.me-page img {
  max-width: 100%;
  height: auto;
}

body.me-page a {
  text-decoration: none;
  transition: color 150ms var(--studio-ease);
}

body.me-page button {
  font-family: inherit;
  cursor: pointer;
}

body.me-page :focus-visible {
  outline: 2px solid var(--studio-focus);
  outline-offset: 2px;
}

/* ---------- 共享导航 ---------- */
.me-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: rgba(13, 16, 14, 0.94);
  border-bottom: 1px solid rgba(242, 239, 231, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.me-nav-inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.me-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--studio-on-dark);
  font-size: 15px;
  letter-spacing: 0;
  flex-shrink: 0;
}

.me-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--studio-gold);
  color: var(--studio-ink-950);
  display: grid;
  place-items: center;
  font-family: var(--studio-font-mono);
  font-weight: 700;
  font-size: 13px;
}

.me-brand-sub {
  color: var(--studio-on-dark-muted);
  font-weight: 400;
}

.me-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.me-nav-link {
  color: rgba(242, 239, 231, 0.72);
  padding: 8px 12px;
  border-radius: var(--studio-radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
  position: relative;
}

.me-nav-link:hover {
  color: var(--studio-on-dark);
  background: rgba(242, 239, 231, 0.08);
}

.me-nav-link.active,
.me-nav-link.is-active {
  color: var(--studio-gold);
}

.me-nav-link.active::after,
.me-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1px;
  background: var(--studio-gold);
}

.me-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.me-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--studio-radius-md);
  font-size: 14px;
  font-weight: 500;
  background: rgba(36, 209, 143, 0.12);
  color: var(--studio-green);
  border: 1px solid rgba(36, 209, 143, 0.35);
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
}

.me-nav-cta:hover {
  background: var(--studio-green);
  color: var(--studio-ink-950);
}

.me-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(242, 239, 231, 0.2);
  border-radius: var(--studio-radius-md);
  color: var(--studio-on-dark);
  font-size: 18px;
}

/* ---------- 共享按钮 ---------- */
.me-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--studio-radius-md);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.me-btn-primary {
  background: var(--studio-green-dark);
  /* --studio-on-dark(#f2efe7) 在绿底仅 3.20:1; 深墨字为 5.21:1 */
  color: var(--studio-ink-950);
}

.me-btn-primary:hover {
  background: #1ab87a;
  color: var(--studio-ink-950);
}

.me-btn-secondary {
  background: transparent;
  color: var(--studio-on-dark);
  border-color: rgba(242, 239, 231, 0.32);
}

.me-btn-secondary:hover {
  border-color: var(--studio-gold);
  color: var(--studio-gold);
}

.me-btn-paper {
  background: transparent;
  color: var(--studio-text);
  border-color: rgba(32, 33, 29, 0.35);
}

.me-btn-paper:hover {
  border-color: var(--studio-text);
  background: rgba(32, 33, 29, 0.04);
}

/* ---------- 共享页脚 ---------- */
.me-footer {
  border-top: 1px solid rgba(242, 239, 231, 0.14);
  padding: 40px 0;
  background: var(--studio-ink-950);
}

.me-footer-inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  color: var(--studio-on-dark-muted);
  font-size: 13px;
  font-family: var(--studio-font-mono);
}

.me-footer a {
  color: rgba(242, 239, 231, 0.8);
}

.me-footer a:hover {
  color: var(--studio-green);
}

/* =========================================================
   个人主页 me.html (body.personal-notes-page)
   ========================================================= */

body.personal-notes-page {
  color: var(--studio-on-dark);
  background:
    radial-gradient(circle at 15% 0%, rgba(36, 209, 143, 0.05), transparent 28%),
    linear-gradient(180deg, var(--studio-ink-950) 0%, var(--studio-ink-900) 100%);
}

.personal-cover {
  padding: 72px 0 80px;
}

.personal-cover-inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 64px;
  align-items: start;
}

.personal-identity {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.personal-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(242, 239, 231, 0.22);
  background: var(--studio-ink-900);
}

.personal-photo-fallback {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--studio-ink-800);
  color: var(--studio-gold);
  font-family: var(--studio-font-mono);
  font-size: 40px;
  font-weight: 700;
  border: 1px solid rgba(242, 239, 231, 0.22);
}

.personal-eyebrow {
  font-family: var(--studio-font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 239, 231, 0.55);
  display: block;
  margin-bottom: 20px;
}

.personal-cover h1 {
  font-family: var(--studio-font-display);
  font-size: clamp(42px, 4.2vw, 54px);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 14px;
  color: var(--studio-on-dark);
}

@media (min-width: 1025px) {
  .personal-cover h1 {
    white-space: nowrap;
  }
}

.personal-handle {
  font-family: var(--studio-font-mono);
  font-size: 16px;
  color: var(--studio-gold);
  margin-bottom: 22px;
  display: block;
}

.personal-bio {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(242, 239, 231, 0.78);
  max-width: 580px;
  margin: 0 0 18px;
}

.personal-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin: 28px 0 34px;
  font-family: var(--studio-font-mono);
  font-size: 13px;
  color: rgba(242, 239, 231, 0.65);
}

.personal-contact-line a {
  color: rgba(242, 239, 231, 0.78);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.personal-contact-line a:hover {
  color: var(--studio-green);
}

.personal-contact-line svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.personal-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.personal-cta .me-btn {
  min-width: 170px;
  height: 46px;
}

/* Current Focus */
.personal-focus {
  border-left: 1px solid rgba(242, 239, 231, 0.14);
  padding-left: 48px;
}

.personal-focus-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.personal-focus-title {
  font-family: var(--studio-font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--studio-gold);
}

.personal-focus-updated {
  font-family: var(--studio-font-mono);
  font-size: 11px;
  color: rgba(242, 239, 231, 0.45);
}

.personal-focus-list {
  display: flex;
  flex-direction: column;
}

.personal-focus-item {
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  gap: 18px;
  align-items: center;
  min-height: 74px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(242, 239, 231, 0.12);
  color: inherit;
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
}

.personal-focus-item:last-child {
  border-bottom: none;
}

.personal-focus-item:hover {
  color: var(--studio-gold);
}

.personal-focus-item:hover .personal-focus-icon {
  color: var(--studio-gold);
}

.personal-focus-item:hover .personal-focus-arrow {
  transform: translateX(3px);
}

.personal-focus-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: rgba(242, 239, 231, 0.55);
  transition: color 150ms var(--studio-ease);
}

.personal-focus-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

.personal-focus-text strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 3px;
}

.personal-focus-text small {
  display: block;
  font-size: 12px;
  color: rgba(242, 239, 231, 0.5);
  font-family: var(--studio-font-mono);
}

.personal-focus-arrow {
  color: rgba(242, 239, 231, 0.35);
  transition: transform 150ms var(--studio-ease);
}

.personal-focus-arrow svg {
  width: 18px;
  height: 18px;
}

/* Field Notes */
.personal-field-notes {
  background: var(--studio-paper-100);
  color: var(--studio-text);
  padding: 56px 0 80px;
}

.personal-field-notes-inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0 40px;
}

.personal-field-notes-eyebrow {
  font-family: var(--studio-font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--studio-text-muted);
  display: block;
  margin-bottom: 32px;
}

.personal-notebook {
  position: relative;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 36px;
  align-items: start;
}

.personal-notebook::before {
  content: "";
  position: absolute;
  left: calc(200px + 36px + (100% - 200px - 36px - 36px - 280px - 36px) * 0.58);
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(32, 33, 29, 0.16);
  display: none;
}

.personal-note-index {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.personal-note-index a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--studio-radius-sm);
  font-size: 13px;
  color: var(--studio-text-muted);
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
}

.personal-note-index a:hover {
  background: rgba(32, 33, 29, 0.05);
  color: var(--studio-text);
}

.personal-note-index a.active {
  color: var(--studio-text);
  background: rgba(32, 33, 29, 0.06);
}

.personal-note-index a.active::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--studio-gold);
  border-radius: 2px;
  position: absolute;
  left: 0;
}

.personal-note-index-num {
  font-family: var(--studio-font-mono);
  /* 纸白底小字序号, 需 4.5:1; 原 --studio-gold 仅 1.60–1.79:1 */
  color: var(--studio-gold-ink);
  min-width: 22px;
}

.personal-note-main h2 {
  font-family: var(--studio-font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--studio-text);
}

.personal-note-main h2 .section-no {
  font-family: var(--studio-font-mono);
  /* 26px 大字号阈值 3:1, 但原金色 1.79 连 3 都不到; 与同页小序号统一用深金 */
  color: var(--studio-gold-ink);
  margin-right: 10px;
}

.personal-note-main p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--studio-text);
  margin: 0 0 16px;
  max-width: 620px;
}

.personal-timeline {
  margin-top: 36px;
  padding-left: 20px;
  border-left: 1px solid rgba(32, 33, 29, 0.18);
}

.personal-timeline-item {
  position: relative;
  padding: 0 0 26px 22px;
}

.personal-timeline-item:last-child {
  padding-bottom: 0;
}

.personal-timeline-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--studio-gold);
}

.personal-timeline-year {
  font-family: var(--studio-font-mono);
  font-size: 13px;
  /* 时间轴年份是**真实内容**("2019–2020"/"2024–至今"), 13px 小字需 4.5:1;
     原 --studio-gold 在纸白底仅 1.79:1, 属实质可读性缺陷而非装饰取舍 */
  color: var(--studio-gold-ink);
  margin-bottom: 4px;
}

.personal-timeline-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--studio-text);
}

.personal-note-aside {
  position: sticky;
  top: 88px;
}

.personal-note-aside h3 {
  font-family: var(--studio-font-display);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 18px;
  color: var(--studio-text);
}

.personal-recent-list {
  display: flex;
  flex-direction: column;
}

.personal-recent-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid rgba(32, 33, 29, 0.12);
  color: var(--studio-text);
  font-size: 14px;
}

.personal-recent-item:last-child {
  border-bottom: none;
}

.personal-recent-item:hover {
  color: var(--studio-text);
}

.personal-recent-item:hover .personal-recent-title {
  color: var(--studio-green-ink);
}

.personal-recent-title {
  transition: color 150ms var(--studio-ease);
  line-height: 1.5;
}

.personal-recent-date {
  font-family: var(--studio-font-mono);
  font-size: 12px;
  color: var(--studio-text-muted);
  white-space: nowrap;
}

.personal-recent-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-family: var(--studio-font-mono);
  font-size: 12px;
  color: var(--studio-text-muted);
}

.personal-recent-more:hover {
  color: var(--studio-green-ink);
}

/* 后续 section（stack/projects/github/contact） */
.personal-section {
  padding: 80px 0;
}

.personal-section-inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0 40px;
}

.personal-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 40px;
}

.personal-section-eyebrow {
  font-family: var(--studio-font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--studio-gold);
  padding: 4px 10px;
  border: 1px solid rgba(200, 169, 107, 0.35);
  border-radius: var(--studio-radius-sm);
}

.personal-section h2 {
  font-family: var(--studio-font-display);
  font-size: 32px;
  font-weight: 600;
  margin: 0;
  color: var(--studio-on-dark);
}

/* 技术栈 */
.personal-stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.personal-stack-card {
  padding: 22px 24px;
  background: rgba(242, 239, 231, 0.04);
  border: 1px solid rgba(242, 239, 231, 0.12);
  border-radius: var(--studio-radius-md);
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
}

.personal-stack-card:hover {
  border-color: rgba(242, 239, 231, 0.22);
  background: rgba(242, 239, 231, 0.06);
}

.personal-stack-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--studio-on-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.personal-stack-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--studio-radius-sm);
  background: rgba(200, 169, 107, 0.12);
  color: var(--studio-gold);
  display: grid;
  place-items: center;
  font-family: var(--studio-font-mono);
  font-size: 12px;
  font-weight: 700;
}

.personal-stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.personal-stack-tag {
  padding: 4px 10px;
  font-family: var(--studio-font-mono);
  font-size: 11px;
  background: rgba(242, 239, 231, 0.05);
  color: rgba(242, 239, 231, 0.72);
  border: 1px solid rgba(242, 239, 231, 0.12);
  border-radius: var(--studio-radius-sm);
}

.personal-tech-bar {
  height: 5px;
  background: rgba(242, 239, 231, 0.08);
  border-radius: var(--studio-radius-sm);
  overflow: hidden;
}

.personal-tech-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--studio-green);
  border-radius: var(--studio-radius-sm);
  transition: width 1.2s var(--studio-ease);
}

.personal-tech-bar-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--studio-font-mono);
  font-size: 11px;
  color: var(--studio-on-dark-muted);
  margin-top: 6px;
}

/* 项目 */
.personal-projects {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.personal-project {
  padding: 26px 30px;
  background: rgba(242, 239, 231, 0.04);
  border: 1px solid rgba(242, 239, 231, 0.12);
  border-radius: var(--studio-radius-md);
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
}

.personal-project:hover {
  border-color: rgba(242, 239, 231, 0.22);
}

.personal-project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.personal-project-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--studio-on-dark);
}

.personal-project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.personal-badge {
  font-family: var(--studio-font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--studio-radius-sm);
  background: rgba(242, 239, 231, 0.06);
  color: rgba(242, 239, 231, 0.7);
  border: 1px solid rgba(242, 239, 231, 0.14);
}

.personal-badge.gold {
  background: rgba(200, 169, 107, 0.12);
  color: var(--studio-gold);
  border-color: rgba(200, 169, 107, 0.3);
}

.personal-badge.green {
  background: rgba(36, 209, 143, 0.1);
  color: var(--studio-green);
  border-color: rgba(36, 209, 143, 0.25);
}

.personal-project-desc {
  color: rgba(242, 239, 231, 0.75);
  font-size: 15px;
  line-height: 1.75;
  margin: 0 0 16px;
}

.personal-project-desc-md {
  color: rgba(242, 239, 231, 0.75);
  font-size: 15px;
  line-height: 1.75;
  margin: 0 0 16px;
}

.personal-project-desc-md p {
  margin: 0 0 10px;
}

.personal-project-desc-md p:last-child {
  margin-bottom: 0;
}

.personal-project-desc-md ul {
  margin: 8px 0;
  padding-left: 20px;
}

.personal-project-desc-md li {
  margin: 4px 0;
}

.personal-project-desc-md strong {
  color: var(--studio-on-dark);
  font-weight: 600;
}

.personal-project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.personal-project-stack .personal-stack-tag {
  background: rgba(242, 239, 231, 0.05);
}

.personal-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(242, 239, 231, 0.12);
}

.personal-project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--studio-font-mono);
  font-size: 13px;
  color: var(--studio-green);
}

.personal-project-link:hover {
  color: #1ab87a;
}

/* GitHub */
.personal-github {
  padding: 26px 30px;
  background: rgba(242, 239, 231, 0.04);
  border: 1px solid rgba(242, 239, 231, 0.12);
  border-radius: var(--studio-radius-md);
}

.personal-github-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}

.personal-github-title {
  font-family: var(--studio-font-mono);
  font-size: 13px;
  color: rgba(242, 239, 231, 0.75);
  display: flex;
  align-items: center;
  gap: 8px;
}

.personal-github-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--studio-green);
}

.personal-github-img {
  width: 100%;
  display: block;
  border-radius: var(--studio-radius-sm);
  background: rgba(255, 255, 255, 0.02);
  min-height: 100px;
}

.personal-github-img-wrap {
  position: relative;
}

.personal-heatmap-reload {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: var(--studio-radius-sm);
  background: rgba(13, 16, 14, 0.78);
  border: 1px solid rgba(242, 239, 231, 0.14);
  color: rgba(242, 239, 231, 0.7);
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
}

.personal-heatmap-reload:hover {
  background: var(--studio-green);
  color: var(--studio-ink-950);
  border-color: var(--studio-green);
}

.personal-github-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.personal-github-stat {
  padding: 12px 14px;
  background: rgba(242, 239, 231, 0.04);
  border: 1px solid rgba(242, 239, 231, 0.12);
  border-radius: var(--studio-radius-sm);
  text-align: center;
}

.personal-github-stat b {
  display: block;
  font-size: 20px;
  color: var(--studio-green);
  font-family: var(--studio-font-mono);
  font-weight: 700;
}

.personal-github-stat span {
  font-size: 11px;
  color: var(--studio-on-dark-muted);
  font-family: var(--studio-font-mono);
}

.personal-github-fallback {
  padding: 28px 20px;
  text-align: center;
  color: var(--studio-on-dark-muted);
  font-family: var(--studio-font-mono);
  font-size: 13px;
  line-height: 1.7;
  background: rgba(242, 239, 231, 0.03);
  border: 1px dashed rgba(242, 239, 231, 0.18);
  border-radius: var(--studio-radius-sm);
}

.personal-github-fallback a {
  color: var(--studio-green);
  text-decoration: underline;
}

/* 联系 */
.personal-contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
}

.personal-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.personal-contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(242, 239, 231, 0.04);
  border: 1px solid rgba(242, 239, 231, 0.12);
  border-radius: var(--studio-radius-md);
  color: inherit;
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
}

.personal-contact-card:hover {
  border-color: rgba(242, 239, 231, 0.22);
  background: rgba(242, 239, 231, 0.06);
}

.personal-contact-card:hover .personal-contact-meta span {
  color: var(--studio-green);
}

.personal-contact-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--studio-radius-sm);
  display: grid;
  place-items: center;
  background: rgba(200, 169, 107, 0.12);
  color: var(--studio-gold);
  font-family: var(--studio-font-mono);
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 auto;
}

.personal-contact-meta b {
  display: block;
  font-size: 12px;
  font-family: var(--studio-font-mono);
  color: var(--studio-on-dark-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.personal-contact-meta span {
  font-size: 15px;
  color: var(--studio-on-dark);
  font-weight: 500;
  transition: color 150ms var(--studio-ease);
}

.personal-form {
  padding: 26px;
  background: rgba(242, 239, 231, 0.04);
  border: 1px solid rgba(242, 239, 231, 0.12);
  border-radius: var(--studio-radius-md);
}

.personal-form h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--studio-on-dark);
}

.personal-form > p {
  margin: 0 0 18px;
  color: var(--studio-on-dark-muted);
  font-size: 13px;
  font-family: var(--studio-font-mono);
}

.personal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.personal-form label {
  display: block;
  font-size: 12px;
  font-family: var(--studio-font-mono);
  color: var(--studio-on-dark-muted);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.personal-form input,
.personal-form textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(13, 16, 14, 0.5);
  border: 1px solid rgba(242, 239, 231, 0.14);
  border-radius: var(--studio-radius-md);
  color: var(--studio-on-dark);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
}

.personal-form input:focus,
.personal-form textarea:focus {
  outline: none;
  border-color: var(--studio-green);
  box-shadow: 0 0 0 3px rgba(36, 209, 143, 0.15);
  background: rgba(13, 16, 14, 0.7);
}

.personal-form textarea {
  min-height: 100px;
  margin-bottom: 12px;
}

.personal-form .me-btn {
  width: 100%;
}

.personal-form-hint {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(36, 209, 143, 0.06);
  border: 1px solid rgba(36, 209, 143, 0.15);
  border-radius: var(--studio-radius-md);
  font-size: 12px;
  color: rgba(242, 239, 231, 0.72);
  font-family: var(--studio-font-mono);
  line-height: 1.6;
}

/* 渐进显示 */
.me-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--studio-ease), transform 500ms var(--studio-ease);
}

.me-reveal.me-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .me-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   简历页 resume.html (body.resume-page)
   ========================================================= */

body.resume-page {
  color: var(--studio-text);
  background: var(--studio-paper-50);
}

.resume-hero {
  padding: 56px 0 44px;
  border-bottom: 1px solid rgba(32, 33, 29, 0.2);
}

.resume-hero-inner {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}

.resume-kicker {
  font-family: var(--studio-font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--studio-text-muted);
  margin: 0 0 14px;
}

.resume-hero h1 {
  font-family: var(--studio-font-display);
  font-size: 52px;
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 12px;
  color: var(--studio-text);
}

.resume-role {
  font-size: 18px;
  color: var(--studio-text);
  margin: 0 0 10px;
  font-weight: 500;
}

.resume-tagline {
  font-size: 15px;
  color: var(--studio-text-muted);
  margin: 0 0 18px;
  line-height: 1.7;
}

.resume-summary {
  font-size: 15px;
  line-height: 1.75;
  color: var(--studio-text);
  margin: 0;
  max-width: 620px;
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* 此处原有 `.resume-actions .me-btn-primary { color: var(--studio-on-dark) }` 覆写:
   它在 (0,2,0) 上压过基类 .me-btn-primary(0,1,0), 使简历页主按钮字色留在浅色
   --studio-on-dark 上, 与绿底只有 3.20:1。基类早已改为 --studio-ink-950(5.21:1),
   本覆写属漏改遗留 —— 删除, 交由基类统一决定, 避免同类漂移再次发生。 */

.resume-contact-list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.resume-contact-list > div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
}

.resume-contact-list dt {
  font-family: var(--studio-font-mono);
  color: var(--studio-text-muted);
  text-transform: lowercase;
}

.resume-contact-list dd {
  margin: 0;
  color: var(--studio-text);
}

.resume-contact-list a {
  color: var(--studio-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resume-contact-list a:hover {
  color: var(--studio-green-ink);
}

.resume-document {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 36px 40px 80px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.resume-toc {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resume-toc a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--studio-radius-sm);
  font-size: 13px;
  color: var(--studio-text-muted);
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease), border-color 150ms var(--studio-ease), transform 150ms var(--studio-ease), box-shadow 150ms var(--studio-ease), opacity 150ms var(--studio-ease);
}

.resume-toc a:hover {
  background: rgba(32, 33, 29, 0.05);
  color: var(--studio-text);
}

.resume-toc a.active {
  color: var(--studio-text);
  background: rgba(32, 33, 29, 0.06);
}

.resume-toc-num {
  font-family: var(--studio-font-mono);
  /* 纸白底小字序号, 需 4.5:1; 原 --studio-gold 仅 1.94:1 */
  color: var(--studio-gold-ink);
  min-width: 22px;
}

.resume-content section {
  padding: 32px 0;
  border-top: 1px solid rgba(32, 33, 29, 0.16);
}

.resume-content section:first-child {
  border-top: none;
  padding-top: 0;
}

.resume-section h2 {
  font-family: var(--studio-font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 24px;
  color: var(--studio-text);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.resume-section-no {
  font-family: var(--studio-font-mono);
  /* 22px 阈值 3:1, 原金色 1.94 不达; 统一用纸白底专用深金 */
  color: var(--studio-gold-ink);
  font-size: 22px;
}

.resume-entry {
  padding: 18px 0;
  border-bottom: 1px dashed rgba(32, 33, 29, 0.14);
}

.resume-entry:last-child {
  border-bottom: none;
}

.resume-entry.is-long {
  break-inside: auto;
  page-break-inside: auto;
}

.resume-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 6px;
}

.resume-entry-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--studio-text);
  margin: 0;
}

.resume-entry-org {
  font-size: 14px;
  color: var(--studio-text-muted);
  font-family: var(--studio-font-mono);
}

.resume-entry-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--studio-text-muted);
  font-family: var(--studio-font-mono);
  background: rgba(32, 33, 29, 0.05);
  border: 1px solid rgba(32, 33, 29, 0.1);
  padding: 2px 8px;
  border-radius: var(--studio-radius-sm);
}

.resume-entry-loc {
  font-size: 12px;
  color: var(--studio-text-muted);
  font-family: var(--studio-font-mono);
  margin-bottom: 10px;
}

.resume-entry-body {
  color: var(--studio-text);
  font-size: 14.5px;
  line-height: 1.75;
}

.resume-entry-body p {
  margin: 0 0 10px;
}

.resume-entry-body ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.resume-entry-body li {
  margin: 5px 0;
}

.resume-entry-body strong {
  color: var(--studio-text);
  font-weight: 600;
}

.resume-entry-body h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 14px 0 6px;
  color: var(--studio-text);
}

.resume-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.resume-stack-tag {
  font-family: var(--studio-font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--studio-radius-sm);
  background: rgba(32, 33, 29, 0.05);
  color: var(--studio-text-muted);
  border: 1px solid rgba(32, 33, 29, 0.12);
}

.resume-skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.resume-skill {
  padding: 16px 18px;
  background: rgba(32, 33, 29, 0.03);
  border: 1px solid rgba(32, 33, 29, 0.1);
  border-radius: var(--studio-radius-md);
}

.resume-skill b {
  display: block;
  font-size: 14px;
  color: var(--studio-text);
  margin-bottom: 6px;
  font-family: var(--studio-font-body);
}

.resume-skill span {
  font-size: 13px;
  color: var(--studio-text-muted);
  line-height: 1.65;
  display: block;
}

.resume-skill ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--studio-text-muted);
  line-height: 1.65;
}

.resume-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.resume-skill-tags .resume-stack-tag {
  font-size: 10px;
  padding: 2px 7px;
}

.resume-chapter-list {
  display: none;
}

/* =========================================================
   响应式
   ========================================================= */

@media (max-width: 1024px) {
  .me-nav-inner {
    padding: 0 28px;
    /* 收窄栅格间距: 桌面端 32px 在窄屏会把「品牌 + 导航 + CTA + 汉堡」挤出行外 */
    gap: 16px;
  }

  /* 允许右侧动作组收缩, 否则 flex-shrink:0 会强行撑破容器宽度 */
  .me-nav-right {
    flex-shrink: 1;
    min-width: 0;
    gap: 8px;
  }

  .personal-cover-inner {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 0 28px;
  }

  .personal-focus {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(242, 239, 231, 0.14);
    padding-top: 32px;
  }

  .personal-field-notes-inner,
  .personal-section-inner {
    padding: 0 28px;
  }

  .personal-notebook {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .personal-note-aside {
    display: none;
  }

  .resume-hero-inner,
  .resume-document {
    padding: 0 28px;
  }

  .resume-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .resume-document {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .personal-identity {
    grid-template-columns: 100px 1fr;
    gap: 24px;
  }

  .personal-photo,
  .personal-photo-fallback {
    width: 100px;
    height: 100px;
  }

  .personal-cover h1 {
    font-size: 44px;
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .me-nav {
    height: 58px;
  }

  .me-nav-inner {
    padding: 0 16px;
    gap: 10px;
  }

  /* 窄屏空间紧张: 隐藏文字型 CTA, 保留汉堡菜单承载导航 */
  .me-nav-cta {
    display: none;
  }

  .me-nav-links {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(13, 16, 14, 0.98);
    border-bottom: 1px solid rgba(242, 239, 231, 0.14);
    padding: 12px;
    margin: 0;
    gap: 2px;
  }

  .me-nav-links.open {
    display: flex;
  }

  .me-nav-toggle {
    display: flex;
  }

  .me-brand-sub {
    display: none;
  }

  .personal-cover {
    padding: 48px 0 56px;
  }

  .personal-cover-inner,
  .personal-field-notes-inner,
  .personal-section-inner,
  .resume-hero-inner,
  .resume-document {
    padding: 0 18px;
  }

  .personal-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .personal-photo,
  .personal-photo-fallback {
    width: 100px;
    height: 100px;
  }

  .personal-cover h1 {
    font-size: 36px;
    text-align: center;
    white-space: normal;
  }

  .personal-handle {
    text-align: center;
  }

  .personal-bio {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .personal-contact-line {
    justify-content: center;
  }

  .personal-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .personal-cta .me-btn {
    width: 100%;
  }

  .personal-focus-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .personal-focus-item {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 16px;
    background: rgba(242, 239, 231, 0.04);
    border: 1px solid rgba(242, 239, 231, 0.12);
    border-radius: var(--studio-radius-md);
  }

  .personal-focus-icon {
    margin-bottom: 8px;
  }

  .personal-focus-arrow {
    display: none;
  }

  .personal-notebook {
    grid-template-columns: 1fr;
  }

  .personal-note-index {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
  }

  .personal-note-index a {
    padding: 6px 12px;
    background: rgba(32, 33, 29, 0.05);
    border-radius: var(--studio-radius-md);
  }

  .personal-note-index-num {
    min-width: auto;
  }

  .personal-stack-grid,
  .resume-skills {
    grid-template-columns: 1fr;
  }

  .personal-github-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .personal-contact-grid {
    grid-template-columns: 1fr;
  }

  .personal-form-row {
    grid-template-columns: 1fr;
  }

  .resume-hero {
    padding: 40px 0 32px;
  }

  .resume-hero h1 {
    font-size: 40px;
  }

  .resume-contact-list > div {
    grid-template-columns: 60px 1fr;
  }

  .resume-actions {
    flex-direction: column;
  }

  .resume-actions .me-btn {
    width: 100%;
  }

  .resume-document {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .resume-toc {
    display: none;
  }

  .resume-chapter-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
    border: 1px solid rgba(32, 33, 29, 0.12);
    border-radius: var(--studio-radius-md);
    overflow: hidden;
  }

  .resume-chapter-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(32, 33, 29, 0.1);
    color: var(--studio-text);
    font-size: 14px;
  }

  .resume-chapter-list a:last-child {
    border-bottom: none;
  }

  .resume-chapter-list a:hover {
    background: rgba(32, 33, 29, 0.04);
  }

  .resume-chapter-num {
    font-family: var(--studio-font-mono);
    /* 纸白底小字序号(移动端章节列表), 需 4.5:1 */
    color: var(--studio-gold-ink);
    margin-right: 10px;
  }

  .resume-content section {
    padding: 28px 0;
  }
}

@media (max-width: 420px) {
  .personal-cover h1 {
    font-size: 32px;
  }

  .personal-focus-list {
    grid-template-columns: 1fr;
  }

  .personal-github-stats {
    grid-template-columns: 1fr 1fr;
  }

  .resume-hero h1 {
    font-size: 34px;
  }

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

  .resume-entry-time {
    margin-left: 0;
  }
}

/* =========================================================
   打印样式（仅 resume-page）
   ========================================================= */

@media print {
  @page {
    size: A4;
    margin: 12mm 12mm 14mm;
  }

  html,
  body {
    width: auto;
    min-height: auto;
  }

  body.resume-page {
    background: #fff !important;
    color: #111 !important;
    font-size: 10pt;
    line-height: 1.5;
  }

  body.resume-page .me-nav,
  body.resume-page .resume-actions,
  body.resume-page .me-footer,
  body.resume-page .resume-footer,
  body.resume-page .screen-only {
    display: none !important;
  }

  body.resume-page .resume-hero {
    padding: 0 0 6mm;
    border-bottom: 0.4pt solid #999;
    display: grid;
    grid-template-columns: 1fr 55mm;
    gap: 10mm;
  }

  body.resume-page .resume-hero-inner {
    width: auto;
    padding: 0;
    display: contents;
  }

  body.resume-page .resume-hero-copy {
    grid-column: 1;
  }

  body.resume-page .resume-contact-list {
    grid-column: 2;
  }

  body.resume-page .resume-document {
    width: auto;
    padding: 0;
    display: block;
  }

  body.resume-page .resume-toc {
    display: none;
  }

  body.resume-page .resume-content section {
    border-top: none;
    padding: 4mm 0;
  }

  body.resume-page .resume-section h2 {
    font-size: 16pt;
    margin-bottom: 12pt;
  }

  body.resume-page .resume-section-no {
    color: #555 !important;
  }

  body.resume-page .resume-entry {
    break-inside: avoid;
    page-break-inside: avoid;
    border-bottom: 1px solid #ddd;
    padding: 3mm 0;
  }

  body.resume-page .resume-entry.is-long {
    break-inside: auto;
    page-break-inside: auto;
  }

  body.resume-page h1,
  body.resume-page h2,
  body.resume-page h3,
  body.resume-page h4 {
    break-after: avoid;
    page-break-after: avoid;
    color: #111 !important;
  }

  body.resume-page p,
  body.resume-page li {
    orphans: 2;
    widows: 2;
  }

  body.resume-page a {
    color: #111 !important;
    text-decoration: underline;
  }

  body.resume-page .resume-content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
  }

  body.resume-page .resume-contact-list a::after {
    content: none;
  }

  body.resume-page .resume-stack-tag {
    background: #f5f5f5;
    border-color: #ddd;
    color: #333;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }
}

/* =========================================================
   极窄屏兜底 (≤360px: iPhone SE 1代 / 5s 等)
   ---------------------------------------------------------
   此档位导航与联系卡片会overflow, 统一收紧内边距与卡片尺寸。
   置于文件末尾, 确保优先级高于上方各断点。
   ========================================================= */
@media (max-width: 360px) {
  .me-nav-inner {
    padding: 0 12px;
    gap: 8px;
  }

  /* 品牌文本省略, 只留 W 标记, 为汉堡按钮腾出空间。
     品牌结构为 <span class="me-brand-mark">W</span><span>文字…</span>,
     文字 span 无类名, 故用 .me-brand > span:not(.me-brand-mark) 精确命中 */
  .me-brand {
    font-size: 13px;
    gap: 8px;
  }

  .me-brand > span:not(.me-brand-mark),
  .me-brand-sub {
    display: none;
  }

  .personal-contact-card {
    padding: 14px 14px;
    gap: 10px;
  }

  .personal-contact-meta {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  /* GitHub 语言统计: 语言种类多时单列过窄, 长名(如 AutoHotkey)撑破容器。
     极窄屏改为 2 列自适应换行 */
  .lang-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
