/* Keep markdown tokens present for PDF text extraction while visually hidden */
:root {
  --md-strong-weight: 600;
  --md-strong-color: #111;
  --tc-bullet-title-color: #111;
}

.markdown-syntax {
  font-size: 0 !important;
  line-height: 0 !important;
  display: inline !important;
  width: 0 !important;
  overflow: hidden !important;
  color: transparent !important;
}

.md-strong {
  font-weight: var(--md-strong-weight, 600) !important;
  color: var(--md-strong-color, #111) !important;
}

.md-em {
  font-style: italic !important;
  color: inherit !important;
}

/* Screen-mode contact card layout (only when index.css is active) */
@media screen {
  :root[data-print-preview="true"][data-theme="light"] {
    --md-strong-color: #1a2040;
    --tc-bullet-title-color: #1a2040;
  }

  :root[data-print-preview="true"][data-theme="dark"] {
    --md-strong-color: #eaf0ff;
    --tc-bullet-title-color: #eaf0ff;
  }

  :root[data-print-preview="true"] body {
    padding: 32px !important;
  }

  :root[data-print-preview="true"] main {
    max-width: 8.5in;
    margin: 0 auto !important;
    background: inherit;
  }
}

@page {
  size: letter;
  margin: 0.45in;
}

/* Print preview toggle UI (screen only) */
.view-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 3000;
  border: 1px solid #cfd6e6;
  background: #ffffff;
  color: #1a2040;
  border-radius: 999px;
  padding: 10px 16px;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(9, 16, 36, 0.18);
}

.view-toggle:hover {
  border-color: #1d6ef5;
  color: #1d6ef5;
}

/* Hide toggle during actual print, but keep other styles active */
@media print {
  .view-toggle {
    display: none !important;
  }
}

/* Print/preview styles - NOT wrapped in @media so they apply to both print and preview toggle */
* {
  box-shadow: none !important;
  text-shadow: none !important;
  animation: none !important;
  transition: none !important;
  background-image: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  color: #111 !important;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

body {
  background: #fff !important;
  font-size: 12px;
  line-height: 1.3;
}

a,
a:visited {
  color: #111 !important;
  text-decoration: none;
}

@media screen {
  :root[data-print-preview="true"][data-theme="dark"] body {
    background: #0d1117 !important;
    color: #d4dff5 !important;
  }

  :root[data-print-preview="true"][data-theme="light"] body {
    background: #f5f7fc !important;
    color: #1a2040 !important;
  }

  :root[data-print-preview="true"] a,
  :root[data-print-preview="true"] a:visited {
    color: #4d8ff7 !important;
    text-decoration: underline !important;
  }

  :root[data-print-preview="true"] #contact a,
  :root[data-print-preview="true"] #contact a:visited,
  :root[data-print-preview="true"] #contact .contact-card,
  :root[data-print-preview="true"] #contact .contact-card:visited {
    text-decoration: none !important;
  }

  :root[data-print-preview="true"][data-theme="dark"] h1,
  :root[data-print-preview="true"][data-theme="dark"] h2,
  :root[data-print-preview="true"][data-theme="dark"] h3,
  :root[data-print-preview="true"][data-theme="dark"] p,
  :root[data-print-preview="true"][data-theme="dark"] li,
  :root[data-print-preview="true"][data-theme="dark"] strong,
  :root[data-print-preview="true"][data-theme="dark"] .tc-date,
  :root[data-print-preview="true"][data-theme="dark"] .tc-company {
    color: #d4dff5 !important;
  }

  :root[data-print-preview="true"][data-theme="dark"] h2 {
    border-bottom-color: #2a3558 !important;
  }
}

@media print {
  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  .markdown-syntax {
    font-size: 1px !important;
    width: auto !important;
    overflow: visible !important;
    color: #ffffff !important;
  }

  a,
  a:visited {
    color: #1d6ef5 !important;
    text-decoration: underline !important;
  }

  #contact a,
  #contact a:visited,
  #contact .contact-card,
  #contact .contact-card:visited {
    text-decoration: none !important;
  }

  h1,
  h2,
  h3,
  p,
  li,
  strong,
  em,
  .tc-date,
  .tc-company,
  .achievement-year,
  .cert-badge {
    color: #111 !important;
  }

  h2 {
    border-bottom-color: #d9d9d9 !important;
  }
}

a[href]::after {
  content: none;
}

