/* Resume document and recruiter overlays share the portfolio's slate/blue theme. */
.header-fast-track {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px; border: 1px solid #0f172a; border-radius: 999px;
  background: #0f172a; color: #ffffff; font-size: 12px; font-weight: 700;
  line-height: 1.5; white-space: nowrap;
}
.header-fast-track:hover { background: #1e293b; color: white; }
.header-fast-track i { color: #facc15; font-size: 16px; }
.portfolio-overlay-open { overflow: hidden; }
.portfolio-dialog {
  padding: 0; color: #334155; background: white; border: 1px solid #e2e8f0;
  box-shadow: 0 24px 80px rgb(15 23 42 / 22%); overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
}
.portfolio-dialog:not([open]) { display: none; }
.portfolio-dialog[open] { display: flex; flex-direction: column; }
.portfolio-dialog::backdrop { background: rgb(15 23 42 / 60%); backdrop-filter: blur(5px); }
.resume-dialog { width: min(1120px, calc(100% - 48px)); max-width: none; height: min(900px, 92dvh); max-height: 92dvh; margin: auto; border-radius: 16px; }
.briefing-dialog { position: fixed; inset: 0 0 0 auto; width: min(610px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 0; border-width: 0 0 0 1px; }
.overlay-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 26px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; flex-shrink: 0; }
.overlay-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.overlay-title>i { font-size: 21px; color: #1d4ed8; }
.overlay-title h2 { margin: 0; color: #0f172a; font-size: 17px; font-weight: 700; line-height: 1.4; }
.overlay-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.overlay-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 13px; background: white; color: #334155; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 12px; font-weight: 600; line-height: 1.5; text-align: center; transition: background .15s; }
.overlay-button:hover { color: #0f172a; background: #f1f5f9; }
.overlay-button:disabled { opacity: .5; cursor: wait; }
.overlay-button i { flex-shrink: 0; font-size: 15px; }
.overlay-button-dark { background: #0f172a; color: white; border-color: #0f172a; }
.overlay-button-dark:hover { background: #1e293b; color: white; }
.overlay-button-blue { background: #2563eb; border-color: #2563eb; color: white; }
.overlay-button-blue:hover { background: #1d4ed8; color: white; }
.overlay-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; flex-shrink: 0; color: #64748b; background: transparent; border: 0; border-radius: 8px; font-size: 18px; }
.overlay-close:hover { color: #0f172a; background: #e2e8f0; }
.overlay-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.overlay-feedback { padding: 8px 26px; background: #eff6ff; color: #1e40af; font-size: 12px; flex-shrink: 0; }
.overlay-feedback:empty { display: none; }
.overlay-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 26px; border-top: 1px solid #e2e8f0; background: #f8fafc; flex-shrink: 0; }
.resume-viewer-footer { font-size: 12px; color: #64748b; }
.overlay-text-button { padding: 3px 0; border: 0; background: none; color: #1d4ed8; font-size: 13px; font-weight: 600; }
.overlay-text-button:hover { text-decoration: underline; }
.resume-load-state { padding: 65px 28px; text-align: center; font-size: 15px; }
.resume-load-state h3 { font-size: 20px; color: #0f172a; }
.resume-load-state>div { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.manual-copy { margin: 20px; padding: 18px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
.manual-copy label { width: 100%; color: #1e40af; font-size: 13px; font-weight: 600; }
.manual-copy textarea { display: block; width: 100%; margin-top: 8px; padding: 10px; color: #0f172a; background: white; border: 1px solid #94a3b8; border-radius: 5px; font-size: 13px; resize: vertical; }

/* One canonical resume document is used by the page, viewer, copy, and print. */
.resume-page { background: #f8fafc; }
.resume-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.resume-page-heading h1 { margin: 0; }
.resume-page-document { padding-top: 36px; padding-bottom: 60px; }
.resume-page-document>.resume-paper { border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: var(--theme-shadow); }
.resume-paper { padding: 40px 52px; color: #334155; background: white; font-size: 14px; line-height: 1.8; }
.resume-paper-heading { padding-bottom: 24px; border-bottom: 2px solid #0f172a; margin-bottom: 30px; text-align: center; }
.resume-paper-heading h1 { margin: 0 0 8px; font-size: 35px; font-weight: 800; color: #0f172a; letter-spacing: -.04em; }
.resume-paper .resume-paper-role { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: #1d4ed8; }
.resume-paper-contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; font-size: 12px; }
.resume-paper-contacts a { overflow-wrap: anywhere; }
.resume-paper .resume-paper-location { margin: 12px 0 0; color: #64748b; font-size: 13px; }
.resume-paper .resume-paper-section { margin: 0 0 28px; padding: 0; overflow: visible; background: white; color: #334155; }
.resume-paper .resume-paper-section:last-child { margin-bottom: 0; }
.resume-paper-section>h2 { margin: 0 0 12px; padding-bottom: 6px; color: #0f172a; border-bottom: 1px solid #e2e8f0; font-size: 13px; font-weight: 800; line-height: 1.5; letter-spacing: .035em; text-transform: uppercase; }
.resume-paper h3 { font-size: 15px; line-height: 1.5; font-weight: 700; color: #0f172a; margin: 0 0 4px; }
.resume-paper p { margin: 0 0 10px; }
.resume-paper ul { margin: 8px 0 0; padding-left: 20px; }
.resume-paper ul li { margin: 5px 0; font-size: 14px; }
.resume-paper .resume-entry { margin-bottom: 20px; }
.resume-entry-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
.resume-date-label { font-size: 12px; color: #64748b; }
.resume-paper em { font-style: normal; color: #64748b; font-size: 12px; }

/* The briefing follows the reference's right-side sheet and persistent actions. */
.briefing-toolbar { padding: 23px; gap: 16px; }
.briefing-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.briefing-heading-icon { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; color: #1d4ed8; background: #dbeafe; border: 1px solid #bfdbfe; border-radius: 10px; font-size: 22px; }
.briefing-heading h2 { margin: 0 0 3px; font-size: 17px; font-weight: 750; color: #0f172a; line-height: 1.4; }
.briefing-heading p { margin: 0; font-size: 12px; color: #64748b; }
.briefing-content { padding: 24px; }
.candidate-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; }
.briefing-label { display: block; color: #1d4ed8; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .045em; margin-bottom: 3px; }
.candidate-status strong { display: block; color: #0f172a; font-size: 14px; line-height: 1.5; }
.candidate-employer { display: block; color: #64748b; font-size: 11px; margin-top: 3px; }
.candidate-status .overlay-button { flex-shrink: 0; font-size: 11px; padding: 8px 10px; }
.briefing-section { margin-top: 28px; }
.briefing-section h3 { color: #475569; font-size: 11px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; margin: 0 0 12px; line-height: 1.6; }
.briefing-role-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.briefing-role-tags span { display: inline-block; padding: 4px 10px; border: 1px solid #e2e8f0; border-radius: 6px; background: #f1f5f9; color: #334155; font-size: 12px; font-weight: 600; }
.briefing-highlights { display: grid; gap: 12px; }
.briefing-highlight { display: flex; align-items: flex-start; gap: 11px; padding: 18px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.briefing-highlight>i { color: #059669; font-size: 17px; flex-shrink: 0; line-height: 1.5; }
.briefing-highlight h4 { color: #0f172a; font-size: 14px; line-height: 1.5; font-weight: 700; margin: 0 0 6px; }
.briefing-highlight p { color: #64748b; font-size: 12px; line-height: 1.85; margin: 0; }
.briefing-questions { border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; background: #f8fafc; }
.briefing-questions h3 { display: flex; gap: 8px; align-items: center; color: #1d4ed8; }
.briefing-questions ul { padding-left: 18px; margin: 0; }
.briefing-questions li { font-size: 12px; color: #475569; margin: 0 0 9px; line-height: 1.8; }
.briefing-questions li:last-child { margin-bottom: 0; }
.briefing-contact { margin: 24px 0 0; border-top: 1px solid #e2e8f0; padding-top: 16px; }
.briefing-contact>div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 16px; margin: 8px 0; font-size: 12px; }
.briefing-contact dt { color: #64748b; font-weight: 600; }
.briefing-contact dd { margin: 0; color: #334155; overflow-wrap: anywhere; }
.briefing-footer { padding: 17px 22px; gap: 12px; }
.briefing-footer .overlay-button { flex: 1; min-height: 44px; padding: 10px 12px; }

@media (prefers-reduced-motion: no-preference) {
  .resume-dialog[open] { animation: resume-appear .18s ease-out; }
  .briefing-dialog[open] { animation: briefing-appear .22s ease-out; }
  @keyframes resume-appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @keyframes briefing-appear { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 767px) {
  .header-fast-track { padding: 8px 11px; font-size: 11px; gap: 6px; }
  .header-fast-track i { font-size: 14px; }
  .resume-dialog { width: calc(100% - 20px); height: 94dvh; max-height: 94dvh; border-radius: 12px; }
  .overlay-toolbar { padding: 14px 16px; gap: 12px; flex-wrap: wrap; }
  .overlay-title { padding-right: 36px; }
  .overlay-title h2 { font-size: 15px; }
  .resume-dialog .overlay-actions { width: 100%; gap: 8px; }
  .resume-dialog .overlay-close { position: absolute; top: 9px; right: 9px; }
  .overlay-button { font-size: 11px; padding: 8px 11px; }
  .overlay-feedback { padding: 8px 16px; }
  .overlay-footer { padding: 12px 16px; }
  .resume-paper { padding: 28px 22px; font-size: 13px; }
  .resume-paper-heading h1 { font-size: 29px; }
  .resume-paper .resume-paper-role { font-size: 13px; }
  .resume-paper-contacts { gap: 5px 13px; font-size: 11px; }
  .resume-paper ul li { font-size: 13px; }
  .resume-paper .resume-paper-section { margin-bottom: 24px; }
  .resume-paper h3 { font-size: 14px; }
  .resume-page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .resume-page-document { padding: 20px 12px 36px; }
  .briefing-toolbar { flex-wrap: nowrap; padding: 18px 16px; gap: 9px; }
  .briefing-heading { gap: 10px; }
  .briefing-heading-icon { width: 35px; height: 35px; font-size: 20px; }
  .briefing-heading h2 { font-size: 15px; }
  .briefing-heading p { font-size: 11px; }
  .briefing-content { padding: 20px 16px; }
  .candidate-status { align-items: flex-start; flex-direction: column; padding: 16px; gap: 12px; }
  .candidate-status strong { font-size: 14px; }
  .briefing-footer { gap: 8px; padding: 12px; }
  .briefing-footer .overlay-button { font-size: 11px; gap: 6px; padding: 9px 8px; }
}
@media (max-width: 479px) {
  .header .brand-copy small { display: none; }
  .header .brand-copy strong { font-size: 12px; }
  .header .brand { gap: 7px; }
  .header .header-inner { gap: 8px; }
  .header .header-actions { gap: 7px; }
  .header-fast-track { padding: 8px 10px; }
}
@media (max-width: 359px) {
  .header .brand-copy { display: none; }
  .resume-paper { padding: 24px 16px; }
  .resume-viewer-footer { font-size: 11px; }
  .overlay-text-button { font-size: 12px; }
}

@media print {
  body.resume-viewer-open { overflow: visible !important; }
  body.resume-viewer-open>*:not(#resume-viewer) { display: none !important; }
  body.resume-viewer-open #resume-viewer {
    display: block !important; position: static !important; inset: auto !important;
    width: 100% !important; max-width: none !important; height: auto !important;
    max-height: none !important; margin: 0 !important; padding: 0 !important;
    overflow: visible !important; border: 0 !important; box-shadow: none !important;
    border-radius: 0 !important; transform: none !important;
  }
  #resume-viewer::backdrop { background: transparent; backdrop-filter: none; }
  #resume-viewer .overlay-toolbar, #resume-viewer .overlay-footer,
  #resume-viewer .overlay-feedback, .manual-copy, .resume-page .page-title { display: none !important; }
  #resume-viewer .overlay-scroll { display: block; overflow: visible !important; height: auto; max-height: none; }
  .resume-page-document { max-width: none; padding: 0; }
  .resume-paper, .resume-page-document>.resume-paper { padding: 0; border: 0; box-shadow: none; font-size: 10pt; line-height: 1.5; }
  .resume-paper-heading { margin-bottom: 18px; padding-bottom: 15px; }
  .resume-paper-heading h1 { font-size: 24pt; }
  .resume-paper .resume-paper-role { font-size: 11pt; }
  .resume-paper-contacts, .resume-paper .resume-paper-location { font-size: 9pt; }
  .resume-paper-section>h2 { font-size: 10pt; break-after: avoid; }
  .resume-paper h3 { font-size: 10pt; break-after: avoid; }
  .resume-paper ul li { font-size: 10pt; }
  .resume-paper .resume-entry { margin-bottom: 14px; break-inside: avoid; }
  .resume-paper .resume-paper-section { margin-bottom: 18px; }
  .resume-paper a { color: #0f172a; text-decoration: none; }
}
