/* ================================================================
   RespiraMFM — Project Page Styles
   ================================================================ */

:root {
  --blue:       #2563eb;
  --blue-dark:  #1d4ed8;
  --blue-light: #eff6ff;
  --teal:       #0d9488;
  --teal-light: #f0fdfa;
  --slate-900:  #0f172a;
  --slate-700:  #334155;
  --slate-500:  #64748b;
  --slate-300:  #cbd5e1;
  --slate-100:  #f1f5f9;
  --white:      #ffffff;
  --border:     #e2e8f0;
  --shadow-sm:  0 1px 3px 0 rgb(0 0 0/.08), 0 1px 2px -1px rgb(0 0 0/.08);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0/.08), 0 2px 4px -2px rgb(0 0 0/.08);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0/.08), 0 4px 6px -4px rgb(0 0 0/.08);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0/.08), 0 8px 10px -6px rgb(0 0 0/.08);
  --radius:     10px;
  --radius-lg:  16px;
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans', 'Segoe UI', sans-serif;
  color: var(--slate-700);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero.pub-hero {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 55%, #0f2d40 100%);
  padding: 5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero.pub-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(37,99,235,.22) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(13,148,136,.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero.pub-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero.pub-hero .hero-body { padding: 0; position: relative; z-index: 1; }

.publication-title {
  font-family: 'Google Sans', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.6rem) !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  color: var(--white) !important;
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem !important;
}

.venue-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #c2185b 0%, #e53935 45%, #ff6f00 100%);
  color: #fff;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.45rem 1.25rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 18px rgba(229, 57, 53, 0.45), 0 1px 4px rgba(0,0,0,0.2);
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.venue-badge:hover {
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 28px rgba(229, 57, 53, 0.55), 0 2px 8px rgba(0,0,0,0.25);
  text-decoration: none;
}

/* Authors */
.publication-authors {
  font-family: 'Google Sans', sans-serif;
  color: rgba(255,255,255,.85);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.publication-authors a {
  color: #93c5fd !important;
  text-decoration: none;
  transition: color .2s;
}

.publication-authors a:hover { color: #bfdbfe !important; text-decoration: underline; }

.author-block { display: inline-block; }

.affil-line {
  font-family: 'Google Sans', sans-serif;
  font-size: 0.9rem;
  color: rgba(255,255,255,.55);
  margin-top: 0.3rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.publication-links { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1rem; }

.pub-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s var(--ease);
  border: none;
  cursor: pointer;
  line-height: 1;
}

.pub-btn-outline {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
  backdrop-filter: blur(6px);
}

.pub-btn-outline:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.6);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

/* ── Metrics strip ──────────────────────────────────────────── */
.metrics-strip {
  background: linear-gradient(135deg, #f0f7ff 0%, #f0fdfa 100%);
  border-top: 1px solid rgba(37,99,235,.12);
  border-bottom: 1px solid rgba(13,148,136,.12);
  padding: 2.25rem 1.5rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.metric-card {
  text-align: center;
  padding: 1rem;
}

.metric-value {
  font-family: 'Google Sans', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.35rem;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--slate-500);
  font-weight: 500;
  line-height: 1.3;
}

.metric-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 0.5rem 0;
}

/* ── Section shared ─────────────────────────────────────────── */
.section { padding: 4rem 1.5rem; }
.section.is-shaded { background: var(--slate-100); }

.section-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--slate-900);
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 3.5px;
  border-radius: 99px;
  background: linear-gradient(90deg, #2563eb, #0d9488, #7c3aed);
  box-shadow: 0 1px 8px rgba(37,99,235,.35);
}

/* ── Section title icon ─────────────────────────────────────── */
.section-icon {
  margin-right: 0.55rem;
  font-size: 1.25rem;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.section-icon.icon-abstract  { color: #0ea5e9; }   /* sky blue   — medical record  */
.section-icon.icon-findings  { color: #10b981; }   /* emerald    — stethoscope     */
.section-icon.icon-method    { color: #8b5cf6; }   /* violet     — microscope      */
.section-icon.icon-results   { color: #f59e0b; }   /* amber      — chart           */
.section-icon.icon-ablation  { color: #ef4444; }   /* red        — flask           */
.section-icon.icon-bibtex    { color: #64748b; }   /* slate      — quote           */

/* ── Metric icon ─────────────────────────────────────────────── */
.metric-icon {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}
.metric-icon .fa-stethoscope { color: #2563eb; }
.metric-icon .fa-bullseye    { color: #0d9488; }
.metric-icon .fa-lungs       { color: #8b5cf6; }
.metric-icon .fa-database    { color: #f59e0b; }

/* ── Disease icons in tables ────────────────────────────────── */
.disease-icon {
  margin-right: 0.35rem;
  font-size: 0.85rem;
  opacity: 0.85;
}
.disease-icon.covid    { color: #dc2626; }
.disease-icon.tb       { color: #7c3aed; }
.disease-icon.copd     { color: #0d9488; }
.disease-icon.asthma   { color: #d97706; }
.disease-icon.pneumonia{ color: #2563eb; }

/* ── Teaser / Figure ────────────────────────────────────────── */
.teaser-section { background: #fff; padding: 3rem 1.5rem 2.5rem; }

.teaser-caption {
  font-size: 1rem;
  color: var(--slate-500);
  text-align: center;
  margin-top: 1.25rem;
  line-height: 1.6;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.teaser-caption strong { color: var(--slate-900); }

.framework-figure img {
  max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

/* ── Abstract ───────────────────────────────────────────────── */
.abstract-card {
  background: linear-gradient(160deg, #ffffff 0%, #f8faff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.abstract-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #2563eb 0%, #0d9488 50%, #7c3aed 100%);
  border-radius: 4px 0 0 4px;
}

.abstract-card p {
  font-size: 1.02rem;
  color: var(--slate-700);
  line-height: 1.8;
  margin: 0;
  text-align: justify;
}

/* Abstract keyword highlights */
.hl-brand {
  background: linear-gradient(135deg, #2563eb, #0d9488);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.hl-disease {
  color: #059669;
  font-weight: 700;
  background: #ecfdf5;
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-style: italic;
}

.hl-metric {
  color: #d97706;
  font-weight: 800;
  background: #fffbeb;
  border-radius: 4px;
  padding: 0.05em 0.35em;
  border-bottom: 2px solid #fbbf24;
}

/* ── Key Findings cards ─────────────────────────────────────── */
.findings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 640px) { .findings-grid { grid-template-columns: 1fr; } }

.finding-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}

.finding-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.finding-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.finding-icon.blue   { background: #eff6ff; color: #2563eb; }
.finding-icon.teal   { background: #f0fdfa; color: #0d9488; }
.finding-icon.violet { background: #f5f3ff; color: #7c3aed; }
.finding-icon.amber  { background: #fffbeb; color: #d97706; }

/* Colored left-border accent per card type */
.finding-card:has(.finding-icon.blue)   { border-left: 3px solid #2563eb; }
.finding-card:has(.finding-icon.teal)   { border-left: 3px solid #0d9488; }
.finding-card:has(.finding-icon.violet) { border-left: 3px solid #7c3aed; }
.finding-card:has(.finding-icon.amber)  { border-left: 3px solid #d97706; }

.finding-card p {
  font-size: 0.93rem;
  color: var(--slate-700);
  line-height: 1.6;
  margin: 0;
}

/* ── Method steps ───────────────────────────────────────────── */
.method-steps { display: flex; flex-direction: column; gap: 0; }

.method-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.75rem 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}

.method-step:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* icon column */
.step-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.step-num {
  font-family: 'Google Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.step-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.step-icon-wrap.s1 .step-num { color: #2563eb; }
.step-icon-wrap.s1 .step-icon-circle {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
  box-shadow: 0 4px 14px rgba(37,99,235,.22);
}

.step-icon-wrap.s2 .step-num { color: #0d9488; }
.step-icon-wrap.s2 .step-icon-circle {
  background: linear-gradient(135deg, #ccfbf1, #99f6e4);
  color: #0f766e;
  box-shadow: 0 4px 14px rgba(13,148,136,.22);
}

/* step label pill */
.step-label {
  display: inline-block;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}

.s1-label { background: #eff6ff; color: #2563eb; }
.s2-label { background: #f0fdfa; color: #0d9488; }

.step-body h4 {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 0.5rem;
}

.step-body p { font-size: 0.93rem; color: var(--slate-700); line-height: 1.7; margin: 0; }

/* connector arrow between steps */
.step-connector {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 2rem;
  color: var(--slate-300);
  font-size: 0.85rem;
}

/* ── Results tables ─────────────────────────────────────────── */
.results-table {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.results-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.results-table thead tr {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
}

.results-table thead th {
  color: #fff;
  padding: 0.9rem 1rem;
  text-align: center;
  font-family: 'Google Sans', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border: none;
  white-space: nowrap;
}

.results-table thead th:first-child { border-radius: var(--radius) 0 0 0; text-align: left; }
.results-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }

.results-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

.results-table tbody tr:last-child { border-bottom: none; }
.results-table tbody tr:hover { background: #f8fafc; }

.results-table tbody td {
  padding: 0.75rem 1rem;
  text-align: center;
  color: var(--slate-700);
  font-size: 0.87rem;
  border: none;
}

.results-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--slate-900);
  padding-left: 1.2rem;
}

.best-result {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
  color: #065f46 !important;
  font-weight: 700 !important;
}

.results-table tfoot td {
  font-size: 0.78rem;
  color: var(--slate-500);
  font-style: italic;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border);
  text-align: left;
  background: var(--slate-100);
}

.table-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.table-badge.supervised { background:#eff6ff; color:#2563eb; }
.table-badge.zero-shot  { background:#f0fdfa; color:#0d9488; }

/* ── BibTeX ─────────────────────────────────────────────────── */
.bibtex-wrapper {
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.bibtex-dots { display: flex; gap: 6px; }
.bibtex-dot  { width: 12px; height: 12px; border-radius: 50%; }
.bibtex-dot.red    { background: #ef4444; }
.bibtex-dot.yellow { background: #f59e0b; }
.bibtex-dot.green  { background: #22c55e; }

.copy-btn {
  background: rgba(255,255,255,.08);
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all .2s;
}

.copy-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.copy-btn.copied { color: #4ade80; border-color: #4ade80; }

.bibtex-wrapper pre {
  background: transparent !important;
  margin: 0;
  padding: 1.5rem 1.5rem !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow-x: auto;
}

.bibtex-wrapper code {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace !important;
  font-size: 0.82rem !important;
  line-height: 1.7;
  color: #e2e8f0 !important;
  background: transparent !important;
}

/* ── Figure caption ─────────────────────────────────────────── */
.figure-caption {
  font-size: 0.83rem;
  color: var(--slate-500);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.5;
  font-style: italic;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--slate-900);
  padding: 2.5rem 1.5rem;
}

.footer p { color: rgba(255,255,255,.45); font-size: 0.85rem; line-height: 1.7; }
.footer a  { color: rgba(255,255,255,.65); transition: color .2s; }
.footer a:hover { color: #fff; text-decoration: underline; }

/* ── Floating UI (More Research / Scroll to Top) ────────────── */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all .25s var(--ease);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 10px 15px -3px rgb(37 99 235 / 0.35);
}

.scroll-to-top:hover { background: var(--blue-dark); transform: translateY(-3px); }
.scroll-to-top.visible { opacity: 1; visibility: visible; }

.more-works-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

/* Rotating conic-gradient border trick */
@property --btn-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes spin-border  { to { --btn-angle: 360deg; } }
@keyframes glow-pulse   { 0%,100% { opacity:.7; transform:scale(1);   }
                          50%      { opacity:1;  transform:scale(1.06); } }
@keyframes btn-entrance { 0%   { opacity:0; transform:translateY(-6px) scale(.95); }
                          100% { opacity:1; transform:translateY(0)    scale(1);    } }
@keyframes shimmer      { 0%   { left:-80%; }  100% { left:130%; } }

.more-works-btn-wrap {
  position: relative;
  display: inline-block;
  border-radius: 999px;
  animation: btn-entrance .55s var(--ease) both;
}

/* Spinning gradient ring behind the button */
.more-works-btn-wrap::before {
  content: '';
  position: absolute;
  inset: -2.5px;
  border-radius: 999px;
  background: conic-gradient(
    from var(--btn-angle),
    #c2185b, #e53935, #ff6f00, #facc15,
    #2563eb, #0d9488, #c2185b
  );
  animation: spin-border 3s linear infinite,
             glow-pulse   2.8s ease-in-out infinite;
  z-index: 0;
  filter: blur(1px);
}

/* White mask so button face stays clean */
.more-works-btn-wrap::after {
  content: '';
  position: absolute;
  inset: 1.5px;
  border-radius: 999px;
  background: #fff;
  z-index: 1;
}

.more-works-btn {
  position: relative;
  z-index: 2;
  background: #fff;
  color: var(--slate-900);
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Google Sans', sans-serif;
  transition: all .25s var(--ease);
  overflow: hidden;  /* for shimmer */
}

/* Shimmer sweep on the button face */
.more-works-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,.65) 50%,
    rgba(255,255,255,0) 70%,
    transparent 100%
  );
  animation: shimmer 2.8s ease-in-out infinite;
  pointer-events: none;
}

.more-works-btn:hover {
  background: #fafafa;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px) scale(1.03);
}

.more-works-btn .dropdown-arrow { font-size: 0.72rem; transition: transform .25s var(--ease); }
.more-works-btn.active .dropdown-arrow { transform: rotate(180deg); }

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: 370px;
  max-width: 90vw;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .25s var(--ease);
  max-height: 70vh;
  overflow-y: auto;
}

.more-works-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.2rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

.dropdown-header h4 { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--slate-900); }

.close-btn {
  background: none; border: none; color: var(--slate-500);
  cursor: pointer; padding: 0.35rem; border-radius: 6px; line-height: 1;
  transition: all .15s;
}
.close-btn:hover { background: var(--slate-100); color: var(--slate-900); }

.works-list { padding: 0.6rem; }

.work-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.8rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--slate-900);
  transition: all .2s;
  margin-bottom: 0.2rem;
}

.work-item:hover { background: var(--slate-100); transform: translateX(3px); }
.work-info { flex: 1; }
.work-info h5 { margin: 0 0 0.3rem; font-size: 0.9rem; font-weight: 600; }
.work-info p  { margin: 0 0 0.3rem; font-size: 0.82rem; color: var(--slate-500); line-height: 1.4; }
.work-venue   { font-size: 0.75rem; color: var(--blue); font-weight: 600; font-style: normal; }
.work-item > .fas { color: var(--slate-300); font-size: 0.8rem; margin-top: 0.15rem; flex-shrink: 0; }

/* ── Dataset Distribution Charts ────────────────────────────── */
.dataset-dist-section { background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); }

.dist-caption {
  text-align: center;
  color: var(--slate-500);
  font-size: 0.95rem;
  font-style: italic;
  margin: -0.5rem 0 2rem;
  letter-spacing: 0.01em;
}

.dist-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

.dist-row1 { grid-template-columns: repeat(3, 1fr); }
.dist-row2 { grid-template-columns: repeat(4, 1fr); }

.dist-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 1.25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Fixed height so all cards are the same square-ish size */
  height: 300px;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}

.dist-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}

.dist-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.dist-icon { font-size: 1rem; }
.dist-icon.covid   { color: #e57373; }
.dist-icon.tb      { color: #ef5350; }
.dist-icon.copd    { color: #4e79a7; }
.dist-icon.asthma  { color: #59a14f; }

.dist-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: 0.01em;
}

.dist-canvas-wrap {
  width: 100%;
  max-width: 130px;
  flex-shrink: 0;
  position: relative;
}

.dist-legend {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.65rem;
  width: 100%;
  padding: 0 0.15rem;
  overflow: hidden;
}

/* 2-column layout for multi-class legends (ICBHI, KAUH) */
.dist-legend.legend-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem 0.4rem;
}

.dist-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--slate-700);
  cursor: pointer;
  border-radius: 6px;
  padding: 0.18rem 0.3rem;
  transition: background .18s;
  white-space: nowrap;
  overflow: hidden;
}

.dist-legend-item:hover { background: var(--slate-100); }

.dist-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero.pub-hero { padding: 3.5rem 1rem 3rem; }
  .findings-grid { grid-template-columns: 1fr; }
  .abstract-card { padding: 1.5rem; }
  .more-works-container { top: auto; bottom: 5.5rem; right: 1rem; }
  .more-works-dropdown { top: auto; bottom: calc(100% + 0.5rem); right: 0; width: calc(100vw - 2rem); }
  .scroll-to-top { bottom: 1.5rem; right: 1rem; }
  .dist-row1 { grid-template-columns: 1fr 1fr; }
  .dist-row2 { grid-template-columns: 1fr 1fr; }
}
