/* FILE: assets/css/home.css (FIXED VERSION) */
/* =============================================================================
   HOME PAGE STYLES
   Hero section, feature cards, and landing page specific components
   
   FIXES:
   - Line 149: Changed background-clip: border-box → text (purple box fix)
   ============================================================================= */

/* Add AOS library CSS for animations */
@import url("https://unpkg.com/aos@2.3.1/dist/aos.css");

/* -----------------------------------------------------------------------------
   HERO SECTION
   ----------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-16) 0;
  padding-top: calc(72px + var(--space-8)); /* Account for fixed navbar */
  background: linear-gradient(135deg, var(--background-light) 0%, #f0e8ff 100%);
}

body.dark-mode .hero {
  background: linear-gradient(135deg, var(--background-light) 0%, #1a0f2e 100%);
}

/* Animated background pattern */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.15;
  overflow: hidden;
  pointer-events: none;
}

.wave-pattern {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(108, 46, 185, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(209, 179, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 20%,
      rgba(108, 46, 185, 0.08) 0%,
      transparent 50%
    );
  animation: wave-drift 20s ease-in-out infinite;
}

@keyframes wave-drift {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(-5%, 5%) rotate(2deg);
  }
  66% {
    transform: translate(5%, -5%) rotate(-2deg);
  }
}

/* Content container */
.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

/* -----------------------------------------------------------------------------
   HERO TEXT CONTENT
   ----------------------------------------------------------------------------- */
.hero-text {
  max-width: 700px;
}

/* Greeting badge */
.hero-greeting {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-6);
  background-color: var(--secondary-color);
  border-radius: 50px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

body.dark-mode .hero-greeting {
  background-color: rgba(155, 111, 204, 0.3);
  color: var(--secondary-color);
}

.greeting-emoji {
  font-size: var(--text-xl);
  animation: wave-hand 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes wave-hand {
  0%,
  100% {
    transform: rotate(0deg);
  }
  10%,
  30% {
    transform: rotate(14deg);
  }
  20% {
    transform: rotate(-8deg);
  }
  40% {
    transform: rotate(0deg);
  }
}

/* Main title */
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  color: var(--text-dark);
}

/* =============================================================================
   HIGHLIGHT TEXT - GRADIENT TEXT EFFECT
   
   FIX APPLIED: Changed background-clip: border-box → text
   This was causing the purple box to appear behind the text in dark mode.
   ============================================================================= */
.highlight-text {
  display: inline;
  padding: 0;
  margin: 0;
  color: var(--primary-color); /* Fallback for unsupported browsers */
  background: linear-gradient(135deg, var(--primary-color) 0%, #9d6fd8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* FIXED: Was "border-box", now correctly "text" */
body.dark-mode .highlight-text {
  background: linear-gradient(135deg, #a77fdb 0%, #d1b3ff 100%);
  -webkit-background-clip: text;
  background-clip: text; /* ← THIS WAS THE BUG: was "border-box" */
  -webkit-text-fill-color: transparent;
}

/* Fallback for browsers that don't support background-clip: text */
@supports not (-webkit-background-clip: text) {
  .highlight-text {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--primary-color);
  }

  body.dark-mode .highlight-text {
    color: #d1b3ff;
  }
}

/* Subtitle/tagline */
.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 500;
  color: #374151;
  margin-bottom: var(--space-6);
  line-height: 1.4;
}

body.dark-mode .hero-subtitle {
  color: #e2e8f0; /* Brighter for better readability */
}

/* Bio paragraph */
.hero-bio {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: #1f2937;
  margin-bottom: var(--space-8);
  max-width: 60ch;
}

body.dark-mode .hero-bio {
  color: #e2e8f0; /* Brighter white for better readability */
}

.hero-bio strong {
  color: var(--primary-color);
  font-weight: 600;
}

body.dark-mode .hero-bio strong {
  color: var(--secondary-color);
}

/* Hero Highlights (Stats) */
.hero-highlights {
  display: flex;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.highlight-item {
  text-align: center;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

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

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

.highlight-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--space-1);

  /* Gradient Text */
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight-label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

body.dark-mode .highlight-label {
  color: var(--gray-400);
}

/* Call-to-action buttons */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--gray-600);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.scroll-arrow {
  animation: bounce-arrow 2s ease-in-out infinite;
}

@keyframes bounce-arrow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* -----------------------------------------------------------------------------
   HERO VISUAL (Right Column)
   ----------------------------------------------------------------------------- */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Visual Stats Circles */
.visual-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  width: 100%;
}

.stat-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  animation: float 6s ease-in-out infinite;
  background: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.stat-circle.primary {
  animation-delay: 0s;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
}
.stat-circle.secondary {
  animation-delay: 2s;
  background: linear-gradient(135deg, var(--accent-teal), #2dd4bf);
}
.stat-circle.tertiary {
  animation-delay: 4s;
  background: linear-gradient(
    135deg,
    var(--warning-color),
    var(--highlight-color)
  );
}

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

.circle-content {
  text-align: center;
  color: var(--white);
}

.circle-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.circle-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.9;
}

/* Code Snippet Card */
.code-snippet {
  background-color: #1e293b;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 480px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.5s ease;
}

/* Light mode - darker code snippet for contrast */
.code-snippet {
  background-color: #0f172a;
}

.code-snippet:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.snippet-header {
  background-color: #0f172a;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.snippet-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.snippet-dot.red {
  background-color: #ef4444;
}
.snippet-dot.yellow {
  background-color: #f59e0b;
}
.snippet-dot.green {
  background-color: #10b981;
}

.snippet-title {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--gray-600);
  font-family: var(--font-mono);
}

.snippet-code {
  padding: var(--space-6);
  margin: 0;
  overflow-x: auto;
}

.snippet-code code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: #e2e8f0;
  display: block;
}

/* Syntax Highlighting */
.code-comment {
  color: #64748b;
  font-style: italic;
}
.code-keyword {
  color: #c084fc;
  font-weight: bold;
}
.code-function {
  color: #60a5fa;
}
.code-string {
  color: #34d399;
}
.code-number {
  color: #f472b6;
}

/* -----------------------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
   ----------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-8);
  }

  .hero-text {
    margin: 0 auto;
    max-width: 100%;
    padding: 0 var(--space-4);
  }

  .hero-greeting {
    justify-content: center;
  }

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

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

  .hero-bio {
    text-align: center;
    max-width: 100%;
  }

  .hero-cta {
    justify-content: center;
  }

  .visual-stats {
    display: none;
  }

  .code-snippet {
    transform: none;
    margin: 0 auto;
    display: none; /* Hide on tablet */
  }

  .hero-visual {
    display: none; /* Hide entire visual section on tablet/mobile */
  }
}

@media (max-width: 768px) {
  .hero {
    padding: calc(var(--space-12) + 72px) 0 var(--space-8);
    min-height: auto;
  }

  .hero-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    line-height: 1.2;
  }

  .hero-title br {
    display: none; /* Remove line break on mobile */
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-bio {
    font-size: var(--text-base);
    line-height: 1.6;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .scroll-indicator {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: calc(var(--space-8) + 72px) 0 var(--space-6);
  }

  .hero-text {
    padding: 0 var(--space-2);
  }

  .hero-greeting {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
    margin-bottom: var(--space-4);
  }

  .greeting-emoji {
    font-size: var(--text-base);
  }

  .hero-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-3);
  }

  .hero-subtitle {
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
  }

  .hero-bio {
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
  }

  .hero-cta .btn {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }
}
