/* =========================================================
 HERO (default + soft variant + image)
========================================================= */

.hero,
.hero-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, var(--bs-primary), var(--bs-info), var(--bs-purple));
  background-size: 300% 300%;
  animation: heroGradient 18s ease-in-out infinite;
  color: var(--bs-body-color);
  /* The bottom border provides separation from the next section */
  border-bottom: 1px solid rgba(var(--bs-border-color-rgb), .7);
}

.hero::before,
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(var(--bs-body-bg-rgb), var(--overlay-hero-light));
  pointer-events: none;
  z-index: 0;
}

.hero::after,
.hero-section::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(35% 35% at 20% 30%, rgba(255, 255, 255, .25), transparent 60%),
    radial-gradient(30% 30% at 80% 70%, rgba(255, 255, 255, .18), transparent 65%);
  filter: blur(30px);
  opacity: .6;
  animation: idx-float 28s var(--easing) infinite alternate;
  z-index: 0;
}

.hero > *,
.hero-section > * {
  position: relative;
  z-index: 1;
}

.hero,
.hero .container,
.hero-section,
.hero-section .container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Hero text */
.hero .display-1,
.hero .display-2,
.hero h1,
.hero-section .display-1,
.hero-section .display-2,
.hero-section h1 {
  letter-spacing: .2px;
  line-height: 1.1;
  text-wrap: balance;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead,
.hero-section .lead {
  color: rgba(var(--bs-emphasis-color-rgb), .85);
  background: rgba(var(--bs-body-bg-rgb), .35);
  border: 1px solid rgba(var(--bs-border-color-rgb), .7);
  padding: .9rem 1.1rem;
  border-radius: .75rem;
  display: inline-block;
}

/* Dark theme adjustments */
html[data-bs-theme="dark"] .hero,
html[data-bs-theme="dark"] .hero-section {
  background: linear-gradient(135deg,
      rgba(var(--bs-primary-rgb), .95),
      rgba(var(--bs-info-rgb), .9),
      rgba(var(--bs-purple-rgb), .9),
      rgba(var(--bs-teal-rgb), .9));
}

html[data-bs-theme="dark"] .hero::before,
html[data-bs-theme="dark"] .hero-section::before {
  background: rgba(var(--bs-body-bg-rgb), var(--overlay-hero-dark));
}

/* Soft variant */
.hero--soft {
  background: linear-gradient(135deg,
      color-mix(in oklab, var(--bs-primary) 22%, transparent),
      color-mix(in oklab, var(--bs-info) 18%, transparent),
      color-mix(in oklab, var(--bs-teal) 16%, transparent));
  background-size: 220% 220%;
  animation: heroGradient 22s ease-in-out infinite;
}

.hero--soft::before {
  background: rgba(var(--bs-body-bg-rgb), var(--overlay-hero-soft-light));
}

html[data-bs-theme="dark"] .hero--soft {
  background: linear-gradient(135deg,
      color-mix(in oklab, var(--bs-primary) 28%, transparent),
      color-mix(in oklab, var(--bs-purple) 22%, transparent),
      color-mix(in oklab, var(--bs-teal) 20%, transparent));
}

html[data-bs-theme="dark"] .hero--soft::before {
  background: rgba(var(--bs-body-bg-rgb), var(--overlay-hero-soft-dark));
}

/* Hero image */
.hero-visual {
  position: relative;
}

.hero-visual-img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-lg);
  -webkit-mask-image: radial-gradient(120% 120% at 50% 40%, #000 68%, transparent 100%);
  mask-image: radial-gradient(120% 120% at 50% 40%, #000 68%, transparent 100%);
  transition: transform .6s var(--easing), box-shadow .4s ease;
}

.hero-visual:hover .hero-visual-img {
  transform: translateY(-3px);
  box-shadow: 0 .9rem 2.1rem rgba(0, 0, 0, .18);
}


/* =========================================================
SECTIONS (work, expertise, CTA)
========================================================= */

.section-title {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--bs-body-color);
}

.section-subtitle {
  max-width: 600px;
  margin-inline: auto;
}

/* Linked, animated section titles */
.section-title.section-title--linked {
  display: inline-block;
  position: relative;
  line-height: 1.1;
  letter-spacing: .2px;
  margin-bottom: .25rem;
}

.section-title.section-title--linked .st-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--link-color);
  transition: color .25s ease;
}

.section-title.section-title--linked .st-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  height: 3px;
  width: 100%;
  border-radius: 3px;
  background: var(--accent-gradient);
  transform: scaleX(.25);
  transform-origin: left;
  opacity: .95;
  transition: transform .5s var(--easing);
}

.section-title.section-title--linked .st-arrow {
  display: inline-block;
  translate: 0 1px;
  transition: transform .35s ease, opacity .35s ease;
  opacity: .9;
}

.section-title.section-title--linked .st-link:hover,
.section-title.section-title--linked .st-link:focus-visible {
  color: var(--link-color-hover);
}

.section-title.section-title--linked .st-link:hover::after,
.section-title.section-title--linked .st-link:focus-visible::after {
  transform: scaleX(1);
}

.section-title.section-title--linked .st-link:hover .st-arrow,
.section-title.section-title--linked .st-link:focus-visible .st-arrow {
  transform: translateX(.25rem);
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .section-title.section-title--linked {
    animation: st-pop .6s ease both;
  }
}

@keyframes st-pop {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

html[data-bs-theme="dark"] .section-title.section-title--linked .st-link {
  color: var(--bs-body-color);
}

/* Work Section */
.work-section {
  /* Increased vertical padding for more breathing room */
  padding: 80px 0;
  /* Added a theme-aware border for separation */
  border-top: 1px solid var(--bs-border-color);
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s ease;
  border: 1px solid var(--surface-border);
  background-color: var(--surface-bg);
  backdrop-filter: var(--surface-blur);
  -webkit-backdrop-filter: var(--surface-blur);
  box-shadow: var(--shadow);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.project-card .project-info {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(var(--bs-dark-rgb), .8), transparent);
  color: #fff;
  transform: translateY(20%);
  opacity: 0;
  transition: all .4s ease;
}

.project-card:hover .project-info {
  transform: translateY(0);
  opacity: 1;
}

.project-title {
  font-weight: 700;
}

/* Expertise Section */
.expertise-section {
  /* Increased vertical padding for more breathing room */
  padding: 80px 0;
  /* Added a theme-aware border for separation */
  border-top: 1px solid var(--bs-border-color);
}

.expertise-item {
  border-bottom: 1px solid var(--surface-border);
  padding: 2rem 0;
}

.expertise-item:last-child {
  border-bottom: none;
}

.expertise-item h4 {
  font-weight: 600;
  margin-bottom: .5rem;
}

/* Responsive spacing for larger screens */
@media (min-width: 768px) {
  .work-section,
  .expertise-section {
    padding: 140px 0;
  }
}

/* CTA Section */
.cta-section {
  position: relative;
  overflow: hidden;
  padding: 140px 0;
  color: #fff;
  background: var(--cta-gradient);
  background-size: 220% 220%;
  animation: ctaGradient 20s ease infinite;
}

html[data-bs-theme="dark"] .cta-section {
  background: var(--cta-gradient-dark);
  color: #fff;
}

.cta-content {
  background-color: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius-xl);
  padding: 4rem 3rem;
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  max-width: 860px;
  margin-inline: auto;
  color: inherit;
}