/* ============================================================
   SAUL MUPALIA — Main Stylesheet
   Theme: Light + Dark Blue (Navy #0f2447 accent #2563eb)
   Fonts: Syne (headings) · Inter (body)
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --navy:        #0f2447;
  --navy-mid:    #1e3a5f;
  --navy-light:  #2a4d7e;
  --blue:        #2563eb;
  --blue-light:  #3b82f6;
  --blue-pale:   #eff6ff;
  --white:       #ffffff;
  --off-white:   #f8fafc;
  --gray-50:     #f9fafb;
  --gray-100:    #f3f4f6;
  --gray-200:    #e5e7eb;
  --gray-400:    #9ca3af;
  --gray-600:    #4b5563;
  --gray-800:    #1f2937;
  --text-main:   #111827;
  --text-muted:  #6b7280;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(15,36,71,.12);
  --shadow-lg:   0 12px 40px rgba(15,36,71,.18);
  --transition:  all .25s ease;
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }

img { max-width: 100%; height: auto; }

/* ── Utility ─────────────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--blue) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-light-custom { background: var(--gray-50); }

.min-vh-85 { min-height: 85vh; }

/* ── Navbar ──────────────────────────────────────────────────── */
.sm-navbar {
  background: var(--navy) !important;
  box-shadow: 0 2px 20px rgba(15,36,71,.4);
  padding: .75rem 0;
}

.sm-navbar .navbar-brand .brand-text {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--white);
}

.sm-navbar .nav-link {
  font-weight: 500;
  color: rgba(255,255,255,.8) !important;
  padding: .4rem .75rem !important;
  border-radius: 8px;
  transition: var(--transition);
}
.sm-navbar .nav-link:hover,
.sm-navbar .nav-link.active {
  color: var(--white) !important;
  background: rgba(255,255,255,.12);
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a3a6e 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.hero-bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(37,99,235,.2);
  border: 1px solid rgba(37,99,235,.4);
  color: #93c5fd;
  padding: .35rem .9rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
}

.badge-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: var(--white);
}

.hero-tagline {
  font-size: 1.25rem;
  color: rgba(255,255,255,.7);
  margin-top: .5rem;
}

.hero-intro {
  font-size: 1rem;
  color: rgba(255,255,255,.65);
  max-width: 520px;
}

.tech-pills { display: flex; flex-wrap: wrap; gap: .5rem; }

.tech-pill {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 500;
}

/* Hero Avatar */
.hero-avatar-wrapper {
  position: relative;
  display: inline-block;
}

.hero-avatar {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.2);
  box-shadow: var(--shadow-lg);
}

.hero-avatar-placeholder {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 4px solid rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  color: rgba(255,255,255,.3);
}

.avatar-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.2);
  animation: spin-ring 20s linear infinite;
}

@keyframes spin-ring {
  to { transform: rotate(360deg); }
}

.floating-badge {
  position: absolute;
  background: var(--white);
  color: var(--navy);
  padding: .4rem .9rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: .4rem;
  animation: float 3s ease-in-out infinite;
}

.badge-python { top: 10%; left: -10%; }
.badge-django { bottom: 15%; right: -5%; animation-delay: 1.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  animation: bounce-dot 1.5s ease-in-out infinite;
}
@keyframes bounce-dot {
  0%, 100% { transform: translateY(0); opacity: .4; }
  50%       { transform: translateY(8px); opacity: 1; }
}

/* ── Stats Strip ─────────────────────────────────────────────── */
.stats-strip {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.07);
}

.stat-item { padding: .5rem; }

.stat-number {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
}

.stat-label {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Section Shared ──────────────────────────────────────────── */
.section-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blue);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-top: .3rem;
}

