/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #3b82f6;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
}

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

/* Header and Navigation */
header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  transition: transform 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav ul li a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

nav ul li a:hover {
  color: var(--primary-color);
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li a.active {
  color: var(--primary-color);
}

nav ul li a.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 8rem 2rem 4rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

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

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

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

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  position: relative;
}

/* Rocket Chart Container */
.rocket-chart-container {
  position: relative;
  width: 400px;
  height: 350px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  padding: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  animation: containerFloat 4s ease-in-out infinite;
}

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

/* Chart Grid */
.chart-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.grid-line {
  position: absolute;
  background: rgba(107, 114, 128, 0.2);
}

.grid-line.horizontal {
  width: 100%;
  height: 1px;
  top: var(--position);
  left: 0;
}

.grid-line.vertical {
  width: 1px;
  height: 100%;
  left: var(--position);
  top: 0;
}

/* Animated Bar Chart */
.bar-chart-base {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-around;
  height: 250px;
  z-index: 2;
  padding: 0 20px;
}

.chart-bar {
  width: 35px;
  background: linear-gradient(to top, var(--color), rgba(255, 255, 255, 0.3));
  border-radius: 8px 8px 0 0;
  position: relative;
  height: 0;
  animation: barGrow 1.5s ease-out forwards;
  animation-delay: var(--delay);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes barGrow {
  from { height: 0; }
  to { height: var(--height); }
}

.bar-value {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
  opacity: 0;
  animation: valueShow 0.5s ease forwards;
  animation-delay: calc(var(--delay) + 1s);
}

@keyframes valueShow {
  to { opacity: 1; }
}

/* Trend Line SVG */
.trend-line-svg {
  position: absolute;
  top: 20px;
  left: 20px;
  width: calc(100% - 40px);
  height: 250px;
  z-index: 3;
  pointer-events: none;
}

.trend-line {
  animation: drawTrendLine 3s ease-out forwards;
  animation-delay: 1.5s;
  filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3));
}

@keyframes drawTrendLine {
  to { stroke-dashoffset: 0; }
}

/* Flying Rocket */
.rocket-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.rocket {
  position: absolute;
  animation: rocketFly 6s ease-in-out infinite;
  animation-delay: 2s;
}

@keyframes rocketFly {
  0% {
    left: 10px;
    top: 160px;
    transform: rotate(-10deg);
  }
  25% {
    left: 80px;
    top: 130px;
    transform: rotate(-5deg);
  }
  50% {
    left: 150px;
    top: 100px;
    transform: rotate(0deg);
  }
  75% {
    left: 220px;
    top: 70px;
    transform: rotate(5deg);
  }
  100% {
    left: 290px;
    top: 40px;
    transform: rotate(10deg);
  }
}

.rocket-body {
  font-size: 2rem;
  animation: rocketBob 0.5s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.5));
}

@keyframes rocketBob {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.rocket-trail {
  position: absolute;
  top: 50%;
  right: 100%;
  width: 30px;
  height: 3px;
  background: linear-gradient(to left, #f59e0b, transparent);
  border-radius: 0 10px 10px 0;
  animation: trailFlicker 0.3s ease-in-out infinite alternate;
}

@keyframes trailFlicker {
  from { opacity: 0.7; width: 30px; }
  to { opacity: 1; width: 40px; }
}

.rocket-sparks {
  position: absolute;
  top: 50%;
  right: 90%;
}

.spark {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #f59e0b;
  border-radius: 50%;
  animation: sparkFly 0.8s ease-out infinite;
}

.spark:nth-child(1) { animation-delay: 0s; top: -5px; }
.spark:nth-child(2) { animation-delay: 0.2s; top: 0px; }
.spark:nth-child(3) { animation-delay: 0.4s; top: 5px; }
.spark:nth-child(4) { animation-delay: 0.6s; top: -3px; }

@keyframes sparkFly {
  0% { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(-20px) scale(0); opacity: 0; }
}

/* Performance Metrics */
.metrics-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 4;
}

.metric-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  border-radius: 10px;
  text-align: center;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transform: translateX(50px);
  opacity: 0;
  animation: metricSlideIn 0.8s ease-out forwards;
  animation-delay: var(--delay);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@keyframes metricSlideIn {
  to { transform: translateX(0); opacity: 1; }
}

.metric-icon {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.metric-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
}

.metric-label {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* Chart Labels */
.chart-labels {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.y-labels {
  position: absolute;
  left: 0;
  top: 20px;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-light);
}

.x-labels {
  position: absolute;
  bottom: 10px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-light);
}

/* Services Section */
.services {
  padding: 5rem 0;
  background: var(--bg-white);
}

.services h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-dark);
}

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

