/* ============================================
   VoltDev Animations
   ============================================ */

/* ---- GSAP / Scroll Reveal States ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  opacity: 0;
  transform: translateX(-40px);
}

.reveal--right {
  opacity: 0;
  transform: translateX(40px);
}

.reveal--left.reveal--visible,
.reveal--right.reveal--visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.9);
}

.reveal--scale.reveal--visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.reveal--visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.reveal--visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.reveal--visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.reveal--visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.reveal--visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.reveal--visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.reveal--visible > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger.reveal--visible > *:nth-child(8) { transition-delay: 0.56s; }
.reveal-stagger.reveal--visible > *:nth-child(9) { transition-delay: 0.64s; }

.reveal-stagger.reveal--visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---- HERO ANIMATIONS ---- */

/* Hero canvas container */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-2xl)) var(--space-xl) var(--space-2xl);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(0, 163, 255, 0.08);
  border: 1px solid rgba(0, 163, 255, 0.2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-primary);
  margin-bottom: var(--space-xl);
  animation: fadeInDown 0.8s ease forwards;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-success);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero__title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero__highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 550px;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

/* Typing effect */
.hero__typing-wrapper {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-body);
  margin-bottom: var(--space-2xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: fadeInUp 0.8s ease 0.5s forwards;
  opacity: 0;
}

.hero__typing-prefix {
  color: var(--accent-primary);
}

.hero__typing-text {
  color: var(--text-heading);
  border-right: 2px solid var(--accent-primary);
  padding-right: 4px;
  animation: blink-caret 0.8s step-end infinite;
}

.hero__buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  animation: fadeIn 1s ease 1.5s forwards;
  opacity: 0;
}

.hero__scroll-text {
  font-size: 0.7rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: var(--font-mono);
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-primary), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

/* ---- COUNTER ANIMATION ---- */
.counter {
  display: inline-block;
}

/* ---- CARD TILT ---- */
.card-tilt {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ---- PARTICLE FLOAT ---- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(2deg); }
  66% { transform: translateY(5px) rotate(-1deg); }
}

/* ---- KEYFRAMES ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes blink-caret {
  0%, 100% { border-color: var(--accent-primary); }
  50% { border-color: transparent; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.1% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 163, 255, 0.2); }
  50% { box-shadow: 0 0 40px rgba(0, 163, 255, 0.4); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- SERVICE PAGE SPECIFICS ---- */
.service-hero {
  padding: calc(var(--nav-height) + var(--space-4xl)) 0 var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.service-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 500px;
  background: radial-gradient(ellipse at 50% 0%, var(--service-glow, rgba(0,163,255,0.1)) 0%, transparent 70%);
  pointer-events: none;
}

.service-hero__icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
}

.service-hero__title {
  margin-bottom: var(--space-md);
}

.service-hero__text {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
}

