:root {
  --primary: #00d4ff;
  --primary-dark: #0099cc;
  --primary-light: #33ddff;
  --secondary: #a855f7;
  --accent: #ff006e;
  --success: #00ff88;
  --warning: #ffaa00;
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1420;
  --bg-tertiary: #1a1f35;
  --text-primary: #ffffff;
  --text-secondary: #b4c7e7;
  --text-muted: #6b7a99;
  --border: rgba(0, 212, 255, 0.1);
  --glow: rgba(0, 212, 255, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ═══ Particle Canvas ═══ */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

/* ═══ Cursor Glow ═══ */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ═══ Navigation ═══ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 30px var(--glow);
  animation: float 3s ease-in-out infinite;
  position: relative;
}

.brand-icon::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  z-index: -1;
  opacity: 0.5;
  filter: blur(10px);
  animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

.brand-icon svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-accent {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: 0.25rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.625rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-text {
  position: relative;
  z-index: 2;
}

.nav-link-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.nav-link:hover .nav-link-hover {
  opacity: 0.15;
}

.nav-link:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

.nav-link.active {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 30px var(--glow);
}

.nav-link.active .nav-link-hover {
  opacity: 1;
}

/* ═══ Main Content ═══ */
.main-content {
  min-height: calc(100vh - 200px);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ═══ Toolbar ═══ */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: rgba(15, 20, 32, 0.6);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.6s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-wrapper {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

#searchInput {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.5rem;
  background: rgba(10, 14, 26, 0.8);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.3s ease;
  outline: none;
  position: relative;
  z-index: 1;
}

#searchInput:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1), 0 0 30px var(--glow);
}

.search-glow {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.3s ease;
  z-index: 0;
}

#searchInput:focus + .search-glow {
  opacity: 0.3;
}

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(10, 14, 26, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.filter-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filter-btn span {
  position: relative;
  z-index: 2;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}

.filter-btn:hover .filter-glow {
  opacity: 0.15;
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: white;
  box-shadow: 0 0 30px var(--glow);
}

.filter-btn.active .filter-glow {
  opacity: 1;
}

/* ═══ Hero Section ═══ */
.hero {
  text-align: center;
  padding: 5rem 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  opacity: 0.1;
  animation: heroGlow 4s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.2; }
}

.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease;
}

.profile-image-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
}

.profile-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  border-radius: 50%;
  z-index: -1;
  animation: rotate 8s linear infinite;
}

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

.profile-image-wrapper::after {
  content: '';
  position: absolute;
  inset: -8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  border-radius: 50%;
  z-index: -2;
  opacity: 0.5;
  filter: blur(20px);
  animation: pulse 2s ease-in-out infinite;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 50px var(--glow);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 50px;
  color: var(--primary-light);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.6s ease 0.1s both;
  text-shadow: 0 0 80px var(--glow);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 750px;
  margin: 0 auto 3rem;
  line-height: 1.8;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto 4rem;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.stat-card {
  padding: 2rem 1.5rem;
  background: rgba(15, 20, 32, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stat-card:hover::before {
  opacity: 0.1;
}

.stat-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
}

.stat-card > * {
  position: relative;
  z-index: 1;
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.stage-card {
  padding: 2.5rem;
  background: rgba(15, 20, 32, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.5s ease;
}

.stage-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  opacity: 0;
  transition: all 0.5s ease;
}

.stage-card:hover::before {
  opacity: 0.08;
}

.stage-card:hover::after {
  width: 400px;
  height: 400px;
  opacity: 0.3;
}

.stage-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 30px 80px rgba(0, 212, 255, 0.4);
}

.stage-card > * {
  position: relative;
  z-index: 1;
}

.stage-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 40px var(--glow);
  animation: float 3s ease-in-out infinite;
}

.stage-card h3 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.stage-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 1.0625rem;
}

.stage-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-light);
  font-weight: 700;
  font-size: 1rem;
  transition: gap 0.3s ease;
}

.stage-card:hover .stage-cta {
  gap: 1rem;
}

.stage-cta svg {
  transition: transform 0.3s ease;
}

.stage-card:hover .stage-cta svg {
  transform: translateX(4px);
}

/* ═══ Section Header ═══ */
.section-header {
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: 1.1875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ═══ Category ═══ */
.category-group {
  margin-bottom: 4rem;
  animation: fadeInUp 0.6s ease;
}

.category-title {
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-light);
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 212, 255, 0.05);
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}

.category-title::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

/* ═══ Cards Grid ═══ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
}

.card {
  padding: 2rem;
  background: rgba(15, 20, 32, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  opacity: 0;
  transition: all 0.4s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover::after {
  width: 300px;
  height: 300px;
  opacity: 0.1;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  flex: 1;
}

.badge {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.badge-task {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
  color: var(--primary-light);
  border: 1px solid rgba(0, 212, 255, 0.4);
}

.badge-practical {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.1));
  color: var(--success);
  border: 1px solid rgba(0, 255, 136, 0.4);
}

.badge-theory {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.2), rgba(255, 170, 0, 0.1));
  color: var(--warning);
  border: 1px solid rgba(255, 170, 0, 0.4);
}

.badge-lab {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.1));
  color: var(--secondary);
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.card-summary {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.card-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.tool-tag {
  padding: 0.5rem 1rem;
  background: rgba(10, 14, 26, 0.8);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.3s ease;
}

.tool-tag:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 212, 255, 0.2);
}

.card-status {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--success);
  font-weight: 700;
  margin-top: auto;
}

.card-status::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(0, 255, 136, 0.2);
  border-radius: 50%;
  font-size: 0.875rem;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* ═══ Footer ═══ */
.footer {
  margin-top: 8rem;
  padding: 3rem 2rem;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .toolbar {
    flex-direction: column;
  }

  .search-wrapper {
    width: 100%;
  }

  .filters {
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .profile-image-wrapper {
    width: 140px;
    height: 140px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .stage-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ═══ Smooth Scrolling ═══ */
html {
  scroll-behavior: smooth;
}

/* ═══ Selection ═══ */
::selection {
  background: rgba(0, 212, 255, 0.3);
  color: var(--text-primary);
}

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
}