/* ── Project Cards ───────────────────────────────────────────── */
.project-card {
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.project-card-img { position: relative; overflow: hidden; height: 200px; }
.project-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card:hover .project-card-img img { transform: scale(1.05); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,36,71,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.project-card:hover .project-overlay { opacity: 1; }

.tech-badge {
  background: var(--blue-pale) !important;
  color: var(--blue) !important;
  font-weight: 500;
  font-size: .7rem;
}

/* ── Blog Cards ──────────────────────────────────────────────── */
.blog-card {
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-card-img { height: 200px; object-fit: cover; width: 100%; }

/* ── SaaS Cards ──────────────────────────────────────────────── */
.saas-card {
  border-radius: var(--radius-lg) !important;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.saas-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.saas-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; }
.saas-logo-placeholder {
  width: 64px; height: 64px;
  background: var(--blue-pale);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: var(--blue);
}

/* ── Betting CTA ─────────────────────────────────────────────── */
.betting-cta-section { background: var(--off-white); }
.betting-cta-card {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a6e 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.betting-icon { font-size: 3rem; }

/* ── Contact Strip ───────────────────────────────────────────── */
.contact-strip { background: var(--gray-50); }

/* ── Footer ──────────────────────────────────────────────────── */
.sm-footer {
  background: var(--navy);
  color: rgba(255,255,255,.75);
}
.footer-brand { font-family: 'Syne', sans-serif; font-weight: 800; color: var(--white); font-size: 1.3rem; }
.footer-heading { font-family: 'Syne', sans-serif; font-weight: 700; color: var(--white); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-links { }
.footer-links li { margin-bottom: .4rem; font-size: .88rem; }
.footer-links a { color: rgba(255,255,255,.65); transition: var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-divider { border-color: rgba(255,255,255,.1); }

.social-btn {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75);
  font-size: 1.1rem;
  transition: var(--transition);
}
.social-btn:hover { background: var(--blue); border-color: var(--blue); color: var(--white); transform: translateY(-2px); }

/* ── Back To Top ─────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--navy); transform: translateY(-2px); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
  font-weight: 600;
}
.btn-primary:hover { background: var(--navy-light) !important; border-color: var(--navy-light) !important; }

.btn-outline-primary {
  border-color: var(--blue) !important;
  color: var(--blue) !important;
}
.btn-outline-primary:hover { background: var(--blue) !important; color: var(--white) !important; }

/* ── Blog / Article Pages ────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 4rem 0 3rem;
}

.post-body { font-size: 1.05rem; line-height: 1.85; }
.post-body h2, .post-body h3 { font-family: 'Syne', sans-serif; color: var(--navy); margin-top: 2rem; }
.post-body img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.post-body code { background: var(--blue-pale); color: var(--blue); padding: .1rem .4rem; border-radius: 4px; font-size: .9em; }
.post-body pre { background: var(--navy); color: #e2e8f0; padding: 1.5rem; border-radius: var(--radius); overflow-x: auto; }
.post-body blockquote { border-left: 4px solid var(--blue); padding: .75rem 1.25rem; background: var(--blue-pale); border-radius: 0 var(--radius) var(--radius) 0; color: var(--gray-600); font-style: italic; }

/* ── Project Gallery (Auto-Scroll) ──────────────────────────── */
.gallery-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--blue) var(--gray-100);
  padding-bottom: .5rem;
}
.gallery-track::-webkit-scrollbar { height: 6px; }
.gallery-track::-webkit-scrollbar-track { background: var(--gray-100); border-radius: 3px; }
.gallery-track::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

.gallery-item {
  flex-shrink: 0;
  width: 340px;
  height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.gallery-nav { display: flex; gap: .5rem; justify-content: center; margin-top: .75rem; }
.gallery-nav-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.gallery-nav-btn:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* ── Betting Pages ────────────────────────────────────────────── */
.prediction-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.prediction-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.prediction-card.premium { border-color: #fbbf24; }

.premium-blur { filter: blur(4px); user-select: none; pointer-events: none; }

.confidence-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--gray-100);
  overflow: hidden;
}
.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #06b6d4);
  border-radius: 3px;
  transition: width .6s ease;
}

.plan-card {
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  transition: var(--transition);
  position: relative;
}
.plan-card.featured { border-color: var(--blue); transform: scale(1.03); }
.plan-card:hover { box-shadow: var(--shadow-lg); }
.plan-price { font-family: 'Syne', sans-serif; font-size: 2.4rem; font-weight: 800; color: var(--navy); }

/* ── Dashboard ────────────────────────────────────────────────── */
.dash-sidebar {
  background: var(--navy);
  min-height: 100vh;
  width: 250px;
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  overflow-y: auto;
  transition: var(--transition);
}
.dash-sidebar .sidebar-brand {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.dash-sidebar .sidebar-brand h5 { font-family: 'Syne', sans-serif; color: var(--white); font-weight: 800; margin: 0; }
.dash-sidebar .sidebar-brand small { color: rgba(255,255,255,.5); font-size: .75rem; }

.dash-nav { padding: 1rem 0; }
.dash-nav .nav-section-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.35);
  padding: .75rem 1.25rem .25rem;
}
.dash-nav .nav-item a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem 1.25rem;
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  font-weight: 500;
  border-radius: 0;
  transition: var(--transition);
}
.dash-nav .nav-item a:hover,
.dash-nav .nav-item a.active {
  color: var(--white);
  background: rgba(255,255,255,.1);
  border-left: 3px solid var(--blue);
}
.dash-nav .nav-item a i { font-size: 1rem; width: 20px; text-align: center; }

.dash-main {
  margin-left: 250px;
  min-height: 100vh;
  background: var(--gray-50);
}

.dash-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dash-content { padding: 1.5rem; }

.stat-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-widget-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.stat-widget-icon.blue { background: var(--blue-pale); color: var(--blue); }
.stat-widget-icon.green { background: #f0fdf4; color: #16a34a; }
.stat-widget-icon.yellow { background: #fffbeb; color: #d97706; }
.stat-widget-icon.red { background: #fef2f2; color: #dc2626; }
.stat-widget-value { font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-widget-label { font-size: .8rem; color: var(--text-muted); margin-top: .2rem; }

.dash-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}
.dash-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-card-header h6 { font-family: 'Syne', sans-serif; font-weight: 700; margin: 0; }
.dash-card-body { padding: 1.25rem; }

/* Dashboard table */
.dash-table { font-size: .88rem; }
.dash-table th { font-weight: 600; color: var(--gray-600); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }

/* ── Feature Toggle Switches ─────────────────────────────────── */
.feature-toggle { padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.feature-toggle:last-child { border-bottom: none; }
.feature-toggle-info h6 { margin: 0; font-size: .9rem; font-weight: 600; }
.feature-toggle-info small { color: var(--text-muted); font-size: .78rem; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-label { font-weight: 600; font-size: .88rem; color: var(--gray-800); }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 .2rem rgba(37,99,235,.15); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  .hero-avatar, .hero-avatar-placeholder { width: 240px; height: 240px; }
  .dash-sidebar { width: 100%; min-height: auto; position: relative; }
  .dash-main { margin-left: 0; }
}

@media (max-width: 768px) {
  .hero-section { padding: 3rem 0 2rem; text-align: center; }
  .hero-intro { margin: 0 auto; }
  .hero-avatar-wrapper { margin-top: 2rem; }
  .floating-badge { display: none; }
}

/* ── Animations ──────────────────────────────────────────────── */
[data-animate] { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
[data-animate="fade-left"] { transform: translateX(20px); }
[data-animate].visible { opacity: 1; transform: none; }
