/* ===== CSS变量定义 ===== */
:root {
  /* 动态字体设置变量 */
  --resume-font-size: 16px;
  --resume-line-height: 1.6;
  --resume-margin: 2rem;
}

/* ===== 简历模板基础样式 ===== */
.resume-content {
  padding: var(--resume-margin);
  font-family: var(--font-primary);
  font-size: var(--resume-font-size);
  line-height: var(--resume-line-height);
  color: var(--text-primary);
  background: white;
  max-width: 100%;
  margin: 0 auto;
}

/* 通用标题样式 */
.resume-content h1 {
  margin-bottom: var(--space-4);
  font-weight: 700;
  line-height: 1.2;
}

.resume-content h2 {
  margin: var(--space-8) 0 var(--space-4) 0;
  font-weight: 600;
  line-height: 1.3;
}

.resume-content h3 {
  margin: var(--space-6) 0 var(--space-3) 0;
  font-weight: 600;
  line-height: 1.4;
}

.resume-content h4,
.resume-content h5,
.resume-content h6 {
  margin: var(--space-4) 0 var(--space-2) 0;
  font-weight: 500;
}

/* 通用段落和列表样式 */
.resume-content p {
  margin-bottom: var(--space-4);
}

.resume-content ul,
.resume-content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.resume-content li {
  margin-bottom: var(--space-2);
}

.resume-content strong {
  font-weight: 600;
}

.resume-content em {
  font-style: italic;
  color: var(--text-secondary);
}

/* 链接样式 */
.resume-content a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.resume-content a:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

/* ===== 经典模板 ===== */
.resume-template-classic {
  font-family: var(--font-primary);
}

.resume-template-classic h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-700);
  text-align: center;
  margin-bottom: var(--space-2);
  border-bottom: 3px solid var(--primary-200);
  padding-bottom: var(--space-4);
}

.resume-template-classic h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-600);
  border-bottom: 2px solid var(--primary-200);
  padding-bottom: var(--space-2);
  margin: var(--space-8) 0 var(--space-4) 0;
  position: relative;
}

.resume-template-classic h2::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 60px;
  height: 2px;
  background: var(--primary-500);
}

.resume-template-classic h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-6) 0 var(--space-3) 0;
}

.resume-template-classic h4 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: var(--space-4) 0 var(--space-2) 0;
}

/* 联系信息样式 */
.resume-template-classic .contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.resume-template-classic .contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.resume-template-classic .contact-item i {
  color: var(--primary-500);
  width: 16px;
  text-align: center;
}

/* 工作经验和项目样式 */
.resume-template-classic .experience-item,
.resume-template-classic .project-item {
  margin-bottom: var(--space-6);
  padding-left: var(--space-4);
  border-left: 3px solid var(--primary-200);
  position: relative;
}

.resume-template-classic .experience-item::before,
.resume-template-classic .project-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 12px;
  height: 12px;
  background: var(--primary-500);
  border-radius: 50%;
}

.resume-template-classic .job-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.resume-template-classic .company {
  color: var(--primary-600);
  font-weight: 500;
}

.resume-template-classic .date {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

/* 技能标签 */
.resume-template-classic .skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}

.resume-template-classic .skill-tag {
  background: var(--primary-100);
  color: var(--primary-700);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== 现代模板 ===== */
.resume-template-modern {
  font-family: var(--font-primary);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.resume-template-modern h1 {
  font-size: 3rem;
  font-weight: 300;
  color: var(--gray-800);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.resume-template-modern .subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--primary-600);
  margin-bottom: var(--space-8);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.resume-template-modern h2 {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--gray-800);
  margin: var(--space-10) 0 var(--space-6) 0;
  position: relative;
  padding-left: var(--space-6);
}

.resume-template-modern h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-500), var(--primary-300));
  border-radius: var(--radius-sm);
}

.resume-template-modern h3 {
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: var(--space-6) 0 var(--space-3) 0;
}

/* 卡片式布局 */
.resume-template-modern .section-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.resume-template-modern .header-card {
  text-align: center;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  margin-bottom: var(--space-8);
}

.resume-template-modern .header-card h1,
.resume-template-modern .header-card .subtitle {
  color: white;
}

/* 联系信息网格 */
.resume-template-modern .contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.resume-template-modern .contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.resume-template-modern .contact-item i {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* 进度条样式技能 */
.resume-template-modern .skill-item {
  margin-bottom: var(--space-4);
}

.resume-template-modern .skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.resume-template-modern .skill-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.resume-template-modern .skill-progress {
  height: 100%;
  background: linear-gradient(to right, var(--primary-500), var(--primary-400));
  border-radius: var(--radius-sm);
  transition: width 1s ease-in-out;
}

/* 时间线样式 */
.resume-template-modern .timeline {
  position: relative;
  padding-left: var(--space-8);
}

.resume-template-modern .timeline::before {
  content: '';
  position: absolute;
  left: var(--space-4);
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-500), var(--primary-300));
}

