/* index.css - 个人简历样式 */

html, body, main, header, footer {
  padding: 0px;
  margin: 0px;
}

/* ===== CSS 变量 ===== */
:root {
  --primary: #1a365d;
  --primary-light: #2a4a7f;
  --accent: #b8860b;
  --accent-light: #d4a017;
  --bg: #f5f5f0;
  --card-bg: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #e0e0e0;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

/* ===== 全局 ===== */
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

/* ===== Header ===== */
.header-bar {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 24px 20px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-bar h1 {
  margin: 0 0 12px 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
}

.nav-anchors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.nav-anchors a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-anchors a:hover,
.nav-anchors a:focus {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ===== Main ===== */
main {
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 960px;
  padding: 24px 16px 40px;
}

/* ===== Card ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* ===== Section Title ===== */
.section-title {
  font-size: 22px;
  color: var(--primary);
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent-light);
}

/* ===== 个人信息 ===== */
.info-container {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.avatar-wrapper {
  flex-shrink: 0;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
  flex: 1;
}

.info-item {
  font-size: 15px;
  line-height: 1.8;
}

.info-label {
  color: var(--text-light);
  font-weight: 500;
}

.info-value {
  color: var(--text);
  font-weight: 400;
}

/* ===== 时间线 ===== */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 22px;
}

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

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 4px;
}

.timeline-content h3 {
  margin: 4px 0 2px 0;
  font-size: 17px;
  color: var(--primary);
  font-weight: 600;
}

.timeline-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-light);
}

/* ===== 主修课程 ===== */
.courses-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-tag {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  cursor: default;
}

.course-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(26,54,93,0.3);
}

/* ===== 获奖情况 ===== */
.awards-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.award-item {
  display: flex;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  transition: var(--transition);
}

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

.award-item:hover {
  background: var(--bg);
  padding-left: 8px;
  border-radius: 4px;
}

.award-year {
  flex-shrink: 0;
  display: inline-block;
  min-width: 64px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  background: rgba(184,134,11,0.1);
  padding: 2px 10px;
  border-radius: 12px;
  text-align: center;
  margin-right: 14px;
}

.award-name {
  font-size: 15px;
  color: var(--text);
}

/* ===== 个人能力 ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border);
  cursor: default;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.skill-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.skill-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.5;
}

/* ===== 自我评价 ===== */
.evaluation-content p {
  margin: 0 0 12px 0;
  font-size: 15px;
  color: var(--text);
  text-indent: 2em;
  line-height: 1.9;
}

.evaluation-content p:last-child {
  margin-bottom: 0;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 20px 16px;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
}

.page-info a {
  color: var(--primary);
  text-decoration: none;
}

.page-info a:hover {
  text-decoration: underline;
}

/* ===== 打印样式 ===== */
@media print {
  .header-bar {
    position: static;
    background: #fff;
    color: var(--primary);
    box-shadow: none;
    padding: 16px 0;
  }

  .header-bar h1 {
    font-size: 24px;
    color: var(--primary);
  }

  .nav-anchors {
    display: none;
  }

  footer {
    display: none;
  }

  body {
    background: #fff;
  }

  #app {
    max-width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
    margin-bottom: 12px;
    padding: 16px 20px;
  }

  .card:hover {
    box-shadow: none;
  }

  .course-tag:hover,
  .skill-card:hover {
    transform: none;
    box-shadow: none;
  }

  .skill-card {
    border: 1px solid #ccc;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .header-bar h1 {
    font-size: 22px;
    letter-spacing: 2px;
  }

  .nav-anchors a {
    font-size: 12px;
    padding: 3px 8px;
  }

  #app {
    padding: 16px 12px 32px;
  }

  .card {
    padding: 20px 16px;
    margin-bottom: 14px;
  }

  .section-title {
    font-size: 18px;
  }

  .info-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .avatar {
    width: 110px;
    height: 110px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .info-item {
    font-size: 14px;
  }

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

  .skill-card {
    padding: 14px 10px;
  }

  .skill-icon {
    font-size: 26px;
  }

  .skill-name {
    font-size: 12px;
  }

  .timeline {
    padding-left: 22px;
  }

  .timeline-dot {
    left: -18px;
    width: 11px;
    height: 11px;
  }

  .timeline-content h3 {
    font-size: 15px;
  }

  .courses-container {
    gap: 8px;
  }

  .course-tag {
    font-size: 13px;
    padding: 5px 12px;
  }

  .award-item {
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
  }

  .award-year {
    min-width: auto;
    display: inline-block;
    width: fit-content;
  }

  .evaluation-content p {
    font-size: 14px;
    text-indent: 1.5em;
  }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .header-bar h1 {
    font-size: 20px;
  }
}
