/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: #050510;
  color: #e2e8f0;
  overflow-x: hidden;
  cursor: none;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #a855f7;
  --primary-light: #c084fc;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.12);
  --glass-shadow: rgba(0,0,0,0.4);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --bg-deep: #050510;
  --bg-dark: #0a0a1a;
  --radius: 16px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ===== GLASS MORPHISM ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ===== BACKGROUND ORBS ===== */
.bg-orbs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: orbFloat 12s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, #a855f7, transparent); top: -150px; left: -150px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, #06b6d4, transparent); top: 30%; right: -100px; animation-delay: -4s; }
.orb-3 { width: 350px; height: 350px; background: radial-gradient(circle, #f59e0b, transparent); bottom: 20%; left: 20%; animation-delay: -8s; }
.orb-4 { width: 300px; height: 300px; background: radial-gradient(circle, #ec4899, transparent); bottom: -100px; right: 20%; animation-delay: -6s; }
@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-30px) scale(1.05); }
  66% { transform: translate(-20px,20px) scale(0.95); }
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s;
  transform: translate(-50%,-50%);
}
.cursor-follower {
  width: 32px; height: 32px;
  border: 2px solid rgba(168,85,247,0.5);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.15s ease;
  transform: translate(-50%,-50%);
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0.8rem 2rem;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(5,5,16,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-size: 1.6rem; font-weight: 800; color: var(--text); letter-spacing: -1px; }
.dot { color: var(--primary); }
.nav-links { display: flex; gap: 2rem; }
.nav-link {
  font-size: 0.92rem; font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color var(--transition);
  padding-bottom: 4px;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  transform: translateX(-100%);
  transition: transform var(--transition);
}
.btn:hover::before { transform: translateX(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 24px rgba(168,85,247,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(168,85,247,0.5); }
.btn-ghost {
  background: var(--glass-bg);
  color: var(--text);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); }
.w-full { width: 100%; justify-content: center; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: space-between;
  padding: 7rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative; z-index: 1;
  gap: 4rem;
}
.hero-content { flex: 1; max-width: 600px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 50px;
  font-size: 0.82rem; font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.6s ease;
}
.badge-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  animation: fadeInUp 0.7s ease 0.1s both;
}
.typewriter {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--primary-light);
  display: block;
  min-height: 1.5em;
  font-family: 'Fira Code', monospace;
}
.hero-desc {
  font-size: 1.05rem; color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  animation: fadeInUp 0.7s ease 0.2s both;
}
.hero-cta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInUp 0.7s ease 0.3s both;
}
.hero-stats {
  display: flex; gap: 1.2rem; flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.4s both;
}
.stat-card {
  padding: 1rem 1.5rem;
  text-align: center;
  transition: transform var(--transition);
}
.stat-card:hover { transform: translateY(-4px); }
.stat-num { display: block; font-size: 1.3rem; font-weight: 800; color: var(--primary-light); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }

