:root {
  --text-color: #333;
  --heading-color: #1a202c;
  --link-color: #3182ce;
  --bg-color: #edf2f7;
  --paper-bg: #fff;
  --border-color: #e2e8f0;
  --accent-color: #2d3748;
  --text-muted: #718096;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  padding: 2rem;
  -webkit-font-smoothing: antialiased;
}

.page-container {
  max-width: 790px;
  margin: 0 auto;
  background: var(--paper-bg);
  padding: 4rem 5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  position: relative;
}

.print-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: var(--paper-bg);
  color: var(--accent-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.print-btn:hover {
  background-color: var(--bg-color);
  border-color: #cbd5e0;
}

h1, h2, h3 {
  color: var(--heading-color);
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

ul.no-bullet {
  list-style-type: none;
  padding-left: 0;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.resume-header {
  margin-bottom: 2.5rem;
}

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

.job {
  margin-bottom: 1.5rem;
}

.job:last-child {
  margin-bottom: 0;
}

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

.job-title {
  font-weight: 500;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.job-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.education-list li,
.cert-list li {
  margin-bottom: 0.5rem;
}

.skills-section {
  display: block;
}

.skills-block h2 {
  margin-top: 1.5rem;
}

@media screen and (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .page-container {
    padding: 2rem 1.5rem;
  }

  .print-btn {
    position: static;
    width: 100%;
    justify-content: center;
    margin-bottom: 2rem;
  }

  h1 {
    font-size: 2rem;
  }

  .job-header {
    flex-direction: column;
  }

  .skills-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .skills-block h2 {
    margin-top: 1rem;
  }
}

@media print {
  body {
    background-color: transparent;
    padding: 0;
    font-size: 10pt;
  }

  .page-container {
    max-width: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }

  .print-btn {
    display: none !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  h1 {
    margin-bottom: 0.1rem;
  }

  h2 {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
  }

  .job {
    margin-bottom: 1.25rem;
  }

  p, ul {
    margin-bottom: 0.75rem;
  }

  .resume-header {
    margin-bottom: 1.5rem;
  }

  @page {
    margin: 0.7in;
    size: letter;
  }

  @supports (background: -webkit-named-image(i)) {
    @page {
      margin: 0.5in;
    }
  }

  .job, .skills-section {
    page-break-inside: avoid;
  }
}
