/**
 * Academic Paper Style - LaTeX-inspired formatting
 */

@import url('https://fonts.googleapis.com/css2?family=Computer+Modern+Serif:wght@400;700&family=Computer+Modern+Sans:wght@400;700&display=swap');

body {
  font-family: 'Georgia', 'Computer Modern Serif', serif;
  font-size: 11pt;
  line-height: 1.6;
  color: #000;
  max-width: 8.5in;
  margin: 1in auto;
  padding: 0;
  text-align: justify;
}

/* Title */
h1 {
  font-size: 18pt;
  font-weight: bold;
  text-align: center;
  margin: 0.5in 0 0.3in 0;
  line-height: 1.3;
}

/* Authors and affiliations */
h1 + p strong {
  font-weight: normal;
  text-align: center;
  display: block;
  margin-bottom: 0.15in;
  font-size: 10pt;
}

/* Abstract styling */
h1 ~ p:first-of-type strong:first-child {
  font-weight: bold;
}

/* Section headers (h2) */
h2 {
  font-size: 12pt;
  font-weight: bold;
  margin-top: 0.25in;
  margin-bottom: 0.1in;
}

/* Subsection headers (h3) */
h3 {
  font-size: 11pt;
  font-weight: bold;
  margin-top: 0.2in;
  margin-bottom: 0.08in;
  font-style: italic;
}

/* Paragraphs */
p {
  margin: 0.08in 0;
  text-indent: 0.2in;
}

/* First paragraph after heading has no indent */
h1 + p,
h2 + p,
h3 + p {
  text-indent: 0;
}

/* Lists */
ul, ol {
  margin: 0.1in 0;
  padding-left: 0.4in;
}

li {
  margin: 0.05in 0;
}

/* Horizontal rule for abstract separator */
hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 0.15in 0;
}

/* Tables */
table {
  margin: 0.15in auto;
  border-collapse: collapse;
  width: 90%;
  font-size: 10pt;
}

th {
  border-bottom: 2px solid #000;
  padding: 0.08in;
  text-align: left;
  font-weight: bold;
}

td {
  border-bottom: 1px solid #ccc;
  padding: 0.08in;
  text-align: left;
}

tr:last-child td {
  border-bottom: 2px solid #000;
}

/* Emphasis */
strong {
  font-weight: bold;
}

em {
  font-style: italic;
}

/* Code and equations (inline) */
code {
  font-family: 'Courier New', monospace;
  font-size: 10pt;
  background: #f5f5f5;
  padding: 0.02in 0.05in;
}

/* Block quotes (for equations or special text) */
blockquote {
  margin: 0.15in 0.5in;
  padding: 0.1in;
  background: #fafafa;
  border-left: 3px solid #ddd;
  font-style: italic;
}

/* References section */
h2:last-of-type {
  page-break-before: auto;
  margin-top: 0.3in;
}

/* Two-column layout for references (optional) */
h2:last-of-type ~ p {
  text-indent: -0.2in;
  padding-left: 0.2in;
  margin: 0.05in 0;
  font-size: 9pt;
}

/* Links */
a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Page breaks */
@media print {
  h2 {
    page-break-after: avoid;
  }

  table, figure {
    page-break-inside: avoid;
  }
}