/* Feature grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-slow);
}

.feature-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.feature-card__icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.feature-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-card__text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Tech tags */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tech-tag {
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.tech-tag:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ---- MT5 TERMINAL MOCKUP ---- */
.mt5-terminal {
  width: 100%;
  max-width: 900px;
  background: #000;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-card);
  margin: var(--space-xl) auto;
}

.mt5-header {
  background: #111;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mt5-header__controls {
  display: flex;
  gap: 6px;
}
.mt5-header__dot { width: 10px; height: 10px; border-radius: 50%; }
.mt5-header__dot--red { background: #ff5f56; }
.mt5-header__dot--yellow { background: #ffbd2e; }
.mt5-header__dot--green { background: #27c93f; }

.mt5-body {
  display: grid;
  grid-template-columns: 250px 1fr;
  height: 400px;
}

.mt5-sidebar {
  border-right: 1px solid var(--border-subtle);
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
}

.mt5-quotes {
  flex: 1;
  overflow: hidden;
  padding: 8px 0;
}
.mt5-quote-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: #ccc;
  transition: background 0.2s;
  cursor: pointer;
}
.mt5-quote-row:hover { background: rgba(255,255,255,0.05); }
.mt5-quote-row--up .mt5-bid { color: var(--accent-primary); }
.mt5-quote-row--down .mt5-bid { color: #ff3b30; }

.mt5-chart-area {
  position: relative;
  background: #050505;
  padding: 20px;
  overflow: hidden;
}

.mt5-candle {
  position: absolute;
  width: 6px;
  bottom: 0; /* JS will adjust height and bottom */
}
.mt5-candle--up { background: var(--accent-primary); }
.mt5-candle--down { background: #ff3b30; }
.mt5-wick {
  position: absolute;
  width: 1px;
  background: inherit;
  left: 2.5px;
  z-index: -1;
}

.mt5-footer {
  background: #111;
  padding: 8px 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-body);
}
.mt5-pl {
  font-weight: bold;
}
.mt5-pl--positive { color: var(--accent-primary); }
.mt5-pl--negative { color: #ff3b30; }

/* ---- DASHBOARD MOCKUP ---- */
.dashboard-demo {
  width: 100%;
  max-width: 900px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin: var(--space-xl) auto;
  font-family: var(--font-body);
}

.dash-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dash-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-heading);
}

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px;
}
.dash-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}
.dash-metric-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.dash-metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-heading);
  font-family: var(--font-mono);
}
.dash-metric-change {
  font-size: 0.75rem;
  color: var(--accent-success);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.dash-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  padding: 0 24px 24px;
}

.dash-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}
.dash-chart-card h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.dash-line-chart {
  height: 180px;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding-top: 20px;
}

.dash-bar {
  flex: 1;
  background: var(--gradient-primary);
  border-radius: 2px 2px 0 0;
  min-height: 10px;
  transition: height 0.5s ease;
}

.dash-donut-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 10px auto;
}
.dash-donut {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent-primary) 0% 60%, 
    var(--accent-secondary) 60% 85%, 
    var(--bg-tertiary) 85% 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.5s ease;
}
.dash-donut-hole {
  width: 75%;
  height: 75%;
  background: var(--bg-card);
  border-radius: 50%;
  position: absolute;
  top: 12.5%;
  left: 12.5%;
}
/* ============================================
   ML Charts & 3D Globe Animations
   ============================================ */

/* --- ML Charts --- */
.ml-viz {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  width: 100%;
  padding: var(--space-md) 0;
}

.ml-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.ml-card__title {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Loss Curve */
.ml-curve-container {
  flex: 1;
  position: relative;
  min-height: 150px;
  display: flex;
  align-items: flex-end;
  border-left: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding-left: 10px;
  overflow: hidden;
}

.ml-curve__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ml-curve__path {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(0, 163, 255, 0.4));
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawCurve 3s cubic-bezier(0.4, 0, 0.2, 1) forwards infinite;
}

@keyframes drawCurve {
  0% { stroke-dashoffset: 1000; }
  70% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

/* Confusion Matrix */
.ml-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  flex: 1;
  min-height: 150px;
}

.ml-matrix__cell {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ml-matrix__cell::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: var(--accent-secondary);
  opacity: 0.2;
  transition: height 1s ease;
  z-index: 0;
}

.ml-matrix__cell.ml-matrix__cell--filled {
  color: var(--text-heading);
}

.ml-matrix__cell.ml-matrix__cell--filled::before {
  height: var(--fill-level, 100%);
}

.ml-matrix__cell.ml-matrix__cell--high::before {
  background: var(--accent-primary);
  opacity: 0.5;
}

.ml-matrix__cell span {
  position: relative;
  z-index: 1;
}

/* Metrics Bars */
.ml-metrics {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  min-height: 150px;
  gap: var(--space-sm);
}

