/* ============================================================
   PRINT / ATS STYLES
   ============================================================ */
@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
  }
  :root {
    --primary: #0077b6;
    --secondary: #00875a;
    --accent: #6d28d9;
    --text-primary: #111;
    --text-secondary: #333;
    --text-muted: #555;
  }
  body {
    background: #fff !important;
    color: #111 !important;
    font-size: 10.5pt;
    line-height: 1.4;
    padding: 0;
  }
  #particle-canvas,
  .data-stream,
  .orb,
  .scroll-indicator,
  .privacy-banner,
  .early-toggle-btn {
    display: none !important;
  }
  body.has-banner {
    padding-top: 0 !important;
  }
  .screen-only {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .contact-chips.print-only {
    display: flex !important;
  }
  .section-header .num .print-only {
    display: inline !important;
  }
  .container {
    max-width: 100%;
    padding: 0;
  }
  section {
    opacity: 1 !important;
    transform: none !important;
    padding: 10px 0;
    page-break-inside: avoid;
  }
  .hero {
    min-height: auto;
    padding: 0 0 6px;
    text-align: left;
    align-items: flex-start;
  }
  .hero-name {
    font-size: 22pt;
    background: none;
    -webkit-text-fill-color: var(--primary);
    color: var(--primary);
  }
  .hero-title {
    font-size: 12pt;
    color: var(--accent);
    text-shadow: none;
  }
  .hero-title .cursor {
    display: none;
  }
  .hero-location {
    font-size: 10pt;
    color: #444;
    margin-bottom: 8px;
  }
  .hero-summary {
    font-size: 10.5pt;
    color: #222;
    max-width: 100%;
    margin-bottom: 10px;
  }
  .contact-chips {
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
  }
  .chip {
    border: 1px solid rgba(0, 119, 182, 0.2);
    background: rgba(0, 119, 182, 0.04);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 9pt;
    color: #333;
  }
  .chip.private-info {
    font-style: normal;
    color: #333;
    pointer-events: auto;
  }
  .section-header {
    margin-bottom: 8px;
  }
  .section-header h2 {
    font-size: 13pt;
    color: var(--primary);
  }
  .section-header .line {
    background: linear-gradient(90deg, var(--primary), transparent);
  }
  .section-header .num {
    color: var(--accent);
  }
  .timeline::before {
    background: #ccc;
  }
  .tl-card,
  .tl-card.current,
  .tl-card.edu {
    background: none;
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 6px 0;
    margin-bottom: 6px;
    border-radius: 0;
    margin-left: 0;
  }
  .tl-card::before,
  .tl-card.current::before,
  .tl-card.edu::before {
    display: none;
  }
  .tl-card:hover {
    transform: none;
  }
  .tl-badge {
    font-size: 7pt;
    padding: 1px 6px;
    margin-bottom: 4px;
  }
  .tl-badge.work,
  .tl-badge.current-badge {
    background: rgba(0, 119, 182, 0.1);
    color: var(--primary);
  }
  .tl-badge.education {
    background: rgba(109, 40, 217, 0.1);
    color: var(--accent);
  }
  .tl-dates {
    color: #555;
    font-size: 9pt;
  }
  .tl-role {
    font-size: 11pt;
  }
  .tl-card.current .tl-role {
    font-size: 11pt;
    color: var(--primary);
  }
  .tl-company {
    font-size: 10pt;
    color: #222;
  }
  .tl-card.current .tl-company {
    font-size: 10pt;
    color: var(--primary);
  }
  .tl-location {
    font-size: 9pt;
  }
  .tl-previous {
    font-size: 8.5pt;
  }
  .tl-desc {
    font-size: 9.5pt;
  }
  .tl-achievements li {
    font-size: 9.5pt;
  }
  .tl-achievements .metric {
    color: var(--secondary);
    font-weight: 700;
  }
  .tl-institution {
    font-size: 9.5pt;
  }
  .tl-edu-detail {
    font-size: 9pt;
  }

  /* Flat timeline print styles */
  /* Horizontal header: company (left, flex-grow) | dates (right) */
  .tl-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12pt;
    margin-bottom: 1pt;
  }
  .tl-header .tl-company {
    flex: 1;
    min-width: 0;
    font-size: 11pt;
    font-weight: 700;
    color: #111;
  }
  .tl-header .tl-dates {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Sub-header: role | sep | location */
  .tl-subheader {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4pt;
    margin-top: 1pt;
    font-size: 10pt;
  }
  .tl-subheader .tl-role {
    font-weight: 600;
  }
  .tl-clients {
    display: none;
  }
  .tl-badge {
    display: none;
  }
  .tl-logo {
    height: 12pt;
    width: auto;
    vertical-align: -2pt;
    margin-right: 3pt;
  }

  /* Cert section print styles */
  .tl-card.cert .tl-header .tl-company {
    font-size: 10pt;
    color: #b45309;
  }
  .tl-card.cert .tl-edu-detail {
    font-size: 9pt;
    color: #444;
    margin-top: 2pt;
  }

  /* Same-org group (career) — visual grouping only, entries stay unnested */
  .entry-group {
    border-left: 1.5pt solid #ccc;
    padding-left: 8pt;
    margin-left: -10pt;
  }
  .entry-group .tl-card {
    border-bottom: none;
  }
  .entry-group .tl-card:last-child {
    border-bottom: 1pt solid #ddd;
  }
  .entry-group .tl-card:not(:first-child) .tl-logo {
    display: none;
  }

  /* Plain bullet override for non-coding roles */
  .tl-achievements.plain li::before {
    content: "•";
    font-family: inherit;
    color: #888;
    font-weight: normal;
  }

  /* tier-noncurrent: hide achievements on ATS */
  .tier-noncurrent .tl-achievements,
  .tier-noncurrent details.tl-achievements-toggle {
    display: none;
  }

  /* tier-early and tier-early-highlight: single compact line */
  .tier-early .tl-header,
  .tier-early-highlight .tl-header,
  .tier-early .tl-subheader,
  .tier-early-highlight .tl-subheader {
    display: inline;
  }
  .tier-early .tl-company,
  .tier-early .tl-dates,
  .tier-early .tl-role,
  .tier-early .tl-location,
  .tier-early-highlight .tl-company,
  .tier-early-highlight .tl-dates,
  .tier-early-highlight .tl-role,
  .tier-early-highlight .tl-location {
    display: inline;
    font-size: 8pt;
    color: #666;
    font-weight: normal;
  }
  .tier-early .tl-company,
  .tier-early-highlight .tl-company {
    font-weight: 700;
  }
  .tier-early .tl-role,
  .tier-early-highlight .tl-role {
    font-weight: 600;
  }

  /* Separators between inline fields: company · dates · role · location */
  .tier-early .tl-company::after,
  .tier-early .tl-dates::after,
  .tier-early .tl-role::after,
  .tier-early-highlight .tl-company::after,
  .tier-early-highlight .tl-dates::after,
  .tier-early-highlight .tl-role::after {
    content: " · ";
    color: #aaa;
  }
  .tier-early .tl-card,
  .tier-early-highlight .tl-card {
    padding: 3pt 0;
  }
  .tier-early .tl-desc,
  .tier-early-highlight .tl-desc {
    font-size: 8pt;
    color: #666;
    margin-top: 2pt;
  }

  /* tier-early: hide achievements on ATS */
  .tier-early .tl-achievements,
  .tier-early details.tl-achievements-toggle {
    display: none;
  }

  /* tier-early-highlight: achievements as inline semicolon prose */
  .tier-early-highlight .tl-achievements,
  .tier-early-highlight .tl-achievements li {
    display: inline;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 8pt;
    color: #666;
  }
  .tier-early-highlight .tl-achievements li::before {
    display: none;
  }
  .tier-early-highlight .tl-achievements li:not(:last-child)::after {
    content: "; ";
  }
  .tier-early-highlight .tl-achievements li:last-child::after {
    content: ".";
  }
  .tier-early-highlight .tl-company {
    color: #cf0a2c !important;
    font-weight: 700 !important;
  }

  /* Early-career section toggle: always show on print */
  details.early-career-toggle > summary {
    display: none;
  }
  details.tl-achievements-toggle > summary {
    display: none;
  }
  details.tl-achievements-toggle {
    display: block;
  }

  .early-career {
    max-height: none !important;
    overflow: visible !important;
  }
  .print-only .timeline::before {
    display: none;
  }
  .skills-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .skill-card {
    background: none;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
  }
  .skill-card h3 {
    color: var(--primary);
    font-size: 9.5pt;
    margin-bottom: 6px;
  }
  .skill-card.green h3 {
    color: var(--secondary);
  }
  .skill-card.purple h3 {
    color: var(--accent);
  }
  .skill-card-icon {
    display: none;
  }
  .skill-tag {
    background: rgba(0, 119, 182, 0.06);
    border: 1px solid rgba(0, 119, 182, 0.2);
    color: #222;
    font-size: 8pt;
  }
  .skill-card.green .skill-tag {
    background: rgba(0, 135, 90, 0.06);
    border-color: rgba(0, 135, 90, 0.2);
  }
  .skill-card.purple .skill-tag {
    background: rgba(109, 40, 217, 0.06);
    border-color: rgba(109, 40, 217, 0.2);
  }
  .skill-note {
    color: #555;
    font-size: 8pt;
  }
  .lang-bar-bg {
    background: #eee;
  }
  .lang-bar-fill {
    width: var(--target-width) !important;
  }
  .lang-bar-fill.mandarin {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: none;
  }
  .lang-bar-fill.english {
    background: linear-gradient(90deg, var(--accent), var(--primary));
    box-shadow: none;
  }
  .footer {
    display: none;
  }
}
