/*
 * MDSNewSite — Tech / AI Visual Effects
 * Neon glows · Neural canvas · Glassmorphism · Scroll reveal · Animations
 */

/* ================================================================
   EXTENDED COLOR PALETTE
   ================================================================ */
:root {
  --neon-cyan:   #00D4FF;
  --neon-purple: #7B2FBE;
  --neon-blue:   #4F8EF7;
  --glow-cyan:   rgba(0, 212, 255, 0.30);
  --glow-purple: rgba(123, 47, 190, 0.30);
  --glass-bg:    rgba(17, 17, 30, 0.70);
  --glass-border:rgba(0, 212, 255, 0.12);
}

/* ================================================================
   KEYFRAME ANIMATIONS
   ================================================================ */
@keyframes gradientFlow {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

@keyframes neonPulse {
  0%, 100% { box-shadow: 0 0 6px var(--neon-cyan), 0 0 12px var(--neon-cyan), 0 0 24px rgba(0,212,255,.20); }
  50%       { box-shadow: 0 0 12px var(--neon-cyan), 0 0 30px var(--neon-cyan), 0 0 60px rgba(0,212,255,.35); }
}

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

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

@keyframes scanline {
  0%   { top: -80px; }
  100% { top: 120%; }
}

@keyframes blinkCursor {
  0%, 49% { opacity: 1; }
  50%,100% { opacity: 0; }
}

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

@keyframes revealLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes revealRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes techBadgeFloat {
  0%, 100% { transform: translateY(0px)   rotate(0deg); }
  33%       { transform: translateY(-10px) rotate(1deg); }
  66%       { transform: translateY(-5px)  rotate(-1deg); }
}

/* ================================================================
   CURSOR GLOW
   ================================================================ */
.cursor-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.045) 0%, transparent 65%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: left 0.15s ease, top 0.15s ease;
  will-change: left, top;
}

/* ================================================================
   HEADER — GLASSMORPHISM
   ================================================================ */
.header {
  background: rgba(13, 13, 26, 0.82) !important;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--glass-border) !important;
  box-shadow: 0 4px 40px rgba(0,0,0,0.45) !important;
}

