/* === Base Reset & Typography === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #2D1B1B;
  background: #FFF5F5;
}
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.3; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1.5rem; color: #9B2C2C; position: relative; padding-bottom: 0.5rem; }
h2::after { content: ''; position: absolute; bottom: 0; left: 0; width: 60px; height: 3px; background: #2C7A7B; border-radius: 2px; }
h3 { font-size: 1.35rem; margin: 2rem 0 1rem; color: #2D1B1B; }
h4 { font-size: 1.1rem; font-family: 'Inter', sans-serif; font-weight: 600; }
p { margin-bottom: 1rem; }
a { color: #2C7A7B; text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: #9B2C2C; }
img { max-width: 100%; height: auto; display: block; }

/* === Layout === */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-alt { background: #FEF0F0; }

/* === Hero === */
.hero {
  position: relative; min-height: 520px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: #fff; text-align: center;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 1;
  background: url('./assets/hero_bg.png') center/cover no-repeat;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(135deg, rgba(45,27,27,0.88), rgba(44,122,123,0.78));
}
.hero-content { position: relative; z-index: 3; max-width: 800px; padding: 3rem 1.5rem; }
.hero-badge {
  display: inline-block; padding: 0.3rem 1rem; border-radius: 20px;
  background: rgba(255,255,255,0.15); color: #fff; font-size: 0.8rem;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 1.5rem; backdrop-filter: blur(4px);
}
.hero h1 { color: #fff; margin-bottom: 1rem; font-size: 2.4rem; }
.hero-journal { opacity: 0.85; font-size: 0.95rem; margin-bottom: 0.5rem; }
.hero-authors { opacity: 0.75; font-size: 0.9rem; margin-bottom: 1.5rem; }
.hero-keywords { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 1.5rem; }
.chip {
  display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px;
  background: rgba(44,122,123,0.3); color: #fff; font-size: 0.78rem;
  font-weight: 500; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.2);
}
.hero-actions { margin-top: 1rem; }
.btn {
  display: inline-block; padding: 0.7rem 1.8rem; border-radius: 8px;
  background: #2C7A7B; color: #fff; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; transition: background 0.3s, transform 0.2s;
}
.btn:hover { background: #285E61; transform: translateY(-1px); text-decoration: none; }

/* === Abstract Card === */
.abstract-card {
  background: #fff; border-left: 4px solid #9B2C2C; border-radius: 0 12px 12px 0;
  padding: 2rem 2.5rem; box-shadow: 0 2px 16px rgba(155,44,44,0.08);
  font-size: 1.05rem;
}

/* === Cards === */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin: 1.5rem 0; }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.info-card {
  background: #fff; border-radius: 12px; padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(155,44,44,0.06); border-top: 3px solid #2C7A7B;
  transition: transform 0.2s, box-shadow 0.2s;
}
.info-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(155,44,44,0.12); }
.card-icon {
  display: inline-block; padding: 0.3rem 0.8rem; border-radius: 6px;
  background: #FEF0F0; color: #9B2C2C; font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 0.75rem;
}
.info-card h4 { margin-bottom: 0.5rem; }
.info-card p { font-size: 0.92rem; margin-bottom: 0; color: #4A2828; }

/* === Comparison Cards === */
.comparison-card {
  background: #fff; border-radius: 12px; padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(155,44,44,0.06);
}
.comparison-card.synthetic { border-top: 3px solid #9B2C2C; }
.comparison-card.biological { border-top: 3px solid #2C7A7B; }
.comparison-card.peptide { border-top: 3px solid #A08080; }
.comparison-card h4 { margin-bottom: 0.75rem; }
.comparison-card p { font-size: 0.92rem; margin-bottom: 0; }

/* === Barriers List === */
.barriers-list { margin: 1.5rem 0; }
.barrier-item {
  display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem;
  background: #fff; border-radius: 12px; padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 8px rgba(155,44,44,0.05);
}
.barrier-num {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: #9B2C2C; color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 0.9rem;
}
.barrier-item h4 { margin-bottom: 0.3rem; }
.barrier-item p { font-size: 0.92rem; margin-bottom: 0; }

/* === Tables === */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border-radius: 12px; box-shadow: 0 2px 12px rgba(155,44,44,0.06); }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.9rem; }
thead { background: #9B2C2C; color: #fff; }
th { padding: 0.75rem 1rem; text-align: left; font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
td { padding: 0.65rem 1rem; border-bottom: 1px solid #E8D8D8; }
tbody tr:nth-child(even) { background: #FFF9F9; }
tbody tr:hover { background: #FEF0F0; }

/* === Figures === */
.figure-container {
  margin: 2rem 0; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 16px rgba(155,44,44,0.08); border: 1px solid #E8D8D8;
}
.figure-container img { width: 100%; display: block; }
.figure-container figcaption {
  padding: 1rem 1.5rem; font-size: 0.88rem; color: #6B4444;
  border-top: 1px solid #E8D8D8; line-height: 1.5;
}

/* === Trial Failure Cards === */
.trial-failure-cards { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
.failure-card {
  background: #fff; border-radius: 12px; padding: 1.5rem;
  border-left: 4px solid #C53030; box-shadow: 0 2px 12px rgba(155,44,44,0.06);
}
.failure-card h4 { color: #C53030; margin-bottom: 0.5rem; }
.failure-card p { font-size: 0.92rem; margin-bottom: 0; }

/* === Challenge Cards === */
.challenge-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; margin: 1.5rem 0; }
.challenge-card {
  background: #fff; border-radius: 12px; padding: 1.25rem;
  box-shadow: 0 1px 8px rgba(155,44,44,0.05); border-left: 3px solid #C53030;
}
.challenge-card h4 { color: #C53030; margin-bottom: 0.4rem; }
.challenge-card p { font-size: 0.9rem; margin-bottom: 0; }

/* === Criteria / Future Lists === */
.criteria-list, .future-list { list-style: none; margin: 1rem 0; }
.criteria-list li, .future-list li {
  padding: 0.75rem 1rem 0.75rem 1.5rem; margin-bottom: 0.5rem;
  background: #fff; border-radius: 8px; font-size: 0.95rem;
  box-shadow: 0 1px 4px rgba(155,44,44,0.04); position: relative;
}
.criteria-list li::before, .future-list li::before {
  content: '\25B8'; position: absolute; left: 0.5rem; color: #2C7A7B; font-weight: 700;
}

/* === References === */
details { margin: 1rem 0; }
details summary {
  cursor: pointer; font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem; font-weight: 700; color: #9B2C2C; padding: 0.5rem 0;
}
details summary:hover { color: #C53030; }
.ref-list { padding-left: 2rem; margin-top: 1rem; }
.ref-list li { font-size: 0.82rem; color: #6B4444; margin-bottom: 0.4rem; line-height: 1.5; }

/* === Flecto Explanation UI === */
.flecto-note, .flecto-callout, .flecto-card, .flecto-panel {
  margin: 1.5rem 0; border-radius: 10px; padding: 1.25rem 1.5rem;
}
.flecto-note::before, .flecto-callout::before, .flecto-card::before, .flecto-panel::before {
  content: '\1F916 AI explanation';
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  color: #60a5fa; letter-spacing: 0.06em; display: block; margin-bottom: 0.5em;
}
.flecto-note {
  background: #FFF9F5; border-left: 3px solid #2C7A7B; font-size: 0.92rem;
}
.flecto-callout {
  background: #F0FDFA; border: 1px solid #99E6E6; padding: 1.25rem 1.5rem;
}
.flecto-card {
  background: #fff; border: 1px solid #E8D8D8; box-shadow: 0 2px 8px rgba(155,44,44,0.06);
}
.flecto-panel {
  background: #FFF5F5; border: 1px solid #E8D8D8; box-shadow: 0 2px 12px rgba(155,44,44,0.08);
}
.flecto-note h4, .flecto-callout h4, .flecto-card h4, .flecto-panel h4 {
  font-size: 1rem; margin-bottom: 0.5rem; color: #2C7A7B;
}
.flecto-note p, .flecto-callout p, .flecto-card p, .flecto-panel p {
  font-size: 0.92rem; margin-bottom: 0.5rem;
}
.flecto-note ul, .flecto-callout ul, .flecto-card ul, .flecto-panel ul {
  margin: 0.5rem 0 0.5rem 1.5rem; font-size: 0.92rem;
}

/* === Reveal Animation === */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* === Responsive === */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .hero { min-height: 400px; }
  .hero h1 { font-size: 1.7rem; }
  .card-grid, .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
  .abstract-card { padding: 1.5rem; }
  .section { padding: 2.5rem 0; }
  th { font-size: 0.78rem; }
  td { font-size: 0.82rem; }
}
