﻿:root {
  --surface-color: #fff;
  --primary-color: #333;
  --highlight-color: #f8f9fa;
  --special-color: #e74c3c;
  --accent-color: #667eea;
  --text-muted: #6c757d;
  --border-color: #e9ecef;
}

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

html {
  background: var(--surface-color);
  font-size: 16px;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--primary-color);
  background-color: var(--highlight-color);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Print Styles - Enhanced for PDF */
@media print {
  /* Ensure colors print correctly */
  * {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* Page setup for professional printing */
  @page {
    size: A4;
    margin: 1.5cm;
    orphans: 3;
    widows: 3;
  }
  
  /* Optimize body for print */
  body {
    background: white !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.3;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Ensure proper page breaks */
  .page {
    min-height: auto !important;
    page-break-after: auto;
  }
  
  /* Optimize main container */
  .main {
    background: white !important;
    box-shadow: none !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Header optimization for print */
  .header {
    background: #f8f9fa !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    margin-bottom: 15px !important;
    padding: 15px !important;
    page-break-inside: avoid;
    page-break-after: avoid;
  }
  
  .header-content {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    flex-direction: row !important;
  }
  
  .profile-section {
    flex-shrink: 0 !important;
  }
  
  .title-section {
    flex: 1 !important;
  }
  
  .contact-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    align-items: flex-end !important;
  }
  
  /* Profile image optimization */
  .avatar {
    border: 2px solid #000 !important;
    filter: none !important;
    width: 100px !important;
    height: 100px !important;
  }
  
  /* Content layout for print - maintain desktop layout */
  .content {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 15px !important;
    margin-top: 15px !important;
  }
  
  .left-column,
  .right-column {
    width: auto !important;
    margin-bottom: 0 !important;
    float: none !important;
  }
  
  /* Section optimization */
  .section {
    page-break-inside: avoid;
    margin-bottom: 15px !important;
    orphans: 3;
    widows: 3;
  }
  
  /* Experience items */
  .experience-item {
    page-break-inside: avoid;
    border: 1px solid #000 !important;
    box-shadow: none !important;
    margin-bottom: 12px !important;
    padding: 12px !important;
    background: white !important;
  }
  
  /* Certifications and education */
  .certification-item,
  .education-item {
    page-break-inside: avoid;
    border: 1px solid #000 !important;
    box-shadow: none !important;
    margin-bottom: 10px !important;
    padding: 10px !important;
    background: white !important;
  }
  
  /* Skills optimization */
  .skill-tag {
    background: #f0f0f0 !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    margin: 1px !important;
    padding: 3px 6px !important;
  }
  
  /* Language bars */
  .level-bar {
    background: #e0e0e0 !important;
    border: 1px solid #000 !important;
    height: 6px !important;
  }
  
  .level-fill {
    background: #000 !important;
  }
  
  /* Typography for print */
  .section-title {
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
    margin-bottom: 12px !important;
    padding-bottom: 6px !important;
    font-size: 14pt !important;
  }
  
  .section-title i {
    color: #000 !important;
  }
  
  .job-title,
  .cert-title,
  .degree {
    color: #000 !important;
    font-size: 12pt !important;
  }
  
  .company-description,
  .skills-description {
    background: #f8f8f8 !important;
    color: #000 !important;
    border-left: 3px solid #000 !important;
    padding: 8px !important;
  }
  
  /* Lists and achievements */
  .achievements li {
    margin-bottom: 4px !important;
    line-height: 1.2 !important;
  }
  
  .achievements li::before {
    color: #000 !important;
  }
  
  /* Contact information */
  .contact-item {
    color: #000 !important;
    font-size: 10pt !important;
  }
  
  .contact-item i {
    color: #000 !important;
  }
  
  /* Remove hover effects */
  .experience-item:hover,
  .skill-tag:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  
  /* Ensure proper spacing */
  .job-details,
  .education-details,
  .cert-details {
    margin-bottom: 8px !important;
  }
  
  /* Skills groups */
  .skills-group {
    page-break-inside: avoid;
    margin-bottom: 15px !important;
  }
  
  .skills-subtitle {
    color: #000 !important;
    font-size: 11pt !important;
  }
  
  /* Language items */
  .language-item {
    border-bottom: 1px solid #000 !important;
    padding: 8px 0 !important;
  }
  
  .language-name {
    color: #000 !important;
    font-weight: bold !important;
  }
  
  /* Name and title optimization */
  .name {
    color: #000 !important;
    font-size: 18pt !important;
  }
  
  .title {
    color: #000 !important;
    font-size: 14pt !important;
  }
  
  .description {
    color: #000 !important;
    font-size: 10pt !important;
    opacity: 1 !important;
  }
  
  /* Company logos */
  .company-logo {
    border: 1px solid #000 !important;
    background: white !important;
  }
  
  /* Force page breaks where appropriate */
  .experience-item:nth-child(3) {
    page-break-before: auto;
  }
  
  /* Ensure skills section doesn't break */
  .skills-group {
    page-break-inside: avoid;
  }
  
  /* Optimize for different paper sizes */
  @page :first {
    margin-top: 1cm;
  }
  
  @page :left {
    margin-left: 2cm;
    margin-right: 1cm;
  }
  
  @page :right {
    margin-left: 1cm;
    margin-right: 2cm;
  }
}