.service-card {
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.6s ease;
  border: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(20px);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.service-card:hover i {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

.service-card i {
  font-size: 3rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.service-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* About Section */
.about {
  padding: 5rem 0;
  background: var(--bg-light);
}

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

.about-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.about-text p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links a {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.5rem;
}

.social-links a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-photo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: var(--shadow-xl);
  border: 4px solid white;
  transition: all 0.3s ease;
  background: var(--gradient-primary);
  padding: 2px;
}

.profile-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.15);
}

/* Portfolio Section */
.portfolio {
  padding: 5rem 0;
  background: var(--bg-white);
}

.portfolio h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.portfolio-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 3rem;
}

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

.portfolio-item {
  background: var(--bg-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.6s ease;
  border: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(20px);
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.portfolio-item:hover .portfolio-info h3 {
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.portfolio-embed {
  width: 100%;
  height: 400px;
}

.portfolio-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-placeholder {
  height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  color: var(--text-light);
}

.portfolio-placeholder i {
  font-size: 4rem;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.portfolio-info {
  padding: 2rem;
}

.portfolio-info h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.portfolio-info p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Contact Section */
.contact {
  padding: 5rem 0;
  background: var(--bg-light);
}

.contact h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.contact-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 3rem;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 2rem;
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.contact-item i {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.contact-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: var(--text-light);
}

.contact-form {
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group.focused input,
.form-group.focused textarea {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form input.error,
.contact-form textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: block;
}

.success-banner {
  display: none;
  background: var(--success-color);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 2rem;
  text-align: center;
  font-weight: 500;
  box-shadow: var(--shadow-md);
}

.success-banner.show {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Footer */
footer {
  background: var(--text-dark);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.footer-left h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-left p {
  color: var(--text-light);
}

.footer-right .social-links a {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.footer-right .social-links a:hover {
  background: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-light);
}

/* Animation classes */
.animate-in {
  animation: slideInUp 0.6s ease forwards;
}

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

/* Section reveal animation */
section {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Loading spinner */
.fa-spinner {
  animation: spin 1s linear infinite;
}

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

/* Better focus states for accessibility */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  nav ul {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
  }
  
  nav ul.mobile-menu-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  nav ul li {
    margin: 0.5rem 0;
  }
  
  nav ul li a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.1rem;
  }
  
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 6rem 1rem 4rem;
  }
  
  .hero-content {
    max-width: 100%;
    margin-bottom: 3rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .rocket-chart-container {
    width: 320px;
    height: 280px;
    padding: 20px;
  }
  
  .bar-chart-base {
    height: 200px;
  }
  
  .chart-bar {
    width: 25px;
  }
  
  .profile-photo {
    width: 200px;
    height: 200px;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .cta-buttons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  .btn-primary, .btn-secondary {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .service-card,
  .contact-form {
    padding: 1.5rem;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio-item {
    margin: 0 1rem;
  }
  
  .rocket-chart-container {
    width: 280px;
    height: 250px;
    padding: 15px;
  }
  
  .chart-bar {
    width: 20px;
  }
  
  .rocket-body {
    font-size: 1.5rem;
  }
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .rocket-chart-container {
    animation: none;
  }
}