/* ========================================
   Performance & SEO Optimizations
======================================== */
/* Preload critical resources */
.preload-font {
  font-display: swap;
}

/* Image optimization */
img {
  max-width: 100%;
  height: auto;
}

/* Critical CSS - Above the fold styles loaded first */
.hero-title,
.header,
.navigation {
  contain: layout style;
}

/* ========================================
   CSS Variables & Root Configuration
======================================== */
:root {
  /* Typography */
  --font-primary: 'Inter', 'Google Sans', 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Inter', 'Google Sans', sans-serif;
  --font-playful: 'Fredoka', 'Bubblegum Sans', 'Comic Neue', 'Kalam', 'Comic Sans MS', cursive;
  
  /* Space Theme Colors */
  --color-space-dark: #2C2954;
  --color-space-purple: #3B3976;
  --color-sun-yellow: #FFB84D;
  --color-sun-orange: #FF8C42;
  --color-earth-blue: #4A90E2;
  --color-earth-green: #7ED321;
  --color-mars-red: #D0021B;
  --color-saturn-beige: #D4A574;
  --color-satellite: #E8E8E8;
  
  /* Main Colors */
  --color-primary: #FFB84D;
  --color-secondary: #FF8C42;
  --color-accent: #4A90E2;
  --color-success: #7ED321;
  --color-danger: #D0021B;
  --color-text: #2C2954;
  --color-text-light: #6B6B9D;
  --color-bg: #F5F5F7;
  --color-white: #ffffff;
  
  /* Spacing - Responsive */
  --spacing-xs: clamp(0.25rem, 1vw, 0.5rem);
  --spacing-sm: clamp(0.5rem, 2vw, 1rem);
  --spacing-md: clamp(1rem, 3vw, 1.5rem);
  --spacing-lg: clamp(1.5rem, 4vw, 2rem);
  --spacing-xl: clamp(2rem, 5vw, 3rem);
  
  /* Container widths */
  --container-xs: 100%;
  --container-sm: 540px;
  --container-md: 720px;
  --container-lg: 960px;
  --container-xl: 1140px;
  --container-xxl: 1320px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 15px;
  --radius-lg: 20px;
  --radius-xl: 25px;
  --radius-full: 50px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(44, 41, 84, 0.1);
  --shadow-md: 0 5px 15px rgba(44, 41, 84, 0.15);
  --shadow-lg: 0 10px 30px rgba(44, 41, 84, 0.2);
  --shadow-hover: 0 8px 25px rgba(255, 184, 77, 0.3);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-default: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ========================================
   Base Styles & Reset
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background: linear-gradient(135deg, var(--color-space-dark) 0%, var(--color-space-purple) 50%, #1E1B3A 100%);
  min-height: 100vh;
  color: var(--color-text);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Space Background Effects - Multi-layer moving stars */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #ffffff, transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 90px 40px, #ffffff, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 160px 30px, #ffffff, transparent),
    radial-gradient(1px 1px at 200px 90px, rgba(255, 255, 255, 0.7), transparent);
  background-repeat: repeat;
  background-size: 300px 200px;
  animation: starsLayer1 20s linear infinite;
  pointer-events: none;
  z-index: -3;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 80px 50px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 150px 100px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(2px 2px at 220px 160px, #ffffff, transparent),
    radial-gradient(1px 1px at 270px 80px, rgba(255, 255, 255, 0.6), transparent);
  background-repeat: repeat;
  background-size: 400px 300px;
  animation: starsLayer2 35s linear infinite;
  pointer-events: none;
  z-index: -2;
}

/* Third layer using a pseudo element on container */
.container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(1px 1px at 50px 120px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 180px 200px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 320px 80px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 380px 220px, rgba(255, 255, 255, 0.6), transparent);
  background-repeat: repeat;
  background-size: 500px 400px;
  animation: starsLayer3 50s linear infinite;
  pointer-events: none;
  z-index: -1;
}

/* Keyframes for different star layers */
@keyframes starsLayer1 {
  0% { transform: translateX(0px); }
  100% { transform: translateX(-300px); }
}

@keyframes starsLayer2 {
  0% { transform: translateX(0px) translateY(0px); }
  100% { transform: translateX(-400px) translateY(-50px); }
}

@keyframes starsLayer3 {
  0% { transform: translateX(0px) translateY(0px); }
  100% { transform: translateX(-500px) translateY(20px); }
}

/* Optional: Add some twinkling effect */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ========================================
   Typography
======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 600;
}

