/* resume.css - Professional, ATS-friendly, and print-optimized design */
:root {
  --primary-color: #3498db;
  --text-color: #2c3e50;
  --secondary-text: #34495e;
  --light-text: #7f8c8d;
  --bg-light: #e0e6ed; /* Original: #f8f9fa - Changed to a slightly darker shade */
  --bg-white: #ffffff;
  --bg-page: #f2f2f2; /* Changed to a neutral light gray */
}

/* Base Styles */
body {
  background: var(--bg-page);
  color: var(--text-color);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  margin: 0;
  padding: 10px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

.resume-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-white);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); /* Enhanced shadow for better depth */
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
}

/* Header Section */
.resume-header {
  background: linear-gradient(135deg, var(--text-color) 0%, var(--secondary-text) 100%);
  color: white;
  padding: 20px; /* Reduced from 40px */
}

.resume-header-content {
  display: flex;
  align-items: center;
  gap: 20px; /* Reduced from 30px */
  flex-wrap: wrap;
}

.resume-photo {
  width: 110px; /* Slightly reduced from 120px */
  height: 110px; /* Slightly reduced from 120px */
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
  flex-shrink: 0;
}

.resume-title-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.resume-title-block h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: white;
  letter-spacing: -0.02em;
}

.resume-role {
  display: block;
  width: 100%;
  font-size: 1.3rem;
  color: #bdc3c7;
  margin-bottom: 10px;
  font-weight: 400;
  line-height: 1.4;
}

.resume-location {
  display: block;
  width: 100%;
  font-size: 0.95rem;
  color: #ecf0f1;
  margin-bottom: 12px;
  line-height: 1.4;
}

.resume-location i {
  margin-right: 4px;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  width: 100%;
  font-size: 0.95rem;
  color: #ecf0f1;
  margin-bottom: 0;
}

.resume-contact a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

.resume-contact a:hover {
  color: white;
  text-decoration: underline;
}

.resume-linkedin-cta {
  margin-top: 10px;
  font-size: 0.9rem;
}

.resume-linkedin-cta a {
  color: #ecf0f1;
  text-decoration: none;
  font-weight: 500;
}

.resume-linkedin-cta a:hover {
  color: white;
  text-decoration: underline;
}

.resume-linkedin-cta i {
  font-size: 0.75rem;
  margin-left: 4px;
}

/* Content Sections */
.resume-body {
  padding: 12px 20px; /* Reduced from 16px 32px */
}

.resume-section {
  margin-bottom: 20px; /* Reduced from 36px */
  position: relative;
}

.resume-section:last-child {
  margin-bottom: 0;
}

.resume-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 12px; /* Reduced from 20px */
  padding-bottom: 6px; /* Reduced from 8px */
  border-bottom: 2px solid var(--primary-color);
  position: relative;
}

.resume-section-title i {
  margin-right: 8px;
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

/* Skills Section */
.resume-skills ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 6px 20px; /* Reduced from 8px 24px */
  margin: 0;
  padding: 0;
  list-style: none;
}

.resume-skills li {
  padding: 3px 0 3px 26px; /* Reduced from 4px 0 4px 28px */
  font-size: 0.95rem;
  color: var(--text-color);
  position: relative;
}

.resume-skills li i {
  position: absolute;
  left: 0;
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

/* Recognition — single item, no list bullet */
.resume-recognition-item {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-color);
}

.resume-recognition-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.resume-recognition-item a:hover {
  text-decoration: underline;
}

/* Experience Section */
.job-entry {
  margin-bottom: 20px; /* Reduced from 40px */
  padding: 14px; /* Reduced from 24px */
  background: var(--bg-light);
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  position: relative;
}

.job-title-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px; /* Reduced from 8px */
  flex-wrap: wrap;
  gap: 8px;
}

.job-title-info {
  flex: 1;
  min-width: 0;
}

.companyname {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 4px;
  line-height: 1.3;
}

.jobtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary-text);
  line-height: 1.3;
}

.job-dates {
  font-size: 0.9rem;
  color: var(--light-text);
  font-weight: 500;
  white-space: nowrap;
  background: #ecf0f1;
  padding: 4px 12px;
  border-radius: 20px;
}

.job-description {
  margin-top: 10px; /* Reduced from 16px */
  line-height: 1.6; /* Slightly reduced from 1.7 */
  color: var(--text-color);
}

.job-description ul {
  margin: 8px 0 0; /* Reduced from 12px */
  padding-left: 18px; /* Reduced from 20px */
}

