/* Academic Paper Styling for Axio Papers */

body {
    background: #ffffff !important;
    color: #000000 !important;
}

article {
    max-width: 680px;
    margin: 0 auto;
    padding: 2em 2em 4em 2em;
    background: #ffffff !important;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 18px;
    line-height: 1.8;
    color: #000000 !important;
}

/* Title and metadata */
article h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2em;
    font-weight: 700;
    margin: 1.5em 0 0.3em 0;
    line-height: 1.3;
    color: #000000;
}

article h1+p {
    font-style: italic;
    color: #333333;
    margin-top: 0.5em;
    margin-bottom: 0.3em;
}

/* Authors and metadata block */
article h1+p+p {
    color: #444444;
    font-size: 0.95em;
    margin-bottom: 2em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid #ddd;
}

/* Section headings */
article h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.5em;
    font-weight: 600;
    margin-top: 2.5em;
    margin-bottom: 0.8em;
    padding-top: 0.5em;
    border-top: 2px solid #cccccc;
    color: #000000;
}

article h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

article h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    color: #000000;
}

/* Body text */
article p {
    margin: 1.2em 0;
    text-align: justify;
    hyphens: auto;
}

/* Abstract styling */
article h2:first-of-type+p {
    background: #f0f0f0;
    padding: 1.5em;
    border-left: 3px solid #333333;
    margin: 1.5em 0 2em 0;
    font-size: 0.95em;
    text-align: left;
    color: #000000;
}

/* Lists */
article ul,
article ol {
    margin: 1.2em 0;
    padding-left: 2em;
}

article li {
    margin: 0.5em 0;
}

/* Emphasis */
article strong {
    font-weight: 600;
    color: #000000;
}

article em {
    font-style: italic;
}

/* Code blocks */
article pre {
    background: #f0f0f0;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.9em;
    border: 1px solid #cccccc;
    color: #000000;
}

article code {
    font-family: 'Courier New', monospace;
    background: #f0f0f0;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    color: #000000;
}

article pre code {
    background: none;
    padding: 0;
}

/* Horizontal rules */
article hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2.5em 0;
}

/* Links in papers */
article a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid #93c5fd;
}

article a:hover {
    color: #1e40af;
    border-bottom-color: #2563eb;
}

/* Math elements */
.MathJax {
    font-size: 1.1em !important;
}

@media (max-width: 768px) {
    article {
        max-width: 100%;
        padding: 1.5em;
        font-size: 17px;
    }

    article h1 {
        font-size: 1.6em;
    }

    article h2 {
        font-size: 1.3em;
    }

    article p {
        text-align: left;
    }
}
