/* ============================================
   Premium Animations — CSS + AOS
   Clean · Stripe / Linear inspired
   ============================================ */

/* ── Hero load animation (CSS only) ── */
.hero-badge { animation: fadeUp 0.7s ease both 0.1s; }
.hero-title__line:nth-child(1) { animation: fadeUp 0.8s ease both 0.2s; }
.hero-title__highlight { animation: fadeUp 0.8s ease both 0.35s; }
.hero-title__line:nth-child(3) { animation: fadeUp 0.8s ease both 0.45s; }
.hero-subtitle { animation: fadeUp 0.8s ease both 0.55s; }
.hero-typing { animation: fadeUp 0.8s ease both 0.65s; }
.hero-cta { animation: fadeUp 0.8s ease both 0.75s; }
.hero-social { animation: fadeUp 0.8s ease both 0.85s; }
.hero-showcase { animation: fadeUp 1s ease both 0.4s; }

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

/* ── Hero AI Showcase ── */
.hero-showcase {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.hero-showcase__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: blobMove 9s ease-in-out infinite;
}

.hero-showcase__blob--1 {
  width: 55%; height: 55%;
  top: 10%; left: 10%;
  background: #ed0004;
  animation-delay: 0s;
}

.hero-showcase__blob--2 {
  width: 45%; height: 45%;
  bottom: 15%; right: 5%;
  background: #ff1a1a;
  animation-delay: -3s;
}

.hero-showcase__blob--3 {
  width: 35%; height: 35%;
  top: 40%; right: 25%;
  background: rgba(237, 0, 4, 0.6);
  animation-delay: -6s;
}

@keyframes blobMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(15px, -20px) scale(1.08); }
  66% { transform: translate(-10px, 15px) scale(0.95); }
}

.hero-showcase__grid {
  position: absolute;
  inset: 8%;
  background-image:
    linear-gradient(rgba(237, 0, 4, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 0, 4, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  border-radius: var(--radius-lg);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.hero-showcase__card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78%;
  background: rgba(26, 26, 26, 0.92);
  border: 1px solid rgba(237, 0, 4, 0.25);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(237, 0, 4, 0.12);
  overflow: hidden;
  animation: cardFloat 5s ease-in-out infinite;
}

[data-theme="light"] .hero-showcase__card {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1), 0 0 40px rgba(237, 0, 4, 0.08);
}

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

.hero-showcase__card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(237, 0, 4, 0.06);
}

.hero-showcase__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

