/* Premium Portfolio Styles */
:root {
  --void: #050507;
  --matte: #0a0a0f;
  --surface: #111118;
  --neon: #a855f7;
  --neon-glow: #c084fc;
  --electric: #3b82f6;
  --electric-glow: #60a5fa;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --radius: 1.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--matte);
  color: #f8fafc;
  overflow-x: hidden;
  line-height: 1.6;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--matte);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon), var(--electric));
  border-radius: 4px;
}

::selection {
  background: var(--neon);
  color: #fff;
}

/* Aurora background */
.aurora-bg {
  background:
    radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
  animation: aurora 18s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15) rotate(5deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.05) rotate(-3deg);
    opacity: 0.6;
  }
}

/* Canvas */
#hero-canvas {
  opacity: 0.55;
  pointer-events: none;
}

/* Cursor glow */
#cursor-glow {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s;
  opacity: 0;
}

body:hover #cursor-glow {
  opacity: 1;
}

@media (pointer: coarse) {
  #cursor-glow {
    display: none;
  }
}

/* Preloader */
#preloader {
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Glass panel */
.glass-panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-panel:hover {
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.08);
}

/* Glass badge */
.glass-badge {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

/* Navbar */
#navbar.scrolled {
  background: rgba(10, 10, 15, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--electric));
  transition: width 0.3s ease, left 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
  left: 20%;
}

.nav-link.active {
  color: #fff;
  background: rgba(168, 85, 247, 0.12);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 9999px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon), var(--electric));
  color: #fff;
  box-shadow: 0 4px 30px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(168, 85, 247, 0.45);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 rgba(168, 85, 247, 0);
}

.btn-secondary:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 4px 30px rgba(168, 85, 247, 0.15);
  transform: translateY(-2px);
}

.btn-content {
  position: relative;
  z-index: 1;
}

/* Profile card */
.profile-card {
  width: 100%;
  max-width: 360px;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.profile-card-glow {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(135deg, var(--neon), var(--electric), var(--neon));
  background-size: 300% 300%;
  animation: gradient-rotate 6s ease infinite;
  opacity: 0.6;
  filter: blur(8px);
  z-index: -1;
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.profile-card:hover .profile-card-glow {
  opacity: 0.9;
  filter: blur(14px);
}

.profile-card-inner {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.1s ease-out;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

@keyframes gradient-rotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Typewriter cursor */
.animate-blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Scroll indicator */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.animate-bounce {
  animation: scroll-bounce 2s infinite;
}

/* Skill tags */
.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  transition: all 0.3s ease;
  cursor: default;
}

.skill-tag:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.15);
}

/* Timeline */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--neon), var(--electric), var(--neon));
  transform: translateX(-50%);
  opacity: 0.3;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--matte);
  border: 2px solid var(--neon);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
  z-index: 1;
  position: relative;
}

.timeline-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(168, 85, 247, 0.3);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.experience-card {
  position: relative;
  overflow: hidden;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--neon), var(--electric));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.experience-card:hover::before {
  opacity: 1;
}

/* Form inputs */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  color: #fff;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  outline: none;
}

.form-input::placeholder {
  color: #64748b;
}

.form-input:focus {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

/* Social icons */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--neon);
  border-color: var(--neon);
  color: #fff;
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.35);
}

/* Mobile menu */
#mobile-menu {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-menu:not(.hidden) {
  display: flex;
  animation: slide-down 0.3s ease;
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Premium glossy glass cards */
.glass-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-card:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow:
    0 20px 50px rgba(168, 85, 247, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

/* Shimmer text */
.text-shimmer {
  background: linear-gradient(90deg, #fff 0%, #c084fc 25%, #60a5fa 50%, #fff 75%);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Hero premium enhancements */
.hero-title {
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  letter-spacing: 0.02em;
}

/* Floating technology icons */
.floating-icons-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: float-orbit 8s ease-in-out infinite;
  opacity: 0.85;
}

.floating-icon:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; color: var(--neon); }
.floating-icon:nth-child(2) { top: 25%; right: 10%; animation-delay: -2s; color: var(--electric); }
.floating-icon:nth-child(3) { top: 60%; left: 5%; animation-delay: -4s; color: var(--neon-glow); }
.floating-icon:nth-child(4) { bottom: 25%; right: 8%; animation-delay: -6s; color: var(--electric-glow); }
.floating-icon:nth-child(5) { top: 45%; right: 5%; animation-delay: -1s; color: #fff; }
.floating-icon:nth-child(6) { bottom: 35%; left: 12%; animation-delay: -3s; color: var(--neon); }

@keyframes float-orbit {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-12px) rotate(3deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(12px) rotate(-3deg); }
}

/* Premium stat cards */
.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 1.25rem;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(168,85,247,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168,85,247,0.3);
  box-shadow: 0 12px 40px rgba(168,85,247,0.12);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card > * {
  position: relative;
  z-index: 1;
}

/* Premium mobile menu */
#mobile-menu {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  transform-origin: top;
}

