/* CSS for the Hero (Home) Section */

/* Styles for the main title, applying the gradient and stroke effect */
.title-style {
  -webkit-text-stroke: 1px #15803d;
  background: linear-gradient(135deg, #15803d 0%, #4ade80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Chip used for the "Portfolio" label above the main title */
.portfolio-chip {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(-15deg, #66e8ff, #33ff77);
  color: black;
  padding: 2px 10px;
  border-radius: 9999px;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9em;
}

/* Chip used for the external link within the hero subtitle */
.chip-link {
  display: inline-flex;
  align-items: center;
  background-color: #dcfce7;
  color: #166534;
  padding: 2px 10px;
  border-radius: 9999px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
  margin-top: 4px;
  font-size: 0.9em;
}
.chip-link:hover {
  background-color: #bbf7d0;
}

/* The main call-to-action button in the hero section */
.btn-dive {
  position: relative;
  overflow: hidden;
  background-color: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 12px 32px;
  font-weight: 500;
  font-family: "Roboto", sans-serif;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 4px 14px 0 rgba(22, 163, 74, 0.39);
  display: inline-block;
  -webkit-tap-highlight-color: transparent;
}

.btn-dive:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.4);
}

/* The ripple effect for the .btn-dive button */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 600ms linear;
  background-color: rgba(255, 255, 255, 0.7);
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* --- Creative Grid Background Texture --- */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -5;
  overflow: hidden;
  opacity: 0.75;
}

/* Layer 1: subtle dot matrix with varying sizes */
.hero-grid-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image:
    /* Primary dot grid - small dots at 48px intervals */
    radial-gradient(circle, rgba(22, 163, 74, 0.4) 1.35px, transparent 1.35px),
    /* Secondary offset dot grid - slightly larger dots */
    radial-gradient(circle, rgba(22, 163, 74, 0.2) 2.25px, transparent 2.25px),
    /* Tertiary sparse larger dots for depth */
    radial-gradient(circle, rgba(22, 163, 74, 0.14) 3.25px, transparent 3.25px);
  background-size:
    48px 48px,
    48px 48px,
    96px 96px;
  background-position:
    0 0,
    24px 24px,
    48px 12px;
  transform: rotate(-8deg) scale(1.2);
  animation: gridDrift 60s linear infinite;
}

/* Layer 2: faint diagonal accent lines */
.hero-grid-bg::after {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image:
    repeating-linear-gradient(
      -8deg,
      transparent,
      transparent 38px,
      rgba(22, 163, 74, 0.08) 38px,
      rgba(22, 163, 74, 0.08) 39px
    ),
    repeating-linear-gradient(
      82deg,
      transparent,
      transparent 38px,
      rgba(22, 163, 74, 0.06) 38px,
      rgba(22, 163, 74, 0.06) 39px
    );
  transform: rotate(-8deg) scale(1.2);
}

/* Slow drift animation for organic feel */
@keyframes gridDrift {
  0% {
    transform: rotate(-8deg) scale(1.2) translate(0, 0);
  }
  25% {
    transform: rotate(-8deg) scale(1.2) translate(12px, -8px);
  }
  50% {
    transform: rotate(-8deg) scale(1.2) translate(-8px, 12px);
  }
  75% {
    transform: rotate(-8deg) scale(1.2) translate(8px, -12px);
  }
  100% {
    transform: rotate(-8deg) scale(1.2) translate(0, 0);
  }
}

/* Glowing intersection nodes - sparse decorative circles */
.hero-grid-glow {
  position: absolute;
  inset: 0;
  z-index: -4;
  overflow: hidden;
  pointer-events: none;
}

.hero-grid-glow .glow-node {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.65), transparent);
  animation: nodePulse 4s ease-in-out infinite;
}

.hero-grid-glow .glow-node:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.hero-grid-glow .glow-node:nth-child(2) { top: 25%; right: 15%; animation-delay: 1s; }
.hero-grid-glow .glow-node:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 2s; }
.hero-grid-glow .glow-node:nth-child(4) { bottom: 20%; right: 10%; animation-delay: 0.5s; }
.hero-grid-glow .glow-node:nth-child(5) { top: 50%; left: 50%; animation-delay: 1.5s; }
.hero-grid-glow .glow-node:nth-child(6) { top: 10%; left: 45%; animation-delay: 3s; }
.hero-grid-glow .glow-node:nth-child(7) { bottom: 35%; right: 35%; animation-delay: 2.5s; }
.hero-grid-glow .glow-node:nth-child(8) { top: 70%; left: 80%; animation-delay: 0.8s; }
.hero-grid-glow .glow-node:nth-child(9) { top: 5%; left: 85%; animation-delay: 1.8s; }
.hero-grid-glow .glow-node:nth-child(10) { bottom: 10%; left: 60%; animation-delay: 3.2s; }

@keyframes nodePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(2.75);
    opacity: 0.9;
  }
}

/* --- Scroll Down Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeInUp 1s ease 2s forwards;
  z-index: 10;
}

.scroll-text {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 500;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid #6b7280;
  border-radius: 14px;
  position: relative;
  display: flex;
  justify-content: center;
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background-color: #16a34a;
  border-radius: 3px;
  position: absolute;
  top: 6px;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(12px);
    opacity: 0.3;
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
  }
}