p {
  margin-bottom: var(--spacing-sm);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-playful {
  font-family: var(--font-playful);
  color: var(--color-secondary);
}

/* ========================================
   Comic Crayon Text Effects
======================================== */
.crayon-text-hero {
  font-family: var(--font-playful);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  color: white;
  text-shadow: 
    -3px -3px 0 #000,
    3px -3px 0 #000,
    -3px 3px 0 #000,
    3px 3px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.crayon-text-simple {
  font-family: var(--font-playful);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: white;
  text-shadow: 
    -3px -3px 0 #000,
    3px -3px 0 #000,
    -3px 3px 0 #000,
    3px 3px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
  text-align: center;
}

.crayon-text-solid {
  font-family: var(--font-playful);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--color-earth-green);
  text-shadow: 
    2px 2px 0px var(--color-space-dark),
    -1px -1px 0px var(--color-space-dark),
    1px -1px 0px var(--color-space-dark),
    -1px 1px 0px var(--color-space-dark),
    1px 1px 0px var(--color-space-dark);
}

.crayon-text-light {
  font-family: var(--font-playful);
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--color-earth-blue);
  text-shadow: 
    2px 2px 0px white,
    -1px -1px 0px white,
    1px -1px 0px white,
    -1px 1px 0px white,
    1px 1px 0px white,
    2px 2px 4px rgba(0,0,0,0.3);
}

.crayon-rainbow {
  font-family: var(--font-playful);
  font-weight: 600;
  font-size: clamp(1rem, 3vw, 1.5rem);
  background: linear-gradient(45deg, var(--color-sun-orange), var(--color-sun-yellow), var(--color-earth-green), var(--color-earth-blue));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(2px 2px 0px var(--color-space-dark)) 
          drop-shadow(-1px -1px 0px var(--color-space-dark)) 
          drop-shadow(1px -1px 0px var(--color-space-dark)) 
          drop-shadow(-1px 1px 0px var(--color-space-dark));
  animation: colorShift 3s ease-in-out infinite;
}

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

/* Special class for Mini Features title to override h2 styles */
.mini-features-section .crayon-text-simple,
h2.crayon-text-simple {
  font-family: var(--font-playful) !important;
  font-weight: 800 !important;
  font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
  color: white !important;
  text-shadow: 
    -4px -4px 0 #000,
    4px -4px 0 #000,
    -4px 4px 0 #000,
    4px 4px 0 #000,
    -3px -3px 0 #000,
    3px -3px 0 #000,
    -3px 3px 0 #000,
    3px 3px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000 !important;
  text-align: center !important;
  margin-bottom: var(--spacing-md) !important;
  letter-spacing: 1px !important;
}

/* Alternative comic crayon style - more similar to the image */
.crayon-text-thick {
  font-family: var(--font-playful) !important;
  font-weight: 800 !important;
  font-size: clamp(1.8rem, 5vw, 3rem) !important;
  color: white !important;
  text-shadow: 
    2px 2px 0 #333,
    3px 3px 0 #222,
    4px 4px 0 #111,
    0 0 8px rgba(255,255,255,0.1) !important;
  text-align: center !important;
  margin-bottom: var(--spacing-md) !important;
  letter-spacing: 1px !important;
  text-transform: none !important;
}

.btn-crayon {
  font-family: var(--font-playful);
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  background: linear-gradient(45deg, var(--color-sun-yellow), var(--color-sun-orange));
  border: 3px solid var(--color-space-dark);
  border-radius: 15px;
  padding: 12px 24px;
  text-shadow: 
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
  box-shadow: 
    0 4px 0px var(--color-space-dark),
    0 6px 10px rgba(0,0,0,0.3);
  transform: translateY(0);
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.btn-crayon:hover {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0px var(--color-space-dark),
    0 4px 8px rgba(0,0,0,0.3);
  color: white;
  text-decoration: none;
}

.btn-crayon:active {
  transform: translateY(4px);
  box-shadow: 
    0 0px 0px var(--color-space-dark),
    0 2px 5px rgba(0,0,0,0.3);
}

/* ========================================
   Layout Components
======================================== */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--spacing-md);
}

/* Responsive container */
@media (min-width: 576px) {
  .container {
    max-width: var(--container-sm);
    padding: var(--spacing-lg);
  }
}