.resume-template-modern .timeline-item {
  position: relative;
  margin-bottom: var(--space-8);
  background: white;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.resume-template-modern .timeline-item::before {
  content: '';
  position: absolute;
  left: -var(--space-10);
  top: var(--space-6);
  width: 16px;
  height: 16px;
  background: var(--primary-500);
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--primary-500);
}

/* ===== 简约模板 ===== */
.resume-template-minimal {
  font-family: var(--font-primary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.resume-template-minimal h1 {
  font-size: 2.25rem;
  font-weight: 400;
  color: var(--gray-900);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.resume-template-minimal .subtitle {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: var(--space-8);
  font-weight: 400;
}

.resume-template-minimal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: var(--space-10) 0 var(--space-4) 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gray-300);
  padding-bottom: var(--space-2);
}

.resume-template-minimal h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--gray-800);
  margin: var(--space-6) 0 var(--space-2) 0;
}

.resume-template-minimal h4 {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gray-600);
  margin: var(--space-2) 0;
}

/* 简洁的联系信息 */
.resume-template-minimal .contact-info {
  text-align: center;
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--gray-200);
}

.resume-template-minimal .contact-item {
  display: inline-block;
  margin: 0 var(--space-4);
  color: var(--gray-600);
  font-size: 0.95rem;
}

.resume-template-minimal .contact-item:not(:last-child)::after {
  content: '•';
  margin-left: var(--space-4);
  color: var(--gray-400);
}

/* 简洁的列表样式 */
.resume-template-minimal ul {
  list-style: none;
  padding: 0;
}

.resume-template-minimal li {
  position: relative;
  padding-left: var(--space-4);
  margin-bottom: var(--space-2);
}

.resume-template-minimal li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--gray-400);
}

/* 工作经验布局 */
.resume-template-minimal .experience-item {
  margin-bottom: var(--space-8);
}

.resume-template-minimal .job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.resume-template-minimal .job-title {
  font-weight: 500;
  color: var(--gray-900);
}

.resume-template-minimal .company {
  color: var(--gray-700);
  font-weight: 400;
}

.resume-template-minimal .date {
  color: var(--gray-500);
  font-size: 0.9rem;
  white-space: nowrap;
}

/* 技能简洁展示 */
.resume-template-minimal .skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
}

.resume-template-minimal .skill-category h4 {
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: var(--space-3);
}

.resume-template-minimal .skill-list {
  color: var(--gray-600);
  line-height: 1.6;
}

/* ===== 颜色主题变体 ===== */
/* 绿色主题 */
.theme-green {
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-300: #6ee7b7;
  --primary-400: #34d399;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
}

/* 紫色主题 */
.theme-purple {
  --primary-50: #faf5ff;
  --primary-100: #f3e8ff;
  --primary-200: #e9d5ff;
  --primary-300: #d8b4fe;
  --primary-400: #c084fc;
  --primary-500: #a855f7;
  --primary-600: #9333ea;
  --primary-700: #7c3aed;
}

/* 红色主题 */
.theme-red {
  --primary-50: #fef2f2;
  --primary-100: #fee2e2;
  --primary-200: #fecaca;
  --primary-300: #fca5a5;
  --primary-400: #f87171;
  --primary-500: #ef4444;
  --primary-600: #dc2626;
  --primary-700: #b91c1c;
}