.hero-showcase__dot--r { background: #ef4444; }
.hero-showcase__dot--y { background: #eab308; }
.hero-showcase__dot--g { background: #22c55e; }

.hero-showcase__card-title {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent-tertiary);
  letter-spacing: 0.04em;
}

.hero-showcase__card-body {
  padding: 1rem 1.125rem 1.25rem;
}

.hero-showcase__metric {
  margin-bottom: 1rem;
}

.hero-showcase__metric-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.hero-showcase__metric-value {
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-showcase__bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 56px;
  margin-bottom: 1rem;
}

.hero-showcase__bars span {
  flex: 1;
  height: var(--h);
  background: var(--gradient-primary);
  border-radius: 4px 4px 0 0;
  opacity: 0.75;
  transform-origin: bottom;
  animation: barGrow 2s ease-in-out infinite alternate;
}

.hero-showcase__bars span:nth-child(1) { animation-delay: 0s; }
.hero-showcase__bars span:nth-child(2) { animation-delay: 0.2s; }
.hero-showcase__bars span:nth-child(3) { animation-delay: 0.4s; }
.hero-showcase__bars span:nth-child(4) { animation-delay: 0.1s; }
.hero-showcase__bars span:nth-child(5) { animation-delay: 0.3s; }
.hero-showcase__bars span:nth-child(6) { animation-delay: 0.5s; }

@keyframes barGrow {
  from { transform: scaleY(0.85); opacity: 0.5; }
  to { transform: scaleY(1); opacity: 1; }
}

.hero-showcase__code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-showcase__code span { color: var(--accent-primary); }
.hero-showcase__code .text-success { color: #22c55e; }

.hero-showcase__code-line {
  display: block;
  animation: blinkText 2s step-end infinite;
}

@keyframes blinkText {
  50% { opacity: 0.5; }
}

/* Orbiting tech icons */
.hero-showcase__orbit {
  position: absolute;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid rgba(237, 0, 4, 0.3);
  border-radius: 50%;
  color: var(--accent-primary);
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(237, 0, 4, 0.2);
  animation: orbitFloat 4s ease-in-out infinite;
}

[data-theme="light"] .hero-showcase__orbit {
  background: rgba(255, 255, 255, 0.95);
}

.hero-showcase__orbit--1 { top: 8%; right: 5%; animation-delay: 0s; }
.hero-showcase__orbit--2 { bottom: 12%; left: 0; animation-delay: 1s; color: #ff1a1a; }
.hero-showcase__orbit--3 { top: 35%; left: -5%; animation-delay: 2s; color: #ed0004; }
.hero-showcase__orbit--4 { bottom: 30%; right: -3%; animation-delay: 0.5s; color: #22c55e; }

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

/* ── Card hover (subtle) ── */
.glass-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.glass-card:hover {
  transform: translateY(-6px);
}

.project-card__image img {
  transition: transform 0.5s ease;
}

.project-card:hover .project-card__image img {
  transform: scale(1.04);
}

/* ── Skill bar smooth fill ── */
.skill-bar__fill {
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Button micro-interaction ── */
.btn-glow, .btn-outline-custom, .btn-ghost-custom {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-glow:active, .btn-outline-custom:active, .btn-ghost-custom:active {
  transform: scale(0.97);
}

/* ── AOS fallback — always show if JS fails ── */
html:not(.aos-init) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero-title__line, .hero-title__highlight,
  .hero-subtitle, .hero-typing, .hero-cta, .hero-social,
  .hero-showcase, .hero-showcase__blob, .hero-showcase__card,
  .hero-showcase__bars span, .hero-showcase__orbit {
    animation: none !important;
  }

  .hero-showcase__card {
    transform: translate(-50%, -50%);
  }

  .about-ai-visual__ring, .about-ai-visual__orbit, .about-ai-visual__orb,
  .about-ai-visual__scanline, .about-ai-visual__live-dot {
    animation: none !important;
  }
}

/* ══════════════════════════════════════════
   ABOUT — AI NEURAL VISUAL
   ══════════════════════════════════════════ */
.about-ai-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-ai-visual__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.about-ai-visual__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(237, 0, 4, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 0, 4, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, black 20%, transparent 75%);
  z-index: 0;
}

.about-ai-visual__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.about-ai-visual__orb--1 {
  width: 200px;
  height: 200px;
  background: rgba(237, 0, 4, 0.35);
  top: 10%;
  left: 15%;
  animation: aboutOrbFloat 8s ease-in-out infinite;
}

.about-ai-visual__orb--2 {
  width: 160px;
  height: 160px;
  background: rgba(75, 0, 1, 0.5);
  bottom: 15%;
  right: 10%;
  animation: aboutOrbFloat 10s ease-in-out infinite reverse;
}

@keyframes aboutOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -18px) scale(1.08); }
}

.about-ai-visual__core {
  position: relative;
  z-index: 3;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-ai-visual__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(237, 0, 4, 0.35);
}

.about-ai-visual__ring--1 {
  inset: -20px;
  animation: aboutRingPulse 3s ease-in-out infinite;
}

.about-ai-visual__ring--2 {
  inset: -40px;
  border-style: dashed;
  opacity: 0.5;
  animation: aboutRingSpin 18s linear infinite;
}

.about-ai-visual__ring--3 {
  inset: -62px;
  opacity: 0.25;
  animation: aboutRingSpin 24s linear infinite reverse;
}

@keyframes aboutRingPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.06); opacity: 1; }
}

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

.about-ai-visual__brain {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--accent);
  box-shadow: 0 0 30px rgba(237, 0, 4, 0.4), inset 0 0 20px rgba(237, 0, 4, 0.08);
  animation: aboutBrainGlow 2.5s ease-in-out infinite;
}

@keyframes aboutBrainGlow {
  0%, 100% { box-shadow: 0 0 24px rgba(237, 0, 4, 0.35), inset 0 0 16px rgba(237, 0, 4, 0.06); }
  50% { box-shadow: 0 0 48px rgba(237, 0, 4, 0.55), inset 0 0 24px rgba(237, 0, 4, 0.12); }
}

.about-ai-visual__orbit {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid rgba(237, 0, 4, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--accent);
  z-index: 4;
  box-shadow: 0 0 12px rgba(237, 0, 4, 0.25);
}

.about-ai-visual__orbit--1 {
  top: 18%;
  right: 22%;
  animation: aboutOrbitBob 4s ease-in-out infinite;
}

.about-ai-visual__orbit--2 {
  bottom: 28%;
  left: 14%;
  animation: aboutOrbitBob 5s ease-in-out infinite 0.8s;
}

.about-ai-visual__orbit--3 {
  top: 42%;
  right: 12%;
  animation: aboutOrbitBob 4.5s ease-in-out infinite 1.5s;
}

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

.about-ai-visual__footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.about-ai-visual__live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.about-ai-visual__live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: aboutLiveBlink 1.5s ease-in-out infinite;
}

@keyframes aboutLiveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.about-ai-visual__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.about-ai-visual__chips span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(237, 0, 4, 0.12);
  border: 1px solid rgba(237, 0, 4, 0.35);
  color: var(--accent);
}

.about-ai-visual__scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(237, 0, 4, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 6px;
  animation: aboutScanline 6s linear infinite;
  pointer-events: none;
  z-index: 2;
  opacity: 0.6;
}

@keyframes aboutScanline {
  from { background-position: 0 -100%; }
  to { background-position: 0 200%; }
}