@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
  }
}

@media (min-width: 992px) {
  .container {
    max-width: var(--container-lg);
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: var(--container-xl);
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: var(--container-xxl);
  }
}

.section {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
}

/* Responsive section padding */
@media (min-width: 768px) {
  .section {
    padding: var(--spacing-xl);
  }
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
  text-align: center;
}

/* Featured Projects section - transparent background */
.featured-projects-section {
  background: transparent;
  box-shadow: none;
}

/* ========================================
   Header & Hero Section
======================================== */
.header {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.profile-badge {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: var(--spacing-xs) var(--spacing-lg);
  border-radius: var(--radius-xl);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: var(--spacing-lg);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
}

.hero-title {
  margin-bottom: var(--spacing-md);
}

.hero-description {
  font-size: 1.2rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.tagline {
  font-family: var(--font-playful);
  font-size: 1.1rem;
  color: var(--color-accent);
  font-weight: 400;
  margin-top: var(--spacing-lg);
}

/* ========================================
   Navigation & Buttons
======================================== */
.navigation {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
  flex-direction: column;
}

/* Mobile navigation - stack vertically */
@media (max-width: 575px) {
  .navigation {
    gap: var(--spacing-md);
  }
  
  .navigation .btn {
    width: 100%;
    text-align: center;
  }
}

/* Tablet and up - horizontal layout */
@media (min-width: 576px) {
  .navigation {
    flex-direction: row;
    gap: var(--spacing-md);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  min-height: 36px; /* Touch-friendly minimum */
  transition: all var(--transition-default);
  font-family: var(--font-primary);
  font-weight: 600;
  transition: all var(--transition-default);
  cursor: pointer;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 184, 77, 0.4);
}

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

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

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-accent:hover {
  background: #3A7BC8;
  border-color: #3A7BC8;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

/* ========================================
   Grid Systems
======================================== */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

/* Mobile-first responsive grid */
.grid-auto {
  grid-template-columns: 1fr;
}

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

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

/* Tablet and up */
@media (min-width: 576px) {
  .grid {
    gap: var(--spacing-lg);
  }
  
  .grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop and up */
@media (min-width: 768px) {
  .grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   Card Components
======================================== */
/* ========================================
   Project Cards - Modern Design
======================================== */
.project-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  height: auto;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.project-image {
  width: 100%;
  height: 140px;
  overflow: hidden;
  position: relative;
}

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

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}

.project-description {
  color: var(--color-text-light);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tech-badge {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 184, 77, 0.3);
}

/* ========================================
   Service Cards - Grid Layout
======================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  justify-items: center;
}

/* Desktop: 3 cards in a row */
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet: 2 cards per row, 3rd card centered below */
@media (min-width: 768px) and (max-width: 1023px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Center the 3rd card when it's alone on the bottom row */
  .services-grid .service-card:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 400px;
    justify-self: center;
  }
}

/* Mobile: 1 card per row */
@media (max-width: 767px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .services-grid .service-card:nth-child(3) {
    grid-column: 1;
    max-width: none;
    justify-self: stretch;
  }
}

.service-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 24px;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.service-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 50%;
  margin: 0 auto 20px;
  color: white;
}

.service-icon svg {
  width: 32px;
  height: 32px;
}

.service-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.service-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
  text-align: center;
}

.service-description {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  flex: 1;
  text-align: center;
}

.service-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: auto;
  padding-top: 16px;
}

/* Mobile responsive for services */
@media (max-width: 767px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
  }
  
  .service-card {
    padding: 20px;
  }
  
  .service-title {
    font-size: 1.1rem;
  }
  
  .service-description {
    font-size: 0.9rem;
  }
  
  .service-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
  }
  
  .service-icon svg {
    width: 28px;
    height: 28px;
  }
}

/* ========================================
   Mini Features - Horizontal Card Layout
======================================== */
.mini-features-section {
  background: transparent;
  backdrop-filter: none;
  border-radius: 0;
  margin: 48px 0;
  padding: 48px;
  box-shadow: none;
  border: none;
}

.mini-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.mini-feature-item {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(44, 41, 84, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--color-text);
  cursor: pointer;
  border: 2px solid transparent;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.mini-feature-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(44, 41, 84, 0.4);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-color: var(--color-primary);
  color: white;
}

.mini-feature-item:hover .mini-feature-title {
  color: white;
}

