:root {
  /* Default to Dark Mode / Cyber Aesthetic */
  --bg-color: #0b0c10;
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  --text-inverse: #0b0c10;

  /* Cyberpunk Neon Accents */
  --primary: #00f0ff;
  /* Cyan */
  --secondary: #7000ff;
  /* Violet */
  --accent: #00ff9d;
  /* Emerald */

  /* Ambient Orbs */
  --ambient-1: rgba(0, 240, 255, 0.15);
  --ambient-2: rgba(112, 0, 255, 0.15);
  --ambient-3: rgba(0, 255, 157, 0.1);
  --ambient-4: rgba(0, 0, 0, 1);

  /* Premium Glassmorphism Cards */
  --card-bg-start: rgba(20, 22, 35, 0.7);
  --card-bg-end: rgba(15, 17, 26, 0.9);
  --card-border-1: rgba(255, 255, 255, 0.1);
  --card-border-2: rgba(255, 255, 255, 0.05);
  --card-shadow-1: rgba(0, 0, 0, 0.5);
  --card-shadow-inset: rgba(255, 255, 255, 0.02);

  /* Interactive Tags */
  --tag-bg: rgba(0, 240, 255, 0.05);
  --tag-border: rgba(0, 240, 255, 0.3);
  --tag-text: #67e8f9;
  --tag-hover-border: var(--primary);
  --tag-shimmer: rgba(255, 255, 255, 0.3);

  /* Sub Categories */
  --sub-cat-bg: rgba(255, 255, 255, 0.02);
  --sub-cat-border: rgba(255, 255, 255, 0.08);

  /* Offcanvas Drawer */
  --drawer-bg: rgba(15, 17, 26, 0.95);
  --drawer-shadow: rgba(0, 0, 0, 0.8);
  --drawer-title: var(--primary);
  --drawer-text: #cbd5e1;
  --resource-card-bg: rgba(255, 255, 255, 0.05);
  --resource-card-hover: rgba(255, 255, 255, 0.1);

  /* Floating Stepper */
  --stepper-bg: rgba(20, 22, 35, 0.6);
  --stepper-hover: rgba(0, 240, 255, 0.15);
  --step-number-bg: rgba(255, 255, 255, 0.1);
  --step-number-hover: var(--primary);
}

/* Light Mode Overrides */
body.light-mode {
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --text-muted: #475569;
  --text-inverse: #ffffff;

  --primary: #2563eb;
  --secondary: #7c3aed;
  --accent: #059669;

  --ambient-1: rgba(37, 99, 235, 0.1);
  --ambient-2: rgba(124, 58, 237, 0.1);
  --ambient-3: rgba(5, 150, 105, 0.1);
  --ambient-4: rgba(248, 250, 252, 1);

  --card-bg-start: rgba(255, 255, 255, 0.85);
  --card-bg-end: rgba(248, 250, 252, 0.95);
  --card-border-1: rgba(0, 0, 0, 0.08);
  --card-border-2: rgba(0, 0, 0, 0.04);
  --card-shadow-1: rgba(0, 0, 0, 0.08);

  --tag-bg: rgba(37, 99, 235, 0.08);
  --tag-border: rgba(37, 99, 235, 0.2);
  --tag-text: #1e40af;
  --tag-hover-border: var(--primary);

  --sub-cat-bg: rgba(0, 0, 0, 0.02);
  --sub-cat-border: rgba(0, 0, 0, 0.08);

  --drawer-bg: rgba(255, 255, 255, 0.95);
  --drawer-title: var(--primary);
  --drawer-text: #334155;
  --resource-card-bg: rgba(0, 0, 0, 0.04);
  --resource-card-hover: rgba(0, 0, 0, 0.08);

  --stepper-bg: rgba(255, 255, 255, 0.8);
  --stepper-hover: rgba(37, 99, 235, 0.1);
  --step-number-bg: rgba(0, 0, 0, 0.1);
  --step-number-hover: rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  position: relative;
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg-start);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border-1);
  color: var(--text-color);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 32px var(--card-shadow-1);
}

.theme-toggle:hover {
  background: var(--primary);
  color: var(--bg-color);
  transform: rotate(30deg) scale(1.15);
  box-shadow: 0 0 20px var(--primary);
  border-color: var(--primary);
}

