/* Resume pages: readable column; only the top header (name + contact) is centered */
.resume-page {
  text-align: left;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.resume-page > h1:first-of-type,
.resume-page .resume-meta,
.resume-page .resume-meta p {
  text-align: center;
}

.resume-page .resume-meta {
  margin-bottom: 2rem;
}

.resume-page .resume-meta a {
  white-space: normal;
}

/* Body: normal lists (not centered) */
.resume-page ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.resume-page li > ul {
  margin-top: 0.35rem;
}

/* Inline • keyword row under tech heading */
.resume-tech-keywords {
  margin: 0 0 1.25rem;
  line-height: 1.55;
  text-align: left;
  font-size: 0.9375rem;
}

/* Short resume: jump links (screen only; hidden when printing) */
.resume-page:has(.resume-jump) h2[id] {
  scroll-margin-top: 3.25rem;
}

/* Jump bar: centered, sticky */
.resume-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.15rem 0.35rem;
  margin: 0 0 1rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--jtd-theme-border-color, #e1e4e8);
  border-radius: 4px;
  background: var(--jtd-theme-sidebar-color, #f8f9fa);
  font-size: 0.72rem;
  line-height: 1.25;
  position: sticky;
  top: 0;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
}

.resume-jump-label {
  font-weight: 600;
  color: var(--jtd-theme-text-color, inherit);
  margin-right: 0.15rem;
  font-size: 0.72rem;
}

.resume-jump a {
  display: inline-block;
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.72rem;
}

.resume-jump a:hover,
.resume-jump a:focus {
  background: var(--jtd-theme-link-color, #0d47a1);
  color: #fff !important;
  outline: none;
}

/* Print / Save as PDF */
@media print {
  .side-bar,
  .site-header,
  .site-footer,
  .aux-nav,
  .breadcrumb-nav,
  .search-input,
  .main-header,
  .back-to-top,
  .search-overlay,
  #main-header,
  footer,
  #back-to-top,
  .resume-jump {
    display: none !important;
  }

  @page {
    margin: 0.5in 0.75in 0.65in;
    size: letter;
  }

  html,
  body {
    font-size: 11pt !important;
    line-height: 1.35 !important;
    background: #fff !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    font-family: Georgia, "Times New Roman", Times, serif !important;
  }

  .main,
  .main-content-wrap,
  .main-content,
  .content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
  }

  #main-content {
    padding: 0 !important;
  }

  .resume-page {
    max-width: 100%;
    text-align: left !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Match website: header only centered */
  .resume-page > h1:first-of-type,
  .resume-page .resume-meta,
  .resume-page .resume-meta p {
    text-align: center !important;
  }

  .resume-page .resume-meta {
    margin-left: auto;
    margin-right: auto;
    margin-top: 0 !important;
    margin-bottom: 0.4rem !important;
    max-width: 100%;
    word-break: break-word;
  }

  .resume-page .resume-meta a {
    white-space: normal !important;
  }

  .resume-page h2 {
    font-size: 12pt !important;
    font-weight: bold !important;
    margin-top: 0.6rem;
    margin-bottom: 0.15rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.1rem;
    page-break-after: avoid;
    text-align: left !important;
  }

  .resume-tech-keywords {
    font-size: 11pt !important;
    line-height: 1.45 !important;
    margin-top: 0 !important;
    margin-bottom: 0.35rem !important;
  }

  .resume-page h3 {
    font-size: 11pt !important;
    font-weight: bold !important;
    font-style: italic !important;
    margin-top: 0.3rem;
    margin-bottom: 0.1rem;
    page-break-after: avoid;
    text-align: left !important;
  }

  .resume-page p {
    text-align: left !important;
    margin-top: 0.1rem;
    margin-bottom: 0.15rem;
    orphans: 3;
    widows: 3;
  }

  .resume-page ul {
    display: block !important;
    margin: 0.1rem 0 0.25rem !important;
    padding-left: 1.25rem;
    text-align: left !important;
  }

  /* Hide “link to heading” icons */
  .anchor-heading {
    display: none !important;
  }

  .resume-page h1:first-of-type {
    margin-top: 0;
    margin-bottom: 0.05rem;
    font-size: 18pt !important;
    page-break-after: avoid;
  }

  hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 0.35rem 0;
  }

  /*
   * Links: print should read like a paper resume—no link styling or URL tails
   * in the body. Only the contact block (.resume-meta) stays visibly linked.
   */
  .resume-page a[href^="http"]::after,
  .resume-page a[href^="mailto:"]::after,
  .resume-page a[href^="/"]:not([href^="//"])::after {
    content: none !important;
  }

  /*
   * Theme sets `.main-content a { overflow: hidden }` for ellipsis; in print that
   * can clip list/body text in WebKit. Reset inside the resume only.
   */
  .main-content .resume-page a[href] {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    text-decoration: none !important;
    font-weight: inherit !important;
    pointer-events: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* Case study doc links: drop from print (prose is outside the <a> in markup). */
  .main-content .resume-page a[href*="/portfolio/"] {
    display: none !important;
  }

  /* Header only: real links for email, LinkedIn, site */
  .main-content .resume-page .resume-meta a[href] {
    color: #0000cc !important;
    -webkit-text-fill-color: #0000cc !important;
    text-decoration: underline !important;
    pointer-events: auto !important;
    overflow: visible !important;
  }

  .resume-page h1 .anchor-heading[href]::after,
  .resume-page h2 .anchor-heading[href]::after,
  .resume-page h3 .anchor-heading[href]::after {
    content: none !important;
  }

  .resume-page a[href^="#"]::after {
    content: none !important;
  }
}