.mini-feature-item:hover .mini-feature-description {
  color: rgba(255, 255, 255, 0.95);
}

.mini-feature-image {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.mini-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mini-feature-item:hover .mini-feature-image img {
  transform: scale(1.05);
}

.mini-feature-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.mini-feature-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}

.mini-feature-description {
  color: var(--color-text-light);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tablet/Laptop responsive for mini features */
@media (max-width: 1024px) and (min-width: 768px) {
  .mini-features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 700px;
  }
  
  .mini-feature-item {
    flex-direction: row;
  }
  
  .mini-feature-image {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
  }
  
  .mini-feature-content {
    padding: 24px;
    gap: 12px;
  }
  
  .mini-feature-title {
    font-size: 1.15rem;
    line-height: 1.3;
  }
  
  .mini-feature-description {
    font-size: 0.95rem;
    line-height: 1.4;
  }
}

/* Mobile responsive for mini features */
@media (max-width: 767px) {
  .mini-features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .mini-feature-item {
    flex-direction: row; /* Keep horizontal layout [foto] [text] */
  }
  
  .mini-feature-image {
    width: 100px; /* Fixed width for mobile */
    height: 100px;
    flex-shrink: 0;
  }
  
  .mini-feature-content {
    padding: 12px 16px; /* Adjust padding for horizontal layout */
    gap: 8px;
  }
  
  .mini-feature-title {
    font-size: 0.95rem; /* Slightly smaller for mobile */
    line-height: 1.2;
  }
  
  .mini-feature-description {
    font-size: 0.8rem;
    line-height: 1.3;
  }
  
  .mini-feature-cta {
    font-size: 0.85rem;
  }
  
  .mini-features-section {
    margin: 32px 0;
    padding: 32px 24px;
  }
}

/* Carousel specific styling - Mobile First */
.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  padding: 0 12px;
  box-sizing: border-box;
}

/* Ensure mobile phones show only 1 card */
@media (max-width: 767px) {
  .carousel-slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    padding: 0 12px;
  }
}

/* Tablet responsive - 2 cards */
@media (min-width: 768px) and (max-width: 1023px) {
  .carousel-slide {
    flex: 0 0 50%;
    width: 50%;
    padding: 0 14px;
  }
}

/* Desktop responsive - 3 cards */
@media (min-width: 1024px) {
  .carousel-slide {
    flex: 0 0 33.333%;
    width: 33.333%;
    padding: 0 16px;
  }
}

/* Mobile specific styles */
@media (max-width: 767px) {
  .project-content {
    padding: 16px;
    gap: 10px;
  }
  
  .project-title {
    font-size: 1rem;
  }
  
  .project-description {
    font-size: 0.85rem;
  }
  
  .project-image {
    height: 120px;
  }
}

/* ========================================
   Carousel
======================================== */
.carousel-container {
  position: relative;
  width: 100%;
  overflow: visible;
  padding: 32px 0;
  margin: 0 auto;
  max-width: 1200px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-default);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover {
  background: var(--color-secondary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 184, 77, 0.4);
}

.carousel-btn-prev {
  left: 10px;
}

.carousel-btn-next {
  right: 10px;
}

.carousel-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 32px 0;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  width: 100%;
  align-items: stretch;
}

.carousel-track:active {
  cursor: grabbing;
}

.carousel-slide {
  flex: 0 0 33.333%;
  width: 33.333%;
  padding: 0 var(--spacing-lg);
  box-sizing: border-box;
}

.carousel-slide .card {
  margin: 0;
}

.carousel-dots {
  display: none;
}

.carousel-dot {
  display: none;
}

/* Mobile carousel container */
@media (max-width: 767px) {
  .carousel-container {
    padding: 24px 0;
  }
  
  .carousel-wrapper {
    padding: 24px 0;
  }
  
  .carousel-btn {
    display: none;
  }
}

/* ========================================
   Social Links
======================================== */
.connect-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-xs) 0;
  padding: var(--spacing-xs) 0;
  flex-wrap: wrap;
  min-height: 32px;
}

.connect-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  margin: 0;
  line-height: 1;
}