/* Ambient Background Orbs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.8;
  animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-1 {
  background: var(--ambient-1);
  width: 50vw;
  height: 50vw;
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.glow-2 {
  background: var(--ambient-2);
  width: 60vw;
  height: 60vw;
  bottom: -20%;
  right: -10%;
  animation-delay: -5s;
}

.glow-3 {
  background: var(--ambient-3);
  width: 40vw;
  height: 40vw;
  top: 40%;
  left: 30%;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(5%, 10%) scale(1.1);
  }

  66% {
    transform: translate(-5%, 5%) scale(0.9);
  }

  100% {
    transform: translate(0, -10%) scale(1.05);
  }
}

h1,
h2,
h3 {
  font-family: "Outfit", sans-serif;
}

/* Header */
.header-section {
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.header-section h1 {
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 25px;
  filter: drop-shadow(0 10px 30px rgba(0, 240, 255, 0.3));
}

.header-section p {
  font-size: 1.4rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* Timeline Base */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto 120px;
  padding: 40px 0;
}

/* Glowing Central Line */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-50%);
  border-radius: 2px;
  z-index: 0;
}

.timeline::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: var(--scroll-progress, 0%);
  background: linear-gradient(
    to bottom,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow:
    0 0 20px var(--primary),
    0 0 40px var(--secondary);
  transition: height 0.1s ease-out;
  z-index: 1;
}

/* Scroll Progress Percentage Badge */
.timeline-progress-badge {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  z-index: 20;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.timeline-progress-badge .badge-inner {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 20px;
  box-shadow:
    0 0 12px var(--primary),
    0 0 24px var(--secondary),
    0 2px 10px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%,
  100% {
    box-shadow:
      0 0 12px var(--primary),
      0 0 24px var(--secondary),
      0 2px 10px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow:
      0 0 20px var(--primary),
      0 0 40px var(--secondary),
      0 2px 10px rgba(0, 0, 0, 0.5);
  }
}

body.light-mode .timeline-progress-badge .badge-inner {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.timeline-item {
  position: relative;
  margin-bottom: 80px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  z-index: 2;
  /* For 3D tilt */
}

.timeline-item:nth-child(odd) {
  justify-content: flex-start;
}

.timeline-item:nth-child(even) {
  justify-content: flex-end;
}

/* 3D Premium Cards */
.timeline-content {
  width: 45%;
  background: linear-gradient(135deg, var(--card-bg-start), var(--card-bg-end));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border-1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 35px;
  box-shadow:
    0 20px 50px var(--card-shadow-1),
    inset 0 1px 0 var(--card-shadow-inset);
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}

/* Subtle moving glow inside card on hover */
.timeline-content::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.timeline-item:hover .timeline-content::before {
  opacity: 1;
  animation: rotateGlow 10s linear infinite;
}

@keyframes rotateGlow {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.timeline-content h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--text-color);
  font-weight: 700;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

/* Timeline Icons */
.timeline-icon {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: var(--bg-color);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  color: var(--primary);
  z-index: 10;
  box-shadow:
    0 0 15px rgba(0, 240, 255, 0.4),
    inset 0 0 10px rgba(0, 240, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item:hover .timeline-icon,
.timeline-icon.filled {
  background: var(--primary);
  color: var(--bg-color);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
  border-color: white;
}

.timeline-item:hover .timeline-icon {
  transform: translate(-50%, -50%) scale(1.3);
}

.connecting-line {
  display: none;
}

.timeline-item:nth-child(odd) .connecting-line {
  right: 45%;
  background: linear-gradient(270deg, var(--primary), transparent);
}

.timeline-item:nth-child(even) .connecting-line {
  left: 45%;
}

/* Sub Categories */
.sub-category {
  background: var(--sub-cat-bg);
  border: 1px solid var(--sub-cat-border);
  border-radius: 16px;
  padding: 18px;
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.3s ease;
}

.sub-category:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sub-category h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  border-bottom: 1px solid var(--card-border-2);
  padding-bottom: 10px;
}

/* Tags / Badges */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
  justify-content: inherit !important;
}

.tag {
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--tag-text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.tag::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--tag-shimmer),
    transparent
  );
  transform: skewX(-20deg);
  transition: all 0.5s ease;
}

.tag:hover::before {
  left: 150%;
}

.tag:hover {
  background: var(--primary);
  color: var(--bg-color);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 2px 5px rgba(0, 240, 255, 0.4);
  border-color: var(--primary);
}

/* Floating Stepper Dock */
.stepper-nav-outer {
  display: flex;
  align-items: center;
  max-width: 1060px;
  margin: 0 auto 40px auto;
  position: sticky;
  top: 20px;
  z-index: 100;
  gap: 6px;
}

