@page { size: A4; margin: 10mm 11mm; }

@media print {
  :root,
  :root[data-theme='dark'],
  :root[data-theme='light'] {
    color-scheme: light;
    --bg: #fff;
    --bg-raised: #fff;
    --bg-sunken: #fff;
    --surface: #fff;
    --text: #000;
    --text-dim: #222;
    --text-faint: #444;
    --line: #bbb;
    --line-strong: #777;
    --accent: #000;
    --accent-dim: #000;
    --accent-deep: #000;
    --accent-wash: transparent;
    --gutter: 0;
    --section: 0;
    --stack-s: 2mm;
    --stack-m: 4mm;
    --stack-l: 6mm;
    --stack-xl: 8mm;
  }

  *, *::before, *::after {
    animation: none !important;
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
  }

  html, body, body.is-locked {
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    color: #000 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 8.5pt;
    line-height: 1.32;
    print-color-adjust: economy;
    -webkit-print-color-adjust: economy;
  }

  body * {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  [hidden] { display: none !important; }
  h1, h2, h3, h4, .mono {
    color: #000 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0 !important;
  }
  h1, h2, h3, h4 { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  a { color: #000 !important; text-decoration: none !important; }
  a[href^='http']::after {
    content: ' (' attr(href) ')';
    font: 400 7pt/1.2 Arial, Helvetica, sans-serif;
    overflow-wrap: anywhere;
  }
  img { max-width: 100% !important; height: auto !important; }

  .nav, .footer, .cursor-dot, .cursor-ring, .cursor-trail, .preloader,
  .chapter-rail, .cinema-counter, .cinema-navigation-progress, .palette,
  .contact-modal, .reel-player, .lightbox, .social-rail, .marquee,
  canvas, svg { display: none !important; }

  .shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .section-head {
    gap: 2mm;
    margin: 0 0 2.5mm;
    padding: 1.5mm 0 0;
    border-top: .6pt solid #000;
  }
  .section-head__index, .section-head__rule,
  .section-head__title:last-child:not(:first-of-type) { display: none !important; }
  .section-head__title { font-size: 9pt; font-weight: 700; }

  /* Homepage: a two-page CV assembled from the existing rendered sections. */
  body:not(.detail-page) main {
    display: flex;
    min-height: 0 !important;
    flex-direction: column;
  }
  body:not(.detail-page) #thinking,
  body:not(.detail-page) #writing,
  body:not(.detail-page) #subscribe,
  body:not(.detail-page) #principles,
  body:not(.detail-page) #vault,
  body:not(.detail-page) #building,
  body:not(.detail-page) #apps,
  body:not(.detail-page) #graph,
  body:not(.detail-page) #design,
  body:not(.detail-page) #about,
  body:not(.detail-page) #volunteering,
  body:not(.detail-page) .work-more,
  body:not(.detail-page) .hero__actions,
  body:not(.detail-page) .hero__portrait,
  body:not(.detail-page) .hero__scroll,
  body:not(.detail-page) .metrics,
  body:not(.detail-page) .contact__headline,
  body:not(.detail-page) .contact__lead,
  body:not(.detail-page) .contact__actions,
  body:not(.detail-page) .contact__email-hint,
  body:not(.detail-page) .credentials__block:last-child { display: none !important; }

  body:not(.detail-page) #hero {
    order: 0;
    display: block;
    min-height: 0;
    padding: 0 0 2.5mm;
    overflow: visible;
    border: 0;
  }
  body:not(.detail-page) .hero__inner::before {
    content: 'Divyansh Sharma';
    display: block;
    margin-bottom: .5mm;
    font: 800 24pt/1 Arial, Helvetica, sans-serif;
    letter-spacing: -.03em;
  }
  body:not(.detail-page) .hero__meta {
    gap: 3mm;
    margin: 0 0 1.5mm;
    padding: 0;
    border: 0;
  }
  body:not(.detail-page) .hero__meta span { font-size: 7.5pt; font-weight: 600; }
  body:not(.detail-page) .hero__meta span:first-child { display: none !important; }
  body:not(.detail-page) .hero__title { margin: 0 0 1.5mm; font-size: 0; line-height: 1; }
  body:not(.detail-page) .hero__title::before {
    content: 'AI Systems Builder & Operator';
    display: block;
    font-size: 10pt;
    font-weight: 700;
    text-transform: none;
  }
  body:not(.detail-page) .hero__line { display: none !important; }
  body:not(.detail-page) .hero__body { display: block; }
  body:not(.detail-page) .hero__statement {
    max-width: none;
    font: 700 11pt/1.2 Arial, Helvetica, sans-serif;
  }
  body:not(.detail-page) .hero__statement em { color: #000; font-style: normal; }
  body:not(.detail-page) .hero__sub {
    max-width: 88ch;
    margin-top: 1mm;
    color: #222;
    font-size: 8pt;
    line-height: 1.3;
  }

  body:not(.detail-page) #contact {
    order: 1;
    padding: 0 0 3mm;
    border: 0;
    background: transparent !important;
  }
  body:not(.detail-page) #contact .section-head { display: none !important; }
  body:not(.detail-page) .contact__email {
    display: block;
    padding: 0;
    border: 0;
    font: 600 8pt/1.2 Arial, Helvetica, sans-serif;
    word-break: normal;
  }
  body:not(.detail-page) .social {
    display: flex;
    gap: 1.5mm 4mm;
    margin: 1mm 0 0;
    border: 0;
    background: transparent;
  }
  body:not(.detail-page) .social__item { flex: 0 1 auto; }
  body:not(.detail-page) .social__item:nth-child(2),
  body:not(.detail-page) .social__item:nth-child(4) { display: none !important; }
  body:not(.detail-page) .social__link {
    display: inline;
    padding: 0;
    background: transparent;
    font: 400 7.2pt/1.2 Arial, Helvetica, sans-serif;
  }

  body:not(.detail-page) #career { order: 2; padding: 0; break-after: page; }
  body:not(.detail-page) .timeline { border-color: #000; }
  body:not(.detail-page) .job {
    grid-template-columns: 31mm minmax(0, 1fr);
    gap: 3mm;
    padding: 2mm 0;
    border-color: #aaa;
    break-inside: avoid;
  }
  body:not(.detail-page) .job::before { display: none !important; }
  body:not(.detail-page) .job__meta { gap: .4mm; }
  body:not(.detail-page) .job__period,
  body:not(.detail-page) .job__location { font-size: 7pt; line-height: 1.2; }
  body:not(.detail-page) .job__org { gap: 1.5mm; font-size: 10pt; line-height: 1.05; }
  body:not(.detail-page) .job__org .pill { padding: 0; border: 0; font-size: 6.5pt; }
  body:not(.detail-page) .job__role { margin: .5mm 0 .8mm; font-size: 7pt; line-height: 1.15; }
  body:not(.detail-page) .job__bullets { gap: .35mm; }
  body:not(.detail-page) .job__bullet {
    max-width: none;
    padding-left: 2.6mm;
    color: #111;
    font-size: 7.5pt;
    line-height: 1.22;
  }
  body:not(.detail-page) .job__bullet::before { top: .55em; width: 1.5mm; background: #000; }

  body:not(.detail-page) #work { order: 3; padding: 0 0 4mm; }
  body:not(.detail-page) #work .section__lead,
  body:not(.detail-page) #workCount { display: none !important; }
  body:not(.detail-page) .work {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2mm 5mm;
    border: 0;
    background: transparent;
  }
  body:not(.detail-page) .card,
  body:not(.detail-page) .card--featured {
    display: block;
    grid-column: auto;
    min-height: 0;
    padding: 0 0 2mm;
    overflow: visible;
    border-bottom: .5pt solid #aaa;
    background: transparent !important;
    break-inside: avoid;
  }
  body:not(.detail-page) .card::before,
  body:not(.detail-page) .card::after,
  body:not(.detail-page) .card__desc,
  body:not(.detail-page) .card__detail,
  body:not(.detail-page) .card__outcomes,
  body:not(.detail-page) .card__foot > .pill { display: none !important; }
  body:not(.detail-page) .card__head { gap: 2mm; }
  body:not(.detail-page) .card__kind,
  body:not(.detail-page) .card__index { font-size: 6.5pt; }
  body:not(.detail-page) .card__name,
  body:not(.detail-page) .card--featured .card__name { margin-top: .4mm; font-size: 10pt; line-height: 1.1; }
  body:not(.detail-page) .card__blurb { margin-top: .8mm; color: #111; font-size: 7.5pt; }
  body:not(.detail-page) .card__foot { padding-top: 1mm; }
  body:not(.detail-page) .tag-row,
  body:not(.detail-page) .skill-group__items { display: flex; flex-wrap: wrap; gap: .8mm 2mm; }
  body:not(.detail-page) .tag,
  body:not(.detail-page) .skill-chip { padding: 0; border: 0; border-radius: 0; color: #222; font-size: 6.8pt; }
  body:not(.detail-page) .tag:not(:last-child)::after,
  body:not(.detail-page) .skill-chip:not(:last-child)::after { content: ' ·'; }

  body:not(.detail-page) #stack { order: 4; padding: 0; }
  body:not(.detail-page) .stack-grid {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr);
    gap: 5mm;
  }
  body:not(.detail-page) .skills, body:not(.detail-page) .credentials { gap: 2.5mm; }
  body:not(.detail-page) .skill-group {
    padding-top: 1.5mm;
    border-color: #aaa;
    break-inside: avoid;
  }
  body:not(.detail-page) .skill-group__name { margin-bottom: .8mm; font-size: 7pt; font-weight: 700; }
  body:not(.detail-page) .credentials__block {
    padding: 2mm;
    border-color: #999;
    background: transparent !important;
    break-inside: avoid;
  }
  body:not(.detail-page) .credentials__block .mono { margin-bottom: 1mm; font-size: 7pt; font-weight: 700; }
  body:not(.detail-page) .edu__degree { margin: 0; font-size: 8.5pt; }
  body:not(.detail-page) .edu__school { margin: 0; color: #111; font-size: 7.5pt; }
  body:not(.detail-page) .edu__period { margin: .5mm 0; font-size: 6.8pt; }
  body:not(.detail-page) .edu__note { font-size: 7pt; line-height: 1.25; }
  body:not(.detail-page) .cert-list { gap: 1mm; }
  body:not(.detail-page) .cert { gap: 0; padding-left: 2.5mm; break-inside: avoid; }
  body:not(.detail-page) .cert::before { top: .45em; width: 1.2mm; height: 1.2mm; border-color: #000; }
  body:not(.detail-page) .cert__name { font-size: 7.2pt; }
  body:not(.detail-page) .cert__issuer { font-size: 6.3pt; }
  body:not(.detail-page) .cert__note { margin-top: .3mm; padding-left: 1.5mm; font-size: 6.2pt; line-height: 1.2; }

  /* Detail pages: article typography, no page-navigation chrome. */
  .detail-page main { min-height: 0; padding: 0; }
  .detail-page .page-back, .detail-page .page-nav, .detail-page .page-substack,
  .detail-page .related, .detail-page .case-seo-link { display: none !important; }
  .detail-page .page-hero { padding: 0 0 5mm; border-color: #000; }
  .detail-page .page-hero__meta,
  .detail-page .case-hero__top { gap: 2mm 4mm; margin: 0 0 3mm; }
  .detail-page .page-hero h1 {
    max-width: none;
    font-size: 28pt;
    line-height: .95;
    overflow-wrap: normal;
  }
  .detail-page .page-hero__lead {
    max-width: 70ch;
    margin-top: 3mm;
    color: #111;
    font-size: 12pt;
  }
  .detail-page .case-hero__context { max-width: 85ch; margin-top: 2mm; color: #222; line-height: 1.35; }
  .detail-page .case-hero__live,
  .detail-page .case-hero__secondary { min-height: 0; padding: 0; border: 0; font-size: 7pt; }
  .detail-page .page-body { padding: 5mm 0 0; }
  .detail-page .prose { width: 100%; max-width: none; color: #111; font-size: 9.5pt; line-height: 1.5; }
  .detail-page .prose > * + * { margin-top: .8em; }
  .detail-page .prose h2, .detail-page .prose h3 { margin-top: 1.4em; color: #000; }
  .detail-page .prose h2 { font-size: 14pt; }
  .detail-page .prose h3 { font-size: 11pt; }
  .detail-page .prose blockquote { font-size: 10pt; }
  .detail-page .tag { padding: 0; border: 0; color: #111; font-size: 8pt; }
  .detail-page .tag:not(:last-child)::after { content: ' ·'; }
  .detail-page .page-section,
  .detail-page .case-section,
  .detail-page .case-section + .case-section { margin-top: 7mm; }
  .detail-page .page-shot, .detail-page .case-shot, .detail-page .case-built__grid article,
  .detail-page .case-broken__item, .detail-page .case-score__category,
  .detail-page .case-growth__grid li, .detail-page .case-open__grid > li,
  .detail-page .case-comparison__row, .detail-page table tr { break-inside: avoid; }
  .detail-page .page-screens__grid,
  .detail-page .case-shots__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; }
  .detail-page .case-shot--featured { grid-column: auto; }
  .detail-page .case-shot--featured .case-shot__desktop,
  .detail-page .case-shot:not(.case-shot--featured) .case-shot__desktop { aspect-ratio: 16 / 10; }
  .detail-page .browser-frame__bar { display: none !important; }
  .detail-page .case-shot__frame { border-color: #888; background: transparent; }
  .detail-page .case-shot figcaption { padding-top: 1mm; }
  .detail-page .case-shot figcaption p { color: #222; font-size: 7pt; line-height: 1.25; }
  .detail-page .case-built__grid, .detail-page .case-broken__list,
  .detail-page .case-growth__grid, .detail-page .case-open__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5mm;
    padding: 0;
    background: transparent;
  }
  .detail-page .case-built__grid article, .detail-page .case-broken__item,
  .detail-page .case-growth__grid li, .detail-page .case-open__grid > li {
    padding: 2.5mm;
    border: .5pt solid #aaa;
    background: transparent;
  }
  .detail-page .case-act__lead { margin: 0 0 4mm; color: #222; font-size: 9pt; line-height: 1.4; }
  .detail-page .case-score__panel { grid-template-columns: 42mm minmax(0, 1fr); background: transparent; }
  .detail-page .case-score__summary,
  .detail-page .case-score__categories { padding: 3mm; border: .5pt solid #aaa; background: transparent; }
  .detail-page .case-score__number strong { font-size: 32pt; }
  .detail-page .case-score__categories { gap: 2mm; }
  .detail-page .case-score__fill,
  .detail-page .case-comparison__fill { transform: none !important; }
  .detail-page .case-findings__table-wrap { overflow: visible; border-color: #777; }
  .detail-page .case-findings th { padding: 1.5mm; font-size: 6.5pt; }
  .detail-page .case-findings td { padding: 2mm; color: #111; font-size: 7pt; line-height: 1.3; }
  .detail-page .case-finding__evidence { gap: 1mm; margin-top: 1mm; }
  .detail-page .case-finding__evidence code { padding: 0; border: 0; background: transparent; font-size: 6.5pt; }
  .detail-page .case-growth { margin-top: 6mm; }
  .detail-page .case-growth__grid strong { font-size: 16pt; }
  .detail-page .case-growth__grid p { font-size: 7pt; line-height: 1.3; }
  .detail-page .case-score-moment { gap: 4mm; margin: 4mm 0; padding: 3mm; background: transparent; }
  .detail-page .case-score-moment del,
  .detail-page .case-score-moment > div > strong { font-size: 30pt; }
  .detail-page .case-comparison__row { gap: 3mm; padding: 2mm; }
  .detail-page .case-performance-note { margin-top: 2mm; padding: 2.5mm; background: transparent; }
  .detail-page .case-open { margin-top: 7mm; }
}
