/* ============================================
   Breast Cancer WDBC ML - Documentation Styles
   Pink breast cancer awareness theme
   ============================================ */

/* === Base & Typography === */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.75;
  color: #2d2d3a;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: #2d2d3a;
  letter-spacing: -0.01em;
}

h2 {
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #f0d0d8;
  font-size: 1.6rem;
  color: #2d2d3a;
}

h3 {
  color: #3d2d3a;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

h4 {
  color: #4a3545;
  font-size: 1.05rem;
}

p {
  color: #4a3545;
  margin-bottom: 1rem;
}

a {
  color: #c2185b;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: #c2185b;
  text-decoration: none;
}

hr {
  border: none;
  border-top: 1px solid #f0d0d8;
  margin: 3.5rem 0;
}

/* === Override Cayman theme header === */
.page-header {
  background: linear-gradient(135deg, rgba(194, 24, 91, 0.82) 0%, rgba(216, 74, 122, 0.75) 40%, rgba(232, 115, 138, 0.68) 100%) !important;
  background-image: linear-gradient(135deg, rgba(194, 24, 91, 0.82) 0%, rgba(216, 74, 122, 0.75) 40%, rgba(232, 115, 138, 0.68) 100%), url('../img/hero-bg.png') !important;
  background-size: cover !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  padding: 3rem 1rem 2.5rem !important;
  position: relative;
}

.page-header .project-name {
  color: #2d2d3a !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.8) !important;
  text-stroke: 1.5px rgba(255, 255, 255, 0.8) !important;
  paint-order: stroke fill !important;
  text-shadow: 
    0 0 25px rgba(255, 255, 255, 0.6),
    0 3px 6px rgba(0, 0, 0, 0.3),
    0 6px 15px rgba(0, 0, 0, 0.2) !important;
}

.page-header .project-tagline {
  color: #2d2d3a !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.7) !important;
  text-stroke: 1px rgba(255, 255, 255, 0.7) !important;
  paint-order: stroke fill !important;
  text-shadow: 
    0 0 20px rgba(255, 255, 255, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 4px 10px rgba(0, 0, 0, 0.15) !important;
  opacity: 0.95 !important;
}

.page-header .btn {
  display: none !important;
}

/* === Portfolio Banner (Top) === */
.portfolio-banner {
  margin: -1.5rem 0 2rem 0;
  background: rgba(245, 200, 215, 0.15);
  border: 1px solid rgba(210, 145, 168, 0.15);
  border-radius: 8px;
  padding: 1.25rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: none;
  backdrop-filter: blur(4px);
}

.portfolio-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.portfolio-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.portfolio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(194, 24, 91, 0.12);
  border-radius: 50%;
  flex-shrink: 0;
  color: #c2185b;
  border: 1px solid rgba(194, 24, 91, 0.15);
}

/* === GitHub Repo Link === */
.github-repo-link {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
  border: none !important;
}

.github-repo-link:hover {
  transform: scale(1.05);
  opacity: 0.85;
  border: none !important;
}

.github-repo-link img {
  height: 28px !important;
  width: auto !important;
  max-width: 100px !important;
  max-height: 28px !important;
  filter: brightness(0) invert(1);
  display: inline-block !important;
}

.portfolio-text {
  flex: 1;
}

.portfolio-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c2185b !important;
  margin: 0 0 0.1rem 0 !important;
  font-weight: 600;
}

.portfolio-name {
  color: #2d2d3a !important;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0 !important;
  letter-spacing: -0.01em;
}

.portfolio-desc {
  color: #5a4555 !important;
  font-size: 0.86rem;
  margin: 0 !important;
  line-height: 1.5;
}

.portfolio-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: #c2185b;
  color: #ffffff !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none !important;
  border: none !important;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.portfolio-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(194, 24, 91, 0.3);
  background: #ad1457;
  text-decoration: none !important;
  border: none !important;
  color: #ffffff !important;
}

/* === Hero Section === */
.hero-section {
  text-align: left;
  padding: 2.5rem 2.5rem 2rem;
  background: rgba(242, 195, 209, 0.18);
  border: 1px solid rgba(210, 145, 168, 0.3);
  border-radius: 6px;
  margin-bottom: 2.5rem;
}

.hero-section h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #2d2d3a;
  letter-spacing: -0.02em;
}

.hero-section .subtitle {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  color: #5a4555;
  font-weight: 400;
  line-height: 1.6;
}

/* === Badges === */
.badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.badges img {
  height: 20px;
}

/* === Summary Grid === */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.summary-item {
  background: #ffffff;
  border: 1px solid rgba(210, 145, 168, 0.3);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
}