.social-links {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.social-btn {
  background: var(--color-bg);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-family: var(--font-primary);
  font-weight: 500;
  color: var(--color-text);
  transition: all var(--transition-default);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  min-height: 32px;
  font-size: 0.8rem;
}

.social-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

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

.social-btn.github:hover {
  background: var(--color-space-dark);
  color: var(--color-white);
  border-color: var(--color-space-dark);
}

.social-btn.github:hover .social-icon {
  filter: brightness(0) invert(1);
}

.social-btn.twitter:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.social-btn.twitter:hover .social-icon {
  filter: brightness(0) invert(1);
}

.social-btn.medium:hover {
  background: var(--color-success);
  color: var(--color-white);
  border-color: var(--color-success);
}

.social-btn.medium:hover .social-icon {
  filter: brightness(0) invert(1);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .connect-container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
  
  .social-links {
    justify-content: flex-start;
    width: 100%;
  }
}

/* Special styling for connect section - no background */
.section:has(.connect-container) {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* ========================================
   Special Sections
======================================== */
.contact-cta {
  text-align: center;
  padding: clamp(var(--spacing-lg), 5vw, var(--spacing-xl));
  background: linear-gradient(135deg, var(--color-accent), var(--color-space-purple));
  border-radius: var(--radius-lg);
  color: var(--color-white);
  margin-top: var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.contact-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(180deg); }
}

.contact-cta h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

.contact-cta p {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
}

/* ========================================
   Pricing Components
======================================== */
.pricing-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 2px solid transparent;
  transition: all var(--transition-default);
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.pricing-card.featured {
  border-color: var(--color-secondary);
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(255, 140, 66, 0.2);
}

.package-badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-lg);
}

.package-badge.basic {
  background: var(--color-success);
  color: var(--color-white);
}

.package-badge.popular {
  background: var(--color-secondary);
  color: var(--color-white);
}

.package-badge.premium {
  background: var(--color-accent);
  color: var(--color-white);
}

.package-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.price {
  margin-bottom: var(--spacing-md);
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  display: block;
}

.price-period {
  font-size: 0.9rem;
  color: var(--color-text-light);
  text-transform: uppercase;
}

.package-description {
  color: var(--color-text-light);
  margin-bottom: var(--spacing-lg);
  font-style: italic;
}

.features-list {
  list-style: none;
  margin-bottom: var(--spacing-lg);
  text-align: left;
}

.features-list li {
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid #eee;
  position: relative;
  padding-left: 25px;
}

.features-list li:last-child {
  border-bottom: none;
}

.features-list li::before {
  content: "✓";
  color: var(--color-primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.service-item {
  background: var(--color-bg);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  transition: all var(--transition-default);
  border: 2px solid transparent;
}

.service-item:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
}

.service-item h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.service-item p {
  color: var(--color-text-light);
  margin-bottom: var(--spacing-sm);
}

.service-item strong {
  color: var(--color-primary);
  font-size: 1.1rem;
}

/* ========================================
   Process Steps
======================================== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.step {
  text-align: center;
  padding: var(--spacing-lg);
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto var(--spacing-md);
}

.step h3 {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.step p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ========================================
   Portfolio Specific Components
======================================== */
.project-status {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--spacing-lg);
  color: var(--color-white);
}

.project-status.completed {
  background: var(--color-primary);
}

.project-status.in-progress {
  background: var(--color-accent);
}

.project-links {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.project-links .btn {
  flex: 1;
  min-width: 120px;
}

/* ========================================
   Utility Classes
======================================== */
.text-center {
  text-align: center;
}

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

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

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
  .container {
    padding: var(--spacing-sm);
  }
  
  .section {
    padding: var(--spacing-lg) var(--spacing-md);
  }
  
  .header {
    padding: var(--spacing-lg) var(--spacing-md);
  }
  
  .navigation {
    flex-direction: column;
    align-items: center;
  }
  
  .social-links {
    flex-direction: column;
    align-items: center;
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: var(--spacing-xs);
  }
  
  .section {
    padding: var(--spacing-md);
  }
  
  .header {
    padding: var(--spacing-md);
  }
}

/* ========================================
   Animation & Performance
======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus states for accessibility */
.btn:focus,
.social-btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ========================================
   Mobile & Touch Device Optimizations
======================================== */
@media (max-width: 480px) {
  /* Extra small screens - phones in portrait */
  h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .social-links {
    gap: var(--spacing-sm);
  }
  
  .social-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
  }
  
  .card {
    padding: var(--spacing-md);
  }
  
  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  /* Touch devices - remove hover effects that don't work */
  .btn:hover,
  .social-btn:hover,
  .card:hover {
    transform: none;
  }
  
  /* Increase touch targets */
  .btn,
  .social-btn {
    min-height: 48px;
    padding: var(--spacing-md) var(--spacing-lg);
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .btn,
  .social-btn {
    border: 1px solid black;
    background: white;
    color: black;
  }
}

