/* ===== IMPORTS & VARIABLES ===== */
:root {
  --primary-color: #00d4ff;
  --secondary-color: #0099ff;
  --accent-color: #ff006e;
  --bg-dark: #0a0e27;
  --bg-darker: #050816;
  --bg-card: #151030;
  --text-primary: #ffffff;
  --text-secondary: #b4b4c5;
  --gradient-1: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
  --gradient-2: linear-gradient(135deg, #ff006e 0%, #ff4d94 100%);
  --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 39, 0.98);
  backdrop-filter: blur(20px);
  z-index: 1000;
  padding: 0;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  transition: var(--transition);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar.scrolled {
  background: rgba(5, 8, 22, 0.98);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 10;
  transition: var(--transition);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-img {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  transition: var(--transition);
  border: 2px solid rgba(0, 212, 255, 0.3);
}

.logo:hover .logo-img {
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
  border-color: var(--primary-color);
  transform: rotate(5deg);
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--transition);
  letter-spacing: -0.5px;
}

.logo:hover .logo-text {
  letter-spacing: 0px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
  background: rgba(0, 212, 255, 0.05);
  padding: 8px;
  border-radius: 50px;
  border: 1px solid rgba(0, 212, 255, 0.1);
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  position: relative;
  transition: var(--transition);
  padding: 12px 24px;
  border-radius: 50px;
  display: block;
  letter-spacing: 0.5px;
}

.nav-menu a:hover {
  color: var(--text-primary);
  background: rgba(0, 212, 255, 0.1);
}

.nav-menu a.active {
  color: var(--bg-dark);
  background: var(--gradient-1);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
  padding: 10px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: var(--transition);
}

.hamburger:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--primary-color);
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  transition: var(--transition);
  border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 20px 60px;
}

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

#canvas3d {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-size: 64px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
}

.glitch {
  position: relative;
  animation: glitch 3s infinite;
}

@keyframes glitch {
  0%, 90%, 100% {
    transform: translate(0);
  }
  92% {
    transform: translate(-2px, 2px);
  }
  94% {
    transform: translate(2px, -2px);
  }
  96% {
    transform: translate(-2px, -2px);
  }
  98% {
    transform: translate(2px, 2px);
  }
}

.typing-container {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 20px;
  min-height: 50px;
}

.cursor {
  animation: blink 0.7s infinite;
}

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

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-1);
  color: var(--bg-dark);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(0, 212, 255, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: var(--bg-dark);
  transform: translateY(-3px);
}

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

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--bg-dark);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.1);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  color: var(--primary-color);
  font-size: 20px;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--primary-color);
  color: var(--bg-dark);
  transform: translateY(-5px) rotate(360deg);
  box-shadow: var(--shadow-glow);
}

/* ===== 3D FLOATING CARDS ===== */
.hero-3d {
  position: relative;
  height: 400px;
}

.floating-card {
  position: absolute;
  background: rgba(21, 16, 48, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
  animation: float 6s ease-in-out infinite;
}

.floating-card i {
  font-size: 48px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.floating-card span {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-1 {
  top: 0;
  left: 20%;
  animation-delay: 0s;
}

.card-2 {
  top: 50%;
  right: 10%;
  animation-delay: 2s;
}

.card-3 {
  bottom: 0;
  left: 30%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(2deg);
  }
  50% {
    transform: translateY(0) rotate(0deg);
  }
  75% {
    transform: translateY(-15px) rotate(-2deg);
  }
}

.floating-card:hover {
  transform: scale(1.1) translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.4);
  border-color: var(--primary-color);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  animation: bounce 2s infinite;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--primary-color);
  border-radius: 20px;
  position: relative;
  margin: 0 auto 10px;
}

.wheel {
  width: 4px;
  height: 10px;
  background: var(--primary-color);
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    top: 10px;
  }
  100% {
    opacity: 0;
    top: 30px;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.scroll-indicator p {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ===== STATS SECTION ===== */
.stats-section {
  padding: 80px 20px;
  background: var(--bg-darker);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.stat-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  transition: left 0.5s;
}

.stat-card:hover::before {
  left: 100%;
}

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

.stat-icon {
  font-size: 48px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.stat-card h3 {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.stat-card p {
  color: var(--text-secondary);
  font-size: 16px;
}

/* ===== FEATURED SECTION ===== */
.featured-section {
  padding: 100px 20px;
}

.section-title {
  text-align: center;
  font-size: 48px;
  margin-bottom: 60px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--gradient-1);
  border-radius: 2px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.featured-card {
  perspective: 1000px;
}

.card-3d-wrapper {
  position: relative;
  width: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.featured-card:hover .card-3d-wrapper {
  transform: rotateY(5deg) rotateX(5deg);
}

.card-3d-content {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: var(--transition);
}

.featured-card:hover .card-3d-content {
  border-color: var(--primary-color);
  box-shadow: 0 30px 80px rgba(0, 212, 255, 0.3);
}

.featured-image {
  height: 200px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 153, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: var(--primary-color);
}

.featured-info {
  padding: 30px;
}

.featured-info h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.featured-info p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tech-tags span {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary-color);
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.link-arrow {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.link-arrow:hover {
  gap: 15px;
}

.text-center {
  text-align: center;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 100px 20px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 153, 255, 0.1));
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.2), transparent);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.cta-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: 42px;
  margin-bottom: 20px;
}

.cta-content p {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 150px 20px 80px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-darker), var(--bg-dark));
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1), transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(0, 153, 255, 0.1), transparent 50%);
}

.page-title {
  font-size: 56px;
  margin-bottom: 20px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.page-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-darker);
  padding: 40px 20px;
  border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left p {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-right {
  display: flex;
  gap: 15px;
}

.footer-right a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 50%;
  color: var(--primary-color);
  transition: var(--transition);
}

.footer-right a:hover {
  background: var(--primary-color);
  color: var(--bg-dark);
  transform: translateY(-3px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .nav-container {
    padding: 0 20px;
    height: 70px;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    width: 280px;
    padding: 30px 20px;
    gap: 10px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: calc(100vh - 70px);
    border-left: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 0;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu a {
    padding: 15px 20px;
    width: 100%;
  }

  .logo-text {
    font-size: 20px;
  }

  .logo-img {
    width: 40px;
    height: 40px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 42px;
  }

  .typing-container {
    font-size: 24px;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-3d {
    display: none;
  }

  .page-title {
    font-size: 36px;
  }
}

@media (max-width: 640px) {
  .hero-text h1 {
    font-size: 32px;
  }

  .typing-container {
    font-size: 20px;
  }

  .section-title {
    font-size: 32px;
  }

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

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