/* -----------------------------
   PRINT RESUME STYLES
   Dedicated stylesheet for print-resume.html
   Optimized for Screen & PDF Export
----------------------------- */

/* Base Reset & Typography */
body {
  background-color: #ffffff;
  color: #1a1a1a;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
}

/* Header Section (Screen View) */
.resume-header {
  text-align: left; /* Align left */
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.75rem;
  max-width: 100%;
}

.resume-header h1 {
  font-size: 2.2rem;
  margin: 0 0 0.25rem 0;
  color: #000;
  font-weight: 700;
  text-transform: none;
  line-height: 1.2;
}

/* Compact Intro Block */
.intro-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.95rem;
  color: #444;
  margin-top: 0;
}

.intro-block .email {
  margin: 0;
  font-weight: 500;
  color: #333;
}

.intro-block .current-title {
  margin: 0;
  font-weight: 600;
  color: #555;
  font-style: italic;
}

/* Summary Section */
.summary-section {
  margin-bottom: 1.5rem;
  text-align: left;
}

.summary-text {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
  margin: 0;
}

/* General Section Styling */
section {
  margin-bottom: 2rem;
  page-break-inside: avoid;
}

section h2 {
  font-size: 1.4rem;
  color: #000;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ddd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Job Section */
.job-section {
  margin-bottom: 1.5rem;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.job-header h2 {
  font-size: 1.25rem;
  margin: 0;
  border: none;
  padding: 0;
  color: #222;
}

.job-period {
  font-size: 0.95rem;
  color: #666;
  font-weight: 600;
  white-space: nowrap;
}

.company {
  font-size: 1rem;
  color: #555;
  margin: 0 0 0.75rem 0;
  font-style: italic;
}

/* Accomplishments List */
.accomplishments-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.accomplishments-list li {
  margin-bottom: 0.6rem;
  padding-left: 1.4rem;
  position: relative;
  color: #333;
  text-align: justify;
}

.accomplishments-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #8b5cf6;
  font-weight: bold;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.skill-item {
  background: #f4f4f4;
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  border-left: 3px solid #8b5cf6;
}

/* Tech Stack Tags */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-tags span {
  background: #8b5cf6;
  color: white;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Footer */
.resume-footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
  color: #666;
}

/* -----------------------------
   PRINT BUTTON (Screen Only)
----------------------------- */
.print-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #8b5cf6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.2s, transform 0.1s;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.print-btn:hover {
  background: #7c3aed;
  transform: translateY(-1px);
}

.print-btn:active {
  transform: translateY(0);
}

.print-btn::before {
  content: "🖨️";
  font-size: 1rem;
}

.print-tip {
  text-align: center;
  color: #666;
  font-size: 0.8rem;
  margin-top: 10px;
}

/* -----------------------------
   PRINT MEDIA QUERIES (CONSOLIDATED)
   Hides buttons/tips and sets margins
----------------------------- */
@page {
  size: letter;
  margin: 0.25in; /* This is the ONLY margin that matters now */
}

@media print {
  /* 1. Completely remove button/tip from flow */
  .print-btn,
  .print-tip {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    top: -9999px !important;
    height: 0 !important;
    width: 0 !important;
  }

  /* 2. CRITICAL: Remove ALL body padding/margin in print */
  body.print-page {
    padding: 0 !important; /* REMOVE all padding */
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: white !important;
    color: black !important;
    font-size: 11pt;
    position: static !important;
    overflow: visible !important;
  }

  /* 3. Ensure the first element (header) has no top margin */
  .resume-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* 4. Ensure sections don't add extra space */
  section {
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
    page-break-inside: avoid;
  }

  /* 5. Force content to respect page boundaries */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box !important;
  }
}