/* CSS Variables */
:root {
  --color-primary: #2c3e50;
  --color-secondary: #3498db;
  --color-text: #333;
  --color-text-light: #666;
  --color-border: #e0e0e0;
  --color-bg: #fff;
  --color-bg-light: #f8f9fa;
  --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
  --font-size-base: 14px;
  --max-width: 850px;
}

/* Reset and Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-main);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg-light);
}

.cv-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.cv-container {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 3rem;
  background: var(--color-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Header */
.cv-header {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-primary);
}

.cv-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.5px;
}

.cv-title {
  font-size: 1.25rem;
  color: var(--color-secondary);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.cv-contact {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

.cv-contact a {
  color: var(--color-secondary);
  text-decoration: none;
}

.cv-contact a:hover {
  text-decoration: underline;
}

.cv-separator {
  margin: 0 0.75rem;
  color: var(--color-border);
}

.cv-actions {
  margin-top: 1rem;
}

.btn-download {
  background: var(--color-secondary);
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-download:hover {
  background: #2980b9;
}

/* Sections */
.cv-section {
  margin-bottom: 1.75rem;
}

.cv-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.cv-section-content {
  padding-left: 0;
}

/* Jobs */
.cv-job {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-bg-light);
}

.cv-job:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cv-job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cv-job-main {
  flex: 1;
}

.cv-job-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0;
}

.cv-job-company {
  font-size: 1rem;
  color: var(--color-secondary);
  font-weight: 500;
}

.cv-job-meta {
  text-align: right;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.cv-job-dates {
  display: block;
  font-weight: 500;
}

.cv-job-location {
  display: block;
  font-style: italic;
}

.cv-job-description {
  font-size: 0.95rem;
  line-height: 1.6;
}

.cv-job-description ul {
  margin: 0;
  padding-left: 1.25rem;
}

.cv-job-description li {
  margin-bottom: 0.25rem;
}

/* Education */
.cv-education {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cv-education-main {
  flex: 1;
}

.cv-education-degree {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0;
}

.cv-education-school {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

.cv-education-dates {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* Skills */
.cv-skills-category {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.cv-skills-category strong {
  color: var(--color-primary);
}

.cv-skills-list {
  color: var(--color-text-light);
}

/* Recommendations */
.cv-recommendation {
  background: var(--color-bg-light);
  padding: 1.25rem;
  border-left: 3px solid var(--color-secondary);
  margin: 0;
  font-style: italic;
}

.cv-recommendation-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.cv-recommendation-author {
  font-style: normal;
  font-size: 0.9rem;
}

.cv-recommendation-author strong {
  color: var(--color-primary);
}

.cv-recommendation-title {
  color: var(--color-text-light);
  display: block;
}

/* Footer */
.cv-footer {
  text-align: center;
  padding: 1rem;
  color: var(--color-text-light);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .cv-container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .cv-header h1 {
    font-size: 2rem;
  }
  
  .cv-job-header {
    flex-direction: column;
  }
  
  .cv-job-meta {
    text-align: left;
  }
  
  .cv-education {
    flex-direction: column;
  }
  
  .cv-contact span,
  .cv-contact a {
    display: block;
    margin: 0.25rem 0;
  }
  
  .cv-separator {
    display: none;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white;
    font-size: 11pt;
  }
  
  .cv-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  
  .cv-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
  
  .cv-header h1 {
    font-size: 24pt;
  }
  
  .cv-title {
    font-size: 14pt;
  }
  
  .cv-section {
    margin-bottom: 1rem;
    page-break-inside: avoid;
  }
  
  .cv-section h2 {
    font-size: 12pt;
  }
  
  .cv-job {
    page-break-inside: avoid;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .cv-job-title {
    font-size: 11pt;
  }
  
  .cv-job-description {
    font-size: 10pt;
  }
  
  .cv-recommendation {
    background: #f5f5f5 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  a {
    text-decoration: none;
    color: inherit;
  }
  
  .cv-contact a {
    color: var(--color-secondary);
  }
}

/* Page break helpers for print */
@page {
  margin: 0.75in;
  size: letter;
}
