/* =============================================
   BOOKTOWN CLASSES – ENHANCED UI/UX THEME
   ============================================= */

/* ---------- ROOT VARIABLES ---------- */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-light: #475569;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --gold: #c4a747;
  --gold-light: #e2c86b;
  --footer-bg: #0f172a;
  --footer-text: #94a3b8;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s ease;
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
}

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- FLOATING SHAPES ---------- */
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.04;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -100px;
  left: -100px;
  animation: floatSlow 20s infinite alternate;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--gold);
  bottom: -80px;
  right: -80px;
  animation: floatSlow 25s infinite alternate-reverse;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: var(--accent);
  top: 50%;
  left: 50%;
  animation: floatSlow 30s infinite alternate;
}

@keyframes floatSlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(30px, 20px) rotate(5deg); }
}

/* ---------- DARK HEADER (MATCHES SIDEBAR STYLE) ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 72px;
  background: #213351;                    /* deep navy */
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #ea6060;                        /* red accent like sidebar title */
  font-family: var(--font-heading);
}

.navbar .logo i {
  color: #ea6060;
}

.navbar .logo span {
  color: #ffffff;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #ea6060;
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.btn-cta-small {
  background: #3b82f6;                   /* blue button – pops on dark bg */
  color: #ffffff !important;
  padding: 8px 18px;
  border-radius: 30px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}

.btn-cta-small:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 8px;
}

/* Mobile sidebar navigation */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .navbar .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: #213351;
    flex-direction: column;
    gap: 4px;
    padding: 100px 24px 32px;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.25s ease;
    z-index: 998;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }

  .navbar .nav-links.show {
    transform: translateX(0);
    opacity: 1;
  }

  .navbar .nav-links a {
    color: rgba(255,255,255,0.85);
    padding: 14px 16px;
    border-radius: 8px;
  }

  .navbar .nav-links a:hover {
    background: rgba(255,255,255,0.1);
  }

  .navbar .nav-links a.active {
    background: rgba(234,96,96,0.15);
    color: #ffffff;
    border-left: 3px solid #ea6060;
  }
}

/* ---------- HERO SECTION ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 80px 0 64px;
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-content .highlight {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.6;
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 14px 28px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37,99,235,0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 12px 24px;
  border-radius: 40px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

/* Hero carousel */
.hero-carousel {
  width: 100%;
  max-width: 504px;
  margin: 0 auto;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1 / 1;
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.carousel-btn:hover {
  background: #fff;
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
}

/* ---------- ADVANTAGE CARDS ---------- */
.advantage-full-width {
  background: #fff;
  padding: 72px 0;
}

.advantage-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title-accent {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--text);
}

.advantage-sub {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 40px;
}

.advantage-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.advantage-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid #e2e8f0;
}

.advantage-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.advantage-icon {
  font-size: 2.4rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.advantage-card h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.advantage-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.advantage-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 30px;
  font-weight: 600;
}

/* ---------- PROGRAMS GRID ---------- */
.section-title {
  text-align: center;
  font-size: 2rem;
  margin: 80px 0 40px;
  color: var(--text);
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.program-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid #e2e8f0;
}

.program-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.program-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.program-card h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.program-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 30px;
  font-weight: 600;
}

/* ---------- FACULTY ---------- */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-bottom: 80px;
}

.faculty-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  border: 1px solid #e2e8f0;
}

.faculty-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.faculty-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 4px solid var(--accent);
}

.faculty-card h3 {
  margin-bottom: 4px;
}

.role {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.faculty-card p {
  color: var(--text-light);
}

/* ---------- ABOUT + STATS ---------- */
.about-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 80px 0;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 12px;
}

.about-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: space-around;
}

.stat-item {
  text-align: center;
  font-weight: 600;
  color: var(--text-light);
}

.stat-number {
  display: block;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
}

/* ---------- TESTIMONIALS ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.testimonial {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  font-style: italic;
  border: 1px solid #e2e8f0;
}

.testimonial p {
  margin-bottom: 12px;
  color: var(--text);
}

.stars {
  color: #fbbf24;
  margin-top: 4px;
}

/* ---------- DEMO CTA BANNER ---------- */
.demo-cta-banner {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: var(--radius);
  padding: 56px 32px;
  text-align: center;
  color: #fff;
  margin-bottom: 80px;
}

.demo-cta-banner h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.demo-cta-banner p {
  margin-bottom: 32px;
  color: #cbd5e1;
}