/* Nav links — neon underline on hover */
.nav-link {
  position: relative;
  transition: color 0.3s ease !important;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 2px;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link:hover {
  color: var(--neon-cyan) !important;
  text-shadow: 0 0 10px rgba(0,212,255,.45);
}

/* ================================================================
   HERO — NEURAL NETWORK BACKGROUND
   ================================================================ */
.hero {
  background: linear-gradient(135deg, #080812 0%, #0F0F1E 45%, #180D2A 100%) !important;
  position: relative;
  overflow: hidden;
}

/* Cyan & purple ambient glow blobs */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 15% 50%, rgba(0,212,255,.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 85% 50%, rgba(123,47,190,.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Neural canvas */
.neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Scanline sweep */
.hero-scanline {
  position: absolute;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(0,212,255,.025), transparent);
  pointer-events: none;
  z-index: 1;
  animation: scanline 5s linear infinite;
}

/* Hero container above canvas */
.hero .container {
  position: relative;
  z-index: 2;
}

/* Animated gradient title */
.hero-title {
  background: linear-gradient(90deg, #FFFFFF 0%, #00D4FF 40%, #7B2FBE 70%, #FFFFFF 100%) !important;
  background-size: 250% auto !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  animation: gradientFlow 5s ease infinite;
  filter: drop-shadow(0 0 18px rgba(0,212,255,.25));
}

/* Hero subtitle typewriter cursor */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--neon-cyan);
  margin-left: 3px;
  vertical-align: text-bottom;
  border-radius: 1px;
  animation: blinkCursor 1s step-end infinite;
  box-shadow: 0 0 8px var(--neon-cyan);
}

/* Hero CTA button — neon */
.hero .btn-primary {
  background: linear-gradient(135deg, rgba(0,212,255,.12) 0%, rgba(123,47,190,.12) 100%) !important;
  border: 2px solid var(--neon-cyan) !important;
  color: var(--neon-cyan) !important;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  animation: neonPulse 3s ease-in-out infinite;
}
.hero .btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.hero .btn-primary:hover {
  color: #fff !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 0 30px rgba(0,212,255,.5), 0 0 60px rgba(123,47,190,.25) !important;
}
.hero .btn-primary:hover::after { opacity: 0.15; }

/* Floating tech badges around hero */
.tech-badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.tech-badge-float {
  position: absolute;
  padding: 0.35rem 0.8rem;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 2rem;
  color: rgba(0, 212, 255, 0.65);
  font-size: 0.72rem;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: 1.2px;
  white-space: nowrap;
  animation: techBadgeFloat var(--fd, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  backdrop-filter: blur(4px);
}

/* Hero logo float */
.hero-logo {
  animation: floatY 4.5s ease-in-out infinite !important;
  filter: drop-shadow(0 0 24px rgba(0,212,255,.30)) !important;
}

/* ================================================================
   PROFILE SECTION
   ================================================================ */
.profile-photo {
  position: relative;
  z-index: 0;
}

/* Spinning gradient ring */
.profile-photo::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--neon-cyan), var(--neon-purple), #4F8EF7, var(--neon-cyan));
  z-index: -1;
  animation: spinRing 5s linear infinite;
  filter: blur(2px);
}

.profile-photo img {
  position: relative;
  z-index: 1;
  border: 4px solid var(--bg-color) !important;
  box-shadow: 0 0 32px rgba(0,212,255,.18) !important;
}

/* Profile name gradient */
.profile-name {
  background: linear-gradient(90deg, #FFFFFF, var(--neon-cyan)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.profile-title {
  color: var(--neon-cyan) !important;
  text-shadow: 0 0 12px rgba(0,212,255,.3);
}

/* Profile links */
.profile-link {
  background: rgba(43,43,53,.5) !important;
  border: 1px solid rgba(0,212,255,.25) !important;
  color: var(--neon-cyan) !important;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease !important;
}
.profile-link:hover {
  background: rgba(0,212,255,.12) !important;
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 20px rgba(0,212,255,.3) !important;
  color: #fff !important;
}

/* ================================================================
   SECTION TITLES — GRADIENT + UNDERLINE
   ================================================================ */
.section-title {
  background: linear-gradient(90deg, #FFFFFF 0%, var(--neon-cyan) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  position: relative;
  padding-bottom: 1.2rem !important;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(0,212,255,.5);
}

/* ================================================================
   SERVICES — TECH GRID BACKDROP + GLASSMORPHISM CARDS
   ================================================================ */
.services {
  position: relative;
}
.services::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.service-card {
  background: rgba(43,43,53,.38) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.06) !important;
  position: relative;
  overflow: hidden;
}

/* Neon top bar that sweeps in on hover */
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
}
.service-card:hover::before { transform: scaleX(1); }

.service-card:hover {
  border-color: rgba(0,212,255,.30) !important;
  box-shadow: 0 0 35px rgba(0,212,255,.09), 0 20px 50px rgba(0,0,0,.32) !important;
  transform: translateY(-10px) !important;
}

.service-card h3 {
  color: var(--neon-cyan) !important;
}

/* ================================================================
   ABOUT SECTION — TECH GRID
   ================================================================ */
.about-section {
  position: relative;
}
.about-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(123,47,190,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,47,190,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ================================================================
   CONTACT SECTION
   ================================================================ */
.contact-form-card,
.contact-info-card {
  border: 1px solid rgba(0,212,255,.1) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.contact-form-card:focus-within {
  border-color: rgba(0,212,255,.35) !important;
  box-shadow: 0 0 32px rgba(0,212,255,.08) !important;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 0 3px rgba(0,212,255,.15) !important;
}

.btn-submit {
  background: linear-gradient(135deg, rgba(0,212,255,.10) 0%, rgba(123,47,190,.10) 100%) !important;
  border: 1.5px solid rgba(0,212,255,.40) !important;
  color: var(--neon-cyan) !important;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease !important;
}
.btn-submit:hover {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 24px rgba(0,212,255,.30), 0 0 50px rgba(123,47,190,.15) !important;
  transform: translateY(-2px) !important;
  color: #fff !important;
}

/* Contact info items */
.contact-info-item {
  border: 1px solid rgba(0,212,255,.08);
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}
.contact-info-item:hover {
  border-color: rgba(0,212,255,.30) !important;
  background: rgba(0,212,255,.04) !important;
  box-shadow: 0 0 20px rgba(0,212,255,.08) !important;
}
.contact-info-icon {
  color: var(--neon-cyan) !important;
  filter: drop-shadow(0 0 5px rgba(0,212,255,.4));
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: rgba(7, 7, 18, 0.96) !important;
  border-top: 1px solid rgba(0,212,255,.10) !important;
}

/* ================================================================
   SCROLL REVEAL CLASSES
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ================================================================
   BLOG / VIDEOS / PROJECTS — neon accents on cards
   ================================================================ */
.post-card,
.video-card,
.project-card {
  border: 1px solid rgba(255,255,255,.05) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease !important;
}
.post-card:hover,
.video-card:hover,
.project-card:hover {
  border-color: rgba(0,212,255,.25) !important;
  box-shadow: 0 0 30px rgba(0,212,255,.08) !important;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .tech-badge-float { display: none; }
  .cursor-glow { display: none; }
  .profile-photo::before { inset: -3px; }
}

/* ================================================================
   PREFERS-REDUCED-MOTION — accessibility
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .neural-canvas,
  .hero-scanline,
  .cursor-glow { display: none !important; }
}
