:root {
  --brand-red: #b10e1e;
  --brand-red-dark: #8f0f1a;
  --brand-red-soft: #f9e8ea;
  --ink: #1f252d;
  --muted: #5d6773;
  --line: #e6e9ee;
  --bg: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, sans-serif;
}

main {
  min-height: 70vh;
}

.site-nav {
  background: linear-gradient(135deg, var(--brand-red-dark), var(--brand-red));
  box-shadow: 0 8px 20px rgba(177, 14, 30, 0.24);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-red);
  font-weight: 800;
  font-size: 0.78rem;
}

.navbar .nav-link {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
  color: #ffe6e9;
}

.hero-section {
  background:
    radial-gradient(1200px 400px at 95% 5%, rgba(177, 14, 30, 0.08), transparent),
    linear-gradient(180deg, #fff 0%, #fff 100%);
}

.hero-title,
.section-title {
  font-family: "Source Serif 4", Georgia, serif;
  color: #141922;
}

.eyebrow {
  display: inline-block;
  margin: 0;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: var(--brand-red-soft);
  color: var(--brand-red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.py-lg-6 {
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}

.project-card {
  border-top: 3px solid var(--brand-red);
}

.metric-box {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  padding: 1rem;
  height: 100%;
}

.metric-value {
  margin: 0;
  color: var(--brand-red);
  font-size: 1.8rem;
  font-weight: 800;
}

.metric-label {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.timeline {
  padding-left: 1rem;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
}

.timeline li {
  margin-bottom: 0.5rem;
}

.timeline li::marker {
  color: var(--brand-red);
  font-weight: 800;
}

.dataset-table {
  border-color: var(--line);
}

.dataset-table thead th {
  color: #2a3139;
  font-weight: 700;
  background: #fbfcfe;
  border-bottom: 2px solid var(--line);
}

.dataset-table tbody td {
  color: #2f3742;
}

.model-tag {
  color: var(--brand-red);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.border-accent {
  border-top: 4px solid var(--brand-red) !important;
}

.section-max {
  max-width: 780px;
}

.pipeline-step {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  padding: 1.2rem;
}

.pipeline-index {
  margin-bottom: 0.35rem;
  color: var(--brand-red);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.command-block {
  border: 1px solid #ecdde0;
  border-radius: 0.8rem;
  background: #fff9fa;
  overflow: auto;
}

.command-block pre {
  margin: 0;
  padding: 1rem 1.2rem;
}

.command-block code {
  color: #592126;
  font-size: 0.89rem;
}

.demo-head {
  background: #fff;
}

.embed-wrap {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(31, 37, 45, 0.07);
}

.streamlit-frame {
  width: 100%;
  min-height: 82vh;
  border: 0;
  background: #fff;
}

.site-footer {
  background: #fff;
}

.footer-links a {
  font-weight: 600;
}

.github-link svg {
  flex: 0 0 auto;
}

.btn-danger {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
}

.btn-danger:hover,
.btn-danger:focus {
  background-color: var(--brand-red-dark);
  border-color: var(--brand-red-dark);
}

.btn-outline-danger {
  color: var(--brand-red);
  border-color: var(--brand-red);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
}

@media (max-width: 991.98px) {
  .py-lg-6 {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .streamlit-frame {
    min-height: 72vh;
  }
}

@media (max-width: 575.98px) {
  .metric-value {
    font-size: 1.55rem;
  }

  .hero-title {
    font-size: 1.9rem;
    line-height: 1.22;
  }

  .streamlit-frame {
    min-height: 68vh;
  }
}