/* ---------- FAQ ---------- */
.faq-section {
  margin-bottom: 80px;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.faq-question {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.faq-question:hover {
  background: #f1f5f9;
}

.faq-question i {
  transition: transform 0.3s;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  padding: 0 24px;
  overflow: hidden;
  background: #f8fafc;
  color: var(--text-light);
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 16px 24px;
}

/* ---------- CONTACT ---------- */
.contact-cta {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  padding: 56px 32px;
  border-radius: var(--radius);
  text-align: center;
  margin: 40px 0 80px;
}

.contact-cta h2 {
  font-size: 2rem;
  margin-bottom: 24px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
}

.contact-form button {
  background: var(--gold);
  color: #0f172a;
  border: none;
  padding: 14px;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.contact-form button:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* ---------- WHATSAPP FLOAT ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px 12px 18px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  z-index: 990;
  transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(37,211,102,0.5);
  color: #fff;
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
  padding: 48px 24px 24px;
  margin-top: 64px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.footer-links a {
  color: #cbd5e1;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

footer p {
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/* ---------- CODING PAGE SPECIFIC ---------- */
.infocard-grid,
.why-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 64px;
}

.infocard-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.infocard {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid #e2e8f0;
}

.infocard:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.infocard-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.why-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.why-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border-left: 4px solid var(--accent);
}

.why-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.why-card i {
  font-size: 2.4rem;
  color: var(--accent);
  margin-bottom: 14px;
}

/* Curriculum table */
.curriculum-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.curriculum-table th {
  background: var(--accent);
  color: #fff;
  padding: 16px;
  text-align: left;
}

.curriculum-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.curriculum-table tr:last-child td {
  border-bottom: none;
}

.cta-dark {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  color: #fff;
  margin: 60px auto;
}

.cta-dark h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.cta-dark p {
  margin-bottom: 28px;
  color: #94a3b8;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .about-wrap {
    grid-template-columns: 1fr;
  }

  .demo-cta-banner,
  .contact-cta {
    padding: 40px 20px;
  }
}


.landing-graphs {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.graph-section {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.graph-section .section-title {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #1e293b;
}

.graph-note {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  margin-top: 0.2rem;
}

.chart-container {
  position: relative;
  max-height: 320px;
  width: 100%;
}

/* Data flow infographic */
.data-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f1f5f9;
  padding: 1.2rem 1rem;
  border-radius: 16px;
  min-width: 100px;
  text-align: center;
  font-weight: 600;
  color: #1e293b;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.flow-step:hover {
  transform: translateY(-4px);
}
.flow-step i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #3b82f6;
}

.flow-arrow {
  font-size: 1.8rem;
  color: #94a3b8;
  margin: 0 -0.3rem;
}


/* ========== GLOBAL DARK/LIGHT MODE ========== */
body.light-mode {
  --bg: #f9fafb;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --card-bg: rgba(255,255,255,0.8);
  background: var(--bg);
  color: var(--text);
}
body.dark-mode {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --card-bg: rgba(30,41,59,0.8);
  background: var(--bg);
  color: var(--text);
}

/* ========== CODE RAIN ========== */
.code-rain {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.15;
  pointer-events: none;
}

/* ========== DARK MODE TOGGLE ========== */
.dark-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--surface);
  border: none;
  border-radius: 50%;
  width: 40px; height: 40px;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== HERO ADVANCED ========== */
.hero-advanced {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}
.hero-content {
  max-width: 600px;
}
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
}
.btn-glass {
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  background: rgba(59,130,246,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59,130,246,0.3);
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}
.btn-glass:hover {
  background: #3b82f6;
  color: white;
}
.code-editor-mockup {
  background: #1e1e2e;
  border-radius: 16px;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.editor-header {
  padding: 10px 16px;
  background: #16162a;
  border-radius: 16px 16px 0 0;
  display: flex;
  gap: 6px;
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.typing-code {
  color: #abb2bf;
  padding: 16px;
  font-family: 'Courier New', monospace;
}

/* ========== STATS SECTION ========== */
.stats-section {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 3rem auto;
  max-width: 900px;
  z-index: 1;
  position: relative;
}
.stat-item {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}
.stat-item i {
  font-size: 2rem;
  color: #3b82f6;
  margin-bottom: 0.5rem;
}
.counter {
  font-size: 2.5rem;
  font-weight: 800;
  color: #3b82f6;
}

/* ========== SECTION CARDS ========== */
.section-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 2.5rem;
  margin: 2rem auto;
  max-width: 1000px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  position: relative;
  z-index: 1;
}
.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ========== CHART ========== */
.chart-wrapper {
  height: 300px;
  position: relative;
}

/* ========== SORTING VISUALIZER ========== */
.sort-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.sort-controls select, .sort-controls button {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.bars-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 300px;
  background: rgba(0,0,0,0.05);
  border-radius: 12px;
  padding: 0 1rem;
  margin-bottom: 1rem;
}
.bar {
  background: #3b82f6;
  border-radius: 4px 4px 0 0;
  transition: height 0.1s ease;
}
.sort-time {
  margin-left: auto;
  font-weight: bold;
}

/* ========== DATA FLOW SVG ========== */
.data-flow-svg svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}
.graph-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ========== TECH GRID ========== */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 16px;
  min-width: 100px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}
.tech-item:hover {
  transform: translateY(-5px);
}
.tech-item i {
  font-size: 2rem;
  color: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .section-card { padding: 1.5rem; }
}

