:root {
  --primary: #f8fafc;
  --secondary: #e2e8f0;
  --accent: #00b4d8;
  --accent-light: #0077b6;
  --accent-glow: rgba(0, 180, 216, 0.1);
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --text-main: #0f172a;
  --text-dim: #475569;
  --bg-main: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 180, 216, 0.1);
  --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --side-nav-w: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

/* ============================
   SCROLL PROGRESS BAR
   ============================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  background: var(--secondary);
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #00f5d4, var(--accent));
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  transition: width 0.1s linear;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================
   CURSOR GLOW FOLLOWER
   ============================ */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,180,216,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, opacity 0.3s;
  opacity: 0;
}

body:hover .cursor-glow { opacity: 1; }

/* ============================
   SECTIONS
   ============================ */
section { padding: 100px 0; border-bottom: 1px solid var(--secondary); }
.alt-bg { background-color: #f1f5f9; }

/* ============================
   TYPOGRAPHY
   ============================ */
.gradient-text {
  background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 50%, #00f5d4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.accent-text { color: var(--accent); }

.part-label {
  display: inline-block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
  padding: 4px 12px;
  background: rgba(0, 180, 216, 0.05);
  border-radius: 4px;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; }
h1 { font-size: clamp(3rem, 8vw, 5rem); line-height: 1.1; margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; margin-bottom: 16px; }
h3 { font-size: 1.5rem; margin-bottom: 16px; }
p { color: var(--text-dim); font-size: 1.1rem; max-width: 700px; }

/* ============================
   NAVIGATION
   ============================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 48px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 48px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; letter-spacing: -1px; }

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: 32px;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.lang-switch {
  margin-left: 32px;
  display: flex;
  align-items: center;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: 100px;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: white;
  border-color: var(--accent);
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.1);
}

.lang-indicator {
  width: 8px;
  height: 8px;
  background: #3b82f6; /* Default Blue for EN */
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.lang-btn.vi .lang-indicator {
  background: #ef4444; /* Red for VI */
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* ============================
   HERO SECTION
   ============================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 120px 0 60px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #f8fafc 0%, #ffffff 100%);
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 40%, rgba(0,180,216,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(0,245,212,0.06) 0%, transparent 50%);
  z-index: 0;
}

.hero-content { 
  position: relative; 
  z-index: 1; 
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 80px;
}

.hero-main {
  max-width: 800px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}

.hero-main {
  max-width: 800px;
}

.hero-3d {
  width: 100%;
  height: 450px;
  position: relative;
  opacity: 0;
  transform: translateX(40px);
  animation: hero-rise 1s ease-out 0.8s forwards;
}

.hero-title {
  opacity: 0;
  transform: translateY(40px);
  animation: hero-rise 1s ease-out 0.3s forwards;
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(30px);
  animation: hero-rise 1s ease-out 0.6s forwards;
}

model-viewer {
  width: 100%;
  height: 100%;
  --poster-color: transparent;
  outline: none;
}

@keyframes hero-rise {
  to { opacity: 1; transform: translateX(0) translateY(0); }
}

.badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--secondary);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  animation: hero-rise 1s ease-out 0.1s forwards;
}

/* ============================
   MARQUEE TICKER
   ============================ */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: #0f172a;
  padding: 20px 0;
  margin: 60px 0;
  position: relative;
  z-index: 20;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.ticker {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-item {
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-right: 60px;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================
   GRIDS
   ============================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

/* ============================
   CARDS WITH 3D TILT
   ============================ */
.glass-card, .stat-card {
  padding: 40px;
  border-radius: 24px;
  background: white;
  border: 1px solid var(--secondary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.glass-card:hover::before { opacity: 1; }
.glass-card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px -12px rgba(0, 180, 216, 0.15); }

.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ============================
   STATS
   ============================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  width: 100%;
}

.hero-stats {
  margin-top: auto;
  margin-bottom: 40px;
}

.stat-card { padding: 32px; text-align: center; }

.stat-value {
  font-size: 2.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================
   DATA TABLES
   ============================ */
.data-table { width: 100%; margin-top: 24px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--secondary); }
.data-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }
.data-table tr { transition: background 0.2s; }
.data-table tr:hover { background: rgba(0, 180, 216, 0.03); }

.growth-positive { color: var(--success); font-weight: 700; }
.growth-negative { color: var(--danger); font-weight: 700; }

/* ============================
   TIMELINE
   ============================ */
.timeline { border-left: 2px solid var(--secondary); padding-left: 24px; }

.timeline-item {
  margin-bottom: 32px;
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 4px solid var(--bg-main);
  transition: transform 0.3s;
}

.timeline-item:hover::before { transform: scale(1.5); }

/* ============================
   MATRIX CARDS (Correlation)
   ============================ */
.matrix-card { display: flex; flex-direction: column; gap: 16px; }
.matrix-header { display: flex; justify-content: space-between; align-items: center; }
.matrix-title { font-weight: 700; font-size: 0.9rem; }

.matrix-score {
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.9rem;
  transition: transform 0.3s;
}

.matrix-score:hover { transform: scale(1.2); }
.score-high { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
.score-mid { background: rgba(5, 150, 105, 0.1); color: var(--success); }

/* ============================
   BLUEPRINT STEPS
   ============================ */
.blueprint-step {
  display: flex;
  gap: 24px;
  padding: 32px;
  background: white;
  border: 1px solid var(--secondary);
  border-radius: 24px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.blueprint-step::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: width 0.6s ease;
}

.blueprint-step:hover::after { width: 100%; }
.blueprint-step:hover { border-color: var(--accent); }

.step-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.3;
  transition: opacity 0.3s, transform 0.3s;
}

.blueprint-step:hover .step-num { opacity: 1; transform: scale(1.1); }

/* ============================
   HORIZONTAL SCROLL (STAR)
   ============================ */
.star-slider-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.slider-nav {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent);
  transition: all 0.3s ease;
  z-index: 30;
  flex-shrink: 0;
}