.ml-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ml-metric__label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ml-metric__bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.ml-metric__bar-fill {
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Neural Network */
.ml-network {
  flex: 1;
  min-height: 150px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ml-network__layer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.ml-network__node {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 10px rgba(0, 163, 255, 0.2);
  animation: nodePulse 2s infinite alternate;
}

.ml-network__layer:nth-child(2) .ml-network__node {
  border-color: var(--accent-secondary);
  animation-delay: 0.3s;
}

.ml-network__layer:nth-child(3) .ml-network__node {
  border-color: var(--accent-cta);
  animation-delay: 0.6s;
}

@keyframes nodePulse {
  0% { transform: scale(1); box-shadow: 0 0 5px currentColor; }
  100% { transform: scale(1.2); box-shadow: 0 0 15px currentColor; }
}

.ml-network__connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.ml-network__connection {
  stroke: var(--border-accent);
  stroke-width: 1;
  opacity: 0.3;
  stroke-dasharray: 4;
  animation: dashFlow 20s linear infinite;
}

@keyframes dashFlow {
  to { stroke-dashoffset: -100; }
}

/* --- 3D Globe --- */
.globe-section {
  position: relative;
  width: 100%;
  height: 600px;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  cursor: grab;
}

.globe-section:active {
  cursor: grabbing;
}

.globe-label {
  position: absolute;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-heading);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 20px var(--accent-primary);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.1s linear;
  z-index: 10;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

/* ============================================
   Workflow Pipeline
   ============================================ */
.workflow {
  width: 100%;
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}

.workflow__track {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.workflow__line-bg, .workflow__line-progress {
  position: absolute;
  top: 40px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border-medium);
  z-index: 1;
}
.workflow__line-progress {
  background: var(--accent-primary);
  width: 0%;
  z-index: 2;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(0, 163, 255, 0.4);
}

.workflow__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 3;
  opacity: 0.3;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateY(20px);
}

.workflow__step.is-active {
  opacity: 1;
  transform: translateY(0);
}

.workflow__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  transition: all 0.5s ease;
}

.workflow__step.is-active .workflow__icon {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--bg-tertiary);
  box-shadow: 0 0 20px rgba(0, 163, 255, 0.4);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(0, 163, 255, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(0, 163, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 163, 255, 0); }
}

.workflow__title {
  color: var(--text-heading);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
}

.workflow__desc {
  color: var(--text-body);
  font-size: 0.9rem;
  max-width: 200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .workflow__track {
    flex-direction: column;
    gap: var(--space-xl);
    padding-left: 20px;
  }
  .workflow__line-bg, .workflow__line-progress {
    top: 0;
    bottom: 0;
    left: 49px; 
    width: 2px;
    height: 100%;
    right: auto;
  }
  .workflow__line-progress {
    height: 0%;
    width: 2px;
    transition: height 0.5s ease;
  }
  .workflow__step {
    flex-direction: row;
    text-align: left;
    transform: translateX(-20px);
  }
  .workflow__step.is-active {
    transform: translateX(0);
  }
  .workflow__icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 0;
    margin-right: var(--space-md);
    flex-shrink: 0;
  }
  .workflow__line-bg, .workflow__line-progress {
    left: 49px; 
  }
  .workflow__desc {
    max-width: none;
    margin: 0;
  }
  .workflow__title {
    margin-top: 5px;
  }
}

/* ============================================
   Before/After Slider
   ============================================ */
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: var(--space-xl) auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-medium);
  background: var(--bg-secondary);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  user-select: none;
  min-height: 400px;
}
.ba-slider.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ba-slider__layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ba-slider__layer--after {
  z-index: 2;
  clip-path: inset(0 50% 0 0); 
}

.ba-mockup {
  width: 100%;
  height: 100%;
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
}

.ba-mockup--before {
  background: #0f1219;
  color: #444;
}
.ba-mockup--before .mockup-avatar {
  width: 64px; height: 64px; background: #222; border-radius: 8px;
}
.ba-mockup--before .mockup-line {
  height: 16px; background: #222; border-radius: 4px; margin-bottom: 12px;
}