/* Language controls */
.lang-controls {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.lang-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  border: 1px solid #cbd5e1;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.lang-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.lang-highlight {
  text-align: center;
  margin-top: 1rem;
  font-weight: 600;
}
.highlight-badge {
  background: #3b82f6;
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

/* Chart wrapper responsive */
.chart-wrapper {
  width: 100%;
}

/* ========== TECH STACK GEN‑Z ========== */
.tech-stack-zone {
  text-align: center;
  overflow: hidden; /* for tilting cards */
}

.tech-vibe {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  letter-spacing: 0.5px;
}

.emoji-pop {
  display: inline-block;
  animation: bouncePop 1.5s infinite;
}

/* Cluster of floating cards */
.tech-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  perspective: 1000px;
}

/* Each card */
.tech-item {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 1.8rem 1.2rem 1.2rem;
  width: 160px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  border: 1px solid rgba(59,130,246,0.2);
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transform: translateZ(0);
}

.tech-item:hover {
  transform: translateY(-8px) scale(1.03) rotateX(3deg) rotateY(3deg);
  box-shadow: 0 20px 30px rgba(59,130,246,0.15);
  border-color: #3b82f6;
}

/* Tech icon wrap with glowing border */
.tech-icon-wrap {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #3b82f6;
  transition: all 0.3s;
}

.tech-item:hover .tech-icon-wrap {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  box-shadow: 0 0 20px rgba(59,130,246,0.5);
}

.tech-name {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Skill bar (progress) */
.skill-bar {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 10px;
  transition: width 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}

/* On hover fill the bar based on data-skill (handled by JS) – but we also want a default fill */
.tech-item:hover .skill-fill {
  /* JS handles dynamic width */
}

.skill-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  background: rgba(59,130,246,0.15);
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
}

.tech-footer {
  margin-top: 2rem;
  font-weight: 600;
  color: var(--muted);
}

/* Bounce animation for emoji */
@keyframes bouncePop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ========== ARSENAL DUAL PANEL LAYOUT ========== */
.arsenal-zone {
  max-width: 1200px;  /* a bit wider to fit two panels */
}

.arsenal-grid {
  display: flex;
  gap: 2rem;
  align-items: stretch;
  margin-top: 1.5rem;
  flex-wrap: wrap;  /* stacks on small screens */
}

.arsenal-panel {
  flex: 1 1 300px;   /* minimum 300px, then share space */
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  border: 1px solid rgba(59,130,246,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}

.arsenal-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(59,130,246,0.1);
}

.panel-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.panel-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* Adjust the tech grid to fit inside the panel (already works) */
.tech-panel .tech-cluster {
  gap: 1rem;          /* slightly tighter because panel is smaller */
  justify-content: center;
}

.tech-panel .tech-item {
  width: 140px;       /* slightly smaller cards */
  padding: 1.2rem 0.8rem;
}

.chart-panel .chart-wrapper {
  max-height: 280px;  /* ensure chart doesn't overflow */
}

/* On mobile, panels stack naturally; you can force single column if needed */
@media (max-width: 768px) {
  .arsenal-grid {
    flex-direction: column;
  }
}

/* ========== TECH STACK ADVANCED INTERACTIVE ========== */
.tech-stack-zone {
  perspective: 1200px;
}

/* Controls */
.tech-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  align-items: center;
}
.tech-controls button {
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  background: var(--card-bg);
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.tech-controls button:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}
.compare-mode-btn.active {
  background: #f59e0b;
  color: #0f172a;
}
.compare-hint {
  font-size: 0.85rem;
  color: var(--muted);
  display: none;
}
.compare-hint.visible {
  display: inline-block;
}

/* Cluster with floating animation */
.tech-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

/* Card container */
.tech-item {
  width: 160px;
  height: 220px;
  position: relative;
  cursor: pointer;
  transition: transform 0.5s, box-shadow 0.3s;
  transform-style: preserve-3d;
}

/* Floating animation – different delays per card for natural motion */
.tech-item:nth-child(odd) {
  animation: floatUpDown 6s ease-in-out infinite;
}
.tech-item:nth-child(even) {
  animation: floatUpDown 7s ease-in-out infinite reverse;
}
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Inner wrapper for flip */
.tech-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
}

/* Flip on click (class added via JS) */
.tech-item.flipped .tech-inner {
  transform: rotateY(180deg);
}

/* Front and back faces */
.tech-front, .tech-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
}

.tech-front {
  background: inherit;
  z-index: 2;
}

.tech-back {
  background: var(--card-bg);
  transform: rotateY(180deg);
  text-align: center;
  color: var(--text);
}
.tech-back h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.tech-back p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Front styling unchanged */
.tech-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(139,92,246,0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #3b82f6;
  transition: all 0.3s;
}
.tech-item:hover .tech-icon-wrap {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  box-shadow: 0 0 25px rgba(59,130,246,0.6);
}
.tech-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.skill-bar {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 10px;
  transition: width 1s;
}
.tech-item:hover .skill-fill {
  width: var(--skill);  /* we'll set via JS */
}

/* Compare mode highlight */
.tech-item.selected {
  outline: 3px solid #f59e0b;
  outline-offset: 4px;
  box-shadow: 0 0 20px rgba(245,158,11,0.5);
  transform: scale(1.05);
}

