/* =========================================================
   简历页 · Apple 风格设计
   设计令牌参考 apple-design-skill（zh-CN）
   ========================================================= */

:root {
  /* 颜色 */
  --apple-bg-white: #FFFFFF;
  --apple-bg-light-gray: #F5F5F7;
  --apple-bg-elevated: #FBFBFD;
  --apple-text-primary: #1D1D1F;
  --apple-text-secondary: #6E6E73;
  --apple-text-tertiary: #86868B;
  --apple-link-blue: #0066CC;
  --apple-link-blue-hover: #0077ED;
  --apple-border-subtle: #E8E8ED;

  /* 间距 */
  --apple-section-gap-sm: 80px;
  --apple-component-gap-sm: 16px;
  --apple-component-gap-md: 32px;
  --apple-card-padding: 32px;
  --apple-card-padding-sm: 24px;
  --apple-content-max-width: 980px;

  /* 字体 */
  --apple-font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --apple-font-text: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --apple-weight-body: 400;
  --apple-weight-body-medium: 500;
  --apple-weight-title: 600;
  --apple-weight-title-bold: 700;
  --apple-weight-title-heavy: 800;
  --apple-weight-title-black: 900;
  --apple-tracking-zh-title: 0.04em;
  --apple-leading-title: 1.1;
  --apple-leading-body: 1.53;

  /* 圆角与阴影 */
  --apple-radius-card: 18px;
  --apple-radius-card-sm: 12px;
  --apple-radius-button: 980px;
  --apple-shadow-photo: 0 8px 24px rgba(0, 0, 0, 0.1);
  --apple-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ---------- 基础 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--apple-bg-white);
  color: var(--apple-text-primary);
  font-family: var(--apple-font-text);
  font-size: 17px;
  font-weight: var(--apple-weight-body);
  line-height: var(--apple-leading-body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dt,
dd,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--apple-link-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--apple-link-blue-hover);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--apple-link-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
}

/* ---------- 头部 Hero ---------- */

.resume-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--apple-component-gap-md);
  padding: 72px 20px 56px;
  background: linear-gradient(180deg, var(--apple-bg-elevated) 0%, var(--apple-bg-light-gray) 100%);
  text-align: center;
}

.profile-photo {
  order: -1;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--apple-shadow-photo);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--apple-component-gap-sm);
}

.eyebrow {
  font-size: 12px;
  font-weight: var(--apple-weight-body-medium);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--apple-text-tertiary);
}

.resume-hero h1 {
  font-family: var(--apple-font-display);
  font-size: 48px;
  font-weight: var(--apple-weight-title-black);
  line-height: 1.05;
  letter-spacing: var(--apple-tracking-zh-title);
}

.role {
  font-size: 21px;
  font-weight: var(--apple-weight-body-medium);
  color: var(--apple-text-secondary);
}

.summary {
  max-width: 620px;
  font-size: 17px;
  color: var(--apple-text-secondary);
}

/* ---------- 导航 ---------- */

.resume-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px 0;
}

.resume-nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: var(--apple-radius-button);
  background: var(--apple-bg-light-gray);
  color: var(--apple-text-primary);
  font-size: 14px;
  font-weight: var(--apple-weight-body-medium);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.resume-nav a:hover {
  background: var(--apple-border-subtle);
  color: var(--apple-link-blue-hover);
  text-decoration: none;
}

/* ---------- 内容区 ---------- */

.resume-grid {
  width: 100%;
  max-width: var(--apple-content-max-width);
  margin: 0 auto;
  padding: 48px 20px 0;
}

/* ---------- 侧栏信息卡片 ---------- */

.resume-sidebar {
  display: grid;
  gap: var(--apple-card-padding-sm);
}

.compact-section {
  background: var(--apple-bg-light-gray);
  border-radius: var(--apple-radius-card);
  padding: var(--apple-card-padding);
}

.compact-section h2 {
  font-family: var(--apple-font-display);
  font-size: 19px;
  font-weight: var(--apple-weight-title-bold);
  letter-spacing: 0.02em;
  margin-bottom: var(--apple-component-gap-sm);
}

.fact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fact-list dt {
  font-size: 12px;
  font-weight: var(--apple-weight-body-medium);
  letter-spacing: 0.06em;
  color: var(--apple-text-tertiary);
  margin-bottom: 2px;
}

.fact-list dd {
  font-size: 15px;
  font-weight: var(--apple-weight-body-medium);
}

