* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
  min-height: 100vh;
  padding: 20px;
}

.cv-container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 40px;
  text-align: center;
}

.header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  font-weight: 300;
}

.contact-info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  font-size: 0.95em;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.content {
  padding: 40px;
}

.section {
  margin-bottom: 40px;
}

.section h2 {
  color: #2c3e50;
  font-size: 1.8em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #3498db;
  position: relative;
}

.section h2::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: #e74c3c;
}

.summary-text {
  font-size: 1.1em;
  color: #555;
  line-height: 1.8;
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  border-left: 5px solid #3498db;
}

.objective-text {
  font-size: 1.05em;
  color: #555;
  line-height: 1.7;
  background: #fff5f5;
  padding: 20px;
  border-radius: 8px;
  border-left: 5px solid #e74c3c;
  font-style: italic;
}

.job {
  margin-bottom: 30px;
  padding: 25px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 5px solid #3498db;
  transition: transform 0.2s ease;
}

.job:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.job-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.company {
  font-size: 1.1em;
  color: #3498db;
  font-weight: 500;
}

.job-date {
  background: #3498db;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 500;
}

.job-location {
  color: #666;
  font-size: 0.95em;
  margin-bottom: 10px;
}

.job-description {
  color: #555;
  line-height: 1.7;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.skill-category {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 5px;
  border-left: 2px solid #3498db;
}

.skill-category h4 {
  color: #2c3e50;
  margin-bottom: 6px;
  font-size: 0.95em;
  font-weight: 600;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.skill-tag {
  background: #3498db;
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.75em;
  font-weight: 500;
}

.education-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 5px solid #e74c3c;
}

.degree {
  font-size: 1.2em;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.university {
  color: #3498db;
  font-weight: 500;
  margin-bottom: 5px;
}

.education-date {
  color: #666;
  font-size: 0.9em;
}

.languages {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.language {
  background: #2c3e50;
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 500;
}

.export-btn-group {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 16px;
  z-index: 1000;
}

.pdf-export-btn,
.word-export-btn {
  position: static;
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
  transition: all 0.3s ease;
}

.pdf-export-btn:hover,
.word-export-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.pdf-export-btn:active,
.word-export-btn:active {
  transform: translateY(0);
}

@media print {
  body {
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 12pt;
    line-height: 1.4;
  }

  .cv-container {
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  .header {
    background: #2c3e50 !important;
    color: white !important;
    padding: 30px !important;
    margin: 0 !important;
  }

  .job:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .pdf-export-btn {
    display: none !important;
  }

  .section {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 25px;
  }

  .job {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 20px;
  }

  .header {
    page-break-after: avoid;
  }

  h2 {
    page-break-after: avoid;
    color: #2c3e50 !important;
  }

  .skill-tag {
    background: #3498db !important;
    color: white !important;
  }

  .job-date {
    background: #3498db !important;
    color: white !important;
  }

  .language {
    background: #2c3e50 !important;
    color: white !important;
  }

  /* Ensure colors are preserved */
  * {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 30px 20px;
  }

  .header h1 {
    font-size: 2em;
  }

  .contact-info {
    flex-direction: column;
    gap: 10px;
  }

  .content {
    padding: 30px 20px;
  }

  .job-header {
    flex-direction: column;
  }

  .job-date {
    align-self: flex-start;
    margin-top: 10px;
  }

  .export-btn-group {
    top: 10px;
    right: 10px;
    gap: 8px;
  }
  .pdf-export-btn,
  .word-export-btn {
    padding: 10px 16px;
    font-size: 0.8em;
  }
}
