:root {
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --accent-color: #3498db;
  --text-color: #333;
  --light-text: #666;
  --border-color: #eee;
  --font-main: "Inter", sans-serif;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.4;
  background-color: #f5f5f5;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

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

/* Header */
.cv-header {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.cv-header h1 {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 14px;
  color: var(--secondary-color);
}

.contact-info a {
  color: var(--secondary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.contact-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Section Common */
.cv-section {
  margin-bottom: 4px;
}

.cv-section h2 {
  font-size: 18px;
  color: var(--primary-color);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
  padding-top: 4px;
  letter-spacing: 0.5px;
}

/* Skills */
.skills-grid {
  display: grid;
  gap: 4px;
}

.skill-category {
  font-size: 14px;
}

.skill-category strong {
  color: var(--secondary-color);
  font-weight: 600;
}

/* Experience */
.experience-item {
  margin-bottom: 10px;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.exp-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

.company {
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 14px;
  margin-right: auto;
  margin-left: 10px;
}

.date {
  font-size: 13px;
  color: var(--light-text);
  font-weight: 500;
}

.exp-details {
  list-style-position: outside;
  margin-left: 18px;
  font-size: 14px;
}

.exp-details li {
  margin-bottom: 1px;
  text-align: justify;
}

/* Projects */
.projects-list {
  list-style-position: outside;
  margin-left: 18px;
  font-size: 14px;
}

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

/* Education */
.education-item {
  margin-bottom: 4px;
}

.edu-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.edu-header h3 {
  font-weight: 600;
}

/* Print Styles */
@page {
  size: A4;
  margin: 0;
}

@media print {
  body {
    background: white;
  }

  .cv-container {
    margin: 0 auto;
    /* Center on larger paper */
    padding: 15px 25px;
    /* Internal padding */
    box-shadow: none;
    width: 100%;
    max-width: 210mm;
    /* Force A4 width */
    min-height: 297mm;
    /* Force A4 height */
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .cv-header h1 {
    color: black;
  }

  .cv-section h2 {
    border-color: #ccc;
    color: black;
  }

  a {
    text-decoration: none;
    color: black;
  }

  /* Ensure page breaks don't chop items */
  .experience-item,
  .cv-section {
    page-break-inside: avoid;
  }
}