@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #1e3c72;
  --primary-light: #2a5298;
  --accent: #7c3aed;
  --bg-color: #f5f7fb;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; background: var(--bg-color); color: var(--text-dark); line-height: 1.6; }

/* ── Navbar ── */
.navbar {
  background: var(--card-bg); padding: 15px 5%;
  border-bottom: 2px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 1000;
}
.navbar-brand { font-size: 1.5rem; font-weight: 800; color: var(--primary); text-decoration: none; }
.navbar-brand span { color: var(--accent); }

/* ── Container & Breadcrumbs ── */
.container { max-width: 1100px; margin: 0 auto; padding: 30px 20px; }
.breadcrumbs { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; font-weight: 500; }
.breadcrumbs a { color: var(--primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { margin: 0 8px; color: #cbd5e1; }

/* ── Page Header ── */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px; padding: 35px 40px; color: white;
  margin-bottom: 30px; position: relative; overflow: hidden;
  box-shadow: 0 8px 20px rgba(30, 60, 114, 0.15);
}
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.page-header p { font-size: 0.95rem; opacity: 0.9; max-width: 700px; }

/* ── Card Grid (Scalable) ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

/* ── Common Cards ── */
.card {
  background: var(--card-bg); border-radius: 14px; padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  transition: all 0.3s ease; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border-color: var(--primary-light);
}
.card h3 { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; flex-grow: 1; }
.card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-color); padding-top: 15px; margin-top: auto; }
.card-stats { font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.btn-outline { font-size: 0.85rem; font-weight: 600; padding: 6px 14px; border-radius: 8px; border: 2px solid var(--primary); color: var(--primary); transition: 0.2s; }
.card:hover .btn-outline { background: var(--primary); color: white; }

/* ── Badges ── */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge-beginner { background: #dcfce7; color: #166534; }
.badge-intermediate { background: #fef9c3; color: #854d0e; }
.badge-advanced { background: #fee2e2; color: #991b1b; }

/* Responsive */
@media (max-width: 900px) {
  /* Un-stick the header on mobile */
  .custom-site-header { position: relative !important; }
  
  .custom-header-wrapper { flex-direction: column; gap: 15px; text-align: center; }
  .custom-nav-list { justify-content: center; }
}

/* ── Site Header (Original Restored) ────────────────────────── */
.custom-site-header { background: #fff; border-bottom: 2px solid #f0f4f8; padding: 15px 0; box-shadow: 0 4px 15px rgba(0,0,0,0.03); position: sticky; top: 0; z-index: 1000; }
.custom-header-wrapper { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 0 20px; }
.custom-site-title { font-size: 1.8rem; font-weight: 800; color: #1e3c72; text-decoration: none; letter-spacing: -0.5px; }
.custom-site-title:hover { color: #ff4b2b; text-decoration: none; }
.custom-nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 15px; margin: 0; padding: 0; }
.custom-nav-list li a { text-decoration: none; font-size: 0.95rem; font-weight: 600; color: #444; padding: 8px 12px; border-radius: 8px; transition: all 0.3s; display: flex; align-items: center; gap: 6px; }
.custom-nav-list li a:hover { background: #f8f9fa; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.05); }

/* Icon Colors */
.nav-icon-about{color:#4e73df} .nav-icon-research{color:#1cc88a}
.nav-icon-pubs{color:#f6c23e}  .nav-icon-res{color:#36b9cc}
.nav-icon-tools{color:#f59e0b} .nav-icon-books{color:#858796}
.nav-icon-video{color:#ff0000} .nav-icon-blog{color:#e67e22}
.nav-icon-contact{color:#6f42c1}

@media (max-width: 900px) {
  .custom-header-wrapper { flex-direction: column; gap: 15px; text-align: center; }
  .custom-nav-list { justify-content: center; }
}

/* ── Site Footer (Original Restored) ───────────────────────── */
.custom-site-footer { background: #f8f9fa; border-top: 3px solid #1e3c72; padding: 50px 20px 20px; margin-top: 60px; color: #444; font-size: 0.95rem; line-height: 1.6; }
.footer-wrapper { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-col { flex: 1; min-width: 250px; }
.footer-col h3 { color: #1e3c72; font-size: 1.2rem; margin-bottom: 20px; font-weight: 700; position: relative; padding-bottom: 10px; }
.footer-col h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: #ff4b2b; border-radius: 2px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #555; text-decoration: none; transition: color 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: #ff4b2b; }
.footer-socials { display: flex; gap: 15px; margin-top: 20px; }
.footer-socials a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: white; border-radius: 50%; color: #333; text-decoration: none; box-shadow: 0 4px 10px rgba(0,0,0,0.08); transition: all 0.3s; font-size: 1.2rem; }
.footer-socials a:hover { transform: translateY(-5px); }
.footer-socials .yt:hover { color: #ff0000; border: 1px solid #ff0000; }
.footer-socials .tg:hover { color: #0088cc; border: 1px solid #0088cc; }
.footer-socials .em:hover { color: #ea4335; border: 1px solid #ea4335; }
.footer-socials .ig:hover { color: #e1306c; border: 1px solid #e1306c; }
.footer-bottom { text-align: center; padding-top: 25px; margin-top: 40px; border-top: 1px solid #dee2e6; font-size: 0.85rem; color: #6c757d; }
.footer-bottom a { color: #6c757d; text-decoration: none; margin: 0 8px; }
.footer-bottom a:hover { color: #ff4b2b; }