/* ViLoMem Project Page Styles */

:root {
  --primary-color: #2f6fed;
  --vilomem-color: #e74c3c;
  --text-color: #0f172a;
  --text-secondary: #475569;
  --bg-page: #f8fafc;
  --highlight-gold: #fff6df;
  --highlight-blue: #eef4ff;
  --border-light: #e5e7eb;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-color);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0 0 2rem;
}

/* Typography Hierarchy */
h1.title, h2.title, h3.title, .title {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700 !important;
  color: var(--text-color);
  letter-spacing: -0.02em;
}

.publication-title {
  font-size: 2.25rem !important;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

strong {
  font-weight: 600;
  color: var(--text-color);
}

em {
  font-style: italic;
  color: inherit;
}

/* Hero Section */
.hero {
  background: transparent;
}

.hero-body {
  padding: 3rem 1.5rem 2rem;
}

.hero .container,
.hero.teaser .container,
.section .container {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 1rem;
  margin-top: 0;
}

/* 分割线：标题区更强调，下方区域更柔和 */
.hero .container {
  border-top: 2px solid #0f172a;
  padding-top: 2rem;
  margin-top: 1rem;
}

.hero.teaser .container {
  border-top: 1px solid #0f172a;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

.section .container {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.hero.teaser {
  border: none;
  padding-bottom: 2rem;
}

.hero.teaser .hero-body {
  padding-top: 2rem;
  padding-bottom: 0;
}

.section {
  padding: 0 1.5rem 1.5rem;
  border: none;
}


.vilomem {
  color: var(--vilomem-color);
  font-weight: 800;
}

.publication-authors {
  margin-top: 1rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.author-block {
  display: inline-block;
  margin-right: 0.3rem;
}

.author-block a {
  color: var(--text-secondary);
  text-decoration: none;
}

.author-block a:hover {
  color: var(--primary-color);
}

.affiliations {
  margin-top: 0.8rem;
  color: var(--text-secondary);
}

.affiliations .author-block {
  margin-right: 1.2rem;
}

/* Publication Links - Modern Button Style */
.publication-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.link-block {
  margin: 0;
}

.external-link {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.external-link .icon {
  margin-right: 0.4rem;
}

.external-link .icon i {
  font-size: 1.05rem;
}

.button.is-dark {
  background-color: #ffffff;
  border: 2px solid #111827;
  color: #111827 !important;
  padding: 0.7rem 1.5rem;
  height: auto;
  transition: all 0.2s ease;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
  border-radius: 32px;
}

.button.is-dark:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.18);
  background-color: #111827;
  color: #ffffff !important;
  border-color: #111827;
}

.button.is-dark:active {
  transform: translateY(0);
  background-color: #0d1324;
  border-color: #0d1324;
}

.button.is-dark .icon i {
  color: inherit;
}

/* arXiv Button - Brand Red */
.button.is-arxiv {
  background-color: #ffffff;
  border: 2px solid #b1302b;
  color: #b1302b;
  padding: 0.7rem 1.5rem;
  height: auto;
  transition: all 0.25s ease;
  box-shadow: 0 12px 32px rgba(177, 48, 43, 0.12);
  border-radius: 32px;
}

.button.is-arxiv:hover {
  background-color: #B31B1B;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(179, 27, 27, 0.22);
}

.button.is-arxiv:active {
  transform: translateY(0);
}

/* Teaser Section */
.hero.teaser .teaser-image img {
  max-width: 70%;
  margin: 0 auto;
  display: block;
}

.hero.teaser .subtitle {
  font-size: 1rem;
  margin-top: 1.25rem;
  line-height: 1.8;
  padding: 0;
  color: var(--text-color);
  font-weight: 400;
  text-align: left !important;
}

/* Section Titles */
h2.title.is-3 {
  margin-bottom: 1.5rem;
  font-size: 1.85rem;
  text-align: left !important;
}

h2.title.is-3::after {
  display: none;
}

h3.title.is-4 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.15rem;
  color: var(--text-color);
  text-align: left;
}

/* Content Styles - Optimized for readability */
.content p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: var(--text-color);
  letter-spacing: -0.01em;
  text-align: left;
}

/* Abstract section - full width like other sections */
#abstract .content {
  max-width: 100%;
  margin: 0;
}

.content ul {
  margin-left: 1.5rem;
  margin-top: 0.75rem;
}

.content ul li {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  line-height: 1.8;
  color: var(--text-color);
  letter-spacing: -0.01em;
}

.method-details {
  margin-top: 1rem;
}

.key-findings {
  margin-top: 1rem;
}

.analysis-content {
  margin-top: 1rem;
}

/* Table Styles - Light Theme */
.table-container {
  overflow-x: auto;
  margin: 1.5rem auto;
}