.job-description li {
  margin-bottom: 6px; /* Reduced from 10px */
  line-height: 1.5; /* Reduced from 1.6 */
}

/* Military awards */
.military-service-note {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-color);
}

.military-awards {
  margin-top: 2px;
}

.military-awards-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-color);
  line-height: 1.3;
}

.military-awards-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.military-awards-featured,
.military-awards-list {
  margin: 0;
  padding-left: 18px;
  list-style: none;
}

.military-awards-featured li,
.military-awards-list li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 4px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--text-color);
}

.military-awards-featured li::before,
.military-awards-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary-color);
}

.military-awards-featured li {
  font-weight: 600;
  color: var(--secondary-text);
}

.military-awards-featured li::before {
  background: #9a7b2f;
}

.military-awards-list li {
  font-weight: 400;
}

.military-awards-list {
  columns: 2;
  column-gap: 24px;
}

.military-awards-list li {
  break-inside: avoid;
}

.award-detail {
  font-weight: 400;
  color: var(--light-text);
}

.military-discharge {
  margin: 14px 0 0;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--secondary-text);
}

/* Multi-role job entries */
.job-role {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--light-text);
}

.job-role:first-child {
  margin-top: 8px;
  padding-top: 0;
  border-top: none;
}

/* PDF Download Button */
.pdf-download-btn {
  margin-top: 14px;
}

