/* ===== BASE ===== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: #0A0A0F;
  color: #e5e7eb;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111118; }
::-webkit-scrollbar-thumb { background: #7C3AED; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #6D28D9; }

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, #7C3AED, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== NAVBAR SCROLL STYLE ===== */
#navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* ===== TECH BADGES ===== */
.tech-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #a78bfa;
  font-family: 'Fira Code', monospace;
  transition: all 0.2s ease;
}
.tech-badge:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.5);
  color: #c4b5fd;
}

.tech-badge-sm {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.7rem;
  color: #9ca3af;
  font-family: 'Fira Code', monospace;
  transition: all 0.2s ease;
}
.tech-badge-sm:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.35);
  color: #a78bfa;
}

/* ===== SKILL BARS ===== */
.skill-bar {
  width: 0%;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PROJECT CARD HOVER ===== */
.project-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.15);
}

/* ===== SKILL CARD HOVER ===== */
.skill-card {
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.skill-card:hover {
  transform: translateY(-4px);
}

/* ===== SOCIAL ICON ===== */
.social-icon {
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.social-icon:hover {
  transform: translateY(-3px);
}

/* ===== CURSOR GLOW ===== */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 0.1s ease, top 0.1s ease;
  z-index: 0;
}

/* ===== TYPED CURSOR ===== */
.typed-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: #7C3AED;
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ===== SECTION HEADER ===== */
.section-header {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section-header.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ACTIVE NAV LINK ===== */
.nav-link.active { color: #7C3AED; }

/* ===== SELECTION COLOR ===== */
::selection {
  background: rgba(124, 58, 237, 0.35);
  color: #fff;
}

/* ===== MOBILE MENU ANIMATION ===== */
#mobileMenu {
  animation: slideDown 0.25s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== GLASSMORPHISM CARD ===== */
.glass-card {
  background: rgba(26, 26, 36, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== GRADIENT BORDER ===== */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #7C3AED, #06B6D4);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ===== CONTACT FORM INPUTS ===== */
input:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* ===== LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  background: #0A0A0F;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
#loader.hide {
  opacity: 0;
  pointer-events: none;
}
.loader-ring {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(124,58,237,0.2);
  border-top-color: #7C3AED;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== BACK TO TOP ===== */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: #7C3AED;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}
#backToTop.show {
  opacity: 1;
  transform: translateY(0);
}
#backToTop:hover {
  background: #6D28D9;
  transform: translateY(-3px);
}
