/* IEEE-Style Research Paper CSS */
/* Pure white background - no dark mode */
/* Responsive: 2-column on desktop/tablet, 1-column on mobile */

* {
  box-sizing: border-box;
}

html {
  font-size: 12pt;
}

body {
  font-family: 'Times New Roman', Times, serif;
  line-height: 1.4;
  color: #000000;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
}

/* Container */
.paper-container {
  max-width: 8.5in;
  margin: 0 auto;
  padding: 0.5in 0.75in;
  background-color: #ffffff;
}

/* Paper Header - Always single column, centered */
.paper-header {
  text-align: center;
  margin-bottom: 24pt;
}

.paper-title {
  font-size: 24pt;
  font-weight: bold;
  margin-bottom: 12pt;
  line-height: 1.2;
}

.paper-subtitle {
  font-size: 14pt;
  font-style: italic;
  margin-bottom: 18pt;
}

.paper-authors {
  font-size: 11pt;
  margin-bottom: 6pt;
}

.paper-affiliation {
  font-size: 10pt;
  font-style: italic;
}

/* Abstract - Single column, indented */
.abstract {
  margin: 24pt 0.5in;
  text-align: justify;
}

.abstract-title {
  font-size: 12pt;
  font-weight: bold;
  font-style: italic;
  text-align: center;
  margin-bottom: 6pt;
}

.abstract-content {
  font-size: 11pt;
}

/* Table of Contents / Navigation */
.paper-nav {
  margin: 24pt 0;
  padding: 12pt;
  border: 1px solid #000;
}

.paper-nav-title {
  font-weight: bold;
  font-size: 10pt;
  text-transform: uppercase;
  margin-bottom: 8pt;
  text-align: center;
}

.paper-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  column-count: 2;
  column-gap: 20pt;
}

.paper-nav li {
  margin: 4pt 0;
  font-size: 11pt;
}

.paper-nav a {
  color: #000;
  text-decoration: none;
}

.paper-nav a:hover {
  text-decoration: underline;
}

/* Language Selector */
.lang-selector {
  display: flex;
  justify-content: center;
  gap: 8pt;
  margin-top: 12pt;
  padding-top: 10pt;
  border-top: 1px solid #ccc;
}

.lang-selector a {
  display: inline-block;
  padding: 4pt 12pt;
  font-size: 10pt;
  font-weight: bold;
  text-decoration: none;
  color: #333;
  border: 1px solid #999;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.lang-selector a:hover {
  background-color: #f0f0f0;
  border-color: #666;
}

.lang-selector a.active {
  background-color: #000;
  color: #fff;
  border-color: #000;
}

.lang-selector a.active:hover {
  background-color: #333;
}

/* Two-column content for desktop/tablet */
.two-column {
  column-count: 2;
  column-gap: 0.25in;
  text-align: justify;
}

/* Section styling */
.section {
  margin-bottom: 12pt;
}

.section-title {
  font-size: 14pt;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  margin: 18pt 0 12pt 0;
  column-span: all;
}

.subsection-title {
  font-size: 12pt;
  font-weight: bold;
  font-style: italic;
  margin: 12pt 0 6pt 0;
}

.subsubsection-title {
  font-size: 12pt;
  font-style: italic;
  margin: 10pt 0 6pt 0;
}

/* Paragraphs */
p {
  margin: 0 0 6pt 0;
  text-indent: 0.25in;
}

p:first-of-type,
.section-title + p,
.subsection-title + p,
.subsubsection-title + p,
.equation-block + p,
ul + p,
ol + p {
  text-indent: 0;
}

/* Lists */
ul, ol {
  margin: 6pt 0;
  padding-left: 0.3in;
}

li {
  margin-bottom: 3pt;
}

/* Equations - MathJax blocks */
.equation-block {
  margin: 12pt 0;
  text-align: center;
}

.MathJax {
  font-size: 12pt !important;
}

/* Code blocks */
pre, code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 9pt;
  background-color: #f5f5f5;
}

code {
  padding: 1pt 3pt;
}

pre {
  padding: 8pt;
  margin: 8pt 0;
  overflow-x: auto;
  border: 1px solid #ccc;
  white-space: pre-wrap;
  word-wrap: break-word;
}

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

/* Horizontal rule */
hr {
  border: none;
  border-top: 0.5pt solid #000;
  margin: 12pt 0;
}

/* Key points / highlights */
.key-point {
  border: 1px solid #000;
  padding: 8pt;
  margin: 10pt 0;
  font-style: italic;
}

/* Theorem/Definition boxes */
.definition-box {
  border: 1px solid #000;
  padding: 8pt;
  margin: 10pt 0;
}

.definition-box-title {
  font-weight: bold;
  font-style: italic;
  margin-bottom: 4pt;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 10pt 0;
  font-size: 11pt;
}

th, td {
  border: 0.5pt solid #000;
  padding: 4pt 6pt;
  text-align: left;
}

th {
  font-weight: bold;
  text-align: center;
}

caption {
  font-size: 9pt;
  margin-bottom: 4pt;
  text-align: center;
}

/* Figures */
.figure {
  margin: 12pt 0;
  text-align: center;
}

.figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.figure figcaption {
  font-size: 9pt;
  text-align: center;
  margin-top: 6pt;
  font-style: normal;
}

/* Figure captions (legacy) */
.figure-caption {
  font-size: 9pt;
  text-align: center;
  margin-top: 6pt;
}

/* Footnotes */
.footnote {
  font-size: 8pt;
}

/* Links */
a {
  color: #000;
  text-decoration: underline;
}

/* Section Navigation (prev/next) */
.section-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24pt 0 12pt 0;
  padding: 12pt 0;
  border-top: 1px solid #ccc;
  font-size: 11pt;
}

.section-nav a {
  text-decoration: none;
  color: #000;
}

.section-nav a:hover {
  text-decoration: underline;
}

.section-nav .prev {
  text-align: left;
}

.section-nav .next {
  text-align: right;
  margin-left: auto;
}

.section-nav .nav-label {
  font-size: 9pt;
  color: #666;
  display: block;
}

.section-nav .nav-title {
  font-weight: bold;
}

/* References section */
.references {
  font-size: 9pt;
}

.references h2 {
  font-size: 12pt;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12pt;
}

.references ol {
  padding-left: 0.2in;
}

.references li {
  margin-bottom: 4pt;
}

/* Print styles */
@media print {
  .paper-container {
    padding: 0;
    max-width: none;
  }

  .paper-nav {
    display: none;
  }

  .two-column {
    column-count: 2;
  }
}

/* Responsive: Tablet */
@media screen and (max-width: 1024px) {
  .paper-container {
    padding: 20pt;
  }

  .paper-title {
    font-size: 20pt;
  }

  .abstract {
    margin: 18pt 0.25in;
  }
}

/* Responsive: Mobile - Single column */
@media screen and (max-width: 768px) {
  html {
    font-size: 12pt;
  }

  .two-column {
    column-count: 1;
  }

  .paper-container {
    padding: 12pt;
  }

  .paper-header {
    text-align: center;
  }

  .paper-title {
    font-size: 18pt;
  }

  .paper-subtitle,
  .paper-authors {
    text-align: center;
  }

  .paper-nav ul {
    column-count: 1;
  }

  .section-title {
    font-size: 11pt;
  }

  p {
    text-indent: 0;
    text-align: left;
  }

  .abstract {
    margin: 12pt 0;
  }

  .abstract-content {
    text-align: left;
  }
}
