/* 基础重置 */
html, body, main, header, footer {
  margin: 0;
  padding: 0;
}

/* ===== 通用 ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f0f2f5;
  color: #333;
  line-height: 1.7;
}

/* ===== Header ===== */
#header {
  background: linear-gradient(135deg, #1a3c5e 0%, #234f75 50%, #1a3c5e 100%);
  color: #fff;
  text-align: center;
  padding: 40px 20px 30px;
}

#avatar-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  display: block;
}

#name-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: 2px;
}

#job-target {
  font-size: 15px;
  margin: 0 0 16px;
  opacity: 0.9;
  background: rgba(255,255,255,0.15);
  display: inline-block;
  padding: 4px 18px;
  border-radius: 20px;
}

#contact-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
  font-size: 14px;
}

.contact-item {
  opacity: 0.9;
}

#extra-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.tag {
  background: rgba(255,255,255,0.12);
  padding: 3px 14px;
  border-radius: 14px;
  transition: background 0.2s;
}

.tag:hover {
  background: rgba(255,255,255,0.25);
}

/* ===== Main ===== */
#main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

#app {
  /* no max-width */
}

/* ===== 模块通用 ===== */
.cv-section {
  background: #fff;
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a3c5e;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8f0f8;
}

/* ===== 时间线 ===== */
.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 18px;
}

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

.timeline-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  background: #1a3c5e;
  margin-top: 7px;
  position: relative;
}

.timeline-item:not(:last-child) .timeline-dot::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  width: 2px;
  height: calc(100% + 18px);
  background: #dce6f0;
}

.timeline-content {
  flex: 1;
}

.item-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  margin-bottom: 6px;
}

.item-date {
  font-size: 13px;
  color: #5682a3;
  font-weight: 600;
  white-space: nowrap;
}

.item-school,
.item-org {
  font-size: 15px;
  font-weight: 700;
  color: #1a3c5e;
}

.item-degree,
.item-role {
  font-size: 13px;
  color: #888;
  font-style: italic;
}

.item-desc {
  font-size: 14px;
  color: #555;
  margin: 4px 0 0;
  line-height: 1.7;
}

.item-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}

.item-list li {
  margin-bottom: 2px;
}

/* ===== 技能卡片 ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.skill-card {
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  border: 1px solid #e8f0f6;
  transition: box-shadow 0.2s;
}

.skill-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.skill-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.skill-name {
  font-weight: 700;
  font-size: 15px;
  color: #1a3c5e;
  margin-bottom: 4px;
}

.skill-detail {
  font-size: 13px;
  color: #777;
  line-height: 1.6;
}

/* ===== 自我评价 ===== */
.evaluation-content .item-list {
  font-size: 14px;
  color: #555;
}

/* ===== 微信弹窗 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 30px 28px 24px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-box h3 {
  margin: 0 0 16px;
  color: #1a3c5e;
  font-size: 18px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  background: #f0f2f5;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #999;
}

/* ===== 返回顶部 ===== */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1a3c5e;
  color: #fff;
  font-size: 18px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 500;
  transition: opacity 0.3s, transform 0.3s;
  line-height: 42px;
  text-align: center;
  padding: 0;
}

#back-to-top.show {
  display: block;
}

#back-to-top:hover {
  background: #234f75;
  transform: scale(1.08);
}

/* ===== 广告位 ===== */
#ad-slot-container {
  margin: 20px auto;
  text-align: center;
}

/* ===== Footer ===== */
#footer {
  text-align: center;
  padding: 20px 16px 30px;
  font-size: 13px;
  color: #999;
  background: #f0f2f5;
}

#footer a {
  color: #5682a3;
  text-decoration: none;
}

#footer a:hover {
  color: #1a3c5e;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  #header {
    padding: 28px 16px 22px;
  }

  #name-title {
    font-size: 24px;
  }

  #contact-row {
    gap: 10px;
    font-size: 13px;
  }

  #main {
    padding: 16px 10px 30px;
  }

  .cv-section {
    padding: 18px 16px;
    border-radius: 8px;
    margin-bottom: 14px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .item-header {
    flex-direction: column;
    gap: 2px;
  }

  #back-to-top {
    bottom: 20px;
    right: 14px;
    width: 36px;
    height: 36px;
    font-size: 16px;
    line-height: 36px;
  }
}

/* ===== 打印 ===== */
@media print {
  body {
    background: #fff;
  }

  #header {
    background: #1a3c5e !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #back-to-top,
  #ad-slot-container,
  #wechat-modal,
  .modal-overlay,
  #footer {
    display: none !important;
  }

  .cv-section {
    box-shadow: none;
    border: 1px solid #e0e0e0;
    break-inside: avoid;
  }
}
