/* ============================================================
   ML Notes — Custom Styles
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --md-primary-fg-color: #7c3aed;
  --md-accent-fg-color: #a855f7;
  --gradient-start: #7c3aed;
  --gradient-end: #06b6d4;
}

/* ── Hero Section on Home Page ───────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0f0524 0%, #1a0a3d 40%, #0c1a3d 100%);
  padding: 5rem 2rem;
  text-align: center;
  border-radius: 1rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e879f9, #818cf8, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}

/* ── Card Grid ────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 1rem;
  padding: 1.75rem;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem 0;
  color: var(--md-primary-fg-color);
}

.card p {
  font-size: 0.9rem;
  color: var(--md-default-fg-color--light);
  margin: 0;
  line-height: 1.6;
}

/* ── Badge Chips ──────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0.15rem;
}

.badge-purple { background: rgba(124,58,237,0.15); color: #a855f7; border: 1px solid rgba(168,85,247,0.3); }
.badge-blue   { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(96,165,250,0.3); }
.badge-cyan   { background: rgba(6,182,212,0.15);  color: #22d3ee; border: 1px solid rgba(34,211,238,0.3); }
.badge-green  { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.badge-orange { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }

/* ── Stats Strip ──────────────────────────────────────────── */
.stats-strip {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
  padding: 1.25rem 2rem;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(6,182,212,0.05));
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 0.75rem;
  min-width: 120px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e879f9, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--md-default-fg-color--light);
  margin-top: 0.25rem;
}

/* ── Navigation Enhancements ──────────────────────────────── */
.md-nav__title {
  font-weight: 600 !important;
}

.md-tabs__link--active {
  font-weight: 600;
}

/* ── Header gradient ──────────────────────────────────────── */
.md-header {
  background: linear-gradient(90deg, #4c1d95, #5b21b6) !important;
}

/* ── Logo size in navbar ──────────────────────────────────── */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 48px !important;
  width: auto !important;
}

.md-header__button.md-logo {
  padding: 0.2rem 0.4rem !important;
}

/* ── Code blocks ──────────────────────────────────────────── */
.highlight pre {
  border-radius: 0.5rem;
}

/* ── Admonitions custom colors ────────────────────────────── */
.md-typeset .admonition.note {
  border-color: #7c3aed;
}
.md-typeset .admonition.note > .admonition-title {
  background-color: rgba(124,58,237,0.1);
}

/* ── Jupyter notebook cells ───────────────────────────────── */
.jp-Cell {
  border-radius: 0.5rem !important;
  margin-bottom: 1rem !important;
}

.jp-InputArea-editor {
  border-radius: 0.4rem !important;
}

/* ── Footer ───────────────────────────────────────────────── */
.md-footer {
  background: linear-gradient(90deg, #0f0524, #1a0a3d) !important;
}

/* ── Progress indicator on notebooks ─────────────────────── */
.notebook-progress {
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border-radius: 2px;
  margin-bottom: 2rem;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.7); }

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .card-grid { grid-template-columns: 1fr; }
  .stats-strip { gap: 0.75rem; }
  .support-section {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Support Section ──────────────────────────────────────── */
.support-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  margin: 3rem 0;
  gap: 2rem;
}

.support-content {
  flex: 1;
}

.support-content h2 {
  margin-top: 0;
  color: var(--md-primary-fg-color);
  font-weight: 700;
}

.support-content p {
  color: var(--md-default-fg-color--light);
  line-height: 1.6;
  font-size: 1rem;
}

.support-thanks {
  font-weight: 600;
  background: linear-gradient(135deg, #e879f9, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.support-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  border: 1px dashed rgba(124, 58, 237, 0.5);
}

.support-qr img {
  width: 150px;
  height: 150px;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.support-qr span {
  font-size: 0.85rem;
  color: #a855f7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.md-content__inner > h1:first-child {
    display: none;
}