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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --text-primary: #e0e0e0;
  --text-secondary: #8888aa;
  --accent-1: #6c63ff;
  --accent-2: #ff6584;
  --accent-3: #00d4aa;
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  --glow-1: rgba(108, 99, 255, 0.3);
  --glow-2: rgba(255, 101, 132, 0.3);
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 50px;
  height: 50px;
  border: 3px solid transparent;
  border-top-color: var(--accent-1);
  border-right-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ===== PARTICLE CANVAS ===== */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  z-index: 100;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  transition: color var(--transition);
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

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

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 0.8s ease forwards;
}

.hero-title .line-2 {
  animation-delay: 0.2s;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: slideUp 0.8s ease forwards, gradientShift 4s ease infinite;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: slideUp 0.8s ease 0.4s forwards;
}

.typewriter {
  color: var(--accent-1);
}

.cursor {
  color: var(--accent-1);
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  opacity: 0;
  animation: slideUp 0.8s ease 0.6s forwards;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--glow-1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--glow-1), 0 4px 20px var(--glow-2);
}

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

.btn-outline:hover {
  background: var(--accent-1);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--glow-1);
}

.btn-lg {
  padding: 1rem 3rem;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* ===== PAGE HERO ===== */
.page-hero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 2rem;
}

/* ===== CARDS ===== */
.cards-section {
  position: relative;
  z-index: 1;
  padding: 6rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 3rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 0;
}

.card:hover {
  transform: translateY(-8px);
  border-color: transparent;
}

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

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.7rem;
  position: relative;
  z-index: 1;
}

.card p {
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

/* ===== STATS ===== */
.stats-section {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 5rem;
  padding: 4rem 3rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* ===== CTA ===== */
.cta-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 6rem 2rem;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

/* ===== ABOUT ===== */
.about-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 3rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-visual {
  position: relative;
  height: 300px;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: float 6s ease-in-out infinite;
}

.orb-1 {
  width: 150px;
  height: 150px;
  background: var(--accent-1);
  opacity: 0.4;
  top: 20%;
  left: 20%;
}

.orb-2 {
  width: 120px;
  height: 120px;
  background: var(--accent-2);
  opacity: 0.35;
  top: 40%;
  right: 15%;
  animation-delay: 2s;
}

.orb-3 {
  width: 100px;
  height: 100px;
  background: var(--accent-3);
  opacity: 0.3;
  bottom: 10%;
  left: 40%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(20px, -20px); }
  50% { transform: translate(-10px, 15px); }
  75% { transform: translate(15px, 10px); }
}

/* ===== TIMELINE ===== */
.timeline-section {
  position: relative;
  z-index: 1;
  padding: 4rem 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-1), var(--accent-2), var(--accent-3));
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: -3rem;
  top: 0.3rem;
  width: 16px;
  height: 16px;
  background: var(--gradient);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.timeline-content p {
  color: var(--text-secondary);
}

/* ===== CONTACT ===== */
.contact-section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 3rem 6rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--glow-1);
}

.form-success {
  display: none;
  text-align: center;
  padding: 3rem;
}

.form-success.show {
  display: block;
  animation: slideUp 0.5s ease;
}

.success-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  color: var(--accent-3);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
}

.info-card:hover {
  transform: translateX(5px);
  border-color: var(--accent-1);
}

.info-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.info-card h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.info-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== SCROLL FADE ===== */
.scroll-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

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

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

  .stats-section {
    gap: 2.5rem;
  }

  .cards-section,
  .about-content,
  .timeline-section,
  .contact-section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
