/* ===========================
   PatientSim Project Page
   =========================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:   #2563eb;
  --blue-light: #dbeafe;
  --green:  #059669;
  --green-light: #d1fae5;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --teal:   #0d9488;
  --teal-light: #ccfbf1;
  --dark:   #111827;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--gray-900);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 780px; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f2a4a 100%);
  color: var(--white);
  padding: 72px 0 60px;
  text-align: center;
}

.venue-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 28px;
  color: #e2e8f0;
}

.venue-badge .spotlight {
  color: #fbbf24;
  font-weight: 700;
}

.paper-title {
  font-family: 'Source Serif 4', serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #000000;
  margin-bottom: 12px;
}

.paper-subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 400;
  color: #94a3b8;
  margin-bottom: 32px;
  line-height: 1.4;
}

.authors {
  font-size: 16px;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.author {
  display: inline;
  font-weight: 500;
  color: #e2e8f0;
}

.author sup { font-size: 10px; color: #93c5fd; }

.affiliations {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 36px;
}

.affiliations sup { font-size: 10px; color: #93c5fd; }
.affiliations span { margin: 0 10px; }

/* Links / Buttons */
.links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }

.btn-primary { background: var(--blue); color: var(--white); }
.btn-dark    { background: #1e293b; color: var(--white); border: 1px solid rgba(255,255,255,0.15); }
.btn-teal    { background: var(--teal); color: var(--white); }
.btn-outline { background: #64748b; color: var(--white); }

/* ===== Teaser ===== */
.teaser { padding: 48px 0; background: var(--gray-50); }

.teaser-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
}

.teaser-diagram { overflow-x: auto; }

.diagram-row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 640px;
}

.diagram-box {
  flex: 1;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.diagram-box.clinical  { background: var(--blue-light);   border: 2px solid #93c5fd; }
.diagram-box.persona   { background: var(--purple-light); border: 2px solid #c4b5fd; }
.diagram-box.output    { background: var(--green-light);  border: 2px solid #6ee7b7; }

.box-icon { font-size: 28px; margin-bottom: 8px; }
.diagram-box.clinical  .box-icon { color: var(--blue);   }
.diagram-box.persona   .box-icon { color: var(--purple); }
.diagram-box.output    .box-icon { color: var(--green);  }

.box-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.box-desc  { font-size: 12px; color: var(--gray-500); margin-bottom: 10px; }

.box-items { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.box-items span {
  background: rgba(255,255,255,0.7);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
}

.persona-axes { text-align: left; }
.axis {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  background: rgba(255,255,255,0.6);
  font-size: 11px;
}
.axis-label { font-weight: 500; }
.axis-count { color: var(--purple); font-weight: 600; font-size: 11px; }

.arrow-right { font-size: 24px; color: var(--gray-300); flex-shrink: 0; }

.teaser-caption {
  text-align: center;
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 20px;
  font-style: italic;
}

/* ===== Sections ===== */
.section     { padding: 64px 0; }
.section-alt { background: var(--gray-50); }

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 30px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 40px;
  color: var(--gray-900);
}

/* ===== Abstract ===== */
.abstract-text {
  font-size: 17px;
  line-height: 1.75;
  color: var(--gray-700);
  margin-bottom: 16px;
  text-align: justify;
}

/* ===== Cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.card-icon.blue   { background: var(--blue-light);   color: var(--blue);   }
.card-icon.green  { background: var(--green-light);  color: var(--green);  }
.card-icon.purple { background: var(--purple-light); color: var(--purple); }

.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.card p  { font-size: 14px; color: var(--gray-500); line-height: 1.6; }

/* ===== Method ===== */
.method-steps { display: flex; flex-direction: column; gap: 36px; }

.method-step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}

.step-content { flex: 1; }
.step-content h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.step-content p  { color: var(--gray-700); margin-bottom: 14px; font-size: 15px; }

.disease-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 500;
}

.axis-table { border: 1px solid var(--gray-300); border-radius: 8px; overflow: hidden; }
.axis-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--gray-300);
  font-size: 14px;
}
.axis-row:last-child { border-bottom: none; }
.axis-row.header { background: var(--gray-100); font-weight: 700; }
.axis-row span {
  padding: 10px 16px;
}
.axis-row span:first-child {
  border-right: 1px solid var(--gray-300);
  color: var(--gray-700);
  font-weight: 500;
}

.highlight-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 10px;
}
.highlight-box i { color: #f59e0b; flex-shrink: 0; }

.rq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.rq-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
}
.rq-label {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}
.rq-card strong { display: block; margin-bottom: 6px; font-size: 15px; }
.rq-card p { color: var(--gray-500); font-size: 13px; margin: 0; }

/* ===== Results ===== */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.result-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--blue);
}

.result-number {
  font-size: 42px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 8px;
}
.result-number span { font-size: 22px; font-weight: 400; color: var(--gray-500); }

.result-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.result-desc { font-size: 13px; color: var(--gray-500); }

.results-note {
  background: var(--blue-light);
  border: 1px solid #93c5fd;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  color: #1e3a8a;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.results-note i { color: var(--blue); flex-shrink: 0; margin-top: 2px; }

/* ===== Dataset ===== */
.dataset-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 720px) { .dataset-layout { grid-template-columns: 1fr; } }

.dataset-info p { font-size: 15px; color: var(--gray-700); margin-bottom: 20px; }

.dataset-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 24px;
}
.dataset-table th, .dataset-table td {
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  text-align: left;
}
.dataset-table th { background: var(--gray-100); font-weight: 600; }
.dataset-table tr:nth-child(even) td { background: var(--gray-50); }

.dataset-stats {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { display: block; font-size: 28px; font-weight: 700; color: var(--blue); }
.stat-lbl { display: block; font-size: 12px; color: var(--gray-500); font-weight: 500; }

.dataset-access { display: flex; flex-direction: column; gap: 20px; }

.access-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.access-card i { color: var(--gray-500); margin-bottom: 12px; display: block; }
.access-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.access-card p { font-size: 13px; color: var(--gray-500); margin-bottom: 16px; }

/* ===== Limitations ===== */
.limitations-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.limitations-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  font-size: 15px;
}
.limitations-list li i {
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 2px;
}
.limitations-list li span { color: var(--gray-700); }

/* ===== BibTeX ===== */
.bibtex {
  background: #0f172a;
  border-radius: var(--radius);
  padding: 28px;
  overflow-x: auto;
}
.bibtex code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre;
}

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: #94a3b8;
  text-align: center;
  padding: 28px;
  font-size: 13px;
}
.footer a { color: #60a5fa; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .footer-cc { margin-top: 8px; font-size: 12px; color: #475569; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .method-step { flex-direction: column; }
  .diagram-row { flex-direction: column; min-width: unset; }
  .arrow-right { transform: rotate(90deg); }
  .axis-row { grid-template-columns: 1fr; }
  .axis-row span:first-child { border-right: none; border-bottom: 1px solid var(--gray-300); }
}