#mobile-menu:not(.hidden) {
  display: flex;
  animation: menu-slide 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes menu-slide {
  from { opacity: 0; transform: translateY(-20px) scaleY(0.95); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

.mobile-link {
  position: relative;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-link:hover {
  color: var(--neon-glow);
  padding-left: 0.75rem;
}

/* Skill tag with icon */
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #cbd5e1;
  transition: all 0.3s ease;
  cursor: default;
}

.skill-tag svg,
.skill-tag i {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.skill-tag:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.15);
}

/* Social media grid */
.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.social-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 1rem;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #cbd5e1;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              background 0.4s ease;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.06);
}

.social-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(168,85,247,0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.social-card:hover::before {
  opacity: 1;
}

.social-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(168,85,247,0.45);
  background: linear-gradient(135deg, rgba(168,85,247,0.12) 0%, rgba(255,255,255,0.04) 100%);
  box-shadow: 0 20px 50px rgba(168,85,247,0.18), inset 0 1px 0 rgba(255,255,255,0.1);
  color: #fff;
}

.social-icon-wrap {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease;
  flex-shrink: 0;
}

.social-card:hover .social-icon-wrap {
  transform: scale(1.1);
  background: rgba(168,85,247,0.15);
  border-color: rgba(168,85,247,0.35);
}

.social-icon-wrap svg {
  width: 56px !important;
  height: 56px !important;
  max-width: 56px;
  max-height: 56px;
  display: block;
  object-fit: contain;
}

.social-icon-wrap svg[width][height] {
  width: 56px !important;
  height: 56px !important;
}

.social-label {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  color: currentColor;
  overflow-wrap: break-word;
  max-width: 100%;
}

@media (max-width: 768px) {
  .social-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .social-icon-wrap {
    width: 64px;
    height: 64px;
    margin-bottom: 0.5rem;
  }

  .social-icon-wrap svg,
  .social-icon-wrap svg[width][height] {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px;
    max-height: 48px;
  }

  .social-label {
    font-size: 0.75rem;
  }
}

/* Timeline glow */
.timeline-line {
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.5));
}

.timeline-dot {
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15), 0 0 20px rgba(168, 85, 247, 0.6);
}

/* Experience card premium */
.experience-card {
  position: relative;
  overflow: hidden;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--neon), var(--electric));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.experience-card:hover::before {
  opacity: 1;
}

/* Section background accents */
.section-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
}

.section-glow.purple {
  background: var(--neon);
}

.section-glow.blue {
  background: var(--electric);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Utility gradients */
.text-gradient {
  background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Section spacing base */
section {
  position: relative;
}

/* Responsive tweaks */
@media (max-width: 1024px) {
  .profile-card {
    max-width: 320px;
  }

  .timeline-line {
    left: 0;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content .hero-name {
    font-size: 2.75rem;
  }

  #hero {
    padding-top: 6rem;
  }

  .profile-card {
    max-width: 280px;
  }

  .stat-item {
    text-align: center;
  }

  .social-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .experience-item > div:first-child {
    text-align: left;
  }

  .timeline-dot {
    margin-left: 0;
  }

  .timeline-line {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content .hero-name {
    font-size: 2.25rem;
  }

  #typewriter {
    font-size: 1.125rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  #hero-canvas {
    display: none;
  }
}
