:root {
  /* Colors - Calm, intelligent, professional */
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --secondary: #0369a1;
  --accent: #2dd4bf;
  --bg-page: #f0f9ff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --water-color: #38bdf8;
  --water-deep: #0369a1;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: rgba(226, 232, 240, 0.8);
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02);
  
  /* Typography */
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container-width: 1200px;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
}

p {
  margin: 0;
  color: var(--text-muted);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

/* Glassmorphism */
.glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

/* Layout Components */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-size: 1rem;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 14px 0 rgba(15, 118, 110, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

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

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  height: 64px;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-link {
  font-weight: 500;
  color: var(--text-main);
  opacity: 0.8;
}

.nav-link:hover {
  opacity: 1;
  color: var(--primary);
}

/* Hero Section */
.hero {
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.1), transparent),
              radial-gradient(circle at bottom left, rgba(3, 105, 161, 0.1), transparent);
}

.hero-content {
  max-width: 700px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 4rem;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 40px;
  max-width: 600px;
}

/* Waves */
.wave-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
}

.wave-svg {
  width: 100%;
  height: 100px;
}

/* Dashboard Sidebar */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-nav {
  margin-top: 40px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.sidebar-link.active {
  background: rgba(15, 118, 110, 0.05);
  color: var(--primary);
}

.sidebar-link:hover:not(.active) {
  background: #f1f5f9;
  color: var(--text-main);
}

.main-content {
  flex: 1;
  background: var(--bg-page);
  padding: 32px;
  overflow-y: auto;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.user-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

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

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
}

.kpi-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.course-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.course-img {
  width: 100%;
  height: 180px;
  background: #e2e8f0;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.course-progress {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  margin: 12px 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef9c3; color: #a16207; }

/* Placeholders */
.placeholder-icon {
  width: 24px;
  height: 24px;
  background: currentColor;
  opacity: 0.2;
  border-radius: 4px;
}

.placeholder-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
}

/* Water Splashing Effects */
.splash-trigger {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.droplet {
  position: absolute;
  background: var(--water-color);
  border-radius: 50%;
  opacity: 0.6;
  pointer-events: none;
  filter: blur(2px);
  bottom: -20px;
}

/* Scroll-based animation using view-timeline */
@keyframes splash-up {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 0.8; }
  100% { transform: translateY(-100vh) scale(0); opacity: 0; }
}

/* Splash Container for the "fast scroll" effect simulation */
.splash-layer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(transparent, var(--water-color));
  opacity: 0;
  transition: opacity 0.3s ease;
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="white"/></svg>');
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="white"/></svg>');
}

/* Scroll-driven splash */
@keyframes water-rise {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0%); opacity: 0.4; }
}

.splash-active {
  animation: water-rise linear both;
  animation-timeline: scroll();
}

.bubble {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  bottom: -50px;
  animation: rise-and-splash 3s infinite ease-in;
}

@keyframes rise-and-splash {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(-80vh) scale(2); opacity: 0; }
}

/* Hero Enhancements */
.hero-title-wrap {
  position: relative;
  display: inline-block;
}

.hero-title-wrap::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--water-color);
  border-radius: 10px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.hero:hover .hero-title-wrap::after {
  transform: scaleX(1);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.floating {
  animation: float 4s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .sidebar { display: none; }
  .nav-links { display: none; }
}
