/* ========================================
   CSS Variables & Base Styles
======================================== */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  
  --accent-primary: #8b5cf6;
  --accent-secondary: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #10b981 100%);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --glow-color: rgba(139, 92, 246, 0.3);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  
  /* Spacing */
  --section-padding: 120px 0;
  --container-max: 1200px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Background Effects
======================================== */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(6, 182, 212, 0.1), transparent),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(16, 185, 129, 0.08), transparent);
  pointer-events: none;
  z-index: -2;
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -1;
}

.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: rgba(139, 92, 246, 0.15);
  top: 10%;
  left: -10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: rgba(6, 182, 212, 0.12);
  top: 60%;
  right: -5%;
  animation-delay: -5s;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: rgba(16, 185, 129, 0.1);
  bottom: 10%;
  left: 20%;
  animation-delay: -10s;
}

.shape-4 {
  width: 350px;
  height: 350px;
  background: rgba(139, 92, 246, 0.1);
  top: 30%;
  right: 20%;
  animation-delay: -15s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -30px) rotate(5deg); }
  50% { transform: translate(-20px, 20px) rotate(-5deg); }
  75% { transform: translate(20px, 30px) rotate(3deg); }
}

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

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

/* ========================================
   Navigation
======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition-base);
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-bracket {
  color: var(--accent-primary);
}

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

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}

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

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

.nav-link:hover::after {
  width: 100%;
}

.nav-link-cta {
  background: var(--accent-gradient);
  padding: 10px 24px;
  border-radius: 8px;
  color: white !important;
}

.nav-link-cta::after {
  display: none;
}

.nav-link-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-base);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-base);
  z-index: 999;
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-link {
  font-size: 18px;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

/* ========================================
   Hero Section
======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero-content {
  max-width: 650px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
}

.title-line {
  display: block;
  animation: fadeInUp 0.6s ease backwards;
}

.title-line:nth-child(1) { animation-delay: 0.1s; }
.title-line:nth-child(2) { animation-delay: 0.2s; }
.title-line:nth-child(3) { animation-delay: 0.3s; }

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight {
  position: relative;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: rgba(139, 92, 246, 0.2);
  z-index: -1;
  transform: skewX(-5deg);
}

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
  animation: fadeInUp 0.6s ease 0.4s backwards;
}

.hero-description strong {
  color: var(--text-primary);
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 60px;
  animation: fadeInUp 0.6s ease 0.5s backwards;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  transition: var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-large {
  padding: 18px 36px;
  font-size: 16px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 48px;
  animation: fadeInUp 0.6s ease 0.6s backwards;
}

.stat {
  text-align: left;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-plus, .stat-percent {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-primary);
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Hero Visual */
.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  animation: fadeInRight 0.8s ease 0.5s backwards;
}

.code-window {
  width: 420px;
  background: rgba(18, 18, 26, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-color);
}

.code-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-title {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: auto;
}

.code-content {
  padding: 24px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}

.code-keyword { color: #c678dd; }
.code-variable { color: #e5c07b; }
.code-property { color: #e06c75; }
.code-string { color: #98c379; }
.code-function { color: #61afef; }
.code-method { color: #61afef; }
.code-param { color: #d19a66; }

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 0.6s ease 0.8s backwards;
}

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

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-primary), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ========================================
   Section Styles
======================================== */
.section-header {
  margin-bottom: 64px;
}

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

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-primary);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
}

.section-description {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 600px;
}

.section-header.center .section-description {
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   About Section
======================================== */
.about {
  padding: var(--section-padding);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-intro {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 24px;
}

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

.about-text strong {
  color: var(--text-primary);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.tag {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-base);
}

.tag:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.about-image {
  position: relative;
}

.image-frame {
  width: 100%;
  aspect-ratio: 1;
  max-width: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.image-placeholder {
  color: var(--text-tertiary);
}

.image-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  max-width: 400px;
  border: 2px solid var(--accent-primary);
  border-radius: 24px;
  top: 20px;
  left: 20px;
  z-index: -1;
  opacity: 0.3;
}

/* ========================================
   Services Section
======================================== */
.services {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px;
  transition: var(--transition-base);
  position: relative;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card.featured {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.05));
  border-color: rgba(139, 92, 246, 0.3);
}

.service-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.service-icon {
  width: 64px;
  height: 64px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-bottom: 24px;
}

.service-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.service-description {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.service-features {
  list-style: none;
}

.service-features li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 600;
}

/* ========================================
   Projects Section
======================================== */
.projects {
  padding: var(--section-padding);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition-base);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card.large {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.project-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.project-card.large .project-image {
  aspect-ratio: auto;
  height: 100%;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.project-info {
  padding: 32px;
}

.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.project-tags span {
  font-size: 12px;
  padding: 4px 12px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 100px;
  color: var(--accent-primary);
}

.project-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

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

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
  transition: var(--transition-base);
}

.project-link:hover {
  gap: 12px;
}

/* ========================================
   Testimonials Section
======================================== */
.testimonials {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}

.testimonials-slider {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.testimonial-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px;
  transition: var(--transition-base);
}

.testimonial-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 18px;
  margin-bottom: 20px;
}

.testimonial-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.author-name {
  display: block;
  font-weight: 600;
  font-size: 15px;
}

.author-role {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ========================================
   CTA Section
======================================== */
.cta {
  padding: var(--section-padding);
}

.cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

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

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   Footer
======================================== */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition-base);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-base);
}

.footer-social a:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

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

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

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate(50px, -50%);
  }
  to {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 1024px) {
  .hero-visual {
    display: none;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .about-image {
    order: -1;
    display: flex;
    justify-content: center;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .project-card.large {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  
  .testimonials-slider {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}