/* Compact table for smaller data sets - centered */
.table-container.compact-table {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.results-table {
  font-size: 0.95rem;
  border-collapse: collapse;
  background: white;
}

.results-table th {
  background-color: #f5f7fa !important;
  color: var(--text-color) !important;
  font-weight: 700;
  text-align: center !important;
  padding: 0.9rem 0.75rem !important;
  border-bottom: 2px solid #ddd !important;
  white-space: nowrap;
}

.results-table td {
  text-align: center !important;
  vertical-align: middle !important;
  padding: 0.7rem 0.75rem !important;
  border-color: #eee;
  color: var(--text-color);
}

.results-table td:first-child {
  text-align: left !important;
  white-space: nowrap;
  font-size: 0.95rem;
}

.results-table tbody tr:hover {
  background-color: #f8fbff;
}

/* Highlighted Rows - ViLoMem results */
.results-table tr.is-highlighted {
  background-color: var(--highlight-gold) !important;
}

.results-table tr.is-highlighted:hover {
  background-color: #fff8dc !important;
}

/* Cross-model results */
.results-table tr.is-cross {
  background-color: var(--highlight-blue) !important;
}

.results-table tr.is-cross:hover {
  background-color: #e8f4ff !important;
}

/* Section divider row */
.results-table tr.section-divider td {
  background-color: #f0f0f0 !important;
  padding: 0.2rem !important;
  height: 4px;
}

/* Figure Styles */
figure.image {
  margin: 1.5rem auto;
  text-align: center;
}

figure.image img,
figure.image embed {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: none;
  border: 1px solid rgba(229, 231, 235, 0.8);
}

figure.image:hover img,
figure.image:hover embed {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

/* BibTeX */
#BibTeX {
  padding: 1rem 1.5rem;
}

#BibTeX pre {
  background-color: #f8fafc;
  padding: 1.35rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.65;
  border: 1px solid var(--border-light);
}

#BibTeX code {
  background-color: transparent;
  color: var(--text-secondary);
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

#BibTeX h2.title::after {
  display: none;
}

/* Footer */
.footer {
  padding: 2rem 1.5rem;
  background-color: transparent;
  border-top: none;
}

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

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer a {
  color: var(--text-color);
  text-decoration: underline;
}

.footer a:hover {
  color: var(--primary-color);
}

/* Responsive */
@media screen and (max-width: 768px) {
  .publication-title {
    font-size: 1.5rem !important;
    line-height: 1.35;
  }

  .hero.teaser .subtitle {
    padding: 0;
    font-size: 0.9rem;
  }

  .results-table {
    font-size: 0.75rem;
  }

  .results-table th,
  .results-table td {
    padding: 0.4rem 0.3rem !important;
  }

  .section {
    padding: 2rem 1rem;
  }

  h2.title.is-3 {
    font-size: 1.5rem;
  }
}

@media screen and (min-width: 769px) {
  body {
    padding-top: 0;
  }
}

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

/* Table of Contents */
.toc-container {
  position: fixed;
  left: calc(50% - 520px - 180px);
  top: 160px;
  width: 150px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: none;
}

.toc-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toc-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.3rem 0;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.toc-links a:hover {
  color: var(--vilomem-color);
}

.toc-sep {
  display: none;
}

@media screen and (min-width: 1280px) {
  .toc-container {
    display: block;
    left: calc(50% - 520px - 170px);
  }

  .hero.teaser .hero-body {
    display: block;
  }

  .hero.teaser figure,
  .hero.teaser .subtitle {
    margin-left: 0;
  }
}

@media screen and (min-width: 1500px) {
  .toc-container {
    left: calc(50% - 520px - 190px);
  }
}

/* Container max width adjustment */
.container.is-max-desktop {
  max-width: 1040px;
}

/* Highlight Box */
.highlight-box {
  background: linear-gradient(135deg, #fffbeb 0%, #fff8dc 100%);
  border-left: 3px solid var(--vilomem-color);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
}

/* Columns spacing */
.columns {
  margin-top: 0;
  margin-bottom: 0;
}

/* Strong text styling */
/* Handled in Typography Hierarchy section */


/* Better link styling in content */
.content a {
  color: var(--primary-color);
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

/* Case Study Styles */
.case-study-table {
  display: grid;
  grid-template-columns: 100%;
  gap: 1rem;
  width: 100%;
  font-size: 0.95rem;
  color: var(--text-color);
}

/* Strong text in case study cells */
.case-cell strong {
  font-weight: 600;
  color: var(--text-color);
}

.text-muted {
  color: #9ca3af;
  font-style: italic;
}

.case-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
  display: block;
  object-fit: contain;
}

.case-image img:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-placeholder {
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
  color: #9ca3af;
  padding: 2rem;
  text-align: center;
  border-radius: 6px;
  font-size: 0.85rem;
}

/* Refined Badge */
.case-badge {
  display: inline-block;
  background-color: #ebf5ff; /* Light blue bg */
  color: #1e40af; /* Dark blue text */
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px; /* Pill shape */
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  border: 1px solid #dbeafe;
}

/* Sup styling - for author affiliations */
.publication-authors sup {
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
  color: var(--text-secondary);
}

/* Desktop Layout */
@media screen and (min-width: 769px) {
  .case-study-table {
    display: block;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }

  .case-study-header,
  .case-study-row {
    display: grid;
    grid-template-columns: 140px 1fr 1fr 180px;
    gap: 0;
  }

  .case-study-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-light);
    padding: 0.85rem 0;
    margin-bottom: 0;
    align-items: center;
  }

  .case-header-cell {
    padding: 0 1rem;
    font-weight: 600;
    text-align: left;
    font-size: 0.95rem;
    color: var(--text-color);
  }

  .case-study-row {
    border: none;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    padding: 0;
    align-items: stretch;
    transition: background-color 0.1s ease;
  }

  .case-study-row:hover {
    background-color: #fafafa;
  }

  .case-study-row:last-child {
    border-bottom: none;
  }

  .case-cell {
    padding: 0.875rem 1rem;
    border-right: 1px solid var(--border-light);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-color);
  }

  .case-cell:last-child {
    border-right: none;
  }

  .case-cell.case-question {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.85rem;
  }

  .case-cell.case-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
  }

  .case-cell p {
    margin: 0;
  }
}
