/* Color scheme inspired by JoulesEye */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --accent-blue: #add8e6;
  --accent-green: #4CAF50;
  --accent-red: #F44336;
  --accent-orange: #ff9800;
  --border-color: #ddd;
  --bg-light: #f9f9f9;
  --bg-lighter: #f2f2f2;
  --bg-white: #ffffff;
  --text-dark: #2c3e50;
  --text-muted: #666;
}

/* Global typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-dark);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Hero section styling */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 3rem 2.5rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.hero-section h2 {
  color: white;
  margin-top: 0;
  font-size: 2.2rem;
  border: none;
  margin-bottom: 1.5rem;
}

.hero-section ul {
  list-style: none;
  padding-left: 0;
  font-size: 1.05rem;
}

.hero-section li {
  padding: 0.4rem 0;
  padding-left: 1.8rem;
  position: relative;
}

.hero-section li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: bold;
  font-size: 1.2rem;
}

/* Comparison grid for tradeoff section */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.comparison-box {
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comparison-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.comparison-box h3 {
  margin-top: 0;
  color: var(--primary-color);
  border-bottom: 3px solid var(--accent-blue);
  padding-bottom: 0.5rem;
}

.comparison-box ul {
  padding-left: 1.2rem;
}

.comparison-box li {
  margin: 0.5rem 0;
}

/* Method highlight box */
.method-highlight {
  background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
  border-left: 5px solid var(--accent-green);
  padding: 2rem;
  margin: 2.5rem 0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.method-highlight h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.method-highlight p {
  margin: 1rem 0;
}

/* Main results section */
.main-result {
  text-align: center;
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--bg-white);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.main-result img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Case study result */
.case-study-result {
  text-align: center;
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--bg-lighter);
  border-radius: 10px;
  border: 2px solid var(--border-color);
}

.case-study-result img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Spatial comparison */
.spatial-comparison {
  text-align: center;
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--bg-white);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.spatial-comparison img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Quality grid for multiple visualizations */
.quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.quality-item {
  text-align: center;
  padding: 1rem;
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.quality-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.quality-item img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* Benchmark table styling */
.benchmark-table table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.benchmark-table th {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.benchmark-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.benchmark-table tr:nth-child(even) {
  background-color: var(--bg-lighter);
}

.benchmark-table tr:hover {
  background-color: #e8f4f8;
}

/* Regular table styling */
table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  background: var(--bg-white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

table th {
  background-color: var(--primary-color);
  color: white;
  padding: 0.9rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}

table td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

table tr:nth-child(even) {
  background-color: var(--bg-lighter);
}

table tr:hover {
  background-color: #e8f4f8;
}

/* Paper info section */
.paper-info {
  background: var(--bg-lighter);
  padding: 2rem;
  border-radius: 10px;
  border-left: 5px solid var(--accent-blue);
  margin: 2rem 0;
  line-height: 1.8;
}

.paper-info p {
  margin: 0.5rem 0;
}

/* Citation box */
.citation-box {
  background: var(--primary-color);
  color: white;
  padding: 2.5rem;
  border-radius: 10px;
  margin: 3rem 0;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.citation-box h3 {
  color: white;
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.citation-box pre {
  background: rgba(255,255,255,0.1);
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0;
}

.citation-box code {
  color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Footer note */
.footer-note {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  border-top: 3px solid var(--accent-blue);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Link styling */
a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Code blocks */
code {
  background-color: rgba(0,0,0,0.05);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', Courier, monospace;
}

pre {
  background-color: #f6f8fa;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  border-left: 3px solid var(--accent-blue);
}

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

/* Math equations */
.katex-display {
  margin: 1.5rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Section dividers */
hr {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 3rem 0;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--accent-blue);
  padding-left: 1.5rem;
  margin-left: 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Strong emphasis */
strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* Lists */
ul, ol {
  line-height: 1.8;
}

li {
  margin: 0.4rem 0;
}

/* Figure captions */
figcaption {
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Navbar enhancements */
.navbar {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: var(--bg-white);
}

/* TOC styling */
#TOC {
  background: var(--bg-lighter);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--accent-blue);
}

#TOC ul {
  list-style: none;
  padding-left: 0;
}

#TOC li {
  margin: 0.5rem 0;
}

#TOC a {
  color: var(--primary-color);
  font-weight: 500;
}

#TOC a:hover {
  color: var(--accent-green);
}

/* Responsive design */
@media (max-width: 992px) {
  .hero-section {
    padding: 2rem 1.5rem;
  }

  .hero-section h2 {
    font-size: 1.8rem;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .quality-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 1.5rem 1rem;
  }

  .hero-section h2 {
    font-size: 1.5rem;
  }

  .method-highlight {
    padding: 1.5rem;
  }

  .main-result,
  .case-study-result,
  .spatial-comparison {
    padding: 1rem;
  }

  table {
    font-size: 0.85rem;
  }

  table th,
  table td {
    padding: 0.6rem;
  }

  .citation-box {
    padding: 1.5rem;
  }

  .citation-box pre {
    font-size: 0.75rem;
  }
}

/* Print styles */
@media print {
  .hero-section {
    background: white;
    color: black;
    border: 2px solid var(--primary-color);
  }

  .citation-box {
    background: white;
    color: black;
    border: 2px solid var(--primary-color);
  }

  a {
    color: black;
    text-decoration: underline;
  }
}

/* Accessibility improvements */
:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Selection styling */
::selection {
  background: var(--accent-blue);
  color: var(--text-dark);
}

/* Smooth transitions */
* {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Content width constraints for readability */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
}
