/* ============================================================
   print.css — Print-only styles for stpatrickdesign.com
   Goal: a clean, single-flow résumé suitable for letter & A4
   when the visitor uses File → Print or "Save as PDF".
   Linked with media="print" so it never affects screen.
   ============================================================ */

@page {
  size: Letter;
  margin: 0.5in 0.6in;
}

@media print {

  /* --- Reset to neutral, print-friendly defaults --- */
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    font-family: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
    font-size: 10.5pt;
    line-height: 1.4;
    -webkit-print-color-adjust: economy;
    print-color-adjust: economy;
  }

  /* --- Hide screen-only chrome --- */
  nav,
  header nav,
  .nav,
  .top,
  .marquee,
  .swatchbar,
  .stamp,
  .hero .lede .drop,
  footer .nav,
  [data-no-print],
  .no-print,
  .download-pdf,
  .scroll-cue,
  button,
  .cta a[href^="#"] {
    display: none !important;
  }

  /* --- Container should be full-width on paper --- */
  .wrap, main, body > div {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* --- Print header: name + contact, single line --- */
  body::before {
    content: attr(data-print-name) " — " attr(data-print-tagline);
    display: block;
    font-weight: 700;
    font-size: 18pt;
    border-bottom: 1px solid #000;
    padding-bottom: 6pt;
    margin-bottom: 10pt;
  }

  /* --- Headings --- */
  h1 { font-size: 22pt; line-height: 1.1; margin: 0 0 6pt; }
  h2 { font-size: 13pt; line-height: 1.2; margin: 12pt 0 6pt; padding-bottom: 2pt; border-bottom: 1px solid #000; text-transform: uppercase; letter-spacing: 0.06em; }
  h3 { font-size: 11pt; margin: 8pt 0 4pt; font-weight: 700; }

  /* --- Body text --- */
  p { margin: 0 0 6pt; orphans: 3; widows: 3; }
  ul { margin: 0 0 8pt 18pt; padding: 0; }
  li { margin-bottom: 2pt; }

  /* --- Hero / lede: collapse to a tight intro paragraph --- */
  .hero,
  .hero h1,
  .hero .lede {
    padding: 0 !important;
    margin: 0 0 8pt !important;
    border: 0 !important;
    color: #000 !important;
    background: transparent !important;
    font-style: normal !important;
  }
  .hero h1 { font-size: 22pt !important; line-height: 1.1 !important; font-family: "Iowan Old Style", Georgia, serif !important; }
  .hero h1 em, .hero h1 .accent, .hero h1 .stack { color: #000 !important; }

  /* --- Work history: tight rows, no decorative tiles --- */
  .work-list, .timeline, .work-list .work-item, .timeline .row, .job {
    display: block !important;
    grid-template-columns: none !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 0 6pt !important;
  }
  .work-item, .row, .job {
    border-top: 0 !important;
    border-bottom: 1px dotted #999 !important;
    padding: 4pt 0 !important;
    page-break-inside: avoid;
  }
  .work-item .yr, .row .yr, .job .yr { font-weight: 700; display: inline; margin-right: 8pt; }
  .work-item .role, .row .ttl, .job .ttl { font-size: 11pt; font-weight: 700; display: inline; }
  .work-item .role span, .row .ttl span, .job .ttl span { display: block; font-style: italic; font-weight: 400; font-size: 10pt; margin-top: 2pt; }
  .work-item .where, .row .place, .job .place { float: right; font-style: italic; }

  /* --- Skills / capabilities: 3-up flat lists --- */
  .skills, .skill-grid, .cap-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 12pt !important;
    page-break-inside: avoid;
  }
  .skills h3, .skill-grid h3, .cap h3 { border-bottom: 1px solid #000; padding-bottom: 2pt; margin-bottom: 4pt; font-size: 10pt; text-transform: uppercase; letter-spacing: 0.05em; }
  .skills ul, .skill-grid ul, .cap ul { list-style: disc; margin-left: 14pt; }

  /* --- Sample tiles: in print, render as a compact list --- */
  .samples, .grid-samples { display: block !important; }
  .sample, .tile {
    display: inline-block !important;
    width: auto !important;
    min-width: 0 !important;
    aspect-ratio: auto !important;
    background: transparent !important;
    border: 1px solid #000 !important;
    padding: 4pt 8pt !important;
    margin: 0 4pt 4pt 0 !important;
    font-size: 9pt !important;
  }
  .sample h3, .tile .t-title { font-size: 10pt !important; margin: 0 !important; display: inline !important; }
  .sample p, .tile .t-meta { display: inline !important; margin-left: 6pt !important; font-size: 9pt !important; opacity: 1 !important; }

  /* --- Contact block --- */
  .contact, .cta {
    display: block !important;
    background: transparent !important;
    border: 1px solid #000 !important;
    padding: 8pt !important;
    margin-top: 10pt !important;
    page-break-inside: avoid;
  }
  .contact a, .cta a { text-decoration: none !important; display: block; padding: 1pt 0; }
  .contact a::before, .cta a::before { content: ""; }

  /* --- Show URLs after links so they're useful in printed copy --- */
  a[href^="http"]::after,
  a[href^="mailto:"]::after,
  a[href^="tel:"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    font-weight: 400;
    color: #444 !important;
    word-break: break-all;
  }
  /* …except internal anchors */
  a[href^="#"]::after { content: ""; }

  /* --- Sectioning: prevent awkward page splits --- */
  section, .section, .work-list, .skills, .skill-grid, .cap-grid, .contact, .cta {
    page-break-inside: avoid;
  }
  h2 { page-break-after: avoid; }

  /* --- Footer --- */
  footer { margin-top: 12pt; border-top: 1px solid #000; padding-top: 6pt; font-size: 9pt; }
}