/* Hero Visual */
.hero-visual { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.avatar-wrapper {
  position: relative; width: 320px; height: 320px;
  display: flex; align-items: center; justify-content: center;
  animation: fadeInRight 0.8s ease 0.2s both;
}
.avatar-ring {
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--secondary), var(--accent), var(--primary));
  animation: rotateSlow 8s linear infinite;
  filter: blur(2px);
  opacity: 0.7;
}
@keyframes rotateSlow { to { transform: rotate(360deg); } }
.avatar-inner {
  width: 220px; height: 220px;
  background: linear-gradient(135deg, #1a1a2e, #0d0d1a);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  border: 2px solid var(--glass-border);
}
.avatar-icon { font-size: 5rem; color: var(--primary); }
.floating-badge {
  position: absolute; padding: 0.4rem 0.8rem;
  font-size: 0.75rem; font-weight: 600;
  border-radius: 50px; z-index: 2;
  animation: floatBadge 4s ease-in-out infinite;
}
.badge-html { top: 10%; left: 0; color: #e34f26; border-color: rgba(227,79,38,0.3); animation-delay: 0s; }
.badge-css { top: 10%; right: 0; color: #264de4; border-color: rgba(38,77,228,0.3); animation-delay: -1s; }
.badge-cpp { bottom: 15%; left: 5%; color: #00599c; border-color: rgba(0,89,156,0.3); animation-delay: -2s; }
.badge-dsa { bottom: 15%; right: 5%; color: var(--primary); border-color: rgba(168,85,247,0.3); animation-delay: -3s; }
@keyframes floatBadge {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== SECTIONS ===== */
.section { padding: 6rem 2rem; position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-tag {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 50px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 0.8rem;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.about-text { padding: 2rem; }
.about-text p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.about-text strong { color: var(--text); }
.about-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.tag {
  padding: 0.35rem 0.9rem;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 50px;
  font-size: 0.82rem;
  transition: all var(--transition);
}
.tag:hover { background: rgba(168,85,247,0.2); transform: translateY(-2px); }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.info-card {
  padding: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  transition: transform var(--transition);
}
.info-card:hover { transform: translateY(-4px); }
.card-icon { font-size: 1.5rem; color: var(--primary); flex-shrink: 0; }
.info-card h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.info-card p { font-size: 0.9rem; font-weight: 500; }

/* ===== SKILLS ===== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.skill-card {
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition);
  cursor: default;
}
.skill-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(168,85,247,0.15); }
.skill-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }
.skill-card h4 { font-size: 0.9rem; margin-bottom: 0.8rem; }
.skill-bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 4px; margin-bottom: 0.4rem; overflow: hidden; }
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.4,0,0.2,1);
}
.skill-pct { font-size: 0.75rem; color: var(--text-muted); font-family: 'Fira Code', monospace; }

/* ===== PROJECTS ===== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.project-card {
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}
.project-card:hover { transform: translateY(-8px); box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 0 40px rgba(168,85,247,0.1); }
.featured-card { border-color: rgba(168,85,247,0.4); }
.featured-label {
  position: absolute; top: 1rem; right: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 0.2rem 0.7rem;
  border-radius: 50px; font-size: 0.72rem; font-weight: 600;
}
.project-img {
  height: 120px;
  background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(6,182,212,0.1));
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--glass-border);
}
.project-icon { font-size: 3rem; color: var(--primary); }
.project-info { padding: 1.5rem; }
.project-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.ptag {
  padding: 0.2rem 0.6rem;
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: 50px;
  font-size: 0.72rem; font-weight: 500; color: var(--primary-light);
}
.project-info h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.project-info p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.2rem; }
.project-links { display: flex; gap: 0.8rem; }
.plink {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.82rem; font-weight: 500;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--glass-border);
  transition: all var(--transition);
}
.plink:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.plink-live { color: var(--primary-light); border-color: rgba(168,85,247,0.3); }
.projects-cta { text-align: center; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.contact-desc { color: var(--text-muted); line-height: 1.7; margin-bottom: 1.5rem; font-size: 1rem; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-link {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 1rem 1.25rem;
  transition: all var(--transition);
}
.contact-link:hover { transform: translateX(6px); border-color: var(--primary); }
.contact-link i { font-size: 1.4rem; color: var(--primary); flex-shrink: 0; width: 28px; text-align: center; }
.contact-link h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.contact-link p { font-size: 0.9rem; font-weight: 500; }
.contact-form { padding: 2rem; }
.form-group { margin-bottom: 1rem; }
.form-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(168,85,247,0.2); }
.form-textarea { resize: vertical; min-height: 120px; }

/* ===== FOOTER ===== */
.footer {
  padding: 2rem;
  border-top: 1px solid var(--glass-border);
  position: relative; z-index: 1;
}
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-size: 1.3rem; font-weight: 800; }
.footer-content p { font-size: 0.85rem; color: var(--text-muted); }
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a { font-size: 1.1rem; color: var(--text-muted); transition: color var(--transition); }
.footer-socials a:hover { color: var(--primary); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInRight { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero { flex-direction: column; text-align: center; padding-top: 8rem; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .avatar-wrapper { width: 250px; height: 250px; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(5,5,16,0.95); padding: 1.5rem 2rem; border-top: 1px solid var(--glass-border); gap: 1rem; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .hero-visual { display: none; }
  .about-cards { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; align-items: center; }
}