/* Particle effect (empty container where JS injects) */
.particle {
  position: absolute;
  font-size: 1.2rem;
  pointer-events: none;
  animation: particleFly 0.8s ease-out forwards;
  z-index: 10;
}
@keyframes particleFly {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.3); }
}

.tech-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--muted);
}


/* Duel result display */
.duel-bar {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem auto;
  max-width: 500px;
  border: 1px solid rgba(59,130,246,0.3);
  text-align: center;
}
.duel-title {
  font-weight: 700;
  margin-bottom: 1rem;
  color: #f59e0b;
}
.duel-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.duel-row span:first-child, .duel-row span:last-child {
  width: 60px;
  font-weight: 600;
  color: var(--text);
}
.duel-track {
  flex: 1;
  height: 10px;
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
}
.duel-fill {
  height: 100%;
  border-radius: 10px;
}
.duel-fill.left { background: #3b82f6; }
.duel-fill.right { background: #f59e0b; }
.duel-winner {
  margin-top: 1rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: #f59e0b;
}


/* ========== TECH STACK – CLEAN FLOATING CARDS ========== */
.tech-stack-zone { perspective: none; }  /* remove 3D perspective */

.tech-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  align-items: center;
}
.tech-controls button {
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  background: var(--card-bg);
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.tech-controls button:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}
.compare-mode-btn.active {
  background: #f59e0b;
  color: #0f172a;
}
.compare-hint {
  font-size: 0.85rem;
  color: var(--muted);
  display: none;
}
.compare-hint.visible { display: inline-block; }

/* Card cluster */
.tech-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  position: relative;
}

/* Individual card */
.tech-item {
  width: 150px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 1.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(59,130,246,0.15);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  z-index: 1;
}

/* Floating up‑down animation */
.tech-item:nth-child(odd) {
  animation: floatUpDown 6s ease-in-out infinite;
}
.tech-item:nth-child(even) {
  animation: floatUpDown 7s ease-in-out infinite reverse;
}
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.tech-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 30px rgba(59,130,246,0.2);
  z-index: 2;
}

/* Icon wrap */
.tech-icon-wrap {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(139,92,246,0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: #3b82f6;
  transition: all 0.3s;
}
.tech-item:hover .tech-icon-wrap {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  box-shadow: 0 0 20px rgba(59,130,246,0.6);
}

.tech-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-transform: uppercase;
}

/* Skill bar (visible on hover) */
.skill-bar {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 10px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}
.tech-item:hover .skill-fill {
  width: var(--skill);  /* set via JS */
}

.skill-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  background: rgba(59,130,246,0.15);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
}

/* Selected state (compare mode) */
.tech-item.selected {
  outline: 3px solid #f59e0b;
  outline-offset: 4px;
  box-shadow: 0 0 20px rgba(245,158,11,0.5);
  transform: scale(1.05) !important;
}