/* ========================================
   Hero Layout Override
   Disable conflicting styles when using side-by-side layout
======================================== */
.hero-section ~ .main-content .header {
  background: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  box-shadow: none;
  text-align: left;
}

.hero-section ~ .main-content .profile-badge {
  display: none; /* Hidden since it's now in the hero section */
}

.hero-section ~ .main-content .hero {
  display: none; /* Hidden since it's now in the hero section */
}

.main-content {
  background: linear-gradient(135deg, #87CEEB 0%, #B0E0E6 50%, #E0F6FF 100%);
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: var(--spacing-xl) 0;
  overflow: hidden; /* Hide clouds when they move outside */
}

/* Cloud Animation */
.cloud {
  position: absolute;
  opacity: 0.6;
  z-index: 2;
  animation: moveCloud linear infinite;
  pointer-events: none; /* Don't interfere with clicks */
}

.cloud img {
  width: 100%;
  height: 100%;
  filter: brightness(1.5) saturate(0) contrast(1.2); /* Make clouds pure white */
}

.cloud-1 {
  top: 10%;
  width: 80px;
  height: 60px;
  animation-duration: 25s;
  animation-delay: 0s;
}

.cloud-2 {
  top: 30%;
  width: 100px;
  height: 75px;
  animation-duration: 35s;
  animation-delay: -8s;
}

.cloud-3 {
  top: 60%;
  width: 120px;
  height: 90px;
  animation-duration: 30s;
  animation-delay: -15s;
}

.cloud-4 {
  top: 80%;
  width: 90px;
  height: 70px;
  animation-duration: 40s;
  animation-delay: -20s;
}

.cloud-5 {
  top: 15%;
  width: 70px;
  height: 55px;
  animation-duration: 28s;
  animation-delay: -5s;
}

.cloud-6 {
  top: 45%;
  width: 110px;
  height: 85px;
  animation-duration: 32s;
  animation-delay: -12s;
}

.cloud-7 {
  top: 70%;
  width: 85px;
  height: 65px;
  animation-duration: 26s;
  animation-delay: -18s;
}

.cloud-8 {
  top: 25%;
  width: 95px;
  height: 72px;
  animation-duration: 38s;
  animation-delay: -25s;
}

@keyframes moveCloud {
  from {
    transform: translateX(100vw);
  }
  to {
    transform: translateX(-200px);
  }
}

/* Responsive clouds for mobile */
@media (max-width: 768px) {
  .cloud-1 {
    width: 60px;
    height: 45px;
    animation-duration: 20s;
  }
  
  .cloud-2 {
    width: 70px;
    height: 55px;
    animation-duration: 25s;
  }
  
  .cloud-3 {
    width: 80px;
    height: 60px;
    animation-duration: 22s;
  }
  
  .cloud-4 {
    width: 65px;
    height: 50px;
    animation-duration: 28s;
  }
  
  .cloud-5 {
    width: 55px;
    height: 42px;
    animation-duration: 18s;
  }
  
  .cloud-6 {
    width: 75px;
    height: 58px;
    animation-duration: 24s;
  }
  
  .cloud-7 {
    width: 62px;
    height: 48px;
    animation-duration: 20s;
  }
  
  .cloud-8 {
    width: 68px;
    height: 52px;
    animation-duration: 26s;
  }
}

.main-content .container {
  margin-top: 0;
  position: relative;
  z-index: 3; /* Keep content above clouds */
}

/* ========================================
   Footer - Connect Section
======================================== */
.footer-connect {
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.footer-social-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--transition-default);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.footer-icon {
  width: 24px;
  height: 24px;
  transition: all var(--transition-default);
}

.footer-social-btn:hover .footer-icon {
  transform: scale(1.1);
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-lg);
  }
  
  .footer-title {
    font-size: 1.25rem;
  }
  
  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-connect {
    padding: var(--spacing-lg) 0;
  }
  
  .footer-social-btn {
    width: 44px;
    height: 44px;
  }
  
  .footer-icon {
    width: 20px;
    height: 20px;
  }
}
