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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  padding-top: 0;
}

.cv-container {
  max-width: 210mm; /* A4 width */
  margin: 20px auto;
  background-color: white;
  padding: 40px 50px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  min-height: 297mm; /* A4 height */
}

.cv-header {
  text-align: center;
  padding-bottom: 30px;
  border-bottom: 3px solid #1976d2;
  margin-bottom: 30px;
  padding-top: 30px;
}

.cv-profile-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 5px solid #1976d2;
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
  margin-bottom: 20px;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.cv-name {
  font-size: 42px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.cv-title {
  font-size: 24px;
  font-weight: 400;
  color: #1976d2;
  margin-bottom: 20px;
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
}

.contact-item i {
  color: #1976d2;
  font-size: 16px;
}

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

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  text-transform: uppercase;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #1976d2;
  letter-spacing: 1px;
}

.section-content {
  padding-left: 10px;
}

.summary-text {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
  text-align: justify;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 15px;
}

.skill-category {
  break-inside: avoid;
}

.skill-category-title {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid #1976d2;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-radius: 4px;
  font-size: 14px;
}

.skill-name {
  font-weight: 500;
  color: #333;
}

.skill-level {
  font-size: 12px;
  color: #1976d2;
  font-weight: 600;
  padding: 2px 10px;
  background-color: white;
  border-radius: 12px;
  border: 1px solid #1976d2;
}

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

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.experience-left {
  flex: 1;
}

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

.company-name {
  font-size: 15px;
  color: #1976d2;
  font-weight: 500;
  margin-bottom: 3px;
}

.job-date {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.job-description {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 10px;
  text-align: justify;
}

.job-responsibilities {
  list-style-type: none;
  padding-left: 0;
  margin-top: 12px;
}

.job-responsibilities li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}

.job-responsibilities li::before {
  content: "▸";
  position: absolute;
  left: 5px;
  color: #1976d2;
  font-weight: bold;
  font-size: 16px;
}

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

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.education-left {
  flex: 1;
}

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

.university-name {
  font-size: 15px;
  color: #1976d2;
  font-weight: 500;
  margin-bottom: 3px;
}

.field-of-study {
  font-size: 14px;
  color: #666;
  font-style: italic;
}

.education-date {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.language-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
}

.language-item:hover {
  border-color: #1976d2;
  box-shadow: 0 4px 8px rgba(25, 118, 210, 0.1);
}

.language-name {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.language-level {
  font-size: 13px;
  color: #1976d2;
  font-weight: 500;
}

.certification-item {
  margin-bottom: 15px;
  padding: 12px 15px;
  background-color: #f8f9fa;
  border-left: 4px solid #1976d2;
  border-radius: 4px;
  page-break-inside: avoid;
}

.certification-header {
  margin-bottom: 5px;
}

.certification-title {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 3px;
}

.certification-issuer {
  font-size: 13px;
  color: #666;
  font-style: italic;
}

.certification-date {
  font-size: 13px;
  color: #1976d2;
  font-weight: 500;
}

.achievements-list {
  list-style-type: none;
  padding-left: 0;
}

.achievements-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}

.achievements-list li::before {
  content: "✓";
  position: absolute;
  left: 5px;
  color: #1976d2;
  font-weight: bold;
  font-size: 16px;
}

.cv-footer {
  text-align: center;
  padding-top: 20px;
  margin-top: 30px;
  border-top: 2px solid #e0e0e0;
  color: #999;
  font-size: 12px;
}

.fixedNav #navigation {
  position: fixed;
  top: 0;
}

.fixedNav .cv-container {
  padding-top: 80px;
}

@media print {
  body {
    background-color: white;
    padding-top: 0;
  }

  @media print and (prefers-color-scheme: dark) {
    body {
      background-color: #1a1a1a;
      color: #ffffff;
    }
    
    .cv-container {
      background-color: #1a1a1a;
      color: #ffffff;
    }
    
    .cv-name {
      color: #ffffff;
    }
    
    .cv-title {
      color: #1976d2;
    }
    
    .section-title {
      color: #ffffff;
      border-bottom-color: #1976d2;
    }
    
    .job-title,
    .degree-title,
    .certification-title,
    .skill-category-title,
    .language-name {
      color: #ffffff;
    }
    
    .company-name,
    .university-name {
      color: #1976d2;
    }
    
    .summary-text,
    .job-description,
    .job-responsibilities li,
    .achievements-list li {
      color: #e0e0e0;
    }
    
    .skill-item,
    .certification-item {
      background-color: #2a2a2a;
      color: #ffffff;
    }
    
    .language-item {
      background-color: #2a2a2a;
      border-color: #444444;
    }
    
    .cv-footer {
      color: #999999;
      border-top-color: #444444;
    }
  }

  #navigation {
    display: none;
  }

  .cv-profile-image {
    width: 120px;
    height: 120px;
    border-width: 3px;
  }

  .cv-container {
    max-width: 100%;
    margin: 0;
    padding: 20mm;
    box-shadow: none;
    min-height: auto;
  }

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

  .section-title {
    page-break-after: avoid;
    page-break-before: auto;
  }

  .skills-grid {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  .skill-category {
    page-break-inside: avoid;
    margin-bottom: 15px;
  }

  .skill-items {
    display: block;
  }

  .skill-item {
    page-break-inside: avoid;
  }

  .experience-item,
  .education-item,
  .certification-item {
    page-break-inside: avoid;
    margin-bottom: 15px;
  }

  .job-responsibilities,
  .achievements-list {
    page-break-inside: auto;
  }

  .job-responsibilities li,
  .achievements-list li {
    page-break-inside: avoid;
  }

  h3, h4 {
    page-break-after: avoid;
  }

  .languages-grid {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
  }

  .language-item {
    page-break-inside: avoid;
    flex: 0 0 auto;
  }
}

@media screen and (max-width: 768px) {
  .cv-container {
    padding: 30px 20px;
    margin: 10px;
  }

  .cv-profile-image {
    width: 150px;
    height: 150px;
  }

  .cv-name {
    font-size: 32px;
  }

  .cv-title {
    font-size: 20px;
  }

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

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

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

  .experience-header,
  .education-header {
    flex-direction: column;
  }

  .job-date,
  .education-date {
    margin-top: 5px;
  }

  #cv-navigation {
    padding: 0 15px;
  }

  .nav-button {
    padding: 8px 15px;
    font-size: 14px;
  }
}

.cv-container h1,
.cv-container h2,
.cv-container h3,
.cv-container h4 {
  font-weight: bold;
}

.cv-container p,
.cv-container li {
  font-size: 14px;
}

.cv-section + .cv-section {
  margin-top: 30px;
}

