/* --- 1. Variables & Reset --- */
:root {
  /* DARK MODE PALETTE */
  --bg-body: #0b1120; /* Deepest Navy/Black */
  --bg-card: #1e293b; /* Slate 800 */
  --bg-glass: rgba(30, 41, 59, 0.7); /* For Navbar */
  
  /* Text Colors */
  --text-main: #f1f5f9; /* Off-white for readability */
  --text-light: #94a3b8; /* Slate 400 for secondary text */
  
  /* The Glow Gradient - Indigo to Electric Purple */
  --primary: #6366f1; 
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); 
  
  /* Spacing & Effects */
  --radius: 16px; 
  --border-light: rgba(255, 255, 255, 0.05); /* Subtle borders */
  
  /* Shadows are now Glows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 20px 40px -10px rgba(99, 102, 241, 0.25); /* Colored Glow */
  
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); 
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* --- 2. Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.5); }
  100% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.2); }
}

/* --- 3. Utilities --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  font-weight: 700;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-gradient);
  margin-top: 10px;
  border-radius: 10px;
}

/* --- 4. Navbar (Dark Glass) --- */
.navbar {
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
  padding: 1.2rem 0;
}

.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
}

.logo .dot {
  color: #6366f1;
  font-size: 2rem;
  line-height: 0;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a:hover {
  color: white;
}

.nav-links a::before {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--primary-gradient);
  transition: var(--transition);
}

.nav-links a:hover::before {
  width: 100%;
}

.btn-nav {
  background: rgba(255,255,255,0.1);
  color: white !important;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  border: 1px solid var(--border-light);
}

.btn-nav:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  transform: translateY(-2px);
}

/* --- 5. Hero Section --- */
.hero {
  padding: 10rem 0 6rem 0;
  text-align: center;
  /* Dark Radial Gradient Background */
  background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0b1120 70%);
}

.hero-content {
  animation: fadeInUp 1s ease-out;
}

.badge {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 650px;
  margin: 0 auto 3rem auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); /* Neon Glow */
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  margin-left: 1rem;
}

.btn-outline:hover {
  border-color: #6366f1;
  color: white;
  background: rgba(99, 102, 241, 0.1);
}

/* --- 6. Sections --- */
section {
  padding: 6rem 0;
}

.section-dark { background-color: var(--bg-body); }
/* Slightly lighter dark for contrast */
.section-darker { background-color: #020617; } 

/* --- 7. About Grid --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.stats-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.stat:hover {
  transform: translateY(-5px);
  border-color: #6366f1;
}

.stat i {
  font-size: 2.2rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.8rem;
}

/* --- 8. Skills (Dark Tags) --- */
.skills-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.skill-category:hover {
  border-color: #6366f1;
  transform: translateY(-5px);
}

.skill-category h3 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  color: var(--text-main);
}

.skill-category i {
  color: #818cf8;
  margin-right: 10px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.tags span {
  background-color: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.tags span:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
  color: white;
}

/* --- 9. Projects (Floating Cards) --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background-color: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out backwards; 
}

/* Delays for animation */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover); /* The Purple Glow */
  border-color: rgba(99, 102, 241, 0.4);
}

/* Gradient Line Top */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.folder-icon {
  font-size: 2.5rem;
  color: #818cf8;
  transition: var(--transition);
}

.project-card:hover .folder-icon {
  color: white;
  transform: scale(1.1);
}

.links a {
  color: var(--text-light);
  font-size: 1.3rem;
}

.links a:hover {
  color: white;
}

.project-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
  color: white;
}

.project-card p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.tech-stack {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: #818cf8; /* Light Indigo */
  font-family: 'SF Mono', 'Fira Code', monospace;
  opacity: 0.9;
}

/* --- 10. Footer --- */
footer {
  text-align: center;
  padding: 6rem 0;
  background-color: var(--bg-body);
  border-top: 1px solid var(--border-light);
}

.socials {
  margin: 2.5rem 0;
}

.socials a {
  font-size: 1.8rem;
  margin: 0 15px;
  color: var(--text-light);
  transition: var(--transition);
}

.socials a:hover {
  color: white;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.copyright {
  color: #64748b;
}

/* --- 11. Mobile --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.8rem; }
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; }
}