.timeline-date {
  font-size: 14px;
  font-weight: var(--apple-weight-body-medium);
  color: var(--apple-text-tertiary);
  margin-bottom: 4px;
}

.timeline-item h3 {
  font-size: 19px;
  font-weight: var(--apple-weight-title-bold);
  letter-spacing: 0.02em;
}

.timeline-item p:not(.timeline-date) {
  font-size: 15px;
  color: var(--apple-text-secondary);
  margin-top: 2px;
}

.muted {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--apple-text-tertiary);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  padding: 6px 14px;
  border-radius: var(--apple-radius-button);
  background: var(--apple-bg-white);
  font-size: 13px;
  font-weight: var(--apple-weight-body-medium);
}

/* ---------- 主栏 ---------- */

.resume-main {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 60px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: var(--apple-component-gap-md);
}

.section-index {
  font-size: 14px;
  font-weight: var(--apple-weight-title);
  color: var(--apple-text-tertiary);
  font-variant-numeric: tabular-nums;
}

.section-heading h2 {
  font-family: var(--apple-font-display);
  font-size: 24px;
  font-weight: var(--apple-weight-title-heavy);
  line-height: var(--apple-leading-title);
  letter-spacing: var(--apple-tracking-zh-title);
}

.skill-list {
  display: grid;
  gap: var(--apple-card-padding-sm);
}

.skill-item {
  background: var(--apple-bg-light-gray);
  border-radius: var(--apple-radius-card);
  padding: var(--apple-card-padding);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item h3 {
  font-size: 19px;
  font-weight: var(--apple-weight-title-bold);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.skill-item p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--apple-text-secondary);
}

.experience-item,
.project-item {
  background: var(--apple-bg-light-gray);
  border-radius: var(--apple-radius-card);
  padding: var(--apple-card-padding-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.entry-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: var(--apple-component-gap-sm);
}

.entry-heading h3 {
  font-size: 21px;
  font-weight: var(--apple-weight-title-bold);
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.entry-role {
  margin-top: 4px;
  font-size: 14px;
  color: var(--apple-text-secondary);
}

.entry-date {
  font-size: 14px;
  font-weight: var(--apple-weight-body-medium);
  color: var(--apple-text-tertiary);
  white-space: nowrap;
}

.project-description {
  margin-bottom: var(--apple-component-gap-sm);
  font-size: 15px;
  line-height: 1.6;
  color: var(--apple-text-secondary);
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.65;
}

.detail-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apple-text-tertiary);
}

.project-item + .project-item {
  margin-top: var(--apple-card-padding-sm);
}

/* ---------- 页脚 ---------- */

.resume-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--apple-content-max-width);
  margin: 60px auto 0;
  padding: 32px 20px 56px;
  border-top: 1px solid var(--apple-border-subtle);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--apple-text-tertiary);
}

/* ---------- 响应式：734px 及以上 ---------- */

@media (min-width: 734px) {
  .resume-hero {
    padding: 96px 40px 64px;
  }

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

  .profile-photo {
    width: 128px;
    height: 128px;
  }

  .resume-grid {
    padding: 64px 40px 0;
  }

  .resume-main {
    gap: var(--apple-section-gap-sm);
    margin-top: var(--apple-section-gap-sm);
  }

  .resume-footer {
    margin-top: var(--apple-section-gap-sm);
  }

  .skill-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .experience-item,
  .project-item {
    padding: var(--apple-card-padding);
  }

  .section-heading h2 {
    font-size: 28px;
  }
}

/* ---------- 响应式：1068px 及以上 ---------- */

@media (min-width: 1068px) {
  .resume-hero {
    padding: 120px 40px 88px;
  }

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

  .resume-grid {
    padding-top: 88px;
  }

  .resume-sidebar {
    grid-template-columns: repeat(3, 1fr);
  }

  .section-heading h2 {
    font-size: 32px;
  }
}

/* ---------- 悬停浮起（仅支持 hover 的设备） ---------- */

@media (hover: hover) {
  .skill-item:hover,
  .experience-item:hover,
  .project-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--apple-shadow-hover);
  }
}

/* ---------- 减弱动效 ---------- */

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

/* ---------- 打印 ---------- */

@media print {
  html,
  body {
    background: #fff;
  }

  .resume-shell {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .resume-nav {
    display: none;
  }

  .resume-hero {
    background: none;
    padding: 24px 0;
  }

  .compact-section,
  .skill-item,
  .experience-item,
  .project-item {
    box-shadow: none;
    transform: none;
    break-inside: avoid;
  }
}
