:root {
  --primary: #0062FF;       /* Vibrant blue */
  --secondary: #6236FF;     /* Purple accent */
  --dark: #111827;          /* Deep navy/almost black */
  --light: #F9FAFB;         /* Off-white */
  --card-bg: #FFFFFF;       /* Pure white */
  --accent: #00D9C5;        /* Teal accent */
  --accent-secondary: #FF5757; /* Coral accent */
  --warm: #FF6B35;          /* Warm orange for buttons */
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-dark: linear-gradient(135deg, var(--dark), #2D3748);
  --transition: all 0.3s ease-in-out;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Manrope', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--light);
  color: var(--dark);
  line-height: 1.8;
  position: relative;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1.5rem;
  color: #4B5563;
  font-weight: 400;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary);
}

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

/* Modern Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--primary);
  display: flex;
  align-items: center;
}

.logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

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

.nav-links a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  font-size: 0.95rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-icon {
  display: none; /* Remove the circle icons */
}

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

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

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

/* Hero Section */
.hero {
  min-height: 100vh;
  padding-top: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: var(--light);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: var(--gradient-primary);
  opacity: 0.05;
  border-radius: 50%;
  z-index: 0;
}

.hero-content {
  max-width: 800px;
  padding: 3rem;
  z-index: 1;
  text-align: left;
  position: relative;
}

/* Set a fixed height for the typewriter text container */
.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: #4B5563;
  max-width: 90%;
  line-height: 1.6;
  min-height: 80px; /* Add a minimum height to prevent layout shifts */
}

/* Ensure the typewriter text doesn't cause layout shifts */
.typewriter-text {
  display: block;
  min-height: 80px; /* Match the container height */
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
  line-height: 1.1;
  position: relative;
  font-weight: 800;
}

.hero h1 span {
  color: var(--primary);
  position: relative;
}

.hero h1 span::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--accent);
  opacity: 0.3;
  z-index: -1;
}

/* Scroll Indicator - Repositioned to bottom of viewport */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--dark);
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.scroll-arrow {
  animation: scrollArrow 2s ease-in-out infinite;
  font-size: 1.5rem;
  margin-top: 10px;
}

/* Modern Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px; /* More rounded buttons */
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
  letter-spacing: 0.5px;
}

.primary-btn {
  background: var(--dark) !important;
  color: white !important;
  border: 2px solid var(--dark) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.primary-btn:hover {
  background: var(--primary) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 98, 255, 0.3) !important;
  color: white !important;
}

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

.secondary-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 98, 255, 0.15);
}

/* Section Styling */
.section {
  padding: 8rem 2rem;
  position: relative;
}

.section-light {
  background: var(--light);
}

.section-dark {
  background: var(--dark);
  color: var(--light);
}

.section-gradient {
  background: var(--gradient-primary);
  color: white;
}

.section h2 {
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  font-weight: 800;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--accent);
}

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

.section-center h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Service Cards */
.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

.card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition);
}

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

.card:hover::before {
  width: 100%;
  opacity: 0.05;
}

.card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  position: relative;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: rgba(0, 98, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 1.5rem;
}

/* Process Steps */
.process-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 4rem;
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(0, 98, 255, 0.1);
  z-index: 0;
}

.process-step {
  flex: 1;
  min-width: 200px;
  text-align: center;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 2;
}

.process-step h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

/* Portfolio Items */
.portfolio-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  background: transparent;
  border: none;
  padding: 10px 24px;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--dark);
  font-weight: 500;
  border-radius: 30px;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: white;
}

.portfolio-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
}

.portfolio-item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

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

.portfolio-image {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 98, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-item h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.3rem;
  padding: 0 1.5rem;
}

.portfolio-item p {
  padding: 0 1.5rem;
  margin-bottom: 1rem;
}

.view-project {
  background: white;
  color: var(--primary);
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  transition: var(--transition);
}

.view-project:hover {
  background: var(--dark);
  color: white;
  transform: translateY(-3px);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0 1.5rem;
  padding: 0 1.5rem;
}

.tech-stack span {
  background: rgba(0, 98, 255, 0.1);
  color: var(--primary);
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: 20px;
  font-weight: 500;
}

/* Contact Form */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  margin-top: 3rem;
}

.contact-info, .contact-form-container {
  flex: 1;
  min-width: 300px;
}

.contact-intro {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(0, 98, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: var(--primary);
  font-size: 1.2rem;
}

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

.social-link {
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 98, 255, 0.1);
  color: var(--primary);
  border-radius: 12px;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
}

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

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

.form-control {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid #E2E8F0;
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: var(--transition);
  background: #F9FAFB;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.1);
  background: white;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 98, 255, 0.3);
}

/* Form Messages */
.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Footer */
footer {
  background: var(--dark);
  padding: 5rem 2rem 2rem;
  color: white;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 3rem;
  gap: 3rem;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
}

.footer-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
}

.footer-section {
  min-width: 150px;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  position: relative;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: white;
  padding-left: 5px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-bottom: 1.5rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--light);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

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

.pixel-loading p {
  margin-top: 20px;
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: var(--dark);
}

/* Hero Background and Elements */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--dark);
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* Contact Section Enhancements */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info, .contact-form-container {
  flex: 1;
  min-width: 300px;
}

.contact-intro {
  margin-bottom: 30px;
}

.contact-details {
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.contact-icon {
  width: 30px;
  height: 30px;
  margin-right: 15px;
  background-color: var(--warm);
}

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

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--dark);
  color: var(--light);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  transform: translateY(-3px);
  background: var(--warm);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input {
  width: auto;
}

.checkbox-group label {
  margin-bottom: 0;
}

/* Footer */
footer {
  background: var(--dark);
  padding: 3rem 2rem 1rem;
  color: var(--light);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 30px;
  gap: 30px;
}

.footer-logo {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.footer-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
}

.footer-section {
  min-width: 150px;
}

.footer-section h4 {
  margin-bottom: 15px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: var(--light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--warm);
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.social-icon {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--warm);
}

.footer-email {
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.footer-links a {
  color: var(--light);
  text-decoration: none;
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--warm);
  color: var(--light);
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 1000;
  transition: var(--transition);
}
#back-to-top:hover {
  background: var(--secondary);
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    right: -100%;
    top: 0;
    height: 100vh;
    width: 60%;
    background: var(--dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: var(--transition);
    z-index: 9;
  }
  .nav-links.nav-active {
    right: 0;
  }
  .burger {
    display: block;
    position: relative;
    z-index: 10;
  }
  .card, .game-item, .portfolio-item {
    width: 100%;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
}