.stepper-arrow {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--card-border-1);
  background: var(--card-bg-start);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-color);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px var(--card-shadow-1);
  user-select: none;
}

.stepper-arrow:hover {
  background: var(--primary);
  color: var(--bg-color);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
}

.stepper-wrapper {
  display: flex;
  overflow-x: auto;
  flex: 1;
  padding: 12px 15px;
  gap: 12px;
  background: var(--card-bg-start);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border-1);
  border-radius: 50px;
  box-shadow:
    0 20px 40px var(--card-shadow-1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  scrollbar-width: none;
}

.stepper-wrapper::-webkit-scrollbar {
  display: none;
}

.stepper-step {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 30px;
  padding: 8px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper-step:hover {
  background: var(--stepper-hover);
  color: var(--text-color);
  border-color: var(--card-border-2);
  transform: translateY(-2px);
}

.stepper-step.active {
  background: var(--primary);
  color: var(--bg-color);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
}

.step-number {
  background: var(--step-number-bg);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-color);
  font-weight: 700;
  transition: background 0.3s;
}

.stepper-step.active .step-number {
  background: rgba(255, 255, 255, 0.3);
  color: var(--bg-color);
}

.stepper-step:hover .step-number {
  background: var(--primary);
  color: var(--bg-color);
}

/* Offcanvas Drawer */
.offcanvas {
  background: var(--drawer-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: var(--text-color);
  width: 500px !important;
}

.offcanvas.offcanvas-end {
  border-left: 1px solid var(--card-border-2);
  box-shadow: -20px 0 50px var(--drawer-shadow);
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}

.offcanvas.offcanvas-start {
  border-right: 1px solid var(--card-border-2);
  box-shadow: 20px 0 50px var(--drawer-shadow);
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}

.offcanvas-header {
  border-bottom: 1px solid var(--card-border-2);
  padding: 25px 30px;
}

.offcanvas-title {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--drawer-title);
  letter-spacing: -0.5px;
}

.btn-close-custom {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-custom:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  transform: rotate(90deg);
}

.offcanvas-body {
  padding: 30px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--drawer-text);
}

#drawerDesc p {
  margin-bottom: 20px;
}

/* Drawer Topic Image */
.drawer-image-container {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 25px;
  border: 1px solid var(--card-border-1);
  background: var(--card-bg-start);
  box-shadow: 0 8px 24px var(--card-shadow-1);
}

.drawer-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  transition: transform 0.4s ease;
}

.drawer-image-container:hover .drawer-image {
  transform: scale(1.03);
}

/* Gradient overlay at bottom of image */
.drawer-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  border-radius: 0 0 16px 16px;
}

.drawer-image-label {
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.9;
}

/* Light mode image border */
body.light-mode .drawer-image-container {
  border-color: var(--card-border-1);
}

.resource-card {
  background: var(--resource-card-bg);
  border: 1px solid var(--card-border-2);
  border-radius: 16px;
  padding: 20px;
  margin-top: 25px;
  transition: all 0.3s ease;
}

.resource-card:hover {
  background: var(--resource-card-hover);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
}

.resource-card h4 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 700;
  font-family: "Outfit", sans-serif;
}

.resource-card.free h4 {
  color: #10b981;
}

.resource-card.tutor h4 {
  color: #f59e0b;
}

.resource-card.premium h4 {
  color: #8b5cf6;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-color);
  margin-bottom: 12px;
  padding: 10px 15px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

body.light-mode .resource-link {
  background: rgba(255, 255, 255, 0.5);
}

.resource-link:hover {
  background: var(--stepper-hover);
  color: var(--primary);
  transform: translateX(5px);
}

.resource-type {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resource-type.article {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
  border: 1px solid #eab308;
}

.resource-type.course {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.resource-type.docs {
  background: rgba(0, 240, 255, 0.2);
  color: #00f0ff;
  border: 1px solid #00f0ff;
}

.resource-type.video {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.resource-title {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Back to Home Button */
.back-home {
  position: fixed;
  top: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg-start);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border-1);
  color: var(--text-color);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 32px var(--card-shadow-1);
  text-decoration: none;
}

.back-home:hover {
  background: var(--primary);
  color: var(--bg-color);
  transform: scale(1.15);
  box-shadow: 0 0 20px var(--primary);
  border-color: var(--primary);
}