.slider-nav:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 180, 216, 0.3);
}

.star-slider {
  flex-grow: 1;
  display: flex;
  gap: 32px;
  overflow-x: auto;
  padding: 20px 0 40px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.star-slider::-webkit-scrollbar {
  display: none;
}

.star-slider > .star-card {
  min-width: calc(50% - 16px);
  max-width: calc(50% - 16px);
  flex-shrink: 0;
}

@media (max-width: 992px) {
  .star-slider > .star-card {
    min-width: calc(100% - 10px);
    max-width: calc(100% - 10px);
  }
}

.scroll-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 8px;
  animation: pulse-opacity 2s ease-in-out infinite;
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ============================
   STAR METHOD CARDS
   ============================ */
.star-card { border-top: 4px solid var(--accent); }
.star-badge { font-size: 0.75rem; font-weight: 800; color: var(--accent); margin-bottom: 20px; letter-spacing: 1px; }

.star-item {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.5;
  padding-left: 16px;
  border-left: 2px solid transparent;
  transition: all 0.3s ease;
}

.star-item:hover {
  border-left-color: var(--accent);
  padding-left: 24px;
  background: rgba(0, 180, 216, 0.03);
}

.star-item strong {
  color: var(--accent);
  font-size: 1.2rem;
  margin-right: 8px;
  font-family: var(--font-display);
}

/* ============================
   SIDE PROGRESS INDICATOR
   ============================ */
.side-progress {
  position: fixed;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.progress-dot:hover { background: var(--accent); transform: scale(1.3); }
.progress-dot.active {
  background: var(--accent);
  transform: scale(1.5);
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
}

.progress-dot::before {
  content: attr(data-title);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  border: 1px solid var(--secondary);
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-50%) translateX(10px);
}

.progress-dot:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ============================
   CHART CONTAINERS
   ============================ */
.viz-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 24px;
  overflow: hidden;
  position: relative;
}

/* ============================
   REVEAL ANIMATIONS (Staggered)
   ============================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.grid-2 .reveal:nth-child(2),
.grid-3 .reveal:nth-child(2) { transition-delay: 0.15s; }

.grid-2 .reveal:nth-child(3),
.grid-3 .reveal:nth-child(3) { transition-delay: 0.3s; }

.grid-3 .reveal:nth-child(4) { transition-delay: 0.45s; }

/* ============================
   PULSE ANIMATION
   ============================ */
.pulse-circle {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 auto;
  position: relative;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 20px rgba(0, 180, 216, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 180, 216, 0); }
}

/* ============================
   FOOTER
   ============================ */
footer {
  padding: 80px 0 40px;
  background: #f8fafc;
  margin-top: 100px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}

.footer-logo { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; }
.footer-info p { font-size: 0.85rem; max-width: 600px; }

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.github-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-dim);
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid transparent;
}

.github-link:hover {
  color: var(--accent);
  background: white;
  border-color: var(--accent);
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.1);
  transform: translateY(-2px);
}

.github-link svg {
  transition: transform 0.5s ease;
}

.github-link:hover svg {
  transform: scale(1.1);
}

.footer-info a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.footer-info a:hover {
  border-bottom-color: var(--accent);
}

/* ============================
   RESPONSIVE & MOBILE MENU
   ============================ */
.nav-actions { display: flex; align-items: center; gap: 20px; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 992px) {
  nav { padding: 15px 24px; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
    padding: 100px 40px;
    gap: 30px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }
  .nav-links.active { right: 0; }
  .nav-links a { margin-left: 0; font-size: 1.1rem; }
  .hamburger { display: flex; }
  
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-3d { height: 300px; margin-top: 40px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .hero-stats { grid-template-columns: 1fr; }
  h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { padding-top: 100px; text-align: center; }
  p { margin: 0 auto; }
  .cursor-glow { display: none; }
  .side-progress { display: none; }
  .horizontal-scroll > .star-card { min-width: 300px; }
}