/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --coral: #e64b35;
  --teal: #4dbbd5;
  --green: #00a087;
  --orange: #FF8C00;
  --navy: #3C5488;
  --brown: #B09C85;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --max-width: 1000px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-800);
  background: #fff;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Hero ===== */
.hero {
  padding: 72px 24px 56px;
  text-align: center;
  background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%);
  border-bottom: 1px solid var(--gray-200);
}

.site-logo {
  position: absolute;
  top: 24px;
  left: 28px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.hero {
  position: relative;
}

.title {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-900);
  max-width: 820px;
  margin: 0 auto 28px;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 24px;
  margin-bottom: 12px;
}

.author {
  font-size: 17px;
  font-weight: 500;
  color: var(--gray-700);
}

.author sup {
  font-size: 11px;
  color: var(--gray-400);
  margin-left: 1px;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin-bottom: 32px;
}

.affiliations span {
  font-size: 14px;
  color: var(--gray-500);
}

.affiliations sup {
  font-size: 10px;
  margin-right: 2px;
}

/* ===== Action Buttons ===== */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--gray-900);
  color: #fff;
}

.btn-primary:hover {
  background: var(--gray-700);
}

.btn-secondary {
  background: #fff;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-disabled {
  background: var(--gray-100);
  color: var(--gray-400);
  border: 1px solid var(--gray-200);
  cursor: default;
  position: relative;
}

.badge-soon {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--orange);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 4px;
}

/* ===== Sections ===== */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--gray-50);
}

.section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  text-align: center;
}

.section-subtitle {
  font-size: 16px;
  color: var(--gray-600);
  max-width: 740px;
  margin: 0 auto 36px;
  text-align: center;
  line-height: 1.7;
}

.subsection-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 48px 0 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gray-200);
}

/* ===== Abstract ===== */
.abstract-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--gray-700);
  max-width: 800px;
  margin: 0 auto;
  text-align: justify;
}

.abstract-text em {
  font-style: italic;
  color: var(--gray-900);
  font-weight: 500;
}

/* ===== Figures ===== */
.figure-full {
  margin: 32px 0;
  text-align: center;
}

.figure-full img {
  width: 100%;
  max-width: 780px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.figure-full figcaption,
.figure-half figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--gray-500);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.figure-full figcaption strong,
.figure-half figcaption strong {
  color: var(--gray-700);
}

.figure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}

.figure-half {
  text-align: center;
}

.figure-half img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ===== Results Highlights ===== */
.results-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.highlight-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  transition: box-shadow 0.15s ease;
}

.highlight-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.highlight-number {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.highlight-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.highlight-detail {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.4;
}

/* ===== Pipeline ===== */
.pipeline {
  margin: 24px 0 40px;
}

.pipeline-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--gray-300);
  padding: 0 8px;
}

.pipeline-step {
  border-radius: 10px;
  padding: 20px;
  border: 2px solid;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.step-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.pipeline-step p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--gray-600);
}

.step-red { border-color: var(--coral); background: rgba(230, 75, 53, 0.04); }
.step-red .step-label { background: var(--coral); }

.step-teal { border-color: var(--teal); background: rgba(77, 187, 213, 0.04); }
.step-teal .step-label { background: var(--teal); }

.step-green { border-color: var(--green); background: rgba(0, 160, 135, 0.04); }
.step-green .step-label { background: var(--green); }

.step-orange { border-color: var(--orange); background: rgba(255, 140, 0, 0.04); }
.step-orange .step-label { background: var(--orange); }

.step-navy { border-color: var(--navy); background: rgba(60, 84, 136, 0.04); }
.step-navy .step-label { background: var(--navy); }

.step-brown { border-color: var(--brown); background: rgba(176, 156, 133, 0.04); }
.step-brown .step-label { background: var(--brown); }

.pipeline-divider {
  text-align: center;
  margin: 20px 0;
  color: var(--gray-400);
  font-size: 14px;
  font-weight: 500;
}

.pipeline-divider span {
  background: #fff;
  padding: 0 16px;
  position: relative;
}

/* ===== Rubric Types ===== */
.rubric-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 8px 0;
}

.rubric-type-card {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 28px;
  background: #fff;
}

.rubric-type-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.rubric-type-card p {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 12px;
  line-height: 1.6;
}

.rubric-type-card ul {
  list-style: none;
  padding: 0;
}

.rubric-type-card li {
  font-size: 13px;
  color: var(--gray-600);
  padding: 4px 0 4px 20px;
  position: relative;
  line-height: 1.5;
}

.rubric-type-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gray-400);
}

/* ===== Representation Comparison ===== */
.comparison-intro {
  font-size: 15px;
  color: var(--gray-600);
  margin-bottom: 20px;
}

.representation-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin: 8px 0 20px;
}

.repr-card {
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid;
}

.repr-header {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.repr-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--gray-700);
  min-height: 300px;
}

.repr-body p {
  margin-bottom: 4px;
}

.repr-section {
  margin-top: 12px !important;
}

.repr-section:first-child {
  margin-top: 0 !important;
}

.repr-naive {
  border-color: var(--coral);
}
.repr-naive .repr-header {
  background: rgba(230, 75, 53, 0.08);
  color: var(--coral);
}
.repr-naive .repr-body {
  background: rgba(230, 75, 53, 0.02);
}

.repr-local {
  border-color: var(--teal);
}
.repr-local .repr-header {
  background: rgba(77, 187, 213, 0.08);
  color: #2a8fa8;
}
.repr-local .repr-body {
  background: rgba(77, 187, 213, 0.02);
}

.repr-global {
  border-color: var(--green);
}
.repr-global .repr-header {
  background: rgba(0, 160, 135, 0.08);
  color: var(--green);
}
.repr-global .repr-body {
  background: rgba(0, 160, 135, 0.02);
}

/* ===== Results Table ===== */
.table-wrapper {
  overflow-x: auto;
  margin: 8px 0 32px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.results-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-300);
  white-space: nowrap;
}

.results-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  font-variant-numeric: tabular-nums;
}

.results-table td:first-child {
  font-weight: 500;
  color: var(--gray-800);
}

.results-table td strong {
  color: var(--navy);
  font-weight: 700;
}

.results-table tbody tr:hover {
  background: rgba(60, 84, 136, 0.03);
}

.row-best {
  background: rgba(60, 84, 136, 0.03);
}

.method-note {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 400;
}

/* ===== BibTeX ===== */
.bibtex-block {
  position: relative;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 28px;
  max-width: 640px;
  margin: 0 auto;
}

.bibtex-block pre {
  margin: 0;
  overflow-x: auto;
}

.bibtex-block code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray-700);
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--gray-500);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  color: var(--gray-700);
  border-color: var(--gray-300);
}

/* ===== Footer ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
}

.footer-note {
  margin-top: 8px;
  font-size: 12px !important;
  color: var(--gray-400) !important;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .results-highlights {
    grid-template-columns: repeat(2, 1fr);
  }

  .pipeline-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pipeline-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
  }

  .rubric-types {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 600px) {
  .hero {
    padding: 48px 16px 40px;
  }

  .title {
    font-size: 1.4rem;
  }

  .author {
    font-size: 15px;
  }

  .section {
    padding: 40px 0;
  }

  .section h2 {
    font-size: 1.4rem;
  }

  .results-highlights {
    grid-template-columns: 1fr;
  }

  .highlight-number {
    font-size: 1.3rem;
  }

  .container {
    padding: 0 16px;
  }
}
