/* CV Online — the PDF (tools/pdf.py) and printing from the browser: the web design on A4 (white paper, cream cards,
   brand gold), every text open, nothing interactive and no repeated blocks. A4 is ~720 px wide, which would trigger
   the phone layout, so the print grid is set explicitly here. */
/* no page margins: the paper colour reaches the edge; the body pads every page instead (clone repeats the padding
   on each page), so the dark PDF has no white frame */
@page { size: A4; margin: 0; }
/* paper in the theme of the page: white paper and cream cards, or the night of the dark theme (tools/pdf.py ?pdf=dark) */
:root, :root[data-theme] {
  --bg: #fff; --bg-alt: #fff; --surface: #fbf7ef; --text: #1c2547; --text-2: #4a5170; --line: rgba(28, 37, 71, .13);
  --gold: #b58534; --gold-2: #c8953f; --gold-text: #7a5212; --shadow: none; --shadow-sm: none; color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1026; --bg-alt: #0b1026; --surface: #141b40; --text: #f6f1e7; --text-2: #b9bdd3; --line: rgba(255, 255, 255, .14);
  --gold: #c8953f; --gold-2: #e2b25c; --gold-text: #e2b25c; color-scheme: dark;
}
* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
html, body { background: var(--bg) !important; }
body { padding: 11mm 13mm 12mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
body { font-size: 9pt; line-height: 1.45; color: var(--text); }
p { margin: 0 0 1.6mm; }

/* only the CV: no intro, bar, assistant, buttons, toggles or blocks that repeat other sections */
#intro, .topbar, .assistant-fab, .as-panel, #assistant, .hero-cta, .hero-panel, .pillars, .skip-link, .summary-notice,
.footer-links, .footer-top, .more > summary, .intro-flyer, #contact { display: none !important; }   /* contact: in the header */
body.summary-mode .detail { display: block !important; }
.reveal, .rung, .ladder * { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
details::details-content { block-size: auto !important; content-visibility: visible !important; }
details > :not(summary) { display: block; }
a { color: inherit; text-decoration: none; }

/* header: the signature on the left, contact on the right, a thin gold rule */
.print-head { display: flex !important; align-items: center; justify-content: space-between; gap: 8mm; padding: 0 0 3.5mm;
  border-bottom: 1.2pt solid var(--gold); margin-bottom: 4mm; }
.print-head .sig { width: 70mm; height: auto; }
.print-head .is-stroke { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
.print-contact { margin: 0; font-size: 8pt; line-height: 1.6; color: var(--text-2); text-align: right; max-width: 82mm; }

/* rhythm: the web hierarchy, tighter */
.container { max-width: none !important; padding: 0 !important; }
.section, .hero { padding: 3mm 0 0 !important; background: transparent !important; }
.hero-grid { display: block !important; }
.hero .eyebrow { margin-bottom: 1mm; }
.hero h1 { margin-bottom: 2mm; }
.hero h1 .h1-main { font-size: 23pt; line-height: 1.1; }
.hero h1 .h1-sub { font-size: 12pt; margin-top: 1mm; }
.hero .lead { font-size: 10.5pt; margin-bottom: 2mm; }
.ticks.hero-facts { margin: 0 !important; grid-template-columns: 1fr 1fr; gap: 1mm 6mm !important; }
.section-head { margin-bottom: 2.5mm !important; break-inside: avoid; break-after: avoid; }
.section-head h2 { font-size: 14pt; margin: 0; }
.section-head .eyebrow { margin-bottom: .6mm; font-size: 7.5pt; }
.section-head .lead { font-size: 9.5pt; margin: 1mm 0 0; }
.eyebrow { font-size: 7.5pt; }
h3, .card h3, .case h3, .tl-item h3 { font-size: 10.5pt !important; line-height: 1.25; }
.creds-grid h3 { font-size: 11pt !important; }
.tl-role { font-size: 8.6pt !important; }
.tl-period { font-size: 8pt !important; }
.card { padding: 3.5mm 4.5mm !important; border: .7pt solid var(--line) !important; background: var(--surface) !important; border-radius: 8px !important; }
.card::after { display: none !important; }
.ticks { gap: 1mm !important; }
.ticks li { padding-left: 4mm; }

/* grids, as on a wide screen */
.summary-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 3mm !important; }
.summary-copy { grid-column: 1 / -1; grid-row: auto !important; position: static !important; }
.summary-copy p, .summary-copy p:first-child { font-size: 9.5pt; color: var(--text); }
.about-grid, .story-grid { display: grid !important; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) !important; gap: 5mm !important; align-items: start; }
.cases-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 3mm !important; }
.creds-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 2.4mm !important; }
.timeline { gap: 1.6mm !important; }
.tl-wrap { padding-left: 0 !important; } .tl-rail, .tl-stop { display: none !important; }
/* the print head already identifies the CV: no portrait or circuit lines on paper */
.hero-id, .ds-circuit { display: none !important; }
/* the promotions are already in the Savana text: on paper the steps would only repeat them */
.tl-steps { display: none !important; }
.tl-item { padding: 2mm 3.6mm !important; } .tl-head { margin-bottom: 1mm !important; } .tl-badge { font-size: 7pt !important; padding: .3mm 2mm !important; }
.tl-item h3, .card h3, .case h3, .tl-item h3 { font-size: 10.5pt !important; line-height: 1.25; }
.creds-grid h3 { font-size: 11pt !important; }
.tl-role { font-size: 8.6pt !important; }
.tl-period { font-size: 8pt !important; }
.eco-grid { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 2.5mm !important; }
.eco h3 { font-size: 8.6pt !important; min-height: 0 !important; margin-bottom: 1.5mm; }
/* ecosystem pills read as a short list on paper */
.eco .chips { display: block !important; }
.eco .chips li { display: block; border: 0 !important; background: none !important; padding: 0 !important; font-size: 8pt; line-height: 1.5; }
.eco .chips li a { padding: 0 !important; border: 0 !important; background: none !important; font-size: 8pt !important; }
.eco .chips li, .eco .chips li a { white-space: normal !important; }   /* the narrow paper columns may wrap */

/* page breaks: titles stay with their content, blocks never split */
h2, h3 { break-after: avoid; }
.card, .tl-item, .layer, .stat, .rung, .ladder { break-inside: avoid; }

/* the way back to the interactive CV and to IsAcademy */
.print-foot { display: block !important; margin: 1.5mm 0 0; font-size: 7.5pt; color: var(--text-2); }
.print-foot a { color: var(--gold-text); }
.footer { padding: 1.5mm 0 0 !important; border-top: .7pt solid var(--line); margin-top: 2mm; background: transparent !important; font-size: 7.5pt; }
.footer-row { gap: 0 4mm; }
.footer-row > p { margin: 0; }
