/* ==================== 基础样式与变量 ==================== */
:root {
  --primary-color: #2c3e50;
  --accent-color: #3a6b8c;
  --border-color: #d0d7de;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --text-dark: #1a1a1a;
  --text-medium: #444444;
  --text-light: #666666;
  --label-color: #555555;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Noto Sans SC", sans-serif;
  --line-height: 1.7;
  --section-gap: 28px;
}

/* ==================== 全局重置 ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height);
  color: var(--text-dark);
  background: linear-gradient(135deg, #e8ecf1 0%, #dfe3e8 30%, #eef1f5 60%, #e4e8ed 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px 60px;
}

/* ==================== 简历主容器 ==================== */
.resume-container {
  width: 100%;
  max-width: 900px;
  background-color: var(--bg-white);
  border: 3px solid #3a6b8c;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.03);
  padding: 44px 48px 40px;
  position: relative;
  overflow: hidden;
}

/* 顶部装饰线 */
.resume-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #3a6b8c 0%, #4d8ab5 30%, #5a9fc9 60%, #3a6b8c 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ==================== 各部分通用样式 ==================== */
.section {
  border: 1px solid #e0e5ea;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  background-color: #fafbfc;
}



/* ==================== 第一部分：基本信息 ==================== */
.basic-info-section {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e8ecf1;
}

.basic-info-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

/* 信息网格：两列 */
.info-grid {
  display: flex;
  gap: 40px;
  flex: 1;
  min-width: 0;
}

.info-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.info-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
}

.info-label {
  color: var(--label-color);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.info-value {
  color: var(--text-dark);
  font-weight: 400;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

/* 照片容器 */
.photo-container {
  flex-shrink: 0;
  width: 130px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e0e5ea;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: #fafbfc;
  box-shadow: var(--shadow-sm);
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 照片未加载时的占位样式 */
.photo-img[src="your-photo.jpg"] {
  object-fit: contain;
  padding: 12px;
  opacity: 0.5;
  background-color: #eef1f5;
}

/* ==================== 第二部分至第五部分：标题样式 ==================== */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
  padding-left: 14px;
  position: relative;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* 标题左侧装饰条 */
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* ==================== 列表样式（二三四五部分分条列点） ==================== */
.content-list {
  list-style: none;
  padding-left: 20px;
}

.content-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: var(--line-height);
  /* ===== 关键：自动换行设置 ===== */
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  hyphens: auto;
}

.content-list li:last-child {
  margin-bottom: 0;
}

/* 列表项圆点标记 */
.content-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  background-color: var(--accent-color);
  border-radius: 50%;
  opacity: 0.75;
  flex-shrink: 0;
}

/* ==================== 第三部分：视频嵌入样式 ==================== */
.video-wrapper {
  margin-top: 18px;
  margin-bottom: 16px;
  padding-left: 20px;
}

.video-hint {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* 响应式视频容器（16:9 比例） */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
}

.video-iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #dde2e8;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  background-color: #000;
}

/* 兼容不支持aspect-ratio的浏览器 */
@supports not (aspect-ratio: 16 / 9) {
  .video-wrapper {
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 640px;
  }
  .video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }
  .video-hint {
    margin-bottom: 6px;
  }
}

/* ==================== 链接区域样式 ==================== */
.link-area {
  margin-top: 16px;
  padding-left: 20px;
}

.link-hint {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.link-area .content-list li::before {
  background-color: #5a9fc9;
}

/* 超链接样式 */
a {
  color: #2a6d9e;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  word-break: break-all;
  overflow-wrap: break-word;
}

a:hover {
  color: #1a5276;
  border-bottom-color: #1a5276;
  text-decoration: none;
}

a:visited {
  color: #4a3f8a;
}

a:active {
  color: #143d5c;
}

/* ==================== 加粗文字样式 ==================== */
strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* ==================== 响应式设计 ==================== */
@media screen and (max-width: 768px) {
  body {
    padding: 16px 10px 30px;
  }

  .resume-container {
    padding: 28px 20px 24px;
    border-radius: var(--radius-md);
    border-width: 1.5px;
  }

  .resume-container::before {
    height: 4px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  /* 基本信息在移动端改为纵向排列 */
  .basic-info-wrapper {
    flex-direction: column-reverse;
    align-items: center;
    gap: 20px;
  }

  .info-grid {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .info-col {
    gap: 8px;
  }

  .photo-container {
    width: 110px;
    height: 140px;
    margin-bottom: 4px;
  }

  .info-item {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.1rem;
    padding-left: 12px;
  }

  .section-title::before {
    width: 3px;
    top: 4px;
    bottom: 4px;
  }

  .content-list {
    padding-left: 12px;
  }

  .content-list li {
    padding-left: 14px;
    font-size: 0.88rem;
    margin-bottom: 8px;
  }

  .content-list li::before {
    width: 5px;
    height: 5px;
    top: 8px;
  }

  .video-wrapper,
  .link-area {
    padding-left: 12px;
  }

  .video-iframe {
    border-radius: 4px;
  }
}

@media screen and (max-width: 480px) {
  .resume-container {
    padding: 20px 14px 18px;
  }

  .info-item {
    font-size: 0.82rem;
    flex-wrap: wrap;
  }

  .info-label {
    font-size: 0.82rem;
  }

  .info-value {
    font-size: 0.82rem;
  }

  .photo-container {
    width: 90px;
    height: 115px;
  }

  .section-title {
    font-size: 1rem;
  }

  .content-list li {
    font-size: 0.82rem;
  }
}

/* ==================== 打印样式 ==================== */
@media print {
  body {
    background: none;
    padding: 0;
    margin: 0;
  }

  .resume-container {
    max-width: 100%;
    border: 2px solid #000;
    border-radius: 0;
    box-shadow: none;
    padding: 30px 35px 28px;
    margin: 0;
  }

  .resume-container::before {
    background: #2c3e50;
    height: 3px;
    border-radius: 0;
  }

  .section-title::before {
    background: #2c3e50;
  }

  .content-list li::before {
    background-color: #2c3e50;
    -webkit-print-color-adjust: exact;

  }

  .video-wrapper,
  .link-area {
    break-inside: avoid;
  }

  a {
    color: #000;
    border-bottom: 1px dotted #000;
  }

  @page {
    margin: 12mm;
  }
}
