/* ==========================================================================
   PORTFOLIO DESIGN SYSTEM — BRIGHT, CLASSIC & PEAK MICRO-ANIMATIONS
   Candidate: Medisetti Jitendra Durga Prasad
   ========================================================================== */

:root {
  --brand-blue: #2563EB;
  --brand-indigo: #4F46E5;
  --border-subtle: #E2E8F0;
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: #FFFFFF;
  overflow-x: hidden;
}

/* --- Ambient Light Mesh Blobs (Subtle Bright Pastel Glows) --- */
.ambient-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.45;
  will-change: transform;
}

.blob-1 {
  top: -12%;
  left: -8%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(219, 234, 254, 0.9) 0%, rgba(239, 246, 255, 0) 70%);
  animation: blobDrift 18s ease-in-out infinite alternate;
}

.blob-2 {
  top: 28%;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(224, 231, 255, 0.85) 0%, rgba(238, 242, 255, 0) 70%);
  animation: blobDrift 22s ease-in-out infinite alternate-reverse;
}

.blob-3 {
  bottom: -10%;
  left: 25%;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(224, 242, 254, 0.8) 0%, rgba(240, 249, 255, 0) 70%);
  animation: blobDrift 20s ease-in-out infinite alternate;
}

@keyframes blobDrift {
  0% { transform: translate(0px, 0px) scale(1); }
  50% { transform: translate(35px, -25px) scale(1.06); }
  100% { transform: translate(-25px, 20px) scale(0.96); }
}

/* --- Animated Gradient Text --- */
.animated-gradient-text {
  background: linear-gradient(120deg, #1D4ED8 0%, #4F46E5 35%, #0284C7 65%, #2563EB 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientFlow 6s ease infinite;
}

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

/* --- Hero Staggered Entrance --- */
.hero-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.hero-stagger > *:nth-child(2) { animation-delay: 0.15s; }
.hero-stagger > *:nth-child(3) { animation-delay: 0.25s; }
.hero-stagger > *:nth-child(4) { animation-delay: 0.35s; }
.hero-stagger > *:nth-child(5) { animation-delay: 0.45s; }

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* --- Spotlight Radial Cursor Glow on Cards --- */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(37, 99, 235, 0.07),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 2;
}

/* --- Shine Sweep CTA Button --- */
.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.65s ease;
}

.btn-shine:hover::after {
  left: 140%;
}

/* --- Nav Link Underline --- */
.nav-link {
  position: relative;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #2563EB, #4F46E5);
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* --- Skill Pills --- */
.skill-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: #475569;
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.skill-pill:hover {
  background-color: #EFF6FF;
  border-color: #BFDBFE;
  color: #2563EB;
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

/* --- Filter Tabs --- */
.filter-btn,
.cert-filter-btn {
  background-color: transparent;
  border: 1px solid transparent;
  color: #64748B;
  cursor: pointer;
}

.filter-btn.active,
.cert-filter-btn.active {
  background-color: #FFFFFF;
  color: #2563EB;
  border-color: #E2E8F0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* --- Project & Cert Cards Hover Lift --- */
.project-card,
.cert-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover,
.cert-card:hover {
  transform: translateY(-5px);
}

/* --- Hero 3D Tilt Card --- */
.hero-photo-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* --- Form Controls --- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  background-color: #F8FAFC;
  color: #0F172A;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  background-color: #FFFFFF;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* --- Lightbox Scale Up --- */
@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.animate-scale-up {
  animation: scaleUp 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
