:root {
    --font-size: 10pt; /* Base font size for print */
}

@page {
    margin: 1in .75in 1in .75in; /* Set overall page margins */
    @bottom-center {
        content: "©2026 Shannan.dev Page " counter(page) "/" counter(pages); /* Add page numbers */
        font-size: 8pt;
    }
}

body {
    padding: 0;
    margin: 0;
    font-size: var(--font-size);
}

p, li, blockquote, pre, code, h4 {
    font-size: var(--font-size) !important;
}

h3 {
    font-size: calc(var(--font-size) * 1.4) !important;
}

h2 {
    font-size: calc(var(--font-size) * 1.6) !important;
}

h1 {
    font-size: calc(var(--font-size) * 2) !important;
    margin-bottom: 0.2in; /* Extra space after main headings */
}

h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    break-after: avoid; /* Modern syntax */
    orphans: 2; /* Ensure at least 2 lines of text follow the heading */
    widows: 2; /* Ensure at least 2 lines of heading text stay together */
}

/* Optional: Ensure paragraphs also have minimum lines on a page */
p, ul, ol, li, blockquote {
    orphans: 2;
    widows: 2;
   break-inside: avoid
}

pre, code {
    white-space: pre-wrap; /* Allow code to wrap to avoid overflow */
}

hr {
    display: none;
    border: none;
    margin: 0;
    padding: 0;
    page-break-after: always;
    break-after: always; /* Modern syntax */
}

.svg-graph {
  width: 3.5in;
  float: right;
  margin-left: 2rem;
}

