/* Print / Save as PDF: a calm, readable document instead of the screen design squeezed onto paper.
   Loaded with media="print", so nothing here touches the website on screen.
   White paper, dark text, sensible sizes, no floating UI, no animation, blocks that don't split across pages,
   and link addresses written out (you can't click paper). */

@page { margin: 16mm 14mm 18mm; }

/* ---------- paper and ink ---------- */
html, body { background: #fff !important; color: #181b2e !important; font-size: 11pt !important; line-height: 1.5 !important; }
*, *::before, *::after { box-shadow: none !important; text-shadow: none !important; animation: none !important; transition: none !important; }
body * { background-color: transparent !important; }
section, header, footer, main, div { background-image: none !important; }
img, svg, video, canvas, picture { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

/* ---------- a proper header on the first page ---------- */
body::before { content: "Kshitij Anand · Product Designer · kshitij.design · kshitijananddesign@gmail.com"; display: block; margin: 0 0 6mm; padding-bottom: 3mm; border-bottom: 1px solid #c9ccd6;
  font: 500 9.5pt/1.3 Outfit, "Segoe UI", Arial, sans-serif; letter-spacing: .02em; color: #474a60 !important; }

/* ---------- screen-only things: floating controls, pop-ups, games, decoration ---------- */
.ks-mode, .ks-mode-hint, .ks-skip, .ks-sr-h1,
.ks-egg-badge, .ks-egg-panel, .ks-egg-toast, .ks-egg-trophy, .ks-egg-card, .ks-egg-confetti, .ks-egg-dawn, .ks-egg-namaste, .ks-bp-title, .ks-bp-dims, .ks-egg-footnote,
.ks-bubble, .ks-card-actions, .ks-peek, .ks-climber, .ks-cloud, .ks-to-sky, .ks-to-snow, .ks-star,
.fp-canvas, .fp-sr, .ks-disco-hang, .ks-disco-fx, .ks-disco-stop, .ks-disco-credit,
.hero-loop-animation-wrapper, .menu-button, .w-nav-button, .w-nav-overlay, .kw-peek,
.ks-sound, .ks-intro-bg, .ks-intro-mark, iframe, audio, video[autoplay] { display: none !important; }

/* the nav prints once, at the top of the first page, as plain text links */
.navbar, .w-nav { position: static !important; transform: none !important; border: 0 !important; margin-bottom: 4mm !important; }
.ks-brand-away { opacity: 1 !important; transform: none !important; }

/* anything an animation left hidden or shifted shows in its resting place */
[style*="opacity: 0"], [style*="opacity:0"] { opacity: 1 !important; }
.ks-mascot, .ks-mascot * { transform: none !important; }

/* ---------- type: big but not poster-sized ---------- */
h1, .display, .h1 { font-size: 26pt !important; line-height: 1.1 !important; letter-spacing: -.01em !important; }
h2, .h2 { font-size: 18pt !important; line-height: 1.2 !important; }
h3, .h3, .thumbnail-title { font-size: 14pt !important; line-height: 1.25 !important; }
h4, .h4, .h5, .h6 { font-size: 12pt !important; line-height: 1.3 !important; }
p, li, td, th, .paragraph-small, .paragraph-mini { font-size: 10.5pt !important; line-height: 1.5 !important; color: #181b2e !important; opacity: 1 !important; }
h1, h2, h3, h4, h5, h6, .display, .h2, .h4, .thumbnail-title { break-after: avoid; page-break-after: avoid; color: #181b2e !important; }
p, li { orphans: 3; widows: 3; }

/* ---------- sections sit closer together; blocks stay whole ---------- */
section { padding-top: 6mm !important; padding-bottom: 6mm !important; min-height: 0 !important; height: auto !important; }
.work-block, .div-block-101, .kw-co, .kw-card, figure, table, blockquote, .ks-kind-card, .about-table-row, .cs-shot, .cs-figure { break-inside: avoid; page-break-inside: avoid; }
img { max-width: 100% !important; height: auto !important; max-height: 95mm; object-fit: contain; break-inside: avoid; }

/* the homepage case study blocks: picture and text side by side, compact */
.work-block, .div-block-101 { display: flex !important; gap: 6mm !important; align-items: center !important; margin: 0 0 6mm !important; }
.work-block-image-wrapper { height: auto !important; max-height: 70mm !important; border-radius: 3mm !important; overflow: hidden; }
.work-block-link-wrapper, .work-block-text-wrapper { width: auto !important; flex: 1 1 0 !important; min-width: 0; transform: none !important; position: static !important; }
.work-block-text-wrapper { border: 1px solid #c9ccd6 !important; border-radius: 3mm !important; padding: 4mm !important; }

/* the testimonial marquee repeats its cards to loop: print one set, wrapped */
.ks-kind-track { animation: none !important; flex-wrap: wrap !important; width: auto !important; transform: none !important; }
.ks-kind-track [aria-hidden="true"] { display: none !important; }

/* ---------- links: write out where they go ---------- */
a { color: #181b2e !important; text-decoration: underline; text-decoration-thickness: 1px; }
main a[href^="http"]:not(:has(img)):not(:has(svg))::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #5f6275 !important; word-break: break-all; }
a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #5f6275 !important; }
.navbar a, .w-nav a { text-decoration: none; }

/* ---------- footer: contact details, no game ---------- */
.footer-section { break-inside: avoid; min-height: 0 !important; height: auto !important; padding: 6mm 0 0 !important; border-top: 1px solid #c9ccd6; }
.ks-to { display: none !important; }

/* the "Printed my portfolio?" Easter egg note: once, at the end, not on top of anything */
.ks-egg-print { position: static !important; transform: none !important; margin: 8mm 0 0 auto !important; max-width: 80mm !important; }

/* ---------- fixes from the first proof ---------- */
/* only real inline links are underlined; whole-card links read as plain text */
a { text-decoration: none !important; }
p a, li a, td a, .paragraph-small a { text-decoration: underline !important; }
/* the homepage cards: no screen-design overlap between picture and text */
.work-block-text-wrapper { margin: 0 !important; left: auto !important; right: auto !important; top: auto !important; }
.work-block-para-wrapper { margin: 0 !important; width: auto !important; height: auto !important; display: block !important; }
.work-block-para-wrapper .paragraph-small { margin: 2mm 0 !important; max-width: none !important; }
.work-type-wrapper, .thumbnail-category { position: static !important; transform: none !important; writing-mode: horizontal-tb !important; margin: 0 0 1mm !important; height: auto !important; width: auto !important; }
.thumbnail-category { font-size: 8.5pt !important; letter-spacing: .08em; text-transform: uppercase; color: #5f6275 !important; }
.thumbnail-link { display: none !important; }   /* "Discover" means nothing on paper */