.ba-mockup--after {
  background: var(--bg-tertiary);
  background-image: var(--gradient-card);
}
.ba-mockup--after .mockup-avatar {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-glow);
}
.ba-mockup--after .mockup-line {
  height: 16px; border-radius: 4px; margin-bottom: 12px;
  background: var(--border-accent);
}
.ba-mockup--after .mockup-line:nth-child(1) { background: var(--accent-primary); }
.ba-mockup--after .mockup-line:nth-child(2) { background: var(--accent-secondary); width: 80%; }
.ba-mockup--after .mockup-line:nth-child(3) { background: rgba(0, 163, 255, 0.2); width: 60%; }

.mockup-header { display: flex; gap: var(--space-md); margin-bottom: var(--space-xl); align-items: center; }
.mockup-body { flex: 1; }
.mockup-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); margin-top: var(--space-xl); }
.mockup-card { height: 100px; border-radius: var(--radius-md); }
.ba-mockup--before .mockup-card { background: #1a1d24; }
.ba-mockup--after .mockup-card { 
  background: rgba(0, 163, 255, 0.05); 
  border: 1px solid var(--border-accent);
  position: relative;
  overflow: hidden;
}
.ba-mockup--after .mockup-card::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shine 3s infinite;
}

@keyframes shine { 100% { left: 200%; } }

.ba-slider__handle-wrap {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--accent-primary);
  z-index: 3;
  transform: translateX(-50%);
  cursor: ew-resize;
}
.ba-slider__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: var(--accent-primary);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 163, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.ba-slider__handle-wrap:hover .ba-slider__handle {
  transform: translate(-50%, -50%) scale(1.1);
}
.ba-slider__handle::before, .ba-slider__handle::after {
  content: ''; width: 0; height: 0; border-style: solid;
}
.ba-slider__handle::before {
  border-width: 6px 8px 6px 0; border-color: transparent white transparent transparent; margin-right: 6px;
}
.ba-slider__handle::after {
  border-width: 6px 0 6px 8px; border-color: transparent transparent transparent white; margin-left: 6px;
}

.ba-slider__label {
  position: absolute; top: var(--space-md); padding: 4px 12px;
  background: rgba(0,0,0,0.7); color: white; border-radius: var(--radius-full);
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.05em; z-index: 4;
}
.ba-slider__label--before { left: var(--space-md); }
.ba-slider__label--after { right: var(--space-md); }

@media (max-width: 768px) {
  .mockup-cards { grid-template-columns: 1fr; }
  .ba-mockup { padding: var(--space-md); }
  .ba-slider { min-height: 500px; }
}

/* ---- Page Transitions ---- */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary, #0a0f1e);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ---- Portfolio Carousel ---- */
.portfolio-carousel {
    position: relative;
    overflow: hidden;
    padding: var(--space-lg) 0;
}

.portfolio-carousel__track {
    display: flex;
    gap: var(--space-lg);
    animation: portfolioScroll 30s linear infinite;
    width: max-content;
}

.portfolio-carousel__track:hover {
    animation-play-state: paused;
}

.portfolio-carousel__item {
    flex-shrink: 0;
    width: 300px;
    background: var(--bg-card, rgba(255,255,255,0.03));
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
    border-radius: 12px;
    padding: var(--space-lg);
    transition: border-color 0.3s, transform 0.3s;
}

.portfolio-carousel__item:hover {
    border-color: var(--accent-primary, #00a3ff);
    transform: translateY(-4px);
}

.portfolio-carousel__icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.portfolio-carousel__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary, #ffffff);
}

.portfolio-carousel__desc {
    font-size: 0.85rem;
    color: var(--text-muted, rgba(255,255,255,0.5));
    line-height: 1.5;
}

@keyframes portfolioScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
