* {
  margin: 0;
  padding: 5px;
  box-sizing: border-box;
  border-radius: 10px;
}

:root {
  --primary-color: #007BFF;
  --primary-dark: #0056b3;
  --navy: #1a2332;
  --dark-navy: #334155; /* Changed for better contrast on toggle */
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 5px 30px rgba(0, 123, 255, 0.2);
  --transition: all 0.3s ease;
}

/* Dark Mode Variables */
body.dark-mode {
  --text-dark: #e4e4e7;
  --text-light: #a1a1aa;
  --bg-light: #0f172a; /* Darker background */
  --white: #020617;
  --navy: #e2e8f0;
  --dark-navy: #94a3b8;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 5px 30px rgba(0, 123, 255, 0.2);
}
/* Loading Screen Styles */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
}

.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #007bff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-screen p {
  font-family: 'Poppins', sans-serif;
  color: #555;
  font-size: 1.1rem;
}


body.dark-mode .navbar { background-color: rgba(2, 6, 23, 0.85); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
body.dark-mode .navbar.scrolled { background-color: rgba(2, 6, 23, 0.95); backdrop-filter: blur(10px); }
body.dark-mode .hero-section { background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e3a8a 100%); }
body.dark-mode .project-card, body.dark-mode .certificate-item, body.dark-mode .contact-item, body.dark-mode .resume-content, body.dark-mode .trait-card, body.dark-mode .highlight-item, body.dark-mode .credentials-section { background-color: #1e293b; border-color: rgba(255, 255, 255, 0.1); }
body.dark-mode .tag { background-color: rgba(59, 130, 246, 0.2); color: #93c5fd; }
body.dark-mode .btn-secondary { color: var(--white); border-color: var(--white); }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }

.section-title {
  font-size: 2.5rem; font-weight: 700; text-align: center; margin-bottom: 60px; color: var(--navy); position: relative;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
body.dark-mode .section-title { background: linear-gradient(135deg, #60a5fa, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-title::after { content: ''; display: block; width: 80px; height: 4px; background: linear-gradient(90deg, var(--primary-color), var(--primary-dark)); margin: 15px auto 0; border-radius: 2px; }

/* Navigation */
.navbar { position: fixed; top: 0; left: 0; right: 0; background-color: var(--white); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); z-index: 1000; transition: all 0.3s ease; }
.navbar.scrolled { background-color: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.nav-logo { font-size: 1.5rem; font-weight: 700; color: var(--navy); cursor: pointer; transition: var(--transition); }
.nav-actions { display: flex; align-items: center; gap: 20px; }

/* FIXED: New creative toggle button styles */
.theme-toggle { width: 44px; height: 24px; border-radius: 12px; border: none; background-color: var(--primary-color); position: relative; cursor: pointer; transition: background-color 0.3s ease; }
.theme-toggle .toggle-circle { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background-color: #fff; transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
body.dark-mode .theme-toggle { background-color: #475569; }
body.dark-mode .theme-toggle .toggle-circle { transform: translateX(20px); }

.nav-menu
 { 
  display: flex; 
  list-style: none;
  gap: 35px; 
  align-items: center; 
}
.nav-link { color: var(--text-dark); text-decoration: none; font-weight: 500; transition: color 0.3s ease; position: relative; padding: 5px 0; }
.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background-color: var(--primary-color); transition: width 0.3s ease; }
.nav-link:hover, .nav-link.active { color: var(--primary-color); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 5px; }
.hamburger span { width: 25px; height: 3px; background-color: var(--navy); border-radius: 3px; transition: all 0.3s ease; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* Hero Section */
.hero-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 50%, var(--primary-color) 100%); overflow: hidden; padding-top: 80px; }
.hero-content { text-align: center; color: var(--white); z-index: 1; position: relative; max-width: 800px; padding: 0 20px; }

/* FIXED: Gradient hover effect for name */
.hero-title {
  font-size: 4rem; 
  font-weight: 700; 
  margin-bottom: 15px; 
  letter-spacing: 2px;
  background: linear-gradient(90deg, #ffffff, #375ddb, #e54ab9, #ffeb35);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  background-size: 300% 300%;
  animation: gradient-animation 6s ease infinite;
  transition: background-position 0.5s ease;
}
.hero-title:hover { animation-play-state: paused; background-position: 100% 50%; }
@keyframes gradient-animation { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* FIXED: Dark mode color adjustments for hero text */
body.dark-mode .hero-title {
  background: linear-gradient(90deg, #22cfea, #375ddb, #e54ab9, #ffeb35);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  background-size: 300% 300%;
  animation: gradient-animation 6s ease infinite;
  transition: background-position 0.5s ease;
}
body.dark-mode .hero-subtitle, body.dark-mode .hero-tagline { color: #cbd5e1; }

.hero-subtitle { font-size: 1.8rem; font-weight: 400; margin-bottom: 20px; opacity: 0.95; }
.hero-tagline { font-size: 1.2rem; margin-bottom: 40px; opacity: 0.9; font-weight: 300; }
.hero-buttons { display: flex; justify-content: center; align-items: center; gap: 20px; }
.btn-primary { display: inline-block; padding: 15px 40px; background-color: var(--white); color: var(--primary-color); text-decoration: none; border-radius: 50px; font-weight: 600; font-size: 1.1rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); border: 2px solid transparent; cursor: pointer; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4); }
body.dark-mode .btn-primary { background-color: #3b82f6; color: #fff; }
body.dark-mode .btn-primary:hover { background-color: #2563eb; }

.btn-secondary { display: inline-block; padding: 13px 40px; background-color: transparent; color: var(--white); text-decoration: none; border-radius: 50px; font-weight: 600; font-size: 1.1rem; transition: var(--transition); border: 2px solid var(--white); cursor: pointer; }
.btn-secondary:hover { background-color: var(--white); color: var(--primary-color); transform: translateY(-3px); }

/* ... (The rest of your CSS remains unchanged) ... */
.fade-in { animation: fadeIn 1s ease-out; }
.fade-in-delay { animation: fadeIn 1s ease-out 0.3s both; }
.fade-in-delay-2 { animation: fadeIn 1s ease-out 0.6s both; }
.fade-in-delay-3 { animation: fadeIn 1s ease-out 0.9s both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

.about-section { background-color: var(--white); }
.about-content { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: center; }
.about-image { display: flex; justify-content: top; }
.profile-picture { width: 400px; height: 400px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); transition: transform 0.3s ease; border: 4px solid var(--white); }
.profile-picture:hover { transform: scale(1.05); }
.about-text p { font-size: 1.1rem; margin-bottom: 20px; color: var(--text-light); line-height: 1.8; }
.traits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 30px; font-size: 20px; }
.trait-card { background-color: var(--bg-light); padding: 25px; border-radius: 12px; text-align: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid transparent; }
.trait-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--primary-color); }
.trait-icon { font-size: 2.5rem; margin-bottom: 10px; }
.trait-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--navy); }
.trait-card p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

.projects-section { background-color: var(--bg-medium); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.project-card { background-color: var(--white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; border: 1px solid transparent; }
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--primary-color); }
.project-image { width: 100%; height: 220px; overflow: hidden; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.project-card:hover .project-image img { transform: scale(1.05); }
.project-content { padding: 25px; }
.project-content h3 { font-size: 1.3rem; margin-bottom: 12px; color: var(--navy); }
.project-content p { font-size: 0.95rem; color: var(--text-light); margin-bottom: 15px; line-height: 1.6; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 5px 12px; background-color: rgba(0, 123, 255, 0.1); color: var(--primary-color); border-radius: 20px; font-size: 0.85rem; font-weight: 500; }

.credentials-section { background-color: var(--white); }
.resume-content { background-color: var(--bg-light); padding: 50px; border-radius: 15px; box-shadow: var(--shadow); margin-bottom: 60px; }
.resume-summary h3 { font-size: 1.8rem; color: var(--navy); margin-bottom: 20px; }
.resume-summary > p { font-size: 1.1rem; color: var(--text-light); line-height: 1.8; margin-bottom: 40px; }
.resume-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-bottom: 40px; }
.highlight-item { background-color: var(--white); padding: 25px; border-radius: 10px; }
.highlight-item h4 { font-size: 1.2rem; color: var(--navy); margin-bottom: 15px; }
.highlight-item ul { list-style: none; padding: 0; }
.highlight-item li { color: var(--text-light); padding: 8px 0 8px 25px; position: relative; }
.highlight-item li::before { content: '▹'; position: absolute; left: 0; color: var(--primary-color); font-weight: bold; }
.resume-download { text-align: center; }
.resume-download .btn-primary { background-color: var(--primary-color); color: var(--white); display: inline-flex; align-items: center; gap: 10px; border: 2px solid var(--primary-color); }
.resume-download .btn-primary:hover { background-color: var(--primary-dark); }
.certificates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.certificate-category { font-size: 1.5rem; color: var(--navy); margin-bottom: 25px; padding-bottom: 10px; border-bottom: 3px solid var(--primary-color); }
.certificate-list { display: flex; flex-direction: column; gap: 20px; }
.certificate-item { display: flex; gap: 20px; padding: 20px; background-color: var(--bg-light); border-radius: 10px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid transparent; }
.certificate-item:hover { transform: translateX(5px); box-shadow: var(--shadow); border-color: var(--primary-color); }
.certificate-icon { font-size: 2rem; flex-shrink: 0; }
.certificate-info h4 { font-size: 1.1rem; color: var(--navy); margin-bottom: 5px; }
.certificate-info p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 5px; }
.certificate-info .year { display: inline-block; padding: 3px 10px; background-color: var(--primary-color); color: var(--white); border-radius: 12px; font-size: 0.85rem; font-weight: 500; }

.contact-section { background-color: var(--bg-light); }
.contact-content { text-align: center; max-width: 600px; margin: 0 auto; }
.contact-tagline { font-size: 1.3rem; color: var(--text-light); margin-bottom: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 20px; background-color: var(--white); border-radius: 10px; text-decoration: none; color: var(--text-dark); transition: all 0.3s ease; box-shadow: var(--shadow); }
.contact-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); color: var(--primary-color); }
.contact-icon { font-size: 1.5rem; }

