/**
 * Executive Resume CSS
 * Clean, print-optimized styling matching executive format
 */

/* ===== BASE STYLES ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  font-family: Arial, sans-serif;
  font-size: 10pt;
  line-height: 1.3;
  color: #000;
  background: #f5f5f5;
}

/* ===== PAGE CONTROLS (screen only) ===== */
.page-controls {
  max-width: 8.5in;
  margin: 0 auto 1rem auto;
  padding: 1rem;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.controls-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn-back, .btn-print {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-back {
  background: #f0f0f0;
  color: #333;
}

.btn-back:hover {
  background: #e0e0e0;
}

.btn-print {
  background: #1a365d;
  color: white;
  font-weight: 600;
}

.btn-print:hover {
  background: #0f2342;
}

.print-tip {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #856404;
  text-align: center;
}

/* ===== RESUME PAGE ===== */
.resume-page {
  max-width: 8.5in;
  margin: 0 auto;
  padding: 1in 0.75in;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== HEADER ===== */
.resume-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #999;
}

.resume-name {
  font-family: 'Futura', 'Trebuchet MS', 'Arial Narrow', sans-serif;
  font-size: 24pt;
  font-weight: 500;
  color: #1a365d;
  margin: 0 0 0.15rem 0;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.resume-headline {
  font-size: 10pt;
  color: #000;
  margin: 0 0 0.15rem 0;
  line-height: 1.3;
}

.resume-contact {
  font-size: 10pt;
  color: #000;
  margin: 0;
  line-height: 1.3;
}

.resume-contact a {
  color: #000;
  text-decoration: none;
}

/* ===== SECTIONS ===== */
.resume-section {
  margin: 0 0 0.75rem 0;
  page-break-inside: avoid;
}

.section-title {
  font-family: 'Futura', 'Trebuchet MS', 'Arial Narrow', sans-serif;
  font-size: 14pt;
  font-weight: 500;
  color: #1a365d;
  margin: 0 0 0.3rem 0;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.section-content {
  margin: 0;
}

.section-content p {
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
}

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

/* ===== EXECUTIVE SNAPSHOT ===== */
.snapshot-tagline {
  margin-bottom: 0.4rem;
}

.snapshot-description {
  margin-bottom: 0.4rem;
}

/* ===== TARGETED HIGHLIGHTS ===== */
.highlight-item {
  margin: 0 0 0.3rem 0;
}

/* ===== EXPERIENCE ===== */
.experience-item {
  margin: 0 0 0.6rem 0;
  page-break-inside: avoid;
}

.experience-header {
  margin-bottom: 0.2rem;
}

.experience-title {
  font-size: 10pt;
  font-weight: bold;
  margin: 0 0 0.05rem 0;
  line-height: 1.3;
}

.experience-meta {
  font-size: 10pt;
  color: #000;
  margin: 0;
  line-height: 1.3;
}

.experience-bullets {
  margin: 0.2rem 0 0 0;
  padding: 0 0 0 1.1rem;
  list-style-type: disc;
  list-style-position: outside;
}

.experience-bullets li {
  margin: 0 0 0.2rem 0;
  padding: 0;
  line-height: 1.3;
}

/* ===== SKILLS ===== */
.skill-paragraph {
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.skill-paragraph:last-child {
  margin-bottom: 0;
}

/* ===== EDUCATION ===== */
.education-item {
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.education-item:last-child {
  margin-bottom: 0;
}

/* ===== PRINT STYLES ===== */
@media print {
  @page {
    size: letter;
    margin: 0.5in 0.75in;
    /* Remove browser headers/footers */
    margin-top: 0.5in;
    margin-bottom: 0.5in;
  }

  /* Chrome/Edge - hide headers and footers */
  @page {
    margin-header: 0;
    margin-footer: 0;
  }

  body {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }

  /* Hide controls completely */
  .no-print,
  .page-controls {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Resume page - remove all wrapper padding/margin */
  .resume-page {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  /* Header */
  .resume-header {
    border-bottom: 1px solid #999;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
  }

  .resume-name {
    font-size: 22pt;
    color: #1a365d;
    margin: 0 0 0.1rem 0;
  }

  .resume-headline {
    margin: 0 0 0.1rem 0;
  }

  .resume-contact {
    margin: 0;
  }

  /* Sections - tighter spacing */
  .resume-section {
    margin: 0 0 0.6rem 0;
    page-break-inside: auto;
  }

  .section-title {
    font-size: 13pt;
    color: #1a365d;
    margin: 0 0 0.25rem 0;
    page-break-after: avoid;
  }

  .section-content {
    margin: 0;
  }

  .section-content p {
    margin: 0 0 0.3rem 0;
  }

  /* Executive Snapshot & Highlights - reduce spacing */
  .snapshot-tagline,
  .snapshot-description {
    margin-bottom: 0.3rem;
  }

  .highlight-item {
    margin: 0 0 0.25rem 0;
  }

  /* Experience - allow strategic breaks */
  .experience-item {
    margin: 0 0 0.5rem 0;
    page-break-inside: auto;
  }

  .experience-header {
    margin-bottom: 0.15rem;
  }

  .experience-title {
    margin: 0 0 0.05rem 0;
  }

  .experience-meta {
    margin: 0;
  }

  .experience-bullets {
    margin: 0.15rem 0 0 0;
    padding-left: 1.1rem;
  }

  .experience-bullets li {
    margin: 0 0 0.15rem 0;
  }

  /* Skills - keep together if possible */
  .skill-paragraph {
    margin: 0 0 0.4rem 0;
    page-break-inside: avoid;
  }

  /* Education */
  .education-item {
    margin: 0 0 0.2rem 0;
  }

  /* Links */
  a {
    color: #000;
    text-decoration: none;
  }

  /* Ensure colors print */
  .resume-name,
  .section-title {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color: #1a365d !important;
  }

  /* Orphan/widow control */
  p, li {
    orphans: 2;
    widows: 2;
  }

  h2, .section-title {
    orphans: 3;
    widows: 3;
  }
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 9in) {
  body {
    padding: 10px;
  }

  .resume-page {
    padding: 0.5in;
  }
}