.summary-item .label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9b7a8a;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.summary-item .value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #c2185b;
  line-height: 1.2;
}

.summary-item .detail {
  display: block;
  font-size: 0.85rem;
  color: #9b7a8a;
  margin-top: 0.25rem;
}

/* === Pipeline / Methodology Steps === */
.pipeline-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.75rem 0;
  border: 1px solid rgba(210, 145, 168, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(210, 145, 168, 0.2);
  transition: background 0.15s ease;
}

.step:last-child {
  border-bottom: none;
}

.step:hover {
  background: rgba(242, 195, 209, 0.1);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #d84a7a;
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content h4 {
  margin: 0 0 0.2rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d2d3a;
}

.step-content p {
  margin: 0;
  color: #6b5a65;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* === Results Table === */
.results-table {
  overflow-x: auto;
  margin: 1.75rem 0;
}

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

.results-table th {
  background: #d84a7a;
  color: #ffffff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.results-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(210, 145, 168, 0.25);
  color: #4a3545;
}

.results-table tbody tr:hover {
  background: rgba(242, 195, 209, 0.12);
}

.results-table .best-model {
  background: rgba(242, 195, 209, 0.18);
}

.results-table .best-model td {
  color: #2d2d3a;
  font-weight: 500;
}

/* === Note Box === */
.note-box {
  background: rgba(242, 195, 209, 0.15);
  border-left: 3px solid #d84a7a;
  padding: 1.25rem 1.5rem;
  border-radius: 0 4px 4px 0;
  margin: 1.75rem 0;
}

.note-box h4 {
  margin: 0 0 0.5rem 0;
  color: #c2185b;
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.note-box p {
  margin: 0;
  color: #5a4555;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* === Technical Details Section === */
.tech-detail {
  background: #ffffff;
  border: 1px solid rgba(210, 145, 168, 0.3);
  border-radius: 4px;
  padding: 1.5rem;
  margin: 1.25rem 0;
}

.tech-detail h4 {
  margin: 0 0 0.75rem 0;
  color: #2d2d3a;
  font-size: 0.95rem;
}

.tech-detail ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #5a4555;
  font-size: 0.92rem;
  line-height: 1.8;
}

.tech-detail code {
  font-size: 0.85rem;
}

/* === Links Section === */
.links-section {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.75rem 0;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
  border: none;
}

.button.primary {
  background: #d84a7a;
  color: #ffffff;
}

.button.primary:hover {
  background: #c2185b;
}

.button.secondary {
  background: #ffffff;
  color: #c2185b;
  border: 1px solid rgba(210, 145, 168, 0.5);
}

.button.secondary:hover {
  background: rgba(242, 195, 209, 0.15);
  border-color: #d84a7a;
}

/* === Footer Section === */
.footer-section {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid #f0d0d8;
  margin-top: 3.5rem;
  color: #b89aa5;
  font-size: 0.85rem;
}

.footer-section p {
  margin: 0.3rem 0;
  color: #b89aa5;
}

/* === Code Blocks === */
pre {
  background: #2d2d3a;
  color: #f0d0d8;
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.7;
  border: 1px solid #4a3545;
}

code {
  background: rgba(242, 195, 209, 0.18);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85em;
  color: #c2185b;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* === Visualization Styles === */
.viz-container {
  margin: 1.75rem 0;
  text-align: center;
}

.viz-container img {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(210, 145, 168, 0.3);
  border-radius: 4px;
}

.viz-caption {
  margin-top: 0.6rem;
  color: #9b7a8a;
  font-size: 0.85rem;
  line-height: 1.5;
  font-style: italic;
}

.viz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.75rem;
  margin: 1.75rem 0;
}

.viz-item {
  text-align: center;
}

.viz-item img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(210, 145, 168, 0.3);
  border-radius: 4px;
}

/* === Ordered/Unordered Lists === */
ol, ul {
  color: #4a3545;
  line-height: 1.85;
}

ol li, ul li {
  margin-bottom: 0.3rem;
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .hero-section {
    padding: 1.75rem 1.5rem;
  }

  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-section .subtitle {
    font-size: 0.95rem;
  }

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

  .step {
    padding: 1rem;
  }

  .links-section {
    flex-direction: column;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .viz-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .portfolio-content {
    flex-direction: column;
    text-align: center;
  }

  .portfolio-banner {
    padding: 1.5rem;
  }

  .portfolio-button {
    width: 100%;
    justify-content: center;
  }
}

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

/* === Fade-in on Scroll === */
.fade-target {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-visible {
  opacity: 1;
  transform: translateY(0);
}