.footer { background-color: var(--navy); color: var(--white); padding: 30px 0; text-align: center; }
.footer p { margin: 0; opacity: 0.8; }

.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background-color: var(--primary-color); color: var(--white); border: none; border-radius: 50%; font-size: 1.5rem; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 999; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background-color: var(--primary-dark); transform: translateY(-5px); }

@media (max-width: 1024px) {
  .about-content { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .profile-picture { margin-bottom: 20px; }
  .resume-highlights { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1.3rem; }
  .section-title { font-size: 2rem; }
  .nav-menu { position: fixed; left: -100%; top: 70px; flex-direction: column; background-color: var(--white); width: 100%; text-align: center; transition: left 0.3s ease; box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1); padding: 20px 0; gap: 0; }
  body.dark-mode .nav-menu { background-color: var(--bg-light); border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .nav-menu li { padding: 15px 0; width: 100%; }
  .nav-menu.active { left: 0; }
  .hamburger { display: flex; }
  .floating-blur { display: none; }
  .traits-grid { grid-template-columns: 1fr; }
  .resume-content { padding: 30px 20px; }
}
@media (max-width: 480px) {
  .section { padding: 60px 0; }
  .hero-title { font-size: 2.2rem; }
  .hero-buttons { flex-direction: column; }
  .back-to-top { bottom: 20px; right: 20px; width: 45px; height: 45px; }
}

/* Connect Section Styles */
.contact-section {
  text-align: center;
  padding: 60px 0;
  background-color: #f8f9fa;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 25px;
  color: #222;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.social-icon {
  font-size: 2rem;
  color: #333;
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.2);
}

/* Specific colors for hover */
.social-icon.linkedin:hover {
  color: #0077b5;
}

.social-icon.github:hover {
  color: #000;
}

.social-icon.email:hover {
  color: #d93025;
}