/* --------- Detail overlay (click to expand) --------- */
.tech-detail-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.tech-detail-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.tech-detail-card {
  background: var(--surface, #fff);
  border-radius: 24px;
  padding: 2rem;
  max-width: 320px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.tech-detail-card .close-detail {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text);
}
.detail-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.detail-name {
  font-size: 1.6rem;
  font-weight: 700;
}
.detail-desc {
  color: var(--muted);
  margin: 0.5rem 0 1rem;
}
.detail-bar {
  width: 100%;
  height: 10px;
  margin: 1rem 0;
}
.detail-percent {
  font-weight: 800;
  color: #3b82f6;
}

/* --------- Duel bar (compare result) --------- */
.duel-bar {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem auto;
  max-width: 500px;
  border: 1px solid rgba(59,130,246,0.3);
  text-align: center;
}
.duel-title {
  font-weight: 700;
  margin-bottom: 1rem;
  color: #f59e0b;
}
.duel-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.duel-row span:first-child, .duel-row span:last-child {
  width: 50px;
  font-weight: 600;
  color: var(--text);
}
.duel-track {
  flex: 1;
  height: 10px;
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
}
.duel-fill { height: 100%; border-radius: 10px; }
.duel-fill.left { background: #3b82f6; }
.duel-fill.right { background: #f59e0b; }
.duel-winner {
  margin-top: 1rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: #f59e0b;
}

/* ========== LANGUAGE CHART – GEN‑Z NEON UPGRADE ========== */
.lang-zone {
  text-align: center;
}

/* Glassy chart container with neon pulse */
.glow-chart {
  position: relative;
  border-radius: 24px;
  padding: 0.5rem;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  box-shadow: 0 0 20px rgba(59,130,246,0.15), inset 0 0 10px rgba(255,255,255,0.1);
  transition: box-shadow 0.5s ease;
  overflow: hidden;
}

.glow-chart::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(59,130,246,0.3), transparent 60%);
  filter: blur(15px);
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 0;
}

.glow-chart:hover::before {
  opacity: 1;
}

.glow-chart canvas {
  position: relative;
  z-index: 1;
}

/* Make bars rounded consistently */
.lang-chart-rounded .chartjs-render-monitor {
  /* we'll handle this via chart config */
}

/* Toggle buttons (already neon) – no change */

/* Battle button already red/orange – good */

/* Particle global */
.particle {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  animation: particleFly 0.9s ease-out forwards;
}

@keyframes particleFly {
  0% { opacity:1; transform: translate(0,0) scale(1); }
  100% { opacity:0; transform: translate(var(--dx), var(--dy)) scale(0.3); }
}


/* ========== THEN vs NOW – PASTEL TIMELINE ========== */
.then-now-section {
  background: #fdfbf7; /* soft cream base */
  border: 1px solid rgba(200,180,160,0.2);
  text-align: center;
}

.then-now-title .section-title {
  color: #5e548e; /* muted purple */
}

.section-sub {
  color: #9a8c98;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.timeline-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

/* Panels */
.timeline-panel {
  flex: 1 1 280px;
  background: rgba(255,250,245,0.8);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 1.8rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
  transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(0,0,0,0.06);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.panel-header h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #4a4e69;
  margin: 0;
}

.year-badge {
  padding: 0.3rem 1.2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Pastel badge colors */
.pastel-pink { background: #ffafcc; color: #4a1942; }
.pastel-blue { background: #a2d2ff; color: #014f86; }
.pastel-green { background: #b5e48c; color: #1e5631; }
.pastel-orange { background: #ffb347; color: #582f0e; }
.pastel-purple { background: #cdb4db; color: #3c096c; }

/* Language row */
.language-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.lang-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.lang-name {
  width: 90px;
  font-weight: 600;
  color: #4a4e69;
  text-align: left;
}

.bar-bg {
  flex: 1;
  height: 10px;
  background: rgba(0,0,0,0.05);
  border-radius: 20px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 20px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0%; /* JS will animate in */
}

.bar-fill.pastel-blue { background: #a2d2ff; }
.bar-fill.pastel-green { background: #b5e48c; }
.bar-fill.pastel-orange { background: #ffb347; }
.bar-fill.pastel-purple { background: #cdb4db; }

.value {
  font-weight: 700;
  color: #6c757d;
  min-width: 40px;
  text-align: right;
}

/* Center connector (visible on desktop) */
.timeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.connector-line {
  width: 3px;
  height: 80%;
  background: linear-gradient(to bottom, #a2d2ff, #b5e48c, #ffb347, #cdb4db);
  border-radius: 3px;
}

.connector-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin: 0.6rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-footnote {
  margin-top: 1.8rem;
  color: #9a8c98;
  font-style: italic;
}

/* Responsive: stack panels */
@media (max-width: 768px) {
  .timeline-container {
    flex-direction: column;
    gap: 2rem;
  }
  .timeline-connector {
    flex-direction: row;
    justify-content: center;
    gap: 0.8rem;
  }
  .connector-line {
    width: 80%;
    height: 3px;
  }
}

/* ============ CODE JOURNEY – GEN‑Z ============ */
.code-journey-section {
  text-align: center;
  background: linear-gradient(135deg, #fdfbf7 0%, #f0e6f6 100%);
  border: 1px solid rgba(180,160,200,0.2);
}

.journey-subtitle {
  color: #7a6e8c;
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Glowing progress bar */
.journey-progress {
  max-width: 700px;
  margin: 0 auto 2rem;
}
.progress-track {
  height: 6px;
  background: rgba(0,0,0,0.05);
  border-radius: 20px;
  overflow: hidden;
}
.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #a2d2ff, #b5e48c, #ffb347, #cdb4db, #ffafcc);
  border-radius: 20px;
  transition: width 0.3s ease;
}

/* Horizontal scrollable stage carousel */
.stage-carousel {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 1rem 0.5rem 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
  margin-bottom: 1rem;
}
.stage-carousel::-webkit-scrollbar {
  height: 6px;
}
.stage-carousel::-webkit-scrollbar-thumb {
  background: #cdb4db;
  border-radius: 10px;
}

/* Stage card – glass morphic */
.stage-card {
  flex: 0 0 160px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  border: 1px solid rgba(200,180,210,0.3);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  scroll-snap-align: center;
  position: relative;
  user-select: none;
}

.stage-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.9);
}

.stage-card.active {
  border: 2px solid #b5e48c;
  box-shadow: 0 0 20px rgba(181,228,140,0.5);
  transform: scale(1.03);
}

.stage-icon {
  font-size: 2.5rem;
  margin-bottom: 0.3rem;
}

.stage-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #4a4e69;
}

.stage-slang {
  font-size: 0.8rem;
  color: #9a8c98;
  font-weight: 500;
  background: rgba(180,160,200,0.15);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
}

/* Detail panel (expandable below cards) */
.stage-detail {
  max-width: 650px;
  margin: 0 auto;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
}
.stage-detail.open {
  opacity: 1;
  max-height: 300px;
}
.detail-content {
  font-size: 0.95rem;
  color: #4a4e69;
  text-align: left;
  line-height: 1.5;
}

/* Particles (burst on click) */
.particle-emoji {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  animation: popOut 0.7s ease-out forwards;
}
@keyframes popOut {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0.3); }
}

/* ========== GEN‑Z HERO BUTTONS ========== */
.btn-genz {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  border-radius: 60px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.3px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
  backdrop-filter: blur(8px);
  border: 1.5px solid transparent;
}

/* Primary – neon purple/blue gradient */
.btn-genz-primary {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: white;
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 8px 20px rgba(59,130,246,0.3), 0 0 0 0 rgba(139,92,246,0.4);
  animation: pulseGlow 2s infinite;
}

/* Secondary – pastel neon orange/pink */
.btn-genz-secondary {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  color: #f59e0b;
  border-color: rgba(245,158,11,0.4);
  box-shadow: 0 6px 14px rgba(245,158,11,0.15);
}

/* Hover effects */
.btn-genz:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 28px rgba(59,130,246,0.4), 0 0 0 6px rgba(139,92,246,0.1);
}

.btn-genz-secondary:hover {
  color: white;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(245,158,11,0.5), 0 0 0 6px rgba(245,158,11,0.15);
}

/* Shimmer sweep on click */
.btn-genz::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.3),
    transparent
  );
  transform: skewX(-25deg);
  transition: left 0.6s;
  z-index: 0;
}

.btn-genz:hover::after {
  left: 125%;
}

/* Icon bounce */
.btn-genz i {
  transition: transform 0.3s;
}
.btn-genz:hover i {
  transform: scale(1.2) rotate(5deg);
}

/* Pulse glow animation */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 20px rgba(59,130,246,0.3), 0 0 0 0 rgba(139,92,246,0.4); }
  50% { box-shadow: 0 8px 20px rgba(59,130,246,0.5), 0 0 0 12px rgba(139,92,246,0); }
}

/* Responsive: stack on tiny screens */
@media (max-width: 480px) {
  .btn-genz {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ========== GEN‑Z CODE EDITOR MOCKUP ========== */
.code-editor-mockup {
  background: #0d1117; /* GitHub dark, feels pro */
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3), 0 0 0 2px rgba(139,92,246,0.3), 0 0 30px rgba(59,130,246,0.15);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  font-family: 'Fira Code', 'Courier New', monospace;
  position: relative;
}

.code-editor-mockup:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.35), 0 0 0 2px rgba(139,92,246,0.6), 0 0 45px rgba(59,130,246,0.3);
}

/* File tab – cute pastel top */
.editor-tab {
  background: #1f2937;
  padding: 0.5rem 1.2rem;
  color: #e5e7eb;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-icon {
  font-size: 1rem;
}

/* Editor header dots */
.editor-header {
  padding: 10px 16px;
  background: #161b22;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

/* Code block */
.typing-code {
  color: #c9d1d9;
  padding: 1.5rem 1.2rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Syntax highlighting */
.code-comment { color: #8b949e; font-style: italic; }
.code-keyword { color: #ff7b72; font-weight: 600; }
.code-func { color: #d2a8ff; font-weight: 600; }
.code-string { color: #a5d6ff; }
.code-builtin { color: #ffa657; }
.code-var { color: #ffa657; }

/* Blinking cursor */
.cursor-blink {
  color: #3b82f6;
  font-weight: 300;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}
/* Responsive: stack cards on narrow screens? Still horizontal scroll works fine */


    /* ========== PASTEL THEN vs NOW ========== */
    .then-now-section {
      background: #fdfbf7;
      border: 1px solid rgba(200,180,160,0.2);
      text-align: center;
    }
    .then-now-title .section-title {
      color: #5e548e;
    }
    .section-sub {
      color: #9a8c98;
      font-size: 1rem;
      margin-bottom: 2rem;
    }
    .timeline-container {
      display: flex;
      align-items: stretch;
      justify-content: center;
      gap: 0;
      flex-wrap: wrap;
    }
    .timeline-panel {
      flex: 1 1 280px;
      background: rgba(255,250,245,0.8);
      backdrop-filter: blur(12px);
      border-radius: 28px;
      padding: 1.8rem;
      box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    }
    .panel-header {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.8rem;
      margin-bottom: 1.8rem;
    }
    .panel-header h3 {
      font-size: 1.6rem;
      font-weight: 700;
      color: #4a4e69;
      margin: 0;
    }
    .year-badge {
      padding: 0.3rem 1.2rem;
      border-radius: 50px;
      font-weight: 700;
      font-size: 0.9rem;
      color: white;
      box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    }
    .pastel-pink { background: #ffafcc; color: #4a1942; }
    .pastel-blue { background: #a2d2ff; color: #014f86; }
    .pastel-green { background: #b5e48c; color: #1e5631; }
    .pastel-orange { background: #ffb347; color: #582f0e; }
    .pastel-purple { background: #cdb4db; color: #3c096c; }
    .language-list {
      display: flex;
      flex-direction: column;
      gap: 1.2rem;
    }
    .lang-row {
      display: flex;
      align-items: center;
      gap: 0.8rem;
    }
    .lang-name {
      width: 90px;
      font-weight: 600;
      color: #4a4e69;
      text-align: left;
    }
    .bar-bg {
      flex: 1;
      height: 10px;
      background: rgba(0,0,0,0.05);
      border-radius: 20px;
      overflow: hidden;
    }
    .bar-fill {
      height: 100%;
      border-radius: 20px;
      transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .bar-fill.pastel-blue { background: #a2d2ff; }
    .bar-fill.pastel-green { background: #b5e48c; }
    .bar-fill.pastel-orange { background: #ffb347; }
    .bar-fill.pastel-purple { background: #cdb4db; }
    .value {
      font-weight: 700;
      color: #6c757d;
      min-width: 40px;
      text-align: right;
    }
    .timeline-connector {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0 1rem;
    }
    .connector-line {
      width: 3px;
      height: 80%;
      background: linear-gradient(to bottom, #a2d2ff, #b5e48c, #ffb347, #cdb4db);
      border-radius: 3px;
    }
    .connector-dot {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      margin: 0.6rem 0;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .section-footnote {
      margin-top: 1.8rem;
      color: #9a8c98;
      font-style: italic;
    }
    @media (max-width: 768px) {
      .timeline-container { flex-direction: column; gap: 2rem; }
      .timeline-connector { flex-direction: row; justify-content: center; gap: 0.8rem; }
      .connector-line { width: 80%; height: 3px; }
    }

    /* ========== SORTING VISUALIZER – IMPROVED ========== */
    .sorting-section {
      position: relative;
    }
    .sort-controls {
      display: flex;
      flex-wrap: wrap;
      gap: 0.8rem;
      align-items: center;
      margin-bottom: 1.5rem;
      justify-content: center;
    }
    .sort-controls select,
    .sort-controls button {
      padding: 0.6rem 1.4rem;
      border-radius: 50px;
      border: 2px solid rgba(59,130,246,0.3);
      background: var(--card-bg, #fff);
      color: var(--text, #1e293b);
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
    }
    .sort-controls button:hover {
      background: #3b82f6;
      color: white;
      border-color: #3b82f6;
      transform: translateY(-2px);
      box-shadow: 0 6px 15px rgba(59,130,246,0.3);
    }
    .sort-controls button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
    }
    .speed-label {
      font-size: 0.85rem;
      color: var(--muted, #64748b);
      font-weight: 600;
    }
    .sort-time {
      margin-left: auto;
      font-weight: 700;
      color: #3b82f6;
      font-size: 1.1rem;
      background: rgba(59,130,246,0.1);
      padding: 0.4rem 1rem;
      border-radius: 20px;
    }
    .bars-container {
      display: flex;
      align-items: flex-end;
      justify-content: center;
      gap: 2px;
      height: 320px;
      background: rgba(0,0,0,0.02);
      border-radius: 16px;
      padding: 0.5rem 0.5rem 0;
      margin-bottom: 1rem;
      overflow: hidden;
      border: 1px solid rgba(0,0,0,0.05);
    }
    .bar {
      border-radius: 6px 6px 0 0;
      transition: height 0.08s ease, background 0.15s;
      min-width: 6px;
      flex: 1;
      background: linear-gradient(180deg, #3b82f6, #60a5fa);
    }
    .bar.comparing {
      background: linear-gradient(180deg, #f59e0b, #fbbf24) !important;
      box-shadow: 0 0 12px rgba(245,158,11,0.5);
    }
    .bar.swapping {
      background: linear-gradient(180deg, #ef4444, #f87171) !important;
      box-shadow: 0 0 14px rgba(239,68,68,0.5);
    }
    .bar.sorted {
      background: linear-gradient(180deg, #10b981, #34d399) !important;
      box-shadow: 0 0 8px rgba(16,185,129,0.3);
    }
    .bar.pivot {
      background: linear-gradient(180deg, #8b5cf6, #a78bfa) !important;
      box-shadow: 0 0 14px rgba(139,92,246,0.5);
    }
    .algo-info {
      display: flex;
      justify-content: center;
      gap: 1rem;
      flex-wrap: wrap;
      margin-top: 0.5rem;
    }
    .algo-badge {
      font-size: 0.8rem;
      padding: 0.3rem 0.8rem;
      border-radius: 12px;
      background: rgba(59,130,246,0.1);
      color: var(--text, #1e293b);
    }

    /* ========== TECH STACK ========== */
    .tech-stack-zone {
      text-align: center;
    }
    .tech-vibe {
      font-size: 1.1rem;
      color: var(--muted, #64748b);
      margin-bottom: 1.5rem;
    }
    .tech-controls {
      display: flex;
      justify-content: center;
      gap: 1rem;
      margin: 1.5rem 0;
      flex-wrap: wrap;
      align-items: center;
    }
    .tech-controls button {
      padding: 0.5rem 1.5rem;
      border-radius: 50px;
      background: var(--card-bg);
      border: 1px solid rgba(59,130,246,0.3);
      color: var(--text);
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
    }
    .tech-controls button:hover {
      background: #3b82f6;
      color: white;
    }
    .compare-mode-btn.active {
      background: #f59e0b;
      color: #0f172a;
    }
    .compare-hint {
      font-size: 0.85rem;
      color: var(--muted);
      display: none;
    }
    .compare-hint.visible {
      display: inline-block;
    }
    .tech-cluster {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 1.5rem;
    }
    .tech-item {
      width: 150px;
      background: var(--card-bg);
      backdrop-filter: blur(12px);
      border-radius: 20px;
      padding: 1.5rem 1rem 1rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.8rem;
      box-shadow: 0 10px 20px rgba(0,0,0,0.08);
      border: 1px solid rgba(59,130,246,0.15);
      cursor: pointer;
      transition: transform 0.3s, box-shadow 0.3s;
    }
    .tech-item:nth-child(odd) {
      animation: floatUpDown 6s ease-in-out infinite;
    }
    .tech-item:nth-child(even) {
      animation: floatUpDown 7s ease-in-out infinite reverse;
    }
    @keyframes floatUpDown {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-6px); }
    }
    .tech-item:hover {
      transform: translateY(-8px) scale(1.03) !important;
      box-shadow: 0 20px 30px rgba(59,130,246,0.2);
    }
    .tech-item.selected {
      outline: 3px solid #f59e0b;
      outline-offset: 4px;
      box-shadow: 0 0 20px rgba(245,158,11,0.5);
      transform: scale(1.05) !important;
    }
    .tech-icon-wrap {
      width: 55px;
      height: 55px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(139,92,246,0.25));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.7rem;
      color: #3b82f6;
      transition: all 0.3s;
    }
    .tech-item:hover .tech-icon-wrap {
      background: linear-gradient(135deg, #3b82f6, #8b5cf6);
      color: white;
      box-shadow: 0 0 20px rgba(59,130,246,0.6);
    }
    .tech-name {
      font-weight: 700;
      font-size: 1.1rem;
      color: var(--text);
    }
    .skill-bar {
      width: 100%;
      height: 6px;
      background: rgba(0,0,0,0.08);
      border-radius: 10px;
      overflow: hidden;
    }
    .skill-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #3b82f6, #8b5cf6);
      border-radius: 10px;
      transition: width 0.8s;
    }
    .skill-label {
      font-size: 0.8rem;
      color: var(--muted);
      font-weight: 600;
      background: rgba(59,130,246,0.15);
      padding: 0.2rem 0.7rem;
      border-radius: 20px;
    }
    .tech-detail-overlay {
      position: fixed;
      top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0,0,0,0.5);
      backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s;
    }
    .tech-detail-overlay.active {
      opacity: 1;
      pointer-events: all;
    }
    .tech-detail-card {
      background: var(--surface, #fff);
      border-radius: 24px;
      padding: 2rem;
      max-width: 320px;
      width: 90%;
      text-align: center;
      position: relative;
      box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    }
    .close-detail {
      position: absolute;
      top: 10px; right: 15px;
      font-size: 1.8rem;
      cursor: pointer;
      color: var(--text);
    }
    .detail-icon {
      font-size: 3rem;
      margin-bottom: 0.5rem;
    }
    .detail-name {
      font-size: 1.6rem;
      font-weight: 700;
    }
    .detail-desc {
      color: var(--muted);
      margin: 0.5rem 0 1rem;
    }
    .detail-bar {
      width: 100%;
      height: 10px;
      margin: 1rem 0;
    }
    .detail-percent {
      font-weight: 800;
      color: #3b82f6;
    }
    .tech-footer {
      margin-top: 1.5rem;
      font-weight: 600;
      color: var(--muted);
    }

    /* ========== PARTICLE ========== */
    .particle {
      position: absolute;
      pointer-events: none;
      z-index: 100;
      animation: particleFly 0.8s ease-out forwards;
    }
    @keyframes particleFly {
      0% { opacity:1; transform: translate(0,0) scale(1); }
      100% { opacity:0; transform: translate(var(--dx), var(--dy)) scale(0.3); }
    }

    /* ========== DUEL BAR ========== */
    .duel-bar {
      background: var(--card-bg);
      backdrop-filter: blur(12px);
      border-radius: 16px;
      padding: 1.5rem;
      margin: 1.5rem auto;
      max-width: 500px;
      border: 1px solid rgba(59,130,246,0.3);
      text-align: center;
    }
    .duel-title {
      font-weight: 700;
      margin-bottom: 1rem;
      color: #f59e0b;
    }
    .duel-row {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin: 0.5rem 0;
    }
    .duel-row span:first-child,
    .duel-row span:last-child {
      width: 70px;
      font-weight: 600;
      color: var(--text);
    }
    .duel-track {
      flex: 1;
      height: 10px;
      background: rgba(0,0,0,0.08);
      border-radius: 10px;
      overflow: hidden;
    }
    .duel-fill {
      height: 100%;
      border-radius: 10px;
      transition: width 0.8s;
    }
    .duel-fill.left { background: #3b82f6; }
    .duel-fill.right { background: #f59e0b; }
    .duel-winner {
      margin-top: 1rem;
      font-weight: 800;
      font-size: 1.2rem;
      color: #f59e0b;
    }

    @media (max-width: 768px) {
      .bars-container { height: 220px; }
      .tech-item { width: 130px; padding: 1rem 0.6rem; }
    }