/* Academic-style CSS for Pandoc output */

body {
    font-family: sans-serif;
    color: rgba(0, 0, 0, 0.881);
    background-color: rgb(255, 253, 253);
    
    font-size: 12pt;
    font-weight: 300;
    line-height: 1.2;
    
    max-width: 55em;
    margin: 0 auto;
    padding: 0 1em;
    text-align: justify;
    
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}

/* Typography */
h1 {
    font-size: 275%;
    font-weight: 400;
    text-align: left;
    margin-top: 1.5em;
}

h2 {
    font-size: 150%;
    font-weight: 500;
    text-align: left;
    margin-top: 1.2em;
}

h3 {
    font-size: 100%;
    font-weight: 600;
    text-align: left;
    margin-top: 1em;
}

/* Links */
a {
    color: #0000d0;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Code blocks (Pandoc generates these) */
pre {
    font-family: monospace;
    text-align: left;
    padding: 0.5em 0 0.5em 1em;
    margin: 1em 0 1em 1em;
    line-height: 1.1;
    border-left: 2px lightgray solid;
    background-color: #f8f8f8;
    overflow-x: auto;
    color: #333;
    
    /* Fix mobile scrolling background issues */
    background-attachment: local;
    min-width: 100%;
    width: max-content;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

pre code {
    background-color: transparent; /* Remove background from code inside pre */
    padding: 0;
    border-radius: 0;
}

code {
    font-family: monospace;
    background-color: #f0f0f0;
    padding: 0.1em 0.3em;
    border-radius: 2px;
    color: #333; /* Explicit text color */
}

/* Fix text selection in code blocks */
pre::selection, pre code::selection {
    background-color: #b3d4fc;
    color: inherit;
}

pre::-moz-selection, pre code::-moz-selection {
    background-color: #b3d4fc;
    color: inherit;
}

/* Lists */
ul, ol {
    padding-left: 1.5em;
}

li {
    padding-left: 0.25em;
    margin: 0.3em 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    background-color: #f9f9f9;
}

table th {
    background-color: #f0f0f0;
    font-weight: bold;
    padding: 0.5em;
    text-align: left;
}

table td {
    padding: 0.5em;
    border-bottom: 1px solid #e0e0e0;
}

table tr:nth-child(even) {
    background-color: #fdfdfd;
}

/* Math display (for KaTeX/MathJax) */
.math {
    overflow-x: auto;
}

/* Blockquotes */
blockquote {
    margin: 1em 2em;
    padding-left: 1em;
    border-left: 3px solid #ddd;
    font-style: italic;
}

/* Figures */
figure {
    margin: 2em 0;
    text-align: center;
}

img {
    max-width: 100%;
    height: auto;
}

/* Mobile responsiveness */
@media (max-width: 35em) {
    body {
        font-size: 11pt;
        line-height: 1.3;
        padding: 0 0.5em;
        text-align: left;
        margin: 0;
    }
    
    h1 { font-size: 200%; }
    h2 { font-size: 130%; }
    
    pre {
        margin-left: 0;
        padding-left: 0.5em;
    }
    
    ul, ol {
        padding-left: 1em;
    }
}

/* Print styles */
@media print {
    body {
        font-size: 10pt;
        max-width: none;
        margin: 0;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    pre {
        border-left: 1px solid black;
    }
}


.home-button {
  position: absolute;
  top: 5rem;
  left: 3rem;
  z-index: 1000; /* ensures it's above other content */
}
@media (max-width: 1200px) {
  .home-button {
    top: 0.5rem;
    left: 0.5rem;
    font-size: 14px;
  }
}