.btn-download {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-download:hover {
  background: #2980b9;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* PDF Generation Specific Styles */
.resume-container {
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  min-height: 100vh;
}

.resume-header,
.resume-body,
.resume-section,
.job-entry {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive Design */
@media (min-width: 1400px) {
  body { 
    padding: 20px 40px; 
  }
  .resume-container { 
    max-width: 1000px;
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  body { 
    padding: 15px 30px; 
  }
  .resume-container { 
    max-width: 950px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .resume-container { 
    max-width: 900px;
  }
}

@media (max-width: 768px) {
  body { padding: 5px; }
  .resume-container { margin: 0; border-radius: 4px; }
  .resume-header { padding: 24px 20px 18px; }
  .resume-header-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .resume-photo { width: 100px; height: 100px; }
  .resume-title-block h1 { font-size: 2.2rem; }
  .resume-role { font-size: 1.1rem; }
  .resume-location {
    text-align: center;
  }
  .resume-contact {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }
  .resume-body { padding: 20px 16px; }
  .resume-section { margin-bottom: 24px; }
  .resume-section-title { font-size: 1.2rem; }
  .job-entry { padding: 16px; margin-bottom: 24px; }
  .job-title-line {
    flex-direction: column;
    align-items: flex-start;
  }
  .job-dates {
    align-self: flex-start;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .resume-title-block h1 { font-size: 1.8rem; }
  .resume-role { font-size: 1rem; }
  .resume-skills ul { grid-template-columns: 1fr; }
  .military-awards-list { columns: 1; }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* Set tight page margins */
  @page {
    margin: 0.2in;
    size: letter;
  }
  
  /* Remove unnecessary padding */
  body {
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
    font-size: 10pt;
    line-height: 1.3;
  }
  
  .resume-container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: white !important;
  }
  
  .resume-body {
    padding: 6pt 10pt !important;
  }
  
  /* Fix header layout to stay inline */
  .resume-header {
    padding: 10pt !important;
    background: white !important;
    color: black !important;
    border-bottom: 1pt solid #000 !important;
  }
  
  .resume-header-content {
    display: block !important;
    text-align: left !important;
  }

  .resume-photo {
    display: none !important;
  }
  
  .resume-title-block {
    width: 100% !important;
    text-align: left !important;
  }
  
  .resume-title-block h1 {
    font-size: 16pt !important;
    margin: 0 0 2pt !important;
    color: black !important;
  }
  
  .resume-role {
    font-size: 11pt !important;
    margin-bottom: 4pt !important;
    color: black !important;
  }

  .resume-location {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    font-size: 9pt !important;
    margin-bottom: 4pt !important;
    color: black !important;
  }

  .resume-location i {
    display: inline-block !important;
    width: auto !important;
    margin-right: 4pt !important;
  }
  
  .resume-contact {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8pt !important;
    justify-content: flex-start !important;
    align-items: center !important;
    font-size: 9pt !important;
    color: black !important;
    margin-bottom: 4pt !important;
  }
  
  .resume-contact a {
    color: black !important;
    text-decoration: none !important;
  }

  .resume-linkedin-cta {
    margin-top: 3pt !important;
    font-size: 8pt !important;
  }

  .resume-linkedin-cta a {
    color: black !important;
    text-decoration: none !important;
  }

  .resume-linkedin-cta i {
    display: none !important;
  }

  /* Company logos in print */
  .job-entry img,
  .companyname img {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: 16pt !important;
    max-width: 16pt !important;
  }
  
  /* Make Font Awesome Pro icons visible */
  .fas, .fab, .far, .fa, .fal, .fad {
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Brands', 'Font Awesome 6 Free' !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
    color: black !important;
  }
  
  /* Keep FontAwesome positioning correct */
  .resume-skills li i {
    position: absolute !important;
    left: 0 !important;
    color: black !important;
    width: 20px !important;
    text-align: center !important;
    display: inline-block !important;
  }
  
  /* Keep section title icons visible */
  .resume-section-title i {
    margin-right: 8px !important;
    color: black !important;
    display: inline-block !important;
  }
  
  /* Optimize spacing between sections */
  .resume-section {
    margin-bottom: 6pt !important;
    page-break-inside: auto;
    break-inside: auto;
  }
  
  .resume-section-title {
    font-size: 11pt !important;
    font-weight: 700 !important;
    margin-bottom: 4pt !important;
    padding-bottom: 2pt !important;
    color: black !important;
    border-bottom: 1pt solid black !important;
  }

  /* Unified body text across summary, skills, and experience */
  .resume-section p,
  .resume-recognition-item,
  .resume-skills li,
  .job-description,
  .job-description li {
    font-family: 'Segoe UI', Arial, sans-serif !important;
    font-size: 9pt !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    color: black !important;
  }
  
  /* Optimize skill section */
  .resume-skills ul {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1pt 10pt !important;
  }
  
  .resume-skills li {
    padding: 1pt 0 1pt 20pt !important;
  }
  
  /* Optimize job entries */
  .job-entry {
    margin-bottom: 6pt !important;
    padding: 6pt !important;
    background: white !important;
    border: none !important; /* Remove all borders */
    border-radius: 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  
  .job-entry + .job-entry {
    margin-top: 6pt !important;
    padding-top: 6pt !important;
  }
  
  .job-title-line {
    margin-bottom: 2pt !important;
  }
  
  .companyname {
    font-size: 10pt !important;
    margin-bottom: 1pt !important;
    font-weight: bold !important;
    color: black !important;
  }
  
  .jobtitle {
    font-size: 9pt !important;
    font-weight: 600 !important;
    color: black !important;
  }
  
  .job-dates {
    font-size: 8pt !important;
    background: none !important;
    padding: 0 !important;
    color: black !important;
    font-weight: normal !important;
  }
  
  .job-description {
    margin-top: 2pt !important;
  }
  
  .job-description ul {
    margin: 1pt 0 0 !important;
    padding-left: 10pt !important;
  }
  
  .job-description li {
    margin-bottom: 2pt !important;
  }
  
  /* Fix for multi-role jobs */
  .job-role {
    margin-top: 3pt !important;
    padding-top: 2pt !important;
    border-top: 0.5pt dashed #999 !important;
  }
  
  .job-role:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
  }
  
  /* Keep section heading with its content */
  .resume-section-keep-together {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .resume-section-keep-together .resume-section-title {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .resume-recognition-item a {
    color: black !important;
    font-weight: 400 !important;
    text-decoration: none !important;
  }

  .military-service-note {
    font-size: 9pt !important;
    margin-bottom: 6pt !important;
  }

  .military-awards {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .military-awards-heading {
    font-size: 10pt !important;
    margin-bottom: 5pt !important;
    padding-bottom: 2pt !important;
    color: black !important;
    border-bottom: 1pt solid black !important;
  }

  .military-awards-body {
    gap: 3pt !important;
  }

  .military-awards-featured,
  .military-awards-list {
    padding-left: 10pt !important;
  }

  .military-awards-featured li,
  .military-awards-list li {
    font-size: 8.5pt !important;
    margin-bottom: 1pt !important;
    padding-left: 8pt !important;
    color: black !important;
  }

  .military-awards-featured li::before,
  .military-awards-list li::before {
    width: 3pt !important;
    height: 3pt !important;
    background: black !important;
  }

  .military-awards-list {
    columns: 2 !important;
    column-gap: 12pt !important;
  }

  .award-detail {
    color: #333 !important;
  }

  .military-discharge {
    font-size: 8pt !important;
    margin-top: 5pt !important;
    padding-top: 3pt !important;
    border-top: 0.5pt solid #ccc !important;
    color: black !important;
  }
}