.hero-copy-line,
.hero-print-links {
  display: inline !important;
}
.hero-copy-line,
.hero-print-contact,
.hero-print-links {
  display: inline !important;
}

.hero-copy-strong strong {
  display: inline !important;
}

.hero-bg,
.hero-badge,
.hero-cta,
.achievement-icon,
.skill-icon,
.timeline-marker,
.cc-icon,
.contact-cta-box,
.brand-icon,
.section-tag {
  display: none !important;
}

#navbar,
#contact {
  display: none !important;
}

.container,
.timeline,
.timeline-item,
.timeline-card,
.recognition-quotes,
.recognition-quote,
.achievements-grid,
.achievement-card,
.skills-grid,
.skill-card,
.edu-grid,
.edu-item,
.cert-list,
.cert-badge,
.contact-grid,
.contact-cards,
.contact-card,
.tc-header,
.section-header {
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.tc-meta {
  display: block;
  margin: 2px 0 6px;
  font-size: 11px;
}

.tc-meta .tc-date {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  font-style: italic;
}

.tc-meta .tc-sep {
  font-style: normal;
}

.tc-meta .tc-date::before {
  content: none;
  font-style: normal;
}

.contact-card > div:last-child {
  display: inline !important;
}

.contact-card strong,
.contact-card span {
  display: inline !important;
  margin-bottom: 0 !important;
}

.contact-card strong::after {
  content: ": ";
}

.tc-bullets li::before,
.skill-card ul li::before,
.achievement-card::before,
.contact-cta-box::before {
  content: none !important;
}

.tc-bullets li,
.skill-card ul li {
  padding-left: 0 !important;
}

.edu-item,
.cert-badge {
  padding-left: 0 !important;
}

.tc-bullets li .tc-bullet-title {
  color: var(--tc-bullet-title-color, #111) !important;
  font-weight: 600 !important;
}

.recognition-quotes {
  display: block !important;
}

.recognition-quote {
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: 0 !important;
  break-inside: avoid;
}

.recognition-quote p {
  margin: 0 !important;
}

#education,
#recognition {
  break-inside: avoid-page;
  page-break-inside: avoid;
}

#education .edu-grid,
#education .edu-col,
#education .edu-list,
#education .cert-list {
  display: block !important;
}

#education .edu-list,
#education .cert-list {
  margin: 0 0 10px !important;
  padding-left: 0 !important;
  list-style: none !important;
}

#education .edu-item,
#education .cert-badge {
  break-inside: avoid;
}

main {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 24px;
}

h2 {
  margin: 18px 0 8px;
  padding-bottom: 4px;
  font-size: 16px;
  border-bottom: 1px solid #d9d9d9;
}

h3 {
  margin: 12px 0 3px;
  font-size: 13px;
}

p {
  margin: 0 0 8px;
  font-size: 12px;
}

ul {
  margin: 0 0 10px;
}

li {
  margin: 0 0 5px;
  font-size: 12px;
}

h2:nth-of-type(3) + h3,
h2:nth-of-type(3) + h3 + ul,
h2:nth-of-type(3) + h3 + ul + h3,
h2:nth-of-type(3) + h3 + ul + h3 + ul,
h2:nth-of-type(3) + h3 + ul + h3 + ul + h3,
h2:nth-of-type(3) + h3 + ul + h3 + ul + h3 + ul,
h2:nth-of-type(3) + h3 + ul + h3 + ul + h3 + ul + h3,
h2:nth-of-type(3) + h3 + ul + h3 + ul + h3 + ul + h3 + ul,
h2:nth-of-type(3) + h3 + ul + h3 + ul + h3 + ul + h3 + ul + h3,
h2:nth-of-type(3) + h3 + ul + h3 + ul + h3 + ul + h3 + ul + h3 + ul,
h2:nth-of-type(3) + h3 + ul + h3 + ul + h3 + ul + h3 + ul + h3 + ul + h3,
h2:nth-of-type(3) + h3 + ul + h3 + ul + h3 + ul + h3 + ul + h3 + ul + h3 + ul {
  break-inside: avoid;
}

h2:nth-of-type(6) + ul,
h2:nth-of-type(7) + ul {
  columns: 2;
  column-gap: 24px;
}

h2:nth-of-type(6) + ul li,
h2:nth-of-type(7) + ul li {
  break-inside: avoid;
}