/* 灰色主题 */
.theme-gray {
  --primary-50: #f9fafb;
  --primary-100: #f3f4f6;
  --primary-200: #e5e7eb;
  --primary-300: #d1d5db;
  --primary-400: #9ca3af;
  --primary-500: #6b7280;
  --primary-600: #4b5563;
  --primary-700: #374151;
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
  .resume-content {
    padding: var(--space-6);
  }
  
  .resume-template-classic h1,
  .resume-template-modern h1 {
    font-size: 2rem;
  }
  
  .resume-template-minimal h1 {
    font-size: 1.875rem;
  }
  
  .resume-template-classic .contact-info,
  .resume-template-minimal .contact-info {
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .resume-template-modern .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .resume-template-modern .timeline {
    padding-left: var(--space-6);
  }
  
  .resume-template-modern .timeline-item::before {
    left: -var(--space-8);
  }
  
  .resume-template-minimal .job-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .resume-template-minimal .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .resume-content {
    padding: var(--space-4);
  }
  
  .resume-template-classic h1,
  .resume-template-modern h1,
  .resume-template-minimal h1 {
    font-size: 1.75rem;
  }
  
  .resume-template-modern .section-card,
  .resume-template-modern .timeline-item {
    padding: var(--space-4);
  }
  
  .resume-template-classic .experience-item,
  .resume-template-classic .project-item {
    padding-left: var(--space-3);
  }
}

/* ===== 打印优化 ===== */
@media print {
  .resume-content {
    padding: 0.5in;
    font-size: 11pt;
    line-height: 1.4;
  }
  
  .resume-template-modern .section-card,
  .resume-template-modern .timeline-item {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
  
  .resume-template-modern {
    background: white;
  }
  
  .resume-template-modern .header-card {
    background: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #ddd;
  }
  
  .resume-template-modern .header-card h1,
  .resume-template-modern .header-card .subtitle {
    color: #333 !important;
  }
  
  h1, h2, h3 {
    break-after: avoid;
  }
  
  .experience-item,
  .project-item,
  .timeline-item {
    break-inside: avoid;
  }
}

/* ===== Dark Mode 简历模板调整 ===== */
[data-theme="dark"] .resume-content {
  background: var(--gray-800);
  color: var(--gray-100);
}

/* Dark mode - 经典模板调整 */
[data-theme="dark"] .resume-template-classic h1 {
  color: var(--primary-400);
  border-bottom-color: var(--gray-600);
}

[data-theme="dark"] .resume-template-classic h2 {
  color: var(--primary-400);
  border-bottom-color: var(--gray-600);
}

[data-theme="dark"] .resume-template-classic h2::before {
  background: var(--primary-400);
}

[data-theme="dark"] .resume-template-classic .contact-item i {
  color: var(--primary-400);
}

[data-theme="dark"] .resume-template-classic .experience-item,
[data-theme="dark"] .resume-template-classic .project-item {
  border-left-color: var(--gray-600);
}

[data-theme="dark"] .resume-template-classic .experience-item::before,
[data-theme="dark"] .resume-template-classic .project-item::before {
  background: var(--primary-400);
}

[data-theme="dark"] .resume-template-classic .company {
  color: var(--primary-400);
}

[data-theme="dark"] .resume-template-classic .date {
  color: var(--gray-400);
}

[data-theme="dark"] .resume-template-classic .skill-tag {
  background: var(--gray-700);
  color: var(--primary-300);
}

/* Dark mode - 现代模板调整 */
[data-theme="dark"] .resume-template-modern {
  background: var(--gray-800);
}

[data-theme="dark"] .resume-template-modern h1 {
  color: var(--gray-100);
}

[data-theme="dark"] .resume-template-modern .subtitle {
  color: var(--primary-400);
}

[data-theme="dark"] .resume-template-modern h2 {
  color: var(--gray-100);
}

[data-theme="dark"] .resume-template-modern h2::before {
  background: linear-gradient(to bottom, var(--primary-400), var(--primary-500));
}

[data-theme="dark"] .resume-template-modern .section-card {
  background: var(--gray-700);
  border-color: var(--gray-600);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .resume-template-modern .header-card {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

[data-theme="dark"] .resume-template-modern .contact-item {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .resume-template-modern .skill-bar {
  background: var(--gray-600);
}

[data-theme="dark"] .resume-template-modern .timeline::before {
  background: linear-gradient(to bottom, var(--primary-400), var(--primary-500));
}

[data-theme="dark"] .resume-template-modern .timeline-item {
  background: var(--gray-700);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .resume-template-modern .timeline-item::before {
  background: var(--primary-400);
  box-shadow: 0 0 0 2px var(--primary-400);
}

/* Dark mode - 简约模板调整 */
[data-theme="dark"] .resume-template-minimal h1 {
  color: var(--gray-100);
}

[data-theme="dark"] .resume-template-minimal .subtitle {
  color: var(--gray-300);
}

[data-theme="dark"] .resume-template-minimal h2 {
  color: var(--gray-100);
  border-bottom-color: var(--gray-600);
}

[data-theme="dark"] .resume-template-minimal h3 {
  color: var(--gray-200);
}

[data-theme="dark"] .resume-template-minimal h4 {
  color: var(--gray-300);
}

[data-theme="dark"] .resume-template-minimal .contact-info {
  border-bottom-color: var(--gray-600);
}

[data-theme="dark"] .resume-template-minimal .contact-item {
  color: var(--gray-300);
}

[data-theme="dark"] .resume-template-minimal .contact-item:not(:last-child)::after {
  color: var(--gray-500);
}

[data-theme="dark"] .resume-template-minimal li::before {
  color: var(--gray-500);
}

[data-theme="dark"] .resume-template-minimal .job-title {
  color: var(--gray-100);
}

[data-theme="dark"] .resume-template-minimal .company {
  color: var(--gray-200);
}

[data-theme="dark"] .resume-template-minimal .date {
  color: var(--gray-400);
}

[data-theme="dark"] .resume-template-minimal .skill-category h4 {
  color: var(--gray-200);
}

[data-theme="dark"] .resume-template-minimal .skill-list {
  color: var(--gray-300);
